Click here to Skip to main content
15,892,005 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i restored my databeses from 2 computers with sql2005 by Microsoft.SqlServer.Management.Smo in this way :

Server srv = new Server();
srv.ConnectionContext.ConnectionString = myConnectionString;
Restore rs = new Restore();
rs.NoRecovery = false;
rs.Action = RestoreActionType.Database;
rs.ReplaceDatabase = true;
BackupDeviceItem bdi = new BackupDeviceItem(strBackupFile + ".bak", DeviceType.File);
rs.Devices.Add(bdi);
rs.Database = DataBaseName;
rs.SqlRestore(srv);


but now i Instal sql2008 on one of my computers and now i can't restore
my backup.

do you have any solution for restore a SQL 2008 DB backup to SQL 2005 DB?
Posted

You can also attach the 2005 database to the 2008 server. Your choices for moving from 2008 to 2005 are very limited. Scripting, linked server and SSIS come to mind. Backup.restore is not one of them
 
Share this answer
 
Master schema's are different. You cannot restore a backup to an earlier version. Your only option is to export everything from the newer version and import it in the older version. (Assuming you haven't used anything which is dependent on the newer version)
 
Share this answer
 
It is not possible to restore SQL Server 2008 backup on SQL Server 2005. It just doesn’t work.

Alternative is to script database objects and database data from SQL Server 2008 and then execute those scripts on 2005 version. Note that you will have to review the scripts and manually remove all object types that don’t exist in 2005 version such as Geometry for example.

Another thing you can do is to create an empty database on 2005 version and use SQL Diff[^] and SQL Data Diff[^] tools from ApexSQL (also possible using other tools such as Red Gate[^] ) to compare and synchronize SQL 2008 backup and newly created 2005 database. Tools will take care of all issues mentioned above automatically.
 
Share this answer
 
I found this[^].

Do you know how I found it?

I Googled on 'restore sqlserver2008 backup to sqlserver2005.

Ain't this interwebz thingy wonderful?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900