Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 how to find how many databases have log shipping

Author  Topic 

Harry_maxi
Starting Member

10 Posts

Posted - 2013-07-15 : 09:55:52
Hi All,

Please help me out!!! Actually i am trying to find out how many databases have logshipping under given server. i need a script that supports versions from 2000 to 2012. if anyone help that would be great.

cheers
harry

James K
Master Smack Fu Yak Hacker

3873 Posts

Posted - 2013-07-15 : 11:29:30
Don't know if this supports SQL 2000, but it does work for SQL 2005 and later:
USE msdb
GO
SELECT * FROM log_shipping_primary_databases
Go to Top of Page

Harry_maxi
Starting Member

10 Posts

Posted - 2013-07-15 : 11:39:40
Cheers James,

It's working. thanks once again.
Go to Top of Page

James K
Master Smack Fu Yak Hacker

3873 Posts

Posted - 2013-07-15 : 12:14:46
You are very welcome - glad to help!
Go to Top of Page
   

- Advertisement -