SQL Server Shrink – Maintenance

Does not always work straight off bat:

  1. Need to backup both database and transaction log regularly and possibly before shrink
  2. Try shrinking Database
  3. Try shrinking Database File and Transaction Log File
  4. Repeat above sequences until files shrink

There may be something blocking the shrink. Try the following query. Should return NOTHING in the second column.
If LOG_BACKUP then the space may not be released until a log backup is done.

SELECT name,log_reuse_wait_desc FROM sys.databases ORDER BY name

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

%d bloggers like this: