Link to home
Start Free TrialLog in
Avatar of SEHC
SEHCFlag for Canada

asked on

How to ignore or filter out certain SQL Server error log messages?

Hi,

Is it possibly to ignore certain SQL Server 2000 errorlog messages?
We are getting Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. which we need to ignore or filter out.

Thanks.

 
Avatar of DBoyes
DBoyes

SEHC,

Let me know if the following might work, or be helpful in any way... of course, you could encapsulate the code into a store procedure, and pass parameters so that you could include or exclude any number of types of log entries.

Thanks!
David.
CREATE TABLE	#TempLog
			(LogDate DATETIME, ProcessInfo VARCHAR(50),
			 [Text] VARCHAR(2000))
 
INSERT INTO	#TempLog
EXEC		sp_readerrorlog
 
SELECT		*
FROM		#TempLog
WHERE		[Text] NOT LIKE
		'%Login failed for user ''(null)''.%'
 
DROP TABLE	#TempLog

Open in new window

Avatar of SEHC

ASKER

Hi DBoyes,

Thanks for your quick response.
What I'm looking for is to find a way to avoid recording "Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection." message in the actual "SQL Server errorlog", so even running the system stored procedure "sp_readerrorlog" will not contain this message.
Thanks.
SEHC - I'm not sure that is possible, but I'll take a poke around during the course of today to make sure - bear with me, as I have a few other things going on today - I'll try to leave another reply before the end of the day.

Thx!
SEHC - I was not able to find much more information.

I did find out that an SQL Agent Log can be tailored to include/Exclude Informational and/or Warning messages, but all I have to hand right now is a local copy of SQL Server 2005 Express, and the option does not appear to be available (Right-click and configure on "Management/SQL Server Logs".

I've put some feelers out to other colleagues, but it might take them a while to get back to me. Watch this space, but don't hold your breath!
Avatar of SEHC

ASKER

Thanks for the update DBoyes.
ASKER CERTIFIED SOLUTION
Avatar of DBoyes
DBoyes

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of SEHC

ASKER

Hi David/DBoyes,

Thanks for your suggestions and the time spent, much appreciated.
The information your provided is indeed very useful .
Let me dig more into this, and I'll sure keep you updated here.

Regards,
Fazal