Can anybody resolve the issue where I am trying to restore a database to a SQL Server 2008 server from a backup file taken from a SQL Server 2008 R2 server?
1 Answer
If you mean that you are trying to restore a database backup from a more recent version, such as SQL Server 2008 R2, to a previous version such as SQL Server 2008, then you cannot do such a restore.
You could restore a SQL Server 2008 database to a SQL Server 2008 R2, since the backup can be promoted to the new level.
If you need to move the data to a lower level server it will likely require scripting the database definitions to create a database on the earlier version of SQL Server. Then the data will need to be copied to that server.
There are a number of posts on doing this, such as:
Restoring a backup to an older version of SQL Server
http://www.mssqltips.com/sqlservertip/2810/how-to-migrate-a-sql-server-database-to-a-lower-version/
EDIT: Although there is no way just to attach the files and make it work, the good news is that the changes between SQL Server 2008 and 2008 R2 are few. Therefore, you have a good chance of migrating code and data to the SQL Server 2008 server using techniques such as posted above without any major problems. (Other than the time and nuisance.)
-
yes it is exactly like i have backup from sql server 2008 R2 and i am restoring it on sql server 2008 older version only. is there any other way so i can restore or attach .mdf file to database Jun 9, 2015 at 20:31
-
No, sorry but attaching the files will not work since the version of the database files have been upgraded to SQL Server 2008 R2, and the changes are incompatible with SQL Server 2008.– RLFJun 9, 2015 at 20:44
-
3@RakeshVishwakarma There is no easy way of doing it - you have to script the database schema out and then bcp out data and bulk insert data back into the old database.– Kin ShahJun 9, 2015 at 20:52