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

find errors in log file for multiple servers Expand / Collapse
Author
Message
Posted Wednesday, January 16, 2013 5:49 PM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Tuesday, April 15, 2014 9:54 AM
Points: 1,720, Visits: 3,063
I would like to see if any errors in SQL log.

Is that possible using some query for all the servers in my central server management to pull it?

A query maybe looks for the word Error in the log file ?

Thanks
Post #1408112
Posted Wednesday, January 16, 2013 6:23 PM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: 2 days ago @ 2:53 PM
Points: 3,733, Visits: 7,072
Are you storing the data from all the SQL log files in a table on the Centralized server?

______________________________________________________________________________
"Never argue with an idiot; They'll drag you down to their level and beat you with experience"
Post #1408116
Posted Wednesday, January 16, 2013 8:39 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, April 10, 2014 8:36 PM
Points: 172, Visits: 459
use the local server group in SSMS and then use something like sp_readerrorlog to seach for what your looking for, not the most elegent, but just a thought I had

No signature available.
Post #1408129
Posted Thursday, January 17, 2013 12:52 PM
Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey Kid

Group: General Forum Members
Last Login: Today @ 11:09 AM
Points: 689, Visits: 1,351
use the local server group in SSMS and then use something like sp_readerrorlog to seach for what your looking for, not the most elegent, but just a thought I had


I agree with this. If your servers are registered in a central management server you can write a query in a query window and execute it against all your systems. You can use sp_readerrorlog or xp_readerrorlog. I prefer using xp_readerrorlog because you can filter with a keyword.

Here is an article on the parameters you can use with xp_readerrorlog:

Reading the SQL Server log files using TSQL


Joie Andrew
"Since 1982"
Post #1408574
Posted Thursday, January 17, 2013 4:01 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: 2 days ago @ 5:20 PM
Points: 237, Visits: 763
What I have done is create a powershell script that goes to all of my instances,
scans the log from a given timestamp and sends me email reports for errors of a given type.

Types:
login errors
deadlocks
backup errors
Severity > 20 (pages)
failed sa (and other elevated logins) login attempts
user defiend errors
IO errors
Other.
Post #1408654
Posted Thursday, January 17, 2013 4:13 PM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Tuesday, April 15, 2014 9:54 AM
Points: 1,720, Visits: 3,063
Can you share your powershell script?


Thanks,
Post #1408660
Posted Thursday, January 17, 2013 4:25 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: 2 days ago @ 5:20 PM
Points: 237, Visits: 763
Sorry, I have IP constraints.
Post #1408666
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse