views:

41

answers:

4

I have a database which I made using SQL server 2008. I have to attach this database into SQL server 2005. When I try to do so , I got an error since the database is made in higher version (2008). How can I do so? Any help ?

+2  A: 

You cannot attach a SQL Server 2008 database to a SQL Server 2005 instance. Not even when using SQL Server 2005 compatibility level.

I'd recommend creating a new database on the SQL Server 2005 instance and use SQL Server Integration Services to copy the tables, indexes, etc. from the SQL Server 2008 database over to the new database.

Aaronaught
A: 

In situations like this, I'll create a blank database on the 2005 server, and then grab my favorite Schema Diff tool and do a diff of the 2008 against the blank 2005 database, and push the schema changes over to the 2005 database. Once that's done, you can do a Data Diff (again with the tool of your choice) and move the data the same way. You may have to adjust some things if you've used any of the new datatypes in 2008 that don't exist in 2005.

Scott Ivey
A: 

You could also use RedGate's SQL Compare and SQL Data Compare to do this migration more easily. This is a commercial tool. You can download a demo copy from their website.

Tom Cabanski
A: 

Please take a look at the very similar question on MSDN http://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/f9a709b8-5c2c-417f-baf6-e24e4820d2fb

Naomi