Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Having problems restoring my backup on another server

Status
Not open for further replies.

Chris5066

Programmer
Feb 23, 2004
11
SG
I am moving a database from one server to another, the current server is a NT4 server with SQL7 and the new server is a WIN2000 with SQL7 and the names of both the servers are different.
Now when I try to restore the backup from the current server to the new one I get this error msg

"Microsoft SQL-DMO(ODBC SQLState: 42000). The header for file 'C:\MSSQL7\data\Database1_Data.MDF' is not a valid database file header. The PageAudit property is incorrect. RESTORE could not start database 'Database1'. Backup or restore operation terminating abnormally."

I even tried to read the header using
"restore Headeronly from disk" and it read the header without any problem.

However the username shown in the header is not a valid user in the new server because it is a local user on the current server. And also the machine name is the current server name.

I am wondering whether this is causing the problem and how can I overcome this.

Thanks
 
Hi,

Are the both the file locations for the database same ? I mean the path for .mdf and .ldf files are the same in both the servers.

If not, then you will have to use the WITH MOVE option to restore the database to the new server.

Also it does not matter for the server name to be different.

--Kishore


 
Thanks Kishore and yes I am using the MOVE option to restore the backup, but I still get the error msg.
 
Looks like you have a corrupted backup file with you.
Probably you can have one more copy from your original database and try restoring it on the new server.

One more way would be to take the database offline, detach the data and log files from your original server, copy them to the new server and then attach them to the new server using sp_attach_db.

Hope this helps.

--Kishore
 
I have tried the first option but it does not help and the second option is my last resort, because it involves down time on the production server which I don't want to do unless it is the only way out.
 
Chris --

I would suggest you 2 options here :

1. I would recommend to run a DBCC CHECKDB on your original server and check if any part of the database is not corrupt.

2. If you have a test sql machine wherein you could restore your backup file and check if it is getting restored there perfectly.

Let me know of your progress.

--Kishore


 
Are BOTH SQL7 instances set up the same way? All settings (collation, language, etc) need to be set exactly the same.

-SQLBill

Posting advice: FAQ481-4875
 
try to restore using only the physical file
ie first detach db
then restore from physical file
without the transaction log
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top