Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

script to find all databases ,which are not in full recovery mode Expand / Collapse
Author
Message
Posted Monday, April 28, 2008 7:41 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, May 5, 2009 7:08 AM
Points: 1, Visits: 17
i am looking for a script ,when executed on a server ,will list out all databases in full recovery mode.

thanks

jacky
Post #491799
Posted Monday, April 28, 2008 9:06 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, February 20, 2013 3:38 PM
Points: 156, Visits: 417
1 of many ways...
select name from sys.databases where recovery_model = 1

NJ
Post #491809
Posted Tuesday, April 29, 2008 7:24 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Yesterday @ 11:14 AM
Points: 326, Visits: 384
This will work only with sql server 2005, how about sql server 2000?
Post #492069
Posted Tuesday, April 29, 2008 7:38 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Yesterday @ 11:14 AM
Points: 326, Visits: 384
I found for SQL server 2000 now.

Here is the script

SELECT [name] AS [DatabaseName], CONVERT(SYSNAME, DATABASEPROPERTYEX(N''+ [name] + '', 'Recovery')) AS [RecoveryModel] FROM master.dbo.sysdatabases where CONVERT(SYSNAME, DATABASEPROPERTYEX(N''+ [name] + '', 'Recovery'))<>'full'
Post #492094
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse