SQL Server backup error

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mirko Slavko

    SQL Server backup error

    Hi,

    I have scheduled backup job on MS SQL server which appends full
    backup, verifies it and then it should eject tape. But upon finishing
    it says that job failed.
    I checked backup and it seems okay, database was backup-ed on tape and
    tape was ejected at the end of execution but job status was failed.

    Here is a code of backup procedure created with "backup database"
    option.

    BACKUP DATABASE [Trading17Replik a] TO TAPE = N'\\.\Tape0' WITH
    NOINIT , UNLOAD , NAME = N'Trading17Repl ika backup', NOSKIP ,
    STATS = 10, NOFORMAT , MEDIANAME = N'B'DECLARE @i INT
    select @i = position from msdb..backupset where
    database_name=' Trading17Replik a'and type!='F' and
    backup_set_id=( select max(backup_set_ id) from msdb..backupset where
    database_name=' Trading17Replik a')
    RESTORE VERIFYONLY FROM TAPE = N'\\.\Tape0' WITH FILE = @i

    If I change "UNLOAD" to "NOUNLOAD" (avoid ejecting tape) then
    everything passes OK.

    Thanks in advance

Working...