Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

sp_replsetoriginator (Transact-SQL)

Applies To: SQL Server 2014, SQL Server 2016 Preview

Topic Status: Some information in this topic is preview and subject to change in future releases. Preview information describes new features or changes to existing features in Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2).

Used to invoke loopback detection and handling in bidirectional transactional replication. This stored procedure is executed at the Publisher on the publication database.

Topic link icon Transact-SQL Syntax Conventions

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

[ @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.

0 (success) or 1 (failure)

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 bidirectional transactional subscriptions that have the loopback property set.

Only members of the sysadmin fixed server role at the Publisher, members of the db_owner fixed database role on the publication database, or users in the publication access list (PAL) can execute sp_replsetoriginator.

Community Additions

ADD
Show:
© 2015 Microsoft