SQL Server - 将存储过程从一个数据库复制到另一个数据库 [英] SQL Server - copy stored procedures from one db to another
本文介绍了SQL Server - 将存储过程从一个数据库复制到另一个数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是 SQL 的新手,我需要做的是将 2 个 .mdf 数据库合并为一个.我使用 SQL Server 2008 Manager - 任务 > 导入/导出表来做到这一点.表和视图已成功复制,但新数据库中没有存储过程.有没有办法做到这一点?
I am new to SQL, and what I needed to do was to combine 2 .mdf databases into one. I did that using SQL Server 2008 Manager - Tasks > Import/Export tables.The tables and views were copied successfully, but there are no Stored procedures in the new database. Is there any way to do that?
推荐答案
- 右键单击数据库
- 任务
- 生成脚本
- 选择要编写脚本的对象
- 脚本到文件
- 针对目标数据库运行生成的脚本
这篇关于SQL Server - 将存储过程从一个数据库复制到另一个数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文