SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 how to find how many databases have log shipping
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Harry_maxi
Starting Member

United Kingdom
10 Posts

Posted - 07/15/2013 :  09:55:52  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

3326 Posts

Posted - 07/15/2013 :  11:29:30  Show Profile  Reply with Quote
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

United Kingdom
10 Posts

Posted - 07/15/2013 :  11:39:40  Show Profile  Reply with Quote
Cheers James,

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

James K
Flowing Fount of Yak Knowledge

3326 Posts

Posted - 07/15/2013 :  12:14:46  Show Profile  Reply with Quote
You are very welcome - glad to help!
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000