sp_helpreplicationdb Replication Stored Procedure

Returns information about a specified database or a list of all publication databases on the server.

Syntax

sp_helpreplicationdb [databasename [, {pub | sub}]]

where

databasename
Is the name of the database about which information will be returned. Wildcard characters can be used; % is the default.
pub | sub
Determines what information will be returned. When pub (the default) is specified, checks whether the specified database is a publication database. When sub is specified, checks whether the specified database is a subscription (destination) database.

Remarks

If run without options, this stored procedure returns a list of all published databases on the server. If run with options, it returns the databasename only if that database is set for publishing (when the pub option is supplied) or subscribing (when the sub option is supplied).

Example

This example returns information about the inventory database and indicates if it is a subscription database.

sp_helpreplicationdb inventory, sub

Permission

Execute permission defaults to the public group.

Table Used

sysdatabases

See Also

sp_helppublication