Restore failed, DB loading... loading... crap.

  • Hey All,

    I tried to restore a database (as I do every month), but this time I got an error, and the database is stuck in (loading) status and is unaccessable.  Help! How do I get my database back and restore my data?

    The T-SQL I use is below:

    RESTORE DATABASE [dbname]

    FROM DISK = 'e:\mssql7\backup\[filepath].bak

    WITH recovery ,

    MOVE [dataname] TO [mdf_file],

    MOVE [logname] TO [ldf_file]

    The error I got is below:

    Server: Msg 3241, Level 16, State 37, Line 11

    The media family on device 'e:\mssql7\backup\[filepath].bak' is incorrectly formed. SQL Server cannot process this media family.

    Server: Msg 3013, Level 16, State 1, Line 11

    RESTORE DATABASE is terminating abnormally.

    I have 2 GIGS left on the server, and the largest file I'm dealing with is 210MB.  I'm at a total loss.

  • I don't think that you want [] around the filepath do you?

  • sorry, the [] are placeholders for the actual file path.

    The restore statement should read:

    RESTORE DATABASE dbtest_name

    FROM DISK = 'e:\mssql7\backup\dbtest_backup_device.bak'

    WITH recovery ,

    MOVE 'dbtest_data' TO 'e:\mssql7\data\dbtest_data.mdf',

    MOVE 'dbtest_log' TO 'e:\mssql7\log\dbtest_log.ldf'

    And the error message should read:

    The media family on device 'e:\mssql7\backup\dbtest_backup_device.bak' is incorrectly formed. SQL Server cannot process this media family.

  • Did you receive any error messages when you backed up the database?

     

  • I didn't see any errors when the database was backed up.

  • Are you sure the backup is valid? Try

    RESTORE VERIFYONLY FROM DISK = 'e:\mssql7\backup\dbtest_backup_device.bak'

    This should return 'The backup set is valid'.

    Also   confirm you haven't been appending backups by using RESTORE HEADERONLY.

  • Hi

     

    If your datbase status stayed Loading and you have a log file, apply all logs to full recovery.

     

    If you dont have logs, retired hint recovery from restore command.

     

     

     


    Hildevan O Bezerra

  • Peter,

      Thanks for your suggestion.  Turned out the backup had been corrupted or truncated.  I pulled down the lattest version of the backup from our production machine and it worked fine.  Thanks for everyone's help

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

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