Thats Why No-One Will Remember Your Name

How to Shrink a SQL Transaction Log File

13. September 2010 13:58 by Scott in   //  Tags:   //   Comments (0)

I was having trouble with a transaction log file that had unrestricted growth set.  I needed to get it down to a good size without killing my disk space.  So below is the script I used to shrink the transaction log after it had gone a little wild with size.

backup
log 'yourdatabasename' to disk ='D:\YourdatabaseName.trn'
go
dbcc
shrinkfile (yourdatabase_logfilename,1)
If you liked this post, please be sure to subscribe to my RSS Feed.

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading