简体   繁体   中英

How to restore legacy data during re-create a database by sql server data tools?

在Visual Studio 2010中使用数据库项目的“发布”功能重新创建数据库时,我尝试自动恢复老化的数据。有人知道我必须为此功能选择哪种偏好吗?

There's no option to restore data when publishing a "New" database. You need to build a script that will populate all of the necessary objects or otherwise transfer the data back in to the database.

Red-Gate's SQL Data Compare could be useful for this task or you can find a way to generate scripts that you can call later.

If you just want to update the schema, I'd check your publish settings to make sure you're not choosing the option to "Always Recreate Database".

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