?
Solved

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

Posted on 2011-09-26
5
Medium Priority
?
297 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:Brendt Hess
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 2000 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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
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…
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Suggested Courses

770 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