如何将表模式从一个数据库迁移到另一个数据库而不损坏目标数据库中的数据?
如何将表模式从一个数据库迁移到另一个数据库而不损坏目标数据库中的数据?
我想将数据从部署的开发副本移至实时数据库,并希望运行一些脚本来完成此操作。 我需要升级某些表的架构并创建其他表。 我现在认为我必须根据部署表检查目标数据库中的每个表,然后复制新表,但这将非常乏味。 对于我如何做到这一点有什么建议吗?
How do I migrate table schemas from one DB to another without damaging the data in the destination DB?
I want to move my data from my deployed development copy to the live database and would like to run some scripts to do it. I need to upgrade the schema for some tables and create others. I figure right now that I'll have to check each of the tables in the destination DB against the deployment one and then copy the new tables but that will be quite tedious. Are there any suggestions on how I can do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
查看 Redgate 的 SQL 比较工具
http://www.red-gate.com /products/SQL_Compare/index.htm
您应该能够比较两个数据库,然后根据差异生成脚本。
Check out SQL Compare tool by Redgate
http://www.red-gate.com/products/SQL_Compare/index.htm
You should be able to compare both the databases and then generate scripts based on the differences.
您可以使用工具来生成脚本。 红砖有一个,埃尔文也可以做三角洲。
You can use a tool to generate the scripts. Redbrick has one, and Erwin can do deltas as well.
除了出色的 Red-Gate SQL Compare 之外,另一个工具是 ApexSQL 的 SQL Diff。
如果您还需要比较和同步来自不同来源的数据,ApexSQL 还具有 SQL 数据差异。
强烈推荐!
马克
Another one besides the excellent Red-Gate SQL Compare is ApexSQL's SQL Diff.
ApexSQL also has a SQL Data Diff if you also need to compare and synchronize data from various sources.
Highly recommended!
Marc
除了上面提到的 RedGate 软件之外,Embarcadero Change Manager 还可以进行架构和数据实例比较,然后生成架构的更改脚本和数据的 DML 脚本,以使两个数据库同步。
In addition to the RedGate software mentioned above, Embarcadero Change Manager can do both schema and data instance compares, then generate alter scripts for the schemas and DML scripts for the data to bring two database in sync.