Knowledgebase: EC Enterprise
EC Enterprise: Truncate SQL Log File-Sample Script
Posted by Barry Kroeker, Last modified by Joel Brickell on 28 May 2015 02:47 PM

To shrink the log, in Query Analyzer: (replace DBname with the database name, replace "LogFileName" with the actual log "filename" property of the log file, seen in database properties)


Use DBName
Go
BACKUP LOG DBName WITH TRUNCATE_ONLY
Go
DBCC SHRINKFILE(LogFileName, 2)
Go

***********************

by Administrator  last modified 06/25/2007  EnergyCAP Rel. 5.x

(289 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments: