Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am using SQL server 2008 Standard edition. I am using Policy based management with policies which come with SQL server during installation.

I want the policies to only look at events that happened in last 24 hours. For example for "Windows Event Log System Failure Error" policy if system restarted unexpectedly 5 days ago, i don't want to be alerted daily.

Is there any way by which I can restrict a policy to look at events which happened in last 24 hours not older?

Any help please?

Thanks in advance.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

Manjot,

You will need to alter the condition on which that policy relies. In this case, the name of the condition is 'System Failure Error Check', and that condition is using the following WQL in order to grab the info:

IsNull(ExecuteWql('Numeric', 'root\CIMV2', 'select EventCode from Win32_NTLogEvent where EventCode=6008 and Logfile="System"'), 0)

If you alter this WQL, you should be able to further filter for events only in the past 24 hours.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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