Re: Using findstr on SQL 2005 ERRORLOG file

Re: Using findstr on SQL 2005 ERRORLOG file

am 21.04.2008 22:45:06 von Dan.Cook

On Feb 28, 11:12=A0am, Teresa Masino
wrote:
> 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?
>
> Thanks in advance for any insight,
> Teresa Masino

The TYPE command will convert unicode to ASCII. i.e.

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