FIX: New Trace Flag to Enhance Stored Procedure Replication
This article was previously published under Q284228
This article has been archived. It is offered "as is" and will no longer be updated.
Replication of stored procedure execution is a feature introduced in Microsoft SQL Server version 7.0, which allows the execution of stored procedures to be replicated rather than the individual data changes. This feature is designed to include automatic owner qualification for stored procedures with the publisher side owner name and allows different users on the publisher to run stored procedures with the same name and still be replicated to the subscriber. This feature is not supported for heterogeneous subscribers, because some heterogeneous subscribers do not support owner qualification at the server level or ODBC driver level. A new trace flag, 8206, has been introduced in SQL Server 2000 that supports stored procedure execution with a user specified owner name for SQL Server subscribers or without owner qualification for heterogeneous subscribers.
To resolve this problem, obtain the latest service pack for SQL Server 2000. For additional information, click the following article number to view the article in theMicrosoft Knowledge Base:
290211 INF: How to Obtain the Latest SQL Server 2000 Service Pack
HotfixNOTE: The following hotfix was created prior to Microsoft SQL Server 2000 Service Pack 1.
The replication of stored procedure execution feature is implemented much like transactional replication with table articles. The stored procedure execution is replicated by regenerating the stored procedure name from the log records and is qualified with the publisher side owner name. With the 8206 trace flag enabled, the stored procedure name that is regenerated, is qualified with the user-specified, subscriber side owner name for SQL Server subscribers and is not owner qualified for heterogeneous subscribers. The logreader then inserts the commands into the distribution database for the distribution agent to apply at the subscriber.
This feature is introduced in a hotfix build, to make the feature available immediately. You need to apply this hotfix and then turn on trace flag 8206 for replicating stored procedures with user specified owner qualification or to heterogeneous subscribers.
The English version of this fix should have the following file attributes or later:
File name Platform ----------------------- s80237i.exe X86NOTE: Due to file dependencies, the most recent hotfix or feature that contains the preceding files may also contain additional files.
Microsoft has confirmed that this is a problem in SQL Server 2000. This problem was first corrected in SQL Server 2000 Service Pack 1.
You need to enable the trace flag on the publishing server by performing either of the following:
- Run the following code from the SQL Server Query Analyzer:NOTE: You need to repeat this step every time SQL Server is stopped and restarted.
DBCC TRACEON (8206)
- If you want to have the 8206 trace flag turned ON permanently then:
- Stop the MSSQLServer service.
- Add -T8206 to the startup parameters. To do this, from Enterprise Manager:
- Right-click the servername, and then click Properties.
- In the Properties dialog box, click the General tab, and then click startup parameters.
- Add the traceflag.
- Start the MSSQLServer service.
From this point forward, the logreader generates commands for execution of stored procedures without owner qualification, for heterogeneous subscribers. For SQL Server subscribers, the logreader generates the stored procedure call with the subscriber side owner name specified in the article and if the owner name is not specified, without owner qualification.
hetero sub proc exec dbo non-dbo
Article ID: 284228 - Last Review: 01/16/2015 21:23:04 - Revision: 3.1
Microsoft SQL Server 2000 Standard Edition
- kbnosurvey kbarchive kbbug kbfix kbsqlserv2000sp1fix KB284228