1

I have set SQL Server performance condition alert with details as follows:

Object           : SQL Server:Databases
Counter          : Percent Log Used
Instance         : My database name
Alert If counter : rises above >25
Delay between responses 10 minutes.

Please let me know what action I should take so that I do not get this alert again.

The hard drive where the transaction log gets saved has enough space, and recovery model is FULL.

What I want to ask is How can I find out why I started getting alert suddenly. My database full backup schedule on Sunday ,differential backup scheduled daily and transaction log backup daily after 10 min. Where should I check to find out the cause of the issue. Auto growth property is set to 5120 MB and restricted to 86000 MB. All backups like Full,daily,transaction log backup are taking place correctly . My transaction log backup size is 1.08 MB ,Differential backup size around 8 GB . From last Sunday I started getting alert . Till that there were not alert. One more thing I would like to mention that I am also taking backup for TempDB. TempDB log file size is 5 GB. Is it the reason the alert

0

1 Answer 1

2

You basically created an alert that will get fired when the log space used percent is above 25%. That's pretty low, in my opinion.

Please let me know what action should I take so that I did not get this alert again Hard drive where transaction log get saved have enough space.

If what I'm understanding from you is correct, you're saying that the volume your transaction log sits on has plenty of space, and you think you may be getting false alerts? If that's correct, this perfmon counter isn't looking at that at all. It could be a 2 GB log file, living on a 500 GB volume. Even if that 500 GB volume has 400 GB of free space, if your 2 GB log file has 500+ MB space used you'll get that alert. Volume free space and database file free space are two different things.

You need to determine what you care about to be alerted on. It's a great strategy to alert on log file space used if it is getting high (in my opinion, the upper bounds would be 70% - 80%, but you will need to tailor that to your environment), but I think you may be confused with the above two points.

If that hasn't answered your question, please clarify either through comments here or editing your own question.

Edit after your edit

You need to see what your log space used percent is. By your alert, if it is greater than 25%, then you should be alerted. You can find that out a couple of ways.

The quickest is to run the following:

dbcc sqlperf(logspace);

That will give you a rundown of all log space used for every database. If you want to break that down for a particular database (for whatever reason) it could be accomplished this way:

use YourDatabase;
go

;with file_cte as
(
    select
        name,
        size,
        fileproperty(name, 'SpaceUsed') as space_used
    from sys.database_files
    where type_desc = 'log'
)
select
    name, 
    size, 
    space_used,
    convert(decimal(5, 2), space_used * 1.0 / size * 100) as space_used_percent
from file_cte;

The reason why you didn't get alerted after that is simple: Because your log space used didn't breach 25%. That could have been through log reuse due to a transaction log backup, or maybe somebody grew the file making that 25% space used a larger number. As for tempdb's database file sizes, that shouldn't affect when you get alerted, unless you are being alerted specifically for tempdb log file space used (in your question it says "my database name" so I'm assuming you're not alerting off of tempdb with this alert).

2
  • Hi Thomas Thanks for the reply. U really gave nice information. But may be I want to ask little different .I edited my question .Please let me know if you want any details
    – Anirudha
    Commented Aug 14, 2013 at 9:36
  • @Anirudha See my edit on my answer. Commented Aug 14, 2013 at 15:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.