sp_helpreplicationdboption (Transact-SQL)
TOC
Collapse the table of content
Expand the table of content

sp_helpreplicationdboption (Transact-SQL)

 

Applies To: SQL Server

Shows whether databases at the Publisher are enabled for replication. This stored procedure is executed at the Publisher on any database. Not supported for Oracle Publishers.

Topic link icon Transact-SQL Syntax Conventions

  
sp_helpreplicationdboption [ [ @dbname =] 'dbname' ]  
    [ , [ @type = ] 'type' ]  
    [ , [ @reserved = ] reserved ]  

[ @dbname=] 'dbname'
Is the name of the database. dbname is sysname, with a default of %. If %, then the result set contains all databases at the Publisher, otherwise only information on the specified database is returned. Information is not returned for any databases on which the user does not have the appropriate permissions, as described below.

[ @type=] 'type'
Restricts the result set to contain only databases on which the specified replication option type value has been enabled. type is sysname, and can be one of the following values.

ValueDescription
publishTransactional replication allowed.
merge publishMerge replication allowed.
replication allowed (default)Either transactional or merge replication allowed.

[ @reserved= ] reserved
Specifies whether information on existing publications and subscriptions is returned. reserved is bit, with a default value of 0. If 1, the result set includes information on whether the database specified has any existing publications or subscriptions.

Column nameData typeDescription
namesysnameName of the database.
idintDatabase identifier.
transpublishbitIf the database has been enabled for snapshot or transactional publishing; where a value of 1 means that snapshot or transactional publishing is enabled.
mergepublishbitIf the database has been enabled for merge publishing; where a value of 1 means that merge publishing is enabled.
dbownerbitIf the user is a member of the db_owner fixed database role; where a value of 1 indicates that the user is a member of this role.
dbreadonlybitIs if the database is marked as read-only; where a value of 1 means that the database is read-only.
haspublicationsbitIs if the database has any existing publications; where a value of 1 means that there are existing publications.
haspullsubscriptionsbitIs if the database has any existing pull subscriptions; where a value of 1 means that there are existing pull subscriptions.

0 (success) or 1 (failure)

sp_helpreplicationdboption is used in snapshot, transactional, and merge replication.

Members of the sysadmin fixed server role can execute sp_helpreplicationdboption for any database. Members of the db_owner fixed database role can execute sp_helpreplicationdboption for that database.

sp_replicationdboption (Transact-SQL)
System Stored Procedures (Transact-SQL)

Community Additions

ADD
Show:
© 2016 Microsoft