
Backup Problems with Sched tasks and SQL Exec
To All,
I've got a problem with SQL Scheduled Tasks and backup that I hope
someone might be able to help me with. I administer nine SQL Server
installations over a WAN using SQL Enterprise Manager. I have scheduled
tasks set up on all the servers to back up the application and master
databases every night. There are two alternating backup sets (Set A on
Monday, Set B on Tuesday, Set A on Wednesday, etc.) SQL Executive runs
the backups at 11:15 PM. The command I use for the scheduled tasks is:
DUMP DATABASE (database name) TO (backup device) WITH
NOUNLOAD,INIT,RETAINDAYS=2,NOSKIP
On two of these installations, a scheduled task has failed
consistently. The message in the Task History is:
Can't open dump device C:\MSSQL\Backup\XXXXXXX.DAT , device error or
device off line.
However, when I run the scheduled task manually (i.e. without SQL
Executive) or backup directly (without using Scheduled Tasks) the backup
works just fine.
If I look at the SQL error log, sometimes it says:
dbswritecheck: Backup device C:\MSSQL\BACKUP\XXXXXXX.DAT failed to open,
operating system error = 32 (The process cannot access the file because
it is being used by another process.)
However, there are no other processes occurring at the backup time.
Also, sometimes no message will be generated in the SQL error log at all
(as if the backup process never got going in the first place).
Does anybody have a clue as to what's going on here? Any help would be
greatly appreciated. Thanks!
--Paul Norton