June 2, 2010 at 11:07 am
Hi All,
Lately, the T-log continues to grow tremendously..sometimes goes to 20Gig. I already setup the severity 17 (insufficient resources). The only way that I will get this error notification is actually run out of disk space. I don't want to continue to manually monitor the T-log file. I setup the maintenance plan to backup the T-log every 5 hours.
My question is that is there a way that I can setup an automatically job to check if the size of the t-log reaches to certain limit, email to the DBA team.
Thank you in advance for your help in this.
NewtoSQLserver.
p.s. the person on this project does not know what cause to increase the t-log and I don't know how to check it to see what the cause of a big jump of increasing in the T-log file.
June 2, 2010 at 11:54 am
Is every 5 hours often enough for log backups? If the tran log is growing a lot, it may not be.
Please read through this - Managing Transaction Logs[/url]
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
June 2, 2010 at 12:26 pm
Normally, it grows only 500mb to 1gig every 5 hours. A few times it grows to 8gig within 5 hours. I just want to setup an alert to notify the team when it reaches to 5gig to look into it and not wait until receive a backup email notification that there is no disk space for backing up the T-log.
June 2, 2010 at 2:56 pm
You can setup alert similar to the one you have:
- change alert Type to "SQL Server performance condition alert"
- select Object "SQLServer:Databases"
- select Counter "Log File(s) Size (KB)"
- specify database name under Instance
- set value in KB (rises above NNN KB)
June 3, 2010 at 8:01 am
Thanks. I will setup and test out.
June 4, 2010 at 1:12 am
You can also let this alert make an automatic T-Log backup when it reaches the treshold, so the log doesn't have to grow at all.
Regards,
Marco
June 4, 2010 at 1:22 am
Thanks magasvs. I tested out and it worked great. I implemented in production evnironment and it did sent me an email notification a few hours later. :=)
June 4, 2010 at 1:25 am
Hi Marco,
I thought about it last night to see if there is a way that I can setup the automatic t-log backup when it reaches to certain threshhold. Now, you said it. I'm going to search the command.
Thanks,
NewToSQLServer 🙂
June 4, 2010 at 3:21 am
Rather than set the backups to run when you are running out of space, you really should set them up to run at regular intervals and manage the transaction log pro-actively, read through the link Gail posted to understand how to do this.
Setting up alerts to let you know when the disk is full be for the last resort...
June 4, 2010 at 3:32 am
it is indeed a good idea to backup the logs more frequently, but when the logs grows over 60% between two backups it is a good idea to make an extra backup through the alert. When you also let the alert notify you, you can manually increase the log file size, when the alert fires frequently. In this way yoou are in control over log file growths en it isn't scary anymore, to let autogrow enabled.
You can start jobs from the Response tab in the alert.
Regards
Marco
June 4, 2010 at 4:46 am
mchofman (6/4/2010)
it is indeed a good idea to backup the logs more frequently, but when the logs grows over 60% between two backups it is a good idea to make an extra backup through the alert.
When the log grows 60% between backups, it's a good idea to find out why and then make an educated response, not just knee-jerk 'make a backup and don't worry about the root cause' approach
One comment, ad-hoc log backups will make a restore fun, if you don't know how many backups there should be. I hope the naming of the files is such that you can tell what order they would need to be restored in, should there be a need for a restore.
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
June 4, 2010 at 4:57 am
mchofman (6/4/2010)
it is indeed a good idea to backup the logs more frequently, but when the logs grows over 60% between two backups it is a good idea to make an extra backup through the alert. When you also let the alert notify you, you can manually increase the log file size, when the alert fires frequently. In this way yoou are in control over log file growths en it isn't scary anymore, to let autogrow enabled.You can start jobs from the Response tab in the alert.
Regards
Marco
I would look at why your logs are growing 60% between backups - this is not normal
June 4, 2010 at 6:31 am
Sorry, I didn't mean grow 60% but fill up to 60% (60% of the log is in use).
Regards,
Marco
Viewing 13 posts - 1 through 12 (of 12 total)
You must be logged in to reply to this topic. Login to reply