January 25, 2011 at 4:33 am
Dear Sir,
My database Mdf file size is 2 GB. But Log file size is 20 GB. Now I want to truncate these log file.
how to truncate log file size. Please guide me to resolve this issue.
thanks,
Aamir
January 25, 2011 at 4:52 am
Truncate or shrink?
Truncate marks log records as inactive and reusable and allows for space in the log to be reused. It breaks the log chain and prevents point-in-time recovery past that point until another full backup runs. It does not affect the size of the file.
Shrink releases unused space to the filesystem, reducing the size of the file (if there's unused space)
What's the recovery model of the database?
If other than simple recovery, how often are you doing log backups?
What's the recovery requirements for this DB in the case of a disaster?
What does the following show for the DB in question?
DBCC SQLPERF(LogSpace)
May be worth reading these two:
http://www.scarydba.com/2011/01/18/dba-101-why-is-my-log-file-full/
http://www.sqlservercentral.com/articles/64582/
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply