locked
RESTORE detected error on page (0:0) RRS feed

  • Question

  • Hi

    I am battling to restore a database, and keep getting this error.

    System.Data.SqlClient.SqlError: RESTORE detected an error on page (0:0) in database "xxxxxxx" as read from the backup set. (Microsoft.SqlServer.Smo)

     

    Source Machine is running SQL2008R2 Enterprise (10.50.2500) (32 bit), on Windows XP.

    Target Machine is running SQL2008R2 Enterprise (10.50.2500) (64 bit) on Windows 7.

    I have no problem restoring the .bak file on the source machine, but cannot get past that message ont he target system. I was under the impression that the 32 and 64 bit versions of SQL were compatible, and that I am using the same version (service pack) on both machines. What am I missing.

    Thanks in Advance,

     

    Wednesday, September 21, 2011 9:09 AM

All replies

  • Hi,

    I'm pretty sure there's no problem restoring between different versions.  I would try taking a fresh copy of your .bak file to see if that restores.

    Have you tried a RESTORE VERIFYONLY to see if you get more information about the backup failure?

    You could try using the CONTINUE_AFTER_ERROR with the backup command, then run a DBCC CHECKDB on the database.

    http://msdn.microsoft.com/en-us/library/ms190952.aspx



    Thanks,

    Andrew Bainbridge
    SQL Server DBA

    Please click "Propose As Answer" if a post solves your problem, or "Vote As Helpful" if a post has been useful to you

    Wednesday, September 21, 2011 10:27 AM
  • There was no 32 bit version of SQL Server R2, secondly you cannot install ANY Enterprise edition on XP so you must be mistaken. Please run SELECT @@version against each instance and post the output. Thanks.

    Regards,
    Mark Broadbent.

    Contact me through (twitter|blog)

    Please click "Propose As Answer" if a post solves your problem
    or "Vote As Helpful" if a post has been useful to you
    Wednesday, September 21, 2011 10:29 AM
  • Hi,

    Sorry Mark but there is a 32bit version of SQL Server 2008 R2.

    Andrew, please post the result of SELECT @@VERSION as Mark asked. As per my experience, this error may happen in two cases:

    1. corrupt backup file: create a new backup and try to restore that one.
    2. you try to restore a backup on a server with lower version than the backup created (sp or version difference like 2005, 2008).  Eg.: you try to restore a SQL 2008 database backup on a SQL 2005 instance. 

    I hope it helps.

    J.


    There are 10 type of people. Those who understand binary and those who do not.

    • Edited by Janos BerkeMVP Wednesday, September 21, 2011 10:50 AM added more clarifications
    Wednesday, September 21, 2011 10:47 AM
  • HA! Good catch, yes of course there is since I'm running it as well as on 64bit! Was actually Windows 2008R2 that is 64bit only.

    Regards,
    Mark Broadbent.

    Contact me through (twitter|blog)

    Please click "Propose As Answer" if a post solves your problem
    or "Vote As Helpful" if a post has been useful to you
    Wednesday, September 21, 2011 11:05 AM
  • SELECT @@version

    Old PC

    Microsoft SQL Server 2008 R2 (SP1) - 10.50.2500.0 (Intel X86)   Jun 17 2011 00:57:23   Copyright (c) Microsoft Corporation  Enterprise Edition on Windows NT 5.1 <X86> (Build 2600: Service Pack 3) 

     

    New PC

    Microsoft SQL Server 2008 R2 (SP1) - 10.50.2500.0 (X64)   Jun 17 2011 00:54:03   Copyright (c) Microsoft Corporation  Enterprise Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) 

    I used the same SQL Enterprise setup files, and downloaded service pack 1 to bring the new PC up to the same version as the old. The error message for an incompatible SQL version is slightly different (ABNORMAL HEADER), and is not what I am getting int his case.

    I have made several backups in trying to sort out this problem. I have no problem in restoring them on the same PC, or even detach/attach the database on the same pc.

    I have also tried truncating the log files and doing another backup. Regardless, I get the same error when attempting to restore or attach on the new PC. 

    I have three different databases on my old PC, and none of them will restore on the new PC.

    I will try some of the suggestions posted above, and post here should I make progress.

     

    Wednesday, September 21, 2011 11:56 AM
  • I would suspect some folder/networking/permission issues here. I can't say exactly what, sinze for instance detach/attach seems to work, but I would look in that direction. One thing is to not try the restore or backup over the network (if that is what you are doing) using UNC, but rather produce the backup locally and copy the file. Also, try different disks on the destination machine and even different folders (for the backup file). Remember that it is the SQL Server service which need permissions on the backup file, not you.
    Tibor Karaszi, SQL Server MVP | web | blog
    Wednesday, September 21, 2011 12:05 PM
  • I gave up on migrating my SQL2008R2 databases to the new PC, so continued with my project work on the old PC. Will probably use both computers for a while. Various other databases from SQL2005, SQL2008 migrated no problem, so the majority of my work is on the new PC anyway. 

    Should I make headway with this issue in the future, I'll post here what the likely problem was. I did check folder permissions (thanks TiborK), but it did not appear to be the issue. 

    Monday, September 26, 2011 6:53 AM
  • Well its been long since this issue was discussed here but recently i faced a similar kinda problem when i was trying to migrate my moss2007 to sharepoint 2010 with db attach approach.

    i tried everything and in last i copied backup file on another drive and tried restoring it,it  worked for me.

    one can also try changing the mdf file path to other drive and attaching it back.

    Friday, July 6, 2012 6:38 AM