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

Search SQL Error Log Expand / Collapse
Author
Message
Posted Thursday, March 5, 2009 3:47 PM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Friday, July 11, 2014 10:12 AM
Points: 1,109, Visits: 545
Comments posted to this topic are about the item Search SQL Error Log

Alejandro Pelc
Post #669780
Posted Monday, March 16, 2009 9:05 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, August 14, 2014 3:20 PM
Points: 1, Visits: 299
I am a newbie to sql.
I can get this to work on sql 2005 but not on sql 2000? How can I make it work for sql 2000?
Post #676594
Posted Monday, March 16, 2009 7:51 PM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Friday, July 11, 2014 10:12 AM
Points: 1,109, Visits: 545
Hi Nancy,
sorry the delay but I'm on a trip and just saw your post. First of all, it won't work on SQL 2000 because I create a table variable, which is not supported. Second, the sp_readerrorlog procedure exists on SQL 2000, but the parameters are not the same. I'll try to get my hands in one SQL 2000 instance tomorrow and then post back the sp.

Thanks,
Alejandro


Alejandro Pelc
Post #677116
Posted Tuesday, April 14, 2009 9:06 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, July 23, 2014 2:07 PM
Points: 12, Visits: 358
Hi there,

I receive this error when I test your script with the following parameters

sp_SearchSQLErrorLog @AllLogs = 0, @LogFile = 1, @SearchString1 = 'login', @SearchString2 = 'sa'

RegQueryValueEx() returned error 2, 'The system cannot find the file specified.'
Msg 50000, Level 11, State 3, Procedure sp_SearchSQLErrorLog, Line 63
Post #696646
Posted Tuesday, April 14, 2009 9:23 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Friday, July 11, 2014 10:12 AM
Points: 1,109, Visits: 545
Hi James,
That means that one of the log files is not there. I'll review the script to validate that the log file exists.

Cheers,
Alejandro


Alejandro Pelc
Post #696671
Posted Tuesday, April 14, 2009 9:31 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Friday, August 15, 2014 5:01 PM
Points: 1,613, Visits: 1,539
There is an easier way to do this. Just use xp_enumerrorlogs.

See my blog post on the subject: Error Logs: Part Two

Also see Error Logs: Part I which also shows you how to do it in SQL 2000.




My blog: SQL Soldier
Twitter: @SQLSoldier
My book: Pro SQL Server 2008 Mirroring
Microsoft Certified Master: SQL Server 2008
Principal DBA: Outerwall, Inc.
Also available for consulting: SQL DBA Master
Post #696679
Posted Tuesday, April 14, 2009 9:57 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, July 23, 2014 2:07 PM
Points: 12, Visits: 358
Thanks for the info
Post #696710
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse