Log File Maintenance

  • Hello. I have 2 questions.

    (1.) How do I determine what the actual size of the log-file is? and (2.) Is there a generally accepted rule about backing up the log-file to maintain the log-file size compared to trunc. log on checkpoint?

    Rgds.

    George

  • 1. used dbcc sqlperf (logspace) to check the log space utilization.

    2. Log file is for recovery purposes. If you perform a full backup you can truncate the log file.

  • You can use sp_helpfile to get the file size.  It's also displayed in Enterprise Manager (EM).  You can use EM to see both the size and the amount used by enabling the TaskPad view for the database.

    You'll need to monitor the use of the log file space during typical use of the database in order to understand how much it grows over time.  Then back up the tran log (which is how one truncates the log) often enough that it doesn't grow beyond the desired size.  Do not overwrite previous tran log backups unless you have at least one full backup prior to the tran log backups.  If you truncate the tran log other than by backing it up, you can no longer use the tran log to recover.



    --Jonathan

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply