script to find all databases ,which are not in full recovery mode

  • i am looking for a script ,when executed on a server ,will list out all databases in full recovery mode.

    thanks

    jacky

  • 1 of many ways...

    select name from sys.databases where recovery_model = 1

    NJ

  • This will work only with sql server 2005, how about sql server 2000?

  • 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'

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply