none
Problems Restoring SQL Server Database

    Question

  • Hello everyone and thanks for your help in advance.  I did a recent install of SQL Server 2005 on a test machine (Windows 7 Ultimate).  I took the backup from our production database (SQL Server2000) (Everyone, please hold the groans and dinosaur comments!).  Took full DB backup file *.bak of current production system. Selected  "Overwrite  the existing Database"  and "Leave the database  ready  to use by rolling back uncommitted transactions.  When I run the backup, I receive the following error:  System.Data.SqlClient.SqlError: RESTORE detected an error on page (0:0) in database "myDB" as read from the backup set. (Microsoft.SqlServer.Smo).  Obviously, the first thought is the backup file is corrupted.  I reran the backup and received the same problem.  Finally, I tried restoring this backup file to another machine running SQL Server2000.  The restore executed correctly and restored the database.  I really have no idea where to go from here.  Any help would be appreciated.
    Saturday, June 29, 2013 1:27 AM

Answers

  • "

    It seems the backup file has been corrupted and can NOT restore, Just to make sure ur SQL Database is healthy and clean... please execute DBCC CHECKDB on that database. After the successfull completion dbcc checks, Initiate one more backup with the current database and verify that backup file before restoring.

    Recomended Practice: when you completed your SQL Backup it is recomended to verify that backup file immediately

    If you are able to success to execute the below command, then only u r able to restore

    RESTORE verifyonly
    FROM DISK='D:\DB.bak';

    "

    Source: http://social.msdn.microsoft.com/Forums/sqlserver/en-US/40f13064-13c3-4e4e-9d58-055efb3985d0/sql-sever-restore-error-systemdatasqlclientsqlerror-restore-detected-an-error-on-page-00-in

    Regards,

    André César Rodrigues

    Please click the Mark as answer button and vote as helpful if this reply solves your problem. Thanks!

    Blog: http://sqlmagu.blogspot.com.br  LinkedIn:   

    Saturday, June 29, 2013 2:48 AM

All replies

  • "

    It seems the backup file has been corrupted and can NOT restore, Just to make sure ur SQL Database is healthy and clean... please execute DBCC CHECKDB on that database. After the successfull completion dbcc checks, Initiate one more backup with the current database and verify that backup file before restoring.

    Recomended Practice: when you completed your SQL Backup it is recomended to verify that backup file immediately

    If you are able to success to execute the below command, then only u r able to restore

    RESTORE verifyonly
    FROM DISK='D:\DB.bak';

    "

    Source: http://social.msdn.microsoft.com/Forums/sqlserver/en-US/40f13064-13c3-4e4e-9d58-055efb3985d0/sql-sever-restore-error-systemdatasqlclientsqlerror-restore-detected-an-error-on-page-00-in

    Regards,

    André César Rodrigues

    Please click the Mark as answer button and vote as helpful if this reply solves your problem. Thanks!

    Blog: http://sqlmagu.blogspot.com.br  LinkedIn:   

    Saturday, June 29, 2013 2:48 AM
  • Thanks for the response.  I ran DBCC CHECKDB without any errors.  I really don't think the problem is the database, but some sort of version or rights problem.  I'm not sure what.
    Saturday, June 29, 2013 12:55 PM
  • I would like you to follow this procedure Create and empty database give it random name on sql server 2005 now try restoring the bak file on this with overwrite option tell me whether you succeed ...

    After you succeed run DBCC CHECKDB on newly created/restored DB just to be sure ..now if no error comes make current DB offline rename it to name u want...

    Give it a try..


    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

    Saturday, June 29, 2013 3:25 PM
  • I concur with André. Please check if the backup is valid by either running RESTORE HEADERONLY or RESTORE VERIFYONLY.

    Alternatively you can also try attaching the .mdf/.ldf files from the old server to this server.

    Also check the SQL Server Error Log for any details related to the RESTORE operation.




    Pradeep Adiga
    Blog: sqldbadiaries.com
    Twitter: @PradeepAdiga

    Saturday, June 29, 2013 6:51 PM