Reducing MS SQL Transaction Log Size

To reduce the physical MS SQL Transaction Log Size, the transaction log needs to be backed up first before it can be shrinked.

In this example we want to reduce the transaction log size of Dreams database.

Firstly, we backup the transaction log using the following command:

BACKUP LOG Dreams
TO disk = ‘D:\backups\DreamsLogBackup.log’

Next, the transaction log is shrinked by using the following command

DBCC SHRINKFILE(‘Dreams_Log’)

Repeat the backup and the shrink of transaction log commands above if the transaction log size doesn’t change.

Reference:
http://social.msdn.microsoft.com/Forums/en/sqlgetstarted/thread/8481e0fa-1820-4350-b809-15ea9d05c938

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