Microsoft KB Archive/934109

= FIX: The Distribution Agent generates an access violation when you configure a transactional replication publication to run an additional script after the snapshot is applied at the subscriber in SQL Server 2005 =

Article ID: 934109

Article Last Modified on 11/20/2007

-

APPLIES TO


 * Microsoft SQL Server 2005 Developer Edition
 * Microsoft SQL Server 2005 Enterprise Edition
 * Microsoft SQL Server 2005 Standard 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

-



Bug #: 50000949 (SQL Hotfix)



Notice
Microsoft distributes Microsoft SQL Server 2005 fixes as one downloadable file. Because the fixes are cumulative, each new release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2005 fix release.



This article describes the following about this hotfix release:
 * The issues that are fixed by this hotfix package
 * The prerequisites for installing the hotfix package
 * Information about whether you must restart the computer after you install the hotfix package
 * Information about whether the hotfix package is replaced by any other hotfix package
 * Information about whether you must make any registry changes
 * The files that are contained in the hotfix package



SYMPTOMS
Consider the following scenario. You configure a transactional replication publication to run an additional script after the snapshot is applied at the subscriber in SQL Server 2005. The Distribution Agent is configured to run with multiple subscription streams. For example, the SubscriptionStreams parameter is set to a value that is more than 1. In this scenario, the Distribution Agent may stop unexpectedly when it runs the additional script at the same time that one of the following operations occurs:
 * An initial synchronization operation
 * A reinitialization operation

When this behavior occurs, the Distribution Agent generates an access violation error message and a dump file. The path of the dump file resembles the following example path:

C:\Program Files\Microsoft SQL Server\90\Shared\ErrorDumps\ReplAgent20061026232554_0.mdmp

Note In this example, the number 20061026232554 is the timestamp of the time and the date when the failure occurred.



Cumulative update information
To resolve this problem, obtain the cumulative update package (build 3161) for SQL Server 2005 Service Pack 2. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

935356 Cumulative update package (build 3161) for SQL Server 2005 Service Pack 2 is available

Hotfix information
A supported hotfix is now available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next service pack that contains this hotfix.

To resolve this problem, submit a request to Microsoft Online Customer Services to obtain the hotfix. To submit an online request to obtain the hotfix, visit the following Microsoft Web site:

http://go.microsoft.com/?linkid=6294451

Note If additional issues occur or any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. To create a separate service request, visit the following Microsoft Web site:

http://support.microsoft.com/contactus/?ws=support

Prerequisites
You must have SQL Server 2005 Service Pack 2 (SP2) installed to apply this hotfix.

For more information about how to obtain SQL Server 2005 Service Pack 2, 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

Restart information
You do not have to restart the computer after you apply this hotfix.

Registry information
You do not have to change the registry.

Hotfix file information
This hotfix contains only those files that are required to correct the issues that this article lists. This hotfix may not contain of all the files that you must have to fully update a product to the latest build.

The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.

SQL Server 2005, x64-based version


WORKAROUND
To work around this problem, temporarily remove the SubscriptionStreams parameter from the Distribution Agent. When the initial synchronization operation is complete or the reinitialization operation is complete, re-add the SubscriptionStreams parameter.

For more information about the SubscriptionStreams parameter, visit the following Microsoft Developer Network (MSDN) Web site:

http://msdn2.microsoft.com/en-us/library/ms170983.aspx



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section.



Call stack information
If you enable public symbols in the debugger and then you open the ReplAgent _0.mdmp minidump file, the part of the call stack that contains the kL command resembles the following: 0:012> kL *** Stack trace for last set context - .thread/.cxr resets it Child-SP          RetAddr           Call Site 00000000`0369d8a0 00000000`77ee4c8d ntdll!_woutput+0x5e2 00000000`0369dd70 00000000`77ee5289 ntdll!_snwprintf+0x3d 00000000`0369ddd0 00000000`77d67be3 ntdll!RtlFormatMessageEx+0x4fa 00000000`0369e540 00000000`77d67c87 kernel32!BaseDllFormatMessage+0x2e8 00000000`0369e640 00000000`4c1daeb7 kernel32!FormatMessageW+0x37 00000000`0369e690 00000000`4c1db10c rdistcom!CMessage::LoadMessageVarg+0xd7 00000000`0369ef10 00000000`4c201b7b rdistcom!CMessage::LoadMessage+0x1c 00000000`0369ef40 00000000`4c1e6d45 rdistcom!CCoreSubscriber::ExecPrePostScriptViaSQLCMD+0x33b 00000000`0369f820 00000000`4c1ef51f rdistcom!CSubscriber::ProcessDeferredExecutionForCSS+0xe5 00000000`0369f850 00000000`4c1f394f rdistcom!CSubscriber::CommitReplTrans+0x2f 00000000`0369f900 00000000`4c1f8ec4 rdistcom!CSubscriber::DistCmds+0x136f 00000000`0369fed0 00000000`781337a7 rdistcom!DistCmdBucketThread+0x114 00000000`0369ff20 00000000`78133864 msvcr80!_callthreadstartex+0x17 00000000`0369ff50 00000000`77d6b69a msvcr80!_threadstartex+0x84 00000000`0369ff80 00000000`00000000 kernel32!BaseThreadStart+0x3a Note Public symbols are not included with SQL Server 2005. However, the symbols are available on the public symbol server. In Microsoft SQL Server 2000 and in SQL Server 2005, you can use public symbols and the Microsoft debugging utilities to examine the call stack. When you do this, you can determine the possible error condition. You do not have to investigate this problem on the server itself.

For more information about how to install the debugging tools, visit the following Microsoft Web site:

http://www.microsoft.com/whdc/devtools/debugging/default.mspx

For more information about how to use the public symbol server, visit the following Microsoft Web site:

http://www.microsoft.com/whdc/devtools/debugging/debugstart.mspx

For more information about a feature that is affected by this problem, visit the following Microsoft Developer Network (MSDN) Web site:

http://msdn2.microsoft.com/en-us/library/ms152525.aspx

For more information about the naming schema for Microsoft SQL Server updates, click the following article number to view the article in the Microsoft Knowledge Base:

822499 New naming schema for Microsoft SQL Server software update packages

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

This hotfix is also included in the cumulative update package (build 3161) for SQL Server 2005 Service Pack 2. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

935356 Cumulative update package (build 3161) for SQL Server 2005 Service Pack 2 is available

Keywords: kbfix kbqfe kbpubtypekc kbexpertiseadvanced kbhotfixserver kbsql2005repl KB934109

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.