Less Than Dot is a community of passionate IT professionals and enthusiasts dedicated to sharing technical knowledge, experience, and assistance. Inside you will find reference materials, interesting technical discussions, and expert tips and commentary. Once you register for an account you will have immediate access to the forums and all past articles and commentaries.
Find Out The Recovery Model For Your Database
From Wiki
You want to quickly find out what the recovery model is for your database but you don't want to start clicking and right-clicking in SSMS/Enterprise Manager to get that information. This is what you can do, you can use databasepropertyex to get that info. Replace 'msdb' with your database name
- SELECT DATABASEPROPERTYEX('msdb','Recovery')
What if you want it for all databases in one shot? No problem here is how, this will work on SQL Server version 2000
- SELECT name,DATABASEPROPERTYEX(name,'Recovery')
- FROM sysdatabases
For SQL Server 2005 and up, you should use the following command
- SELECT name,recovery_model_desc
- FROM sys.databases
Contributed by: --SQLDenis 14:12, 30 August 2008 (GMT)
Part of SQL Server Admin Hacks



LTD Social Sitings
Note: Watch for social icons on posts by your favorite authors to follow their postings on these and other social sites.