Backup failing

  • Hi everybody,

    I have the below script on SQL Server 2005, SP1 on Windows 2003 Server to backup a database

    BACKUP DATABASE [XYZ] FILEGROUP = N'PRIMARY' TO [XYZ] WITH NOFORMAT, NOINIT, NAME = N'XYZ-Full Filegroup Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10

    GO

    declare @backupSetId as int

    select @backupSetId = position from msdb..backupset where database_name=N'XYZ' and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N'XYZ' )

    if @backupSetId is null begin raiserror(N'Verify failed. Backup information for database ''XYZ'' not found.', 16, 1) end

    RESTORE VERIFYONLY FROM [XYZ] WITH FILE = @backupSetId, NOUNLOAD, NOREWIND

    GO

    And after 40% processing the backup fails with below error message. I have been trying to find out the solution for past 2 days, but in vain. Can someone look at below results and show me any pointers?

    10 percent processed.

    20 percent processed.

    30 percent processed.

    Msg 3634, Level 16, State 1, Line 1

    The operating system returned the error '32(The process cannot access the file because it is being used by another process.)' while attempting 'CreateFile' on 'F:\MSSQL\005.YINT01\XYZ\XYZ01.mdf'.

    Msg 3013, Level 16, State 1, Line 1

    BACKUP DATABASE is terminating abnormally.

    Msg 50000, Level 16, State 1, Line 3

    Verify failed. Backup information for database 'XYZ' not found.

    Msg 3250, Level 16, State 0, Line 4

    The value '0' is not within range for the FILE parameter.

    Msg 3013, Level 16, State 1, Line 4

    VERIFY DATABASE is terminating abnormally.

    Thanks in advance!


    Thanks!

    Viking

  • Can post your backup device details...

    I think you may be using the backup device file name same as your database mdf file...

     

    MohammedU
    Microsoft SQL Server MVP

  • Here is the backup device create script

    EXEC master.dbo.sp_addumpdevice @devtype = N'disk', @logicalname = N'XYZ', @physicalname = N'D:\FT005.YINT01.USERDB BACKUP\XYZ\XYZ.BAK'


    Thanks!

    Viking

  • It looks fine...

    try running the backup without creating the disk...

    Don't run the restore verify...first let backup finish completely...

    BACKUP DATABASE [XYZ] FILEGROUP = N'PRIMARY' TO disk = 'D:\FT005.YINT01.USERDB BACKUP\XYZ\XYZ.BAK' WITH stats = 10, NOINIT

    MohammedU
    Microsoft SQL Server MVP

  • I have tried these options too, but in vain. No success until now.


    Thanks!

    Viking

  • Any other error in SQL error log related to this bakcup failure?

    Final option will be call PSS...

    MohammedU
    Microsoft SQL Server MVP

  • Have you tried backing up to another drive?

     

    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.

  • No, I haven't because I don't have space on other drive because I have data files of the same database.


    Thanks!

    Viking

Viewing 8 posts - 1 through 7 (of 7 total)

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