Sunday, November 11, 2007

Shrink the transaction log file in SQL Server 2005

I face a problem where i use database to store application session the problem is that the ASP state database log file size is 50 GB so i need to shrink the log file after googling I found the solution

first you need to backup the log file using this command
BACKUP LOG TestDB TO DISK='C:\TestDB1.bak'
Second you run the following command to shrink the log file
DBCC SHRINKFILE (, ) WITH NO_INFOMSGS

For more information check this link on
Microsfot support http://support.microsoft.com/kb/907511

No comments:

RSS Feeds