Solved

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

Posted on 2011-09-26
5
296 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Business Impact of IT Communications

What are the business impacts of how well businesses communicate during an IT incident? Targeting, speed, and transparency all matter. Find out more in this infographic.

Question has a verified solution.

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

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
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…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
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.

707 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