Current errorlog missing

  • Hello everybody,

    last week I had to move my master database en with it the location of my SQL Server errorlogs. Since then new errorlogs are created in the new location specified in the startup parameter, but in EM I can only see the archived ones, not the current. ANy ideas what is causng this problem and how to fix it?

    Tia Markus

     

    [font="Verdana"]Markus Bohse[/font]

  • Maybe one more information, I recognized that xp_enumerrorlogs only returns the logs 1 to 7, but not 0 (which is the current log). Executing sp_readerrorlog works and returns the content of the current log.

    Markus

    [font="Verdana"]Markus Bohse[/font]

  • My observations are as below.

    xp_enumerrorlogs reads the file ERRORLOG (from HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\MSSQLServer\Parameters Key) and for Archived logs are named as per extension of the rest ERRORLOG).

    I changed the extension of previous ErrorLogs to ERRORLOG.3, ERRORLOG.4, ERRORLOG.5, ERRORLOG.6, ERRORLOG.7

    and found below

    0 02/14/2006  18:25 4233

    3 02/07/2006  19:31 3037

    4 02/07/2006  19:30 3021

    5 02/04/2006  16:42 4830

    6 01/26/2006  03:44 4044

    7 01/25/2006  20:26 4562

    please check HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\MSSQLServer\Parameters. Also check the file names in your LOG folder.

     

     

  • Thanks for your reply, but I found the reason for this behaviour.

    I had checked the start parameters before (in EM and the registry) and it looked to be ok. What I didn't realized was that there was a trailing blank space. So the archived logfiles had names like Errorlog .01 but for the current errorlog Windows removed the trailing space and that's why xp_enumerrorlogs couldn't find that one.

    Markus

    [font="Verdana"]Markus Bohse[/font]

  • That's interesting.

    Nice to know the "root cause" of this

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

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