Daily Logging Detail

×
This query is great for monitoring the health of the system. Just setup an ExportToEmail job to send you this queries results daily:
 

select
SourceSolution AS Application, Category, ErrorCode, SourceObject AS Object, SourceRoutine AS Routine,CAST(EventMessage AS VarChar(50)) AS [Message]
,Severity, VersionNo, Count(*) AS [Count]
from bdlogging with(nolock)
where eventtime>='%Yesterday%' and eventtime<'%Today%'

-- The following removes standard operational logging that we don't want to see
AND NOT
(
SourceSolution='JobMaster' AND Category='Services' AND SourceRoutine='Execute'
AND Severity=3 AND CAST(EventMessage AS VarChar(10))='Duration -'
)
AND NOT
(
SourceSolution='JobMaster'
AND Category='Services'
AND SourceRoutine='Execute'
AND Severity=3 AND CAST(EventMessage AS VarChar(10))='ProcessID '
)
group by SourceSolution, Category, ErrorCode, SourceObject, SourceRoutine,CAST(EventMessage AS VarChar(50)),Severity, VersionNo
ORDER BY Count(*) Desc, Severity