Search code examples
sql-serversql-agent-job

why Job Sql server has a stuck on "running" status in the step while it is finished


Hello I have a job who do this step: step 1 : copy backups file ( they are big) from FTP to a local serveur step 2 : restore the the backups

When I execute the job via Sql server Agent. The job remains stuck on "running" status in step 1 ( I know that because I have a t-sql procedure that insert into a table the current running step and it is because the restoration step is not yet done), however the files were copied successfully What should I do to solve this problem ?

Thank you


Solution

  • This is normal:

    One of possible reason was that FTP process still holding the backup file. You can verify this by using process explore tool (https://learn.microsoft.com/en-us/sysinternals/downloads/process-explorer)

    It often happened with large files or with unstable network, or even with the FTP server it's self, there are many reasons, for example, the file might be scanned by your local anti virus software as well.

    I suggest to wait for 15 minutes before starting restoration process if you had to use FTP to transfer files. Also, make sure configure exception policy of your local anti virus software to skip .bak or .trn or whatever the file types.