Senin, 17 Juni 2013

Reduce SQL Sever Log Size (.LDF File)

One of my client database log size is growing ridiculously big. Over 40 GB, I need to shrink the file size since I don’t really need to recover to a point in time. My client periodically backup the database. After googling around, I found these steps:

backup log DatabaseName with truncate_only -- This statement will mark inactive part of log

dbcc shrinkfile(DatabaseName_Log) -- This statement will release the marked inactive space to OS

After this my log file size reduced to marely 1 MB. However since my backup chain is now broken, I no longer able to use TL backup for recovery so I have to do full backup of the database.

Source :

0 komentar:

Posting Komentar