Solved

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

Posted on 2011-09-26
5
293 Views
Last Modified: 2012-05-12
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!
0
Comment
Question by:luyan
  • 3
5 Comments
 
LVL 32

Expert Comment

by:bhess1
ID: 36632907
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
 
LVL 18

Accepted Solution

by:
x-men earned 500 total points
ID: 36708805
0
 
LVL 18

Expert Comment

by:x-men
ID: 36708812
0
 

Author Comment

by:luyan
ID: 36719820
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
 
LVL 18

Expert Comment

by:x-men
ID: 37130875
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

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

837 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question