How to put errorlog file of current day into one html file?

How to put errorlog file of current day into one html file? So it would be easier for DBA doing daily check. Or do you have any good idea to check errorlog more directly and easily?
Thanks!
luyanAsked:
Who is Participating?
 
x-menConnect With a Mentor IT super heroCommented:
0
 
Brendt HessSenior DBACommented:
You can always roll over the errorlog each day, and increase the number of error logs to match the number you need to retain (or create an archiving process on the logs after rollover).
0
 
x-menIT super heroCommented:
0
 
luyanAuthor Commented:
X-men, seems LogParser is a pretty good tool.

How to write the command line such as  
   LogParser "select date, ... from ..." ...
for getting information from SQL errorlog?

Could you give me one or two examples?
Thanks!
0
 
x-menIT super heroCommented:
example:

LogParser.exe "SELECT TO_TIMESTAMP(STRCAT(STRCAT(DATE,' '), TIME), 'yyyy-MM-dd hh:mm:ss') as DateTime, Source, Message FROM 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG*'" -i:TSV -iSeparator:spaces -iHeaderFile:C:\SQLErrorLogHeader.txt -headerRow:OFF -nskiplines:5 -o:DATAGRID
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.