SQL log file

anan

Member
Hi group,
I am using xe in win2k and MS sql serever
the log file and the size of the production database seems very large. the log file size is 11.7 GB and should be maxmum 2 gb what sould I do to reduce its size.
did any body use shrink command in the sql enterprise manager.
 
Hi,

You need to backup your log on a daily or weekly basis.
After backup, you can run a DBCC SHRINKFILE on the LOG
FileId (typically 2).
Finally, I suggest you to get some SQL Admin guide, it
will be very helpful and show you how to deal with these
situations.

Regards,
 
It sounds like you have the recovery model set to Full and you are not doing transaction log backups.

If you are using a full recovery model you must either do transaction log backups or do full backups plus transaction log truncations. Both methods truncate the transaction log. However, transaction log truncation does not reduce the size of a physical log file, it reduces the size of the logical
log file. To reduce the size of the physical file you must execute a dbcc shrinkfile on the transaction log file after truncating it with either a transaction log backup or an explicit truncation .

All this should be automated as a part of a maintenance plan.





[ QUOTE ]
Hi group,
I am using xe in win2k and MS sql serever
the log file and the size of the production database seems very large. the log file size is 11.7 GB and should be maxmum 2 gb what sould I do to reduce its size.
did any body use shrink command in the sql enterprise manager.

[/ QUOTE ]
 
Back
Top