March 5, 2009 at 3:47 pm
Comments posted to this topic are about the item Search SQL Error Log
Alejandro Pelc
March 16, 2009 at 9:05 am
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?
March 16, 2009 at 7:51 pm
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
April 14, 2009 at 9:06 am
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
April 14, 2009 at 9:23 am
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
April 14, 2009 at 9:31 am
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.
April 14, 2009 at 9:57 am
Thanks for the info
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply