Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««34567

How to centralize your SQL Server Event Logs. Expand / Collapse
Author
Message
Posted Wednesday, May 30, 2012 4:38 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, May 13, 2013 9:37 AM
Points: 4, Visits: 92
Geoff A (5/30/2012)
Hi Phil,

Only MSSQL logs will be forwarded to the central server. That is a SQL Server Agent function.
SQL Server Agent will not forward non SQL Application log entries.

The modification to the script will work, but only on the server where the error occurs.

Thanks


Thanks for the quick reply Geoff.

I'm having a little trouble trying to grasp the concept. Maybe I'm misunderstanding SQL Server Agent's role in this.

I only want to monitor one SQL Server, and write the errors into a database on that server. In this case, all errors are occurring on that one server, the server that is monitoring for errors. But the script isn't picking up non-SQL specific errors. If the script is reading directly from wherever the Event Viewer Application log is, it shouldn't matter that the errors are not SQL specific?

Thanks

Phil
Post #1308235
Posted Wednesday, May 30, 2012 4:46 AM


SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Today @ 7:10 AM
Points: 485, Visits: 1,568
try this script instead;

query = "Select * from __InstanceCreationEvent" _
& " " & "where TargetInstance isa 'Win32_NTLogEvent'" _
& " " & "and (TargetInstance.Logfile = 'Application' or TargetInstance.Logfile = 'System')" _
& " " & "and (TargetInstance.EventType = 1 or TargetInstance.EventType = 2)"
Post #1308239
Posted Thursday, May 31, 2012 3:02 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, May 13, 2013 9:37 AM
Points: 4, Visits: 92
Geoff A (5/30/2012)
try this script instead;

query = "Select * from __InstanceCreationEvent" _
& " " & "where TargetInstance isa 'Win32_NTLogEvent'" _
& " " & "and (TargetInstance.Logfile = 'Application' or TargetInstance.Logfile = 'System')" _
& " " & "and (TargetInstance.EventType = 1 or TargetInstance.EventType = 2)"


Thanks for that, I've given it a try but I'm having the same results.

I thought the package might have cached the script or something so I recreated it with the correct script from the beginning, and it's still ignoring non-SQL errors.

Really confusing one.
Post #1308817
Posted Monday, June 04, 2012 4:38 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, May 16, 2013 5:25 PM
Points: 42, Visits: 95
Hi,

I am testing the script on one server and it works.
However it inserts four records for the same event.
Any thoughts?

Adam
Post #1310863
« Prev Topic | Next Topic »

Add to briefcase «««34567

Permissions Expand / Collapse