Intermitant failures

  • Hi all

    I've got a backup job that runs every night which is occationally failing to run.

    The job first deletes the old backups then runs the following

    backup database Prod to disk = 'c:\inetpub\ftproot\Data\DB.bak' WITH INIT

    Most nights it runs fine but occationally the job fails. The job history contains the following.

    Error Detail Records: Error: -2147217900 (80040E14); Provider Error: 3013 (BC5) Error string: BACKUP DATABASE is terminating abnormally. Error source: Microsoft OLE DB Provider for SQL Server Help file: Help context: 0 Error: -2147217900 (80040E14); Provider Error: 3201 (C81) Error string: Cannot open backup device 'c:\inetpub\ftproot\Data\DB.bak'. Device error or device off-line.

    There is sufficient space on the drive for the backup to complete. As far as I know there are no other jobs, SQL or otherwise that run at the same time (I'm not the server admin)

    Does anyone know what could be causing this?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • If you are already using the WITH INIT option, there isn't a need to have a separate job to first delete the file.

    SQL BAK Explorer - read SQL Server backup file details without SQL Server.
    Supports backup files created with SQL Server 2005 up to SQL Server 2017.

  • The message "Device off-line or device off-line" indicates that something might hold the file that you are trying to write to. Proberly the file is still beeing removed when the backup starts.

    Further, there is no need to first delete the backupfile before starting a new backup, since "INIT" will overwrite the existing file.


    robbac
    ___the truth is out there___

  • The delete and backup are done in a DTS package, with an On_Completion workflow between them. I added the delete in after the first time I got this error. The server admin suggested that some process might have a lock on the file, causing the error.

    Which would be safer, to remove the delete, or to remove the WITH INIT?

    If it's any help, the server event log records the following:

    BackupDiskFile::CreateMedia: Backup device 'c:\inetpub\ftproot\Data\DB.bak' failed to create. Operating system error=5 (file not found)

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • If there is something that hold the file and you try to backup your database "WITH INIT", it will give you the same error as you get now "Device offline...".

    So I would not say that it is safer to delete the file prior to backing up the database.


    robbac
    ___the truth is out there___

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply