I have a backup file taken from a SQL Server 2000 database and I'm trying to restore it to a 2008 database. However, I'm getting this error:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo) The media family on device 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Backup\customers.bak' is incorrectly formed. SQL Server cannot process this media family. RESTORE HEADERONLY is terminating abnormally. (Microsoft SQL Server, Error: 3241)
I am the one who originally took the backup (years ago). It was a hosted SQL Server. If I remember correctly, I got the backup using some sort of online "control panel"
SQL 2000 SP4 database can be upgraded on-the-fly to SQL 2008 (including restore-upgrade). See Version and Edition Upgrades. If you get that message most likely the media is corrupted.
In SQL Server 2008, follow these steps
Create New database with the same name as in SQL Server 2000
After writing database name, go to Options tab
In Compatibility Level dropdown select 'SQL Server 2000 (80)
After creating database, go to Task and select restore
After selecting restore resource go to options tab and select 'Overwrite the existing database (With Replace)
Your database will be restored
Related
The database was backed up on a server running version 8.00.2039. That version is incompatible with this server, which is running version 11.00.2100. Either restore the database on a server that supports the backup, or use a backup that is compatible with this server. (Microsoft.SqlServer.SmoExtended)
I am trying to restore and I get this message.. is there anyway to restore this backup without having to install SQL Server 2005?
SQL Server 2012 (v11.0) doesn't support direct upgrade from SQL Server 2000 (v8.0).
You'll have to use a "in-between" step restoring your SQL Server 2000 database to a SQL Server 2005 or 2008 instance, and then do a backup from there, in order to get your .bak file into the latest database server.
There's no trick or workaround for this - that's just the way it is, and you'll have to deal with it.
There are tons of blog posts on this topic, e.g.
Migration SQL Server 2000 to SQL Server 2012
I took a full backup of a SQL Server 2005 database, then restored it onto SQL Server 2008. I'm curious, was it a 2008 database at that point?
Anyways, I since did a full backup of it using SQL Server 2008 and now I have a machine with only SQL Server 2012 Express on it. When I try to restore from the backup file I get the following error:
TITLE: Microsoft SQL Server Management Studio
Restore of database 'CodeLib' failed. >(Microsoft.SqlServer.Management.RelationalEngineTasks)
ADDITIONAL INFORMATION:
System.Data.SqlClient.SqlError: The operating system returned the error '5(Access is denied.)' while attempting 'RestoreContainer::ValidateTargetForCreation' on 'D:\SQLdata\MSSQL10_50.SQLBESI\MSSQL\DATA\CodeLib.mdf'. (Microsoft.SqlServer.SmoExtended)
I ran SSMS as an Admin when I tried to restore it.
I have this scenario:
Old Server -> SQL Server 2005 with the current Database
New Server -> SQL Server 2012 no database created.
I want to migrate the old database to the new one.
I've tried to create a backup from the Management Studio 2005 and restore in the 2012. Failed.
I've connected from the 2012 server using Management Studio 2012 to the old server and create the backup. Then restored in the new one. Failed.
The error said that the versions are incompatibles (tried to restored a version from 8.0 to 11.0)
Then, I tried to use the Copy database Wizard. But a error message shows up:
The destination server can not be an instance of SQL Server 2005 Express or higher .
So, how it is supposed to do the backup?
I'm getting the scripts in sql files as last resort...
PS: I've check this thread, I need to migrate to 2008 and then 2012?
How to migrate a database from SQL Server 2005 to 2008 as is?
When I have performed a SQL Server migration in the past I have normally performed a SQL Backup, copy to the new server and then restore, I see in your question that you got an error, update the question with the error and perhaps we can be more specific about what you need to do to make it succeed.
I have also performed a migration by detaching the database from the old server, copying the data and log files to the new server and attaching the databases. This is the method I tend to go with.
The SQL you would use to attach the MDF/LDF files is as follows:
CREATE DATABASE MyAdventureWorks
ON (FILENAME = 'C:\MySQLServer\AdventureWorks_Data.mdf'),
(FILENAME = 'C:\MySQLServer\AdventureWorks_Log.ldf')
FOR ATTACH;
You can refer to the documentation at: https://msdn.microsoft.com/en-AU/library/ms190209(v=sql.110).aspx
Please apply latest service pack SP4 on 2005 databases after this take a full backup of 2005 databases and restore it on 2012. I hope, it will work.
I am trying to restore a backup file to SQL Server 2008. I am getting the following message.
System.Data.SqlClient.SqlError: The database was backed up on a server
running version 10.50.1600. That version is incompatible with this
server, which is running version 10.00.1600. Either restore the
database on a server that supports the backup, or use a backup that is
compatible with this server. (Microsoft.SqlServer.Smo)
I need to transfer all data from the SQL server 2008 R2 backup file to SQL server 2008 database.
Can you please suggest me how to restore the .bak file.
Although SQL 2008 and SQL2008 R2 have similar(ish) names, a backup from SQL 2008R2 (where your .bak file was created) cannot be restored on a SQL 2008 instance (where you are trying to restore it.)
You could create a new backup using a third party tool like Redgate SQLBackup, or you could use the import/export wizard in SSMS to transfer the data, but R2 backups are not backward compatible unfortunately.
*Hi,
The Case:
I am trying to move a database from one server to another, source server has SQL Server 2008 R2, destination server has SQL Server 2008.
I copied the .mdf file only I tried to use query sp_attach_db and wizard attach but the was an error, as follows:
Attach database failed for Server
'SERVER_NAME'.
(Microsoft.SqlServer.Smo)
----------------------- ADDITIONAL INFORMATION:
An exception occurred while executing
a Transact-SQL statement or batch.
(Microsoft.SqlServer.ConnectionInfo)
The database 'DB_Name' cannot be
opened because it is version 661. This
server supports version 655 and
earlier. A downgrade path is not
supported. Could not open new database
'DB_Name'. CREATE DATABASE is aborted.
(Microsoft SQL Server, Error: 948)
I dont think its possible to attach a database from a higher version of SQL server to a lower version.
Eg 2008 to 2003 is not ok,
going from 2003 to 2008 is ok.
You could try doing an import export data but I have not worked out how to attach it so far.