truncate transaction log in SQL-SERVER

Article about truncating the transaction log. some time in live environtment especially in big database, it might happens when you shrink the database log file, it dosn't shrink. here is the solution in this article.

Many times, it happens in live sql server which has big transaction log file, you run DBCC SHRINKFILE command and see no effect of it on the transaction log file. You can use following magical five line at that time and you will done. It shrinks the trucated log File to minimum size possible.

DBCC SHRINKFILE(<logfilename>, 1)
DBCC SHRINKFILE(<logfilename>, 1)

We will go in depth study for internal working of transaction log soon in my future article. 
Happy Working!!!!

Reference: Ritesh Shah

By Ritesh Shah   Popularity  (3601 Views)