将带有约束和关联过程的表从一个数据库转移到另一个数据库 [英] transfer tables with constraints and associative procedures from one database to another
问题描述
在我的组织中,每个应用程序都有自己的数据库。因此每个数据库都有主数据的复制。
现在我必须从其他几个数据库中创建集中的Master数据库。
i必须将所有带有约束的主表及其相关的存储过程,函数,视图从其他数据库转移到这个集中式数据库。
我怎么能实现这一点,以便大多数当前和所有依赖对象都成功地进入一个屋檐下。请指导我。
我们使用的是sql server 2008 R2。
谢谢。
你可以在sql server 2008 r2中为它生成脚本..
1)只需右键单击你的数据库。
2)去任务
3)选择生成脚本
4)按照屏幕上的说明按照步骤操作。
那里你去..
详情请浏览以下链接..
http://blog.sqlauthority.com/2011/05/07/sql-server-2008- 2008 R2创建脚本到复制数据库架构和所有的对象,数据架构的存储过程,函数,触发器,表,视图,约束,和所有其他 - 数据库 - objects / [ ^ ]
hi,
In my organisation every application has its own database.so there is replication of master data in every database.
now i have to make centralized Master database from several other databases.
i have to transfer all the master tables with constraints and their associated stored procedures,function ,views form other databases to this centralized database.
how can i this implement so that most current and all dependent object are come under one roof successfully.please guide me.
we are using sql server 2008 R2.
thanks.
Hi,
you can generated script for that in sql server 2008 r2..
1) just Right click on your database.
2)go to task
3) select "Generate Scripts"
4) follow the steps as per instructions given on the screen.
and there you go..
for details go through the below link..
http://blog.sqlauthority.com/2011/05/07/sql-server-2008-2008-r2-create-script-to-copy-database-schema-and-all-the-objects-data-schema-stored-procedure-functions-triggers-tables-views-constraints-and-all-other-database-objects/[^]
这篇关于将带有约束和关联过程的表从一个数据库转移到另一个数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!