I have this question, one of my data base log file is bigger than the data file why? how can i shrink it?? i tried shrinking it with dbcc shrinkfile but did not help!!
You don't need to do both, you need to either do backups of the log OR truncate the log. That's why I said: If not (you don't do log backups) and you don't truncate....
If you backup the logs on a regular basis, they will shrink down. It just doesn't happen immediately. Plus they can't shrink smaller than the size they were built as nor smaller than the active portion. If you are backing up the logs, you can 'force' a shrink by using DBCC SHRINKFILE and using the path for the log file.
If you don't care about backing up the logs, you can use BACKUP LOG <dbname> WITH TRUNCATE_ONLY
Refer to the BOL for more information about both commands.
-SQLBill
BOL=Books OnLine=Microsoft SQL Server's HELP
Installed as part of the Client Tools
Found at Start>Programs>Microsoft SQL Server>Books OnLine
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.