合并两个数据库 [英] merging two database

查看:117
本文介绍了合并两个数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个数据库源和目标,它们具有相同的模式

i想要将数据从源复制到目标

你有任何脚本迭代遍历所有表来源并将它们复制到目的地的类似表中

i有外键我认为我必须在移动数据之前禁用所有约束,然后启用它们我是否正确?

i have two databases source and destination which have the same schema
i want to copy data from source to destination
do you have any script that iterates through all tables in source and copies them to similar tables in destination
i have Foreign keys iam thinkin that i must disable all constraints before moving data and then enabling them a gain am i right ?

推荐答案

您可以为您准备一些选项:

1.数据库复制。这是自2005年以来SQL的一个特性 - http://msdn.microsoft.com/en-us/library /ms151198.aspx [ ^ ]

2.同步框架。这是一个更通用的同步框架,但也可以用于SQL。 http://msdn.microsoft.com/en-us/library/bb902853 (v = sql.110).aspx [ ^ ]
You have some options ready-made for you:
1. Database replication. This is a feature of SQL since 2005 - http://msdn.microsoft.com/en-us/library/ms151198.aspx[^]
2. Sync Framework. This is a more general purpose syncronization framework but can be used for SQL too. http://msdn.microsoft.com/en-us/library/bb902853(v=sql.110).aspx[^]


请参阅。

http://stackoverflow.com/questions/17455172/how-to -copy-data-and-schema-of-all-tables-into-a-different-database-on-the-same [ ^ 的不同数据库中

复制表SQL Server中从一个数据库到另一个数据库的架构和数据 [ ^ ]
See.
http://stackoverflow.com/questions/17455172/how-to-copy-data-and-schema-of-all-tables-into-a-different-database-on-the-same[^]
Copy Table Schema and Data From One Database to Another Database in SQL Server[^]


这篇关于合并两个数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆