October 3, 2007 at 12:37 pm
I would like to ask the members if there is a method via transact SQL or via system stored procedures within a MS SQL 2005 instance to determine if replication is being done on the system.
I could easily pull up SSMS, but am automating a script to email me some vital stats and would like to know if this is possible?
Is the presence of the 'distribution' db on the server a good enough indication that replication is being done?
Thanks in advance.
October 3, 2007 at 12:54 pm
No, the presence of a database called distribution is not enough. Three reason for this are:
1. The distributor could be on another server
2. Replication might no longer be used
3. You can name the distrbution database different.
This should give you a better indication
SELECT COUNT(*) FROM sys.databases
WHERE is_published = 1
OR is_subscribed = 1
Markus
[font="Verdana"]Markus Bohse[/font]
October 3, 2007 at 1:01 pm
Thanks MarkusB for the quick response. That would do it.
Greatly appreciated.
October 3, 2007 at 3:46 pm
NOTE that is_subscribed does not work in all cases
* Noel
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply