简体   繁体   中英

SQL Server 2005 and SQL Server 2008 how to make it compatible?

I have in production SQL Server 2005 and in Development SQL Server 2008 Database.

I would like to detach database from production create tables, insert data etc. and then attach it back.

How make it compatible after I make some changes in SQL server 2008? What is the right way to do it?

There is no way to do this.

The only way I know to move a database from MSSQL2008 to 2005 is to script the tables.

Once the new tables are created in 2005, you can transfer the data either by scripting it (no fun) or by the data transfer wizard.

Changes to tables and data (for lookup tables) should be scripted and in source control like any other code. Then you run the scripts for the changes you are promoting to prod. This way other dev changes which are not ready to go to prod can be held back from being sent to prod.

I also do not recommend that you have a development database in a differnt version of SQL Server unless what you are testing to see if anything needs to be changed in preparation of moving to 2008. Otherwise, it is highly likely that bad code will be written that the prodcution database cannot handle becasue it is the wrong version and you will not find this out until you send the change to production.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM