3

I have 2 jobs for one database. One does a full backup every hour. The other one is a transaction log backup every 15 minutes.

I've checked the job history. It shows some failures at 16:00. The detail is as follows:

enter image description here

Does that mean that 2 jobs can't run at the same time?

The error detail is:

Message Executed as user: NT SERVICE\SQLSERVERAGENT.
Cannot open backup device 'D:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Backup\AdventureWorksLT_from_Azure.bak'.
Operating system error 32(The process cannot access the file because it is being used by another process.).
[SQLSTATE 42000] (Error 3201) BACKUP LOG is terminating abnormally.
[SQLSTATE 42000] (Error 3013). The step failed.'

Could you please help me for that?

1
  • The error is clearly saying file is being locked by other program The process cannot access the file because it is being used by another process .. backing up to same file ?
    – Kin Shah
    Commented Jan 20, 2017 at 21:51

1 Answer 1

3

There are two possibilities that come to mind:

1. The full backup and the transaction log backup are trying to use the same file.

'D:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Backup\AdventureWorksLT_from_Azure.bak'

  1. Something else is locking the file i.e. tape backup

    I have had tape backups cause this problem for me. I had to wait until the tape backup finished then my SQL Agent backup job would work.

1
  • Thank you very much. I modify the transaction log back up to another file. The issue is gone!
    – Luke
    Commented Jan 20, 2017 at 22:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.