HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

Failure during 2 backup jobs for one database

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
duringdatabasejobsoneforfailurebackup

Problem

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:

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?

Solution

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'

  • 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.

Context

StackExchange Database Administrators Q#161815, answer score: 3

Revisions (0)

No revisions yet.