Dangling Instances

As per this article dangling instances can be a problem when using BAM continuations to make discrete updates to a BAM record over receive location, orchestration, and send ports.

To get around this I use the “RemoveDanglingInstances” stored proc mentioned in the above article and then set it up as scheduled job.  The TSQL for the job step looking something like the below which purges all dangling active BAM records for the MessageEvent activity older than 24hrs.

DECLARE @RC int
DECLARE @ActivityName nvarchar(128)
DECLARE @ActivityId nvarchar(128)
DECLARE @DateThreshold datetime
DECLARE @NewTableExtension nvarchar(30)

SET @ActivityName = 'MessageEvent'
SET @DateThreshold = DATEADD(HOUR, -24, GETDATE())
SET @NewTableExtension = 'Dangling'

select @DateThreshold

EXECUTE @RC = [BAMPrimaryImport].[dbo].[RemoveDanglingInstances]
@ActivityName
,@ActivityId
,@DateThreshold
,@NewTableExtension
GO
Advertisements
This entry was posted in BizTalk Server. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s