script to check the recovery model | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

script to check the recovery model

Is there script I could check the recovery model for sql server?
I have over 100 database on each server, and I would like to check and set the recovery model for each database for simple model.
It is very time consuming to check each one by right click and choose properties?
Thanks for your help.

You can check recover_model from sys.databases.

Did you ever get an answer on this one?

This is what u are looking for?? like this you can find all properties of all database.
SELECT name, databasepropertyex (name,’Recovery’),
FROM master..sysdatabases

FROM master.dbo.sysdatabases
ORDER BY 1 Alternatively,
SELECT name, recovery_model, recovery_model_desc
FROM master.sys.databases
order by 1
Hi Idris, welcome to the forums! Thanks for share your expertise.
Try to check thread date. This one is 2 years old.:)
Thanks Luis.
Hi Idris,
Welcome to the forums,
You are not bad. A few days back I answered to a thread which was 8 years old. :eek: Faithful moderators like Frank and Luis are there to point out it when we do it.
Please continue to share your knowledge.
Hi Idris,
May be my lack of English sound aggressive.
I’m sorry about that.:(
No offence at all Luis and your english is absolutely perfect. No need to apologise, Luis.
Frankly, I have a lot to learn from both you and Preethi, and will continue to learn from your immense contributions to this great resource you share freely to enhance the development of others. My reason for adding to the 2year thread was due to a comma error (typo) I felt should be corrected to help others to this great resource which may has gone unnoticed since 2008. However, your time, effort and contributions are greatly appreciated by all who thrive to enrich and share their knowledge of SQL Server. You are the eyes and ears of all users. Thanks for having me on board.
Posting a solution to the old questions is not a problem at all, over the time the practices do get change.. unless there is no advertisement or spam in the response ONE is always welcome to dust off the old thread :)

Software Reviews | Book Reviews | FAQs | Tips | Articles | Performance Tuning | Audit | BI | Clustering | Developer | Reporting | DBA | ASP.NET Ado | Views tips | | Developer FAQs | Replication Tips | OS Tips | Misc Tips | Index Tuning Tips | Hints Tips | High Availability Tips | Hardware Tips | ETL Tips | Components Tips | Configuration Tips | App Dev Tips | OLAP Tips | Admin Tips | Software Reviews | Error | Clustering FAQs | Performance Tuning FAQs | DBA FAQs |