You are currently offline, waiting for your internet to reconnect

FIX: A blocking issue occurs when you run the Merge Agent in SQL Server 2005

Extended support for SQL Server 2005 ends on April 12, 2016

If you are still running SQL Server 2005 after April 12, 2016, you will no longer receive security updates and technical support. We recommend upgrading to SQL Server 2014 and Azure SQL Database to achieve breakthrough performance, maintain security and compliance, and optimize your data platform infrastructure. Learn more about the options for upgrading from SQL Server 2005 to a supported version here.

SYMPTOMS
In Microsoft SQL Server 2005, you configure a merge publication. When you run the Merge Agent, a blocking issue occurs. When you monitor the blocking issue, you find the following behaviors:
  • In the output of the blocking script that you created to monitor this issue, some threads that are running replication stored procedures are blocked. For example, you may notice that the blocked threads are running the following replication stored procedures:
    • The sp_MSinsertgenhistory stored procedure
    • The sp_MSgetmakegenerationappl stored procedure
    • The sp_MSenumgenerations stored procedure
    Note You can also find the threads that are blocked by using the Activity Monitor in SQL Server Management Studio.

    For more information about how to monitor an issue by creating a blocking script, click the following article number to view the article in the Microsoft Knowledge Base:
    271509 How to monitor blocking in SQL Server 2005 and in SQL Server 2000
  • In a SQL Server trace, a transaction that is opened through the sp_mergemetadataretentioncleanup stored procedure may still be running even though the stored procedure that calls the sp_mergemetadataretentioncleanup stored procedure has completed. Additionally, you may find an Attention event in the transaction. The stored procedure that calls the sp_mergemetadataretentioncleanup stored procedure may be one of the following stored procedures:
    • The sp_MSinsertgenhistory stored procedure
    • The sp_MSgetmakegenerationappl stored procedure
    • The sp_MSenumgenerations stored procedure.
    For example, you may find records that resemble the following in the SQL Server trace:
    EventClassTextDataObjectNameDBIDTransactionIDHostNameClientProcessIDApplicationNameSPID
    RPC:Completedexec sp_MSenumgenerations 1051201,'9B9CC268-A43A-4736-9481-0B99227C3BF0',1sp_Msenumgenerations5525491216HostName1896ApplicationName69
    EventClassTextDataObjectNameDBIDTransactionIDHostNameClientProcessIDApplicationNameSPID
    SP:StmtCompletedbegin transactionsp_mergemetadataretentioncleanup5525491216HostName1896ApplicationName69
    SP:StmtStarting select NULL from dbo.MSmerge_contents with(TABLOCK ,HOLDLOCK) where 1=2sp_mergemetadataretentioncleanup5525491216HostName1896ApplicationName69
    EventClassTextDataObjectNameDBIDTransactionIDHostNameClientProcessIDApplicationNameSPID
    Attention5525491216HostName1896ApplicationName69
CAUSE
This issue occurs because the merge metadata cleanup process does not set the XACT_ABORT option to ON for the transaction. When the sp_mergemetadataretentioncleanup stored procedure is running, if an unexpected exception such as a network issue occurs, the transaction is not rolled back. When the transaction is not rolled back, the lock resources that are held by the transaction is not released.
RESOLUTION

Service pack information

To resolve this problem, obtain the latest service pack for SQL Server 2005. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
913089 How to obtain the latest service pack for SQL Server 2005
STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section. This problem was first corrected in SQL Server 2005 Service Pack 3.
MORE INFORMATION
For more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:
824684 Description of the standard terminology that is used to describe Microsoft software updates
Properties

Article ID: 959023 - Last Review: 12/16/2008 01:06:07 - Revision: 1.0

Microsoft SQL Server 2005 Standard Edition, Microsoft SQL Server 2005 Developer Edition, Microsoft SQL Server 2005 Enterprise Edition, Microsoft SQL Server 2005 Standard X64 Edition, Microsoft SQL Server 2005 Standard Edition for Itanium-based Systems, Microsoft SQL Server 2005 Enterprise X64 Edition, Microsoft SQL Server 2005 Enterprise Edition for Itanium-based Systems, Microsoft SQL Server 2005 Workgroup Edition

  • kbsql2005repl kbexpertiseadvanced kbtshoot kbfix kbbug KB959023
Feedback
amp;t=">mp;t=">