Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

dbf2mysql parameter, WWWXXXAPC, wwwxxxAPC, How to unsubscrube from dategen spam, docmd.close 2585, WWWXXXDOCO, nu vot, dhcpd lease file "binding state", WWWXXXDOCO, how to setup procmail to process html2text

Links

XODOX
Impressum

#1: Re: Using findstr on SQL 2005 ERRORLOG file

Posted on 2008-04-21 22:49:49 by Dan.Cook

On Feb 28, 5:33=A0pm, Erland Sommarskog <esq...@sommarskog.se> wrote:
> Teresa Masino (teresa.mas...@peninsula.org) writes:
> > We have set up a couple of SQL Server 2005 systems and I have found
> > that the format of the ERRORLOG files and the SQL Agent's log files
> > are Unicode or some format that findstr cannot parse properly. =A0"find"=

> > parses them fine, but it doesn't have the capabilities that I need --
> > specifically, I can't search for multiple strings in one search.
>
> > I see the checkbox on the SQL Agent's for "Write OEM File", but it is
> > grayed out so I am not able to try checking that. =A0I also don't know
> > if that would affect the server's ERRORLOG file too or just the
> > Agent's log file.
>
> > So what am I missing? =A0What is everyone else doing who is used to
> > having scripts to parse these files looking for strings that indicate
> > problems? =A0Is there a server setting that will force it to go back to
> > a plain ANSI text file format for log files? =A0Is that a bad thing to
> > do?
>
> I doubt there is a setting to force the SQL Server error log to be ANSI.
> Would be a lot problem to log object and database names with characters
> outside the ANSI set in that case.
>
> I guess the answer is to use Unicode-capable tools. I don't have any
> real suggestion for that. I search the errorlog fairly rarely, so most
> of the time I'm content of opening it in Textpad. (Which understands
> Unicode in so far it can handle the encoding, but it's not able to
> work with characters outside the ANSI range.)
>
> --
> Erland Sommarskog, SQL Server MVP, esq...@sommarskog.se
>
> Books Online for SQL Server 2005 athttp://www.microsoft.com/technet/prodte=
chnol/sql/2005/downloads/books...
> Books Online for SQL Server 2000 athttp://www.microsoft.com/sql/prodinfo/p=
reviousversions/books.mspx- Hide quoted text -
>
> - Show quoted text -

=46rom a batch job the TYPE command will convert unicode to ASCII. i.e.

TYPE \\SQLSRVR1\E$\MSSQL.1\MSSQL\LOG\ERRORLOG > \\SQLSRVR1\C$\ERRORLOG
\ErrorLog.txt

Report this message