none
What should I expect to see in next log if I cycle log? RRS feed

  • Question

  • I thought that when the SQL engine was restarted a fresh server log was created beginning with lines like "Microsoft SQL Server 2008....", "(c) Microsoft.." etc. but when you cycled the log (sp_cycle_errorlog) you just got a line in the old one saying "Attempting to cycle ....." and the new one just started afresh (blank).

    I've now noticed that on cycling the new log ALSO contains Microsoft copyright etc, just like a fresh server restart. HOWEVER I've noticed this someone DOESN'T happen. Ie for a log recycle sometime there is copyright and start information in the new log and sometime the new log just begins with whatever "proper" event happens next.

    Can someone explain? If I keep running sp_cycle_error log on a test server I can't get it to NOT start the new log with copyright details - finishing with "The error log has been reinitialized...". Do these lines perhaps not appear if server is too busy in production?

    
    Thursday, February 25, 2016 10:46 AM

All replies

  • Running DBCC ERRORLOG I got the below

    2016-02-25 12:52:31.27 spid53      Microsoft SQL Server 2005 - 9.00.5057.00 (Intel X86) 
    Mar 25 2011 13:50:04 
    Copyright (c) 1988-2005 Microsoft Corporation
    Enterprise Edition on Windows NT 5.2 (Build 3790: Service Pack 2)

    2016-02-25 12:52:31.27 spid53      (c) 2005 Microsoft Corporation.
    2016-02-25 12:52:31.27 spid53      All rights reserved.
    2016-02-25 12:52:31.27 spid53      Server process ID is 544545.
    2016-02-25 12:52:31.27 spid53      Authentication mode is MIXED.
    2016-02-25 12:52:31.27 spid53      Logging SQL Server messages in file 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG'.
    2016-02-25 12:52:31.27 spid53      The error log has been reinitialized. See the previous log for older entries.


    Best Regards,Uri Dimant SQL Server MVP, http://sqlblog.com/blogs/uri_dimant/

    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting: Large scale of database and data cleansing
    Remote DBA Services: Improves MS SQL Database Performance
    SQL Server Integration Services: Business Intelligence

    Thursday, February 25, 2016 10:53 AM
    Answerer
  • I was bit unable to understand your question but I would like to quote what BOl says

    Closes the current error log file and cycles the error log extension numbers just like a server restart. The new error log contains version and copyright information and a line indicating that the new log has been created.


    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it

    My Wiki Articles

    MVP

    Thursday, February 25, 2016 10:55 AM
    Moderator
  • I've attached some pictues.

    I filtered all logs for when log was cycled:

    The latest cycle was "normal":

    But the two previous one did not contain the copyright info before the "proper" events were listed. There are long time gaps - I have deleted nothing.

    Thursday, February 25, 2016 11:26 AM
  • I've attached some pictues.

    I filtered all logs for when log was cycled:

    The latest cycle was "normal":

    But the two previous one did not contain the copyright info before the "proper" events were listed. There are long time gaps - I have deleted nothing.

    I am not sure if you are missing anything. Can you use Sp_readerrorlog 1 or 2 or 3 to see previous logs and then compare

    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it

    My Wiki Articles

    MVP

    Thursday, February 25, 2016 1:37 PM
    Moderator
  • Next question - why cant I paste into this silly update box!

    Thursday, February 25, 2016 2:14 PM
  • Okay pasting seems to work on chome not IE!

    Sorry got a big estate and can't find what server i was talking about now!

    Thursday, February 25, 2016 2:34 PM