February 14, 2017 at 1:38 am
I know what the messages mean and why they happen, but I'm sick of wading through them in the error log on instances that have a lot of databases on them (which happens a lot in our Dev environment). Is there a trace flag or anything that would let me mute this message, a bit like how trace flag 3226 prevents the logging of successful native backups?
Thanks
February 14, 2017 at 2:12 am
Don't think you can supress this message, do you have VSS (Volume Shadowcopy Service) on the DB volumes?
😎
February 14, 2017 at 4:14 am
We do, yes. That's a shame- thanks. Our Dev backups are a bit of a mess (not controlled by me) and it's a pain to have to wade through really long log files to find the useful stuff.
February 14, 2017 at 8:39 am
use xp_readErrorLog and filter them out
I use variations on this:
Create Table #Errorlog
(Logdate datetime,
ProcessInfo varchar(50),
LogText varchar(5000))
--Dump all the things into the table
insert into #Errorlog
EXEC sys.xp_readerrorlog
0-- Current ERRORLOG
,1-- SQL ERRORLOG (not Agent)
--Query just like you would anything else:
Select *
from #Errorlog
Where 1=1
--and LogText like '(c) Microsoft Corporation%'
and (LogText like '%Error%'or LogText like '%Fail%'--or LogText like '%SPN%'
)
And Logdate > getdate() -4
And LogText Not Like '%CheckDB%'
And LogText not like '%35262%'
And LogText not like '%35250%'
--Clean up your mess, you weren't raised in a barn!
Drop Table #Errorlog
------------------------------------------------------------------------------------------------Standing in the gap between Consultant and ContractorKevin3NFDallasDBAs.com/BlogWhy is my SQL Log File HUGE?!?![/url]The future of the DBA role...[/url]SQL Security Model in Plain English[/url]
February 14, 2017 at 8:42 am
Thanks, Kevin.
It's so annoying because I like a tidy error log for when I'm doing ad hoc checks if somebody calls up, or whatever.
February 14, 2017 at 9:08 am
Beatrix Kiddo - Tuesday, February 14, 2017 8:42 AMThanks, Kevin.It's so annoying because I like a tidy error log for when I'm doing ad hoc checks if somebody calls up, or whatever.
Yep...that's why I keep this handy in notepad 🙂 helps with morning checks against all prod servers at once as well.
------------------------------------------------------------------------------------------------Standing in the gap between Consultant and ContractorKevin3NFDallasDBAs.com/BlogWhy is my SQL Log File HUGE?!?![/url]The future of the DBA role...[/url]SQL Security Model in Plain English[/url]
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply