Shrink Database

When a database log file size increase we can shrink it to reduce its size. If recover model is not important, we can set database recovery model to SIMPLE mode and then shrink it.This code can release 10 percent amount of test_db files size.

USE test_db;
<div id="_mcePaste" class="mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0; width: 1px; height: 1px;"><strong><em><a href=""><strong>Inside Microsoft SQL Server 2008: T-SQL Programming (MSPress, March 2009)</strong></a></em></strong></div>
This entry was posted in Database Administration, Joy of T-SQL, SQL General Information, T-SQL Tips & Tricks. Bookmark the permalink.

Leave a comment

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

You are commenting using your 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