clean up maintenance plan failing because it can't access log file

  • Much like the subject says, my cleanup job is failing because it can't access the log file it generates. The exact error is :

    The process cannot access the file 'E:\\Program Files\\Microsoft SQL Server\\MSSQL10.MyServer\\MSSQL\\Log\\TJUHMaint_Cleanup files_20110808075201.txt' because it is being used by another process.

    What other process could be accessing this

  • irritating those type of errors! You don't have it open in another mapped file/drive?

    I usually try to rename a file in this type of situation and see what info is generated. Your delete isn't trying to delete the log file it's actually writing? I know it sounds silly but I admit to doing this once myself.

    [font="Comic Sans MS"]The GrumpyOldDBA[/font]
    www.grumpyolddba.co.uk
    http://sqlblogcasts.com/blogs/grumpyolddba/

  • Hi, I initally checked to see if it was trying to delete its own log, but no, this job deletes old backup files. Strange.

  • So definitely no "Keep logs for x amount of days" in there?

  • nah, we have a separate job to cleanup thos files

  • jshurak (8/8/2011)


    Much like the subject says, my cleanup job is failing because it can't access the log file it generates. The exact error is :

    The process cannot access the file 'E:\\Program Files\\Microsoft SQL Server\\MSSQL10.MyServer\\MSSQL\\Log\\TJUHMaint_Cleanup files_20110808075201.txt' because it is being used by another process.

    What other process could be accessing this

    You don't have the cleanup step trying to run in parallel with another step in the maintenance plan do you? Verify that you have a precedence constraint from the previous step in the maintenance plan to the clean up step.

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

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