Can not read errorlog due to it not being in unicode

  • Hi all,

    During my daily checks today I noticed one of my instances had a job fail that has never failed before. It is just a job that executes the sp_cycle_errorlog. When I looked at why it failed, the job history gave me this:

    ...Unable to cycle error log file from 'D:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Log\ERRORLOG.11' to 'D:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Log\ERRORLOG.12' due to OS error '1392(The file or directory is corrupted and unreadable.)' A process outside of SQL Server may be preventing SQL Server from reading the files. As a result, errorlog entries may be lost and it may not be possible to view some SQL Server errorlogs. Make sure no other processes have locked the file with write-only access." [SQLSTATE 42000] (Error 17049) DBCC execution completed. If DBCC printed error messages, contact your system administrator. [SQLSTATE 01000] (Error 2528). The step failed.

    Next I tried to use sp_readerrorlog, and it gives the error message :

    Msg 22004, Level 16, State 1, Line 0

    Unicode file expected.

    As a result I have no archive log #1 and an unreadable current error log. I have noticed that the file is still being written to, Management Studio can just not read this file.

    My questions are, what can I do to fix this? Is this a serious issue? And how did this happen?

    Any help is appreciated.

    Cheers,

    Kurt Kapferer

  • If the server is not business critical restart the SQL service and it will recycle the error log.

    is there any anti-virus running on the server, if so, make exceptions for your SQL Server, .mdf, .ndf, .ldf, along with errorlog files or if possible the folder where sql places its files.

    and ask your server\storage admin to see if the DISK\LUN is in good shape?

    you can also check the windows event viewer.

    looks like nothing critical as such, but if someone has done this intentionally then .......... cross your fingers.

    Regards,
    Sarabpreet Singh 😎
    Sarabpreet.com
    SQLChamp.com
    Twitter: @Sarab_SQLGeek

  • Sarab,

    Thanks for your response. This is a non-critical production system, so I will be able to recycle the instance in the off hours today. I'll also look into your suggestions.

    Thanks again!

    - Kurt

  • kkapferer (3/4/2010)


    Sarab,

    Thanks for your response. This is a non-critical production system, so I will be able to recycle the instance in the off hours today. I'll also look into your suggestions.

    Thanks again!

    - Kurt

    before taking your SQL BOX down don't forget to take Backups and also make a note of configuratinos in case..............:-)

    all d best

    Regards,
    Sarabpreet Singh 😎
    Sarabpreet.com
    SQLChamp.com
    Twitter: @Sarab_SQLGeek

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply