Export (0) Print
Expand All
Expand Minimize

sp_helpreplicationdboption (Transact-SQL)

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.

Value

Description

publish

Transactional replication allowed.

merge publish

Merge 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 name

Data type

Description

name

sysname

Name of the database.

id

int

Database identifier.

transpublish

bit

If the database has been enabled for snapshot or transactional publishing; where a value of 1 means that snapshot or transactional publishing is enabled.

mergepublish

bit

If the database has been enabled for merge publishing; where a value of 1 means that merge publishing is enabled.

dbowner

bit

If 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.

dbreadonly

bit

Is if the database is marked as read-only; where a value of 1 means that the database is read-only.

haspublications

bit

Is if the database has any existing publications; where a value of 1 means that there are existing publications.

haspullsubscriptions

bit

Is 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.

Community Additions

ADD
Show:
© 2014 Microsoft