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).
Sets a replication database option for the specified database. This stored procedure is executed at the Publisher or Subscriber on any database.
Is whether to enable or disable the given replication database option. value is sysname, and can be true or false. When this value is false and optname is merge publish, subscriptions to the merge published database are also dropped.
[ @ignore_distributor=] ignore_distributor
Indicates whether this stored procedure is executed without connecting to the Distributor. ignore_distributor is bit, with a default of 0, meaning the Distributor should be connected to and updated with the new status of the publishing database. The value 1 should be specified only if the Distributor is inaccessible and sp_replicationdboption is being used to disable publishing.
[ @from_scripting=] from_scripting
Identified for informational purposes only. Not supported. Future compatibility is not guaranteed.
sp_replicationdboption is used in snapshot replication, transactional replication, and merge replication.
This procedure creates or drops specific replication system tables, security accounts, and so on, depending on the options given. Sets the corresponding category bit in the master.sysdatabases system table and creates the necessary system tables.
To disable publishing, the publication database must be online. If a database snapshot exists for the publication database, it must be dropped before disabling publishing. A database snapshot is a read-only offline copy of a database, and is not related to a replication snapshot. For more information, see Database Snapshots (SQL Server).