开发者

Transfer database from 2008 R2 back to 2005

开发者 https://www.devze.com 2023-04-11 23:26 出处:网络
My company has to go back to Sql Server 2005 from 2008R2 (legacy issues with scripts and customer deployment.. ) and I got the task to find out how to do that: is there any automated migration tools (

My company has to go back to Sql Server 2005 from 2008R2 (legacy issues with scripts and customer deployment.. ) and I got the task to find out how to do that: is there any automated migration tools (Redgate, MS, whatever) for doing this?

There are several (around 10) databases, all of them containing from 20 up to 220 tables.

If there are no known tools, is there a way in form of scripts? I know SQL server can generate scripts (with and without data I think?), but under what circumstances/restrictions is it possible to migrate the schemes? If possible with data migration, but if n开发者_如何学Goot empty tables must do.


If you do have Visual Studio installed, you can connect to your database, right click it and select "Publish to provider". There you can select if you want to generate script for database schema, data only, or both.


@Rubens Farias That unfortunately doesn't work well for complex databases with a lot of foreignkey constraints and sometimes even cyclomatic dependencies, as there are a lot of script errors, and SQL Server Management Studio doesn't seem to be very intelligent about ordering of scripts.

I found a (still somewhat lacking) way of doing it, with the two commercial tools marc_s mentioned. We have a custom DB scripting tool, so I first migrate the schema without SPs and Views, then the data Sql Data Compare, and then, via our internal DbScripter I generate the SPs and Views. It works for statistics, even Fulltext Catalogs, very nice. But: at least in one case, when the dataset was very large, there were deadlock situation on the sql server when usind the data comparison migration tool. Still working on that one, it's annoying.

Still not the ideal solution, but didn't find a better one, so I'll mark my answer as answered...

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号