Wednesday, March 28, 2012

How do I know whether this database is published or not?

G'Day
Some of our customers have the db replicated, some not. (SQL-Server 2000)
How can find out, whether the db is published or not without access to the
master db?
thanks
Aline
Aline,
The sp_dboption procedure will give you this information. Pass the database
name as the parameter.
The output will look something like this:
The following options are set:
published
select into/bulkcopy
merge publish
trunc. log on chkpt.
auto create statistics
auto update statistics
Alternatively:
select name, databasepropertyex (name,'IsMergePublished') from
master..sysdatabases
select name, databasepropertyex (name,'IsPublished') from
master..sysdatabases
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)

No comments:

Post a Comment