The size of the .MDF is 175,000 Kb while that of the .LDF is 2,377,000 Kb. What should I do to truncate the Log File? Pls advise.before executing this code read BOL, dbcc shrinkfile
backup DATABASE yourdatabasename to disk='c:\yourdatabasename .bak'
go
dbcc shrinkfile (yourdatabase_log,size,truncateonly)
go
--to get log file name--
select * from sysfiles|||1.Please change the db options to Simple recovery Model.
2.Use the DBCC Shrinkfile ('FileNAme','SizeinMB) e.g DBCC Shrinkfile ('Myfile',100)
Thankssql
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment