sp_setreplfailovermode

Transact-SQL Reference

Transact-SQL Reference

sp_setreplfailovermode

Allows you to set the failover operation mode for subscriptions enabled for immediate updating with queued updating as failover. This stored procedure is executed at the Subscriber on the subscription database.

Syntax

sp_setreplfailovermode [ @publisher = ] 'publisher'
    [ , [ @publisherdb = ] 'publisher_db' ]
    [ , [ @publication = ] 'publication' ]
    [ , [ @failover_mode = ] 'failover_mode' ]

Arguments

[@publisher =] 'publisher'

Is the name of the publication. publication is sysname, with no default. The publication must already exist.

[@publisher_db =] 'publisher_db'

Is the name of the publication database. publisher_db is sysname, with no default.

[@publication =] 'publication'

Is the name of the publication. publication is sysname, with no default.

[@failover_mode =] 'failover_mode'

Is the failover mode for the subscription. failover_mode is nvarchar(20) and can be one of these values:

Value Description
immediate Data modifications made at the Subscriber will be bulk copied to the Publisher as they occur.
queued Data modifications will be stored in either a SQL Server queue or Message Queuing.

Return Code Values

0 (success) or 1 (failure)

Remarks

sp_setreplfailovermode is used in snapshot replication or transactional replication for which subscriptions are enabled for immediate updating with queued updating as a standby in case of failure.

Permissions

Only members of the sysadmin fixed server role or db_owner fixed database role can execute sp_addmergesubscription.