Checking recovery models in MS SQL Server

We have quite a few databases that have been added to our SQL environment by 3rd parties. The default recovery model is “Full”, yet a lot of the databases have no scheduled transaction log backups. What does this mean?

Well, a database with “Full” recovery model will never reclaim space in LDF files unless a transaction log backup is run. A full database backup isn’t enough.

So the options here are: set recovery model to simple, or make sure you have backup jobs in place to empty your log files periodically.

Here’s how to list all your databases and their associated recovery models:

SELECT name AS [Database Name],
recovery_model_desc AS [Recovery Model]
FROM sys.databases
GO

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s