This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

verbose, Log file is removed upon success setting is not removing logs

I have logging set to Verbose, Log file is removed on success set on one of our servers where we are testing different scenarios.  The backups are succeeding, that jobs are completing but the logs aren't being removed.

 

Has anyone else run into this?  we are running 8.5.0.625.

 

Thanks

  • Hello,

    As a first step I would check that the SQL server service account has the right to delete files from the folder you place your logs into. Also review one of the logs and make sure the exit code, seen at the bottom, is a "0" for an engine log or "0 (success)" for a maintenance plan log.

    If the exit code is a "1" the job has recorded an error hence why the log was not deleted.

    Hope that helps,
    -Ben-

  • Thank you for the suggestion, I verified delete permissions but I cleared the directory today so I will have to wait for the next log to check the exit code.

    I will post after I do.

    Thanks
    Cory
  • I found this in the most recent log:
    13:08:56.538 Main CLSEngine::ConfigureThreads Engine thread exit code. ThreadId:6 Code:0
    this should be deleted correct? Is that the code you were speaking of?

    Thanks
    Cory
  • Hello Cory,

    No, that is a VDI thread closing. In an advance engine log look for the below line for a successful job.This line is located at the bottom of the log..

    EXAMPLE:

    13:36:27.193 Main main } = 0

    Zero here means Success. A one means failed.

    In a "normal" engine log (logging=2 has been selected in your job) look for a message\error section again at the bottom of the log.

    EXAMPLE:
    <MESSAGES>

    <ERROR error="11806" showInUI="true">Backup of database "model" failed.
    LiteSpeed for SQL Server can not append to a backup file in use with the LiteSpeed Engine.

    </ERROR>

    <INFO>CPU Seconds: 0.14</INFO>

    <INFO>Environment: Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz</INFO>

    <INFO>CPUs: 8 logical, 4 cores, 4 physical packages.</INFO>

    </MESSAGES>

    A message\error section ONLY exist if the job recorded an error. If there is no message\error section as seen above then the job completed without error.

    Also note these are engine logs which will not be deleted by a "remove on success" configured in a maintenance plan reporting option.

    Hope this helps,
    -Ben-
  • One other note which may help.

    If the below is what you see in the log as the last line.

    Main main } = 0

    Then please verify that the below option (delete log file on success) has been selected for advance engine logging.

     

  • Hello Cory,


    Just checking if the above information helped to resolve your issue.
    If not, please post back or, if you like, please open a support case and we can help you directly via a webex.


    Thanks,
    -Ben-
  • Been I checked the logging settings and nothing is checked so the Delete log file on success is grayed out.

    I think I will open a support case since the logs aren't completing with success but the jobs are.

    Thank you for all your help.
    Cory