sp_replsetoriginator (T-SQL)

Used to invoke loopback detection and handling in transactional replication.

Syntax

sp_replsetoriginator [@server_name =] 'server_name'
    [@database_name =] 'database_name'

Arguments
[@server_name =] 'server_name'
Is the name of the server where the transaction is being applied. originating_server is sysname, with no default.
[@database_name =] 'database_name'
Is the name of the database where the transaction is being applied. originating_db is sysname, with no default.
Return Code Values

0 (success) or 1 (failure)

Remarks

sp_replsetoriginator is executed by the Distribution Agent to record the source of transactions applied by replication. This information is used to invoke loopback detection for transactional subscriptions that have the loopback property set. Immediate-updating subscriptions and bi-directional transactional replication are used to set the loopback detection property for a subscription.

Permissions

Members of the public role can execute sp_replsetoriginator.

See Also
Implementing Nonpartitioned, Bidirectional Transaction Replication System Stored Procedures
Immediate-updating Subscribers Components  

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.