|  Login
July 23, 2008  
Blog
Minimize
You must be logged in and have permission to create or edit a blog.
  
 
Search
 
Truncate SQL Server 2000 Log File
Minimize
Location: BlogsLiving in Software Development    
Posted by: host 11/28/2007 11:38 PM

I am a jack of all trades, so I don't spend too much time on any one task. I just looked at directory where my sql server 2000 databases live and I noticed that my DB logs are huge. One log file was over a gig and a half in size for a 500 meg database. I'm putting it here for my future reference, but I hope someone else can use it, too.

BACKUP LOG <dbName> WITH TRUNCATE_ONLY

DBCC SHRINKFILE(<dbName>_Log, 2)

Permalink |  Trackback

Your name:
Title:
Comment:
Add Comment   Cancel 
Blog
Minimize