Some days ago, we received an incident about failed restore job which includes quite a lot of steps in it. When we checked why it’s exactly failing, it just says – Unable to open Step output file. Now, that’s interesting!
One of the steps is logging it’s progress in an output .log file which resides on one of the drives on the server.
When we checked the file and tried to opened it:
And for sure, the .log file was already more than 2GB in size, so no wonder we will have some problems writing in it again, or let’s think for the issue this way – when notepad cannot open a text file, let’s do not expect that SQL Server will!
So, as you can see from the screenshot above, we renamed the problematic .log file to nameofthefile_old and created a new one with the name that was used in the restore job(please, do not ask why robocopy is used! 🙂 ) and reran the job. You won’t believe, but it completed successfully! 🙂
So, next time, if you get this error – first check the size of your output file. Probably, it got bigger with the time especially when the append option is used.