我怎样才能只复制存储过程 [英] how can i copy only stored procedures

查看:88
本文介绍了我怎样才能只复制存储过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我怎么能只将存储过程复制到另一个数据库而不是表格怎么办?请告诉我

解决方案



这可以帮到你(使用SSMS 2008):



右键单击所需的数据库。



选择任务>生成脚本...



选择对象部分选择选择特定数据库对象



标记您感兴趣的存储过程。



生成脚本并保存。



然后在目标数据库中运行生成的脚本。



祝你好运。


< blockquote>其中一个选项是使用脚本生成器向导。以下链接提供了相同的更多信息

SQL SERVER - 2008 - 2008 R2 - 创建脚本以复制数据库架构和所有对象 - 数据,架构,存储过程,函数,触发器,表,视图,约束和所有其他数据库对象 [ ^ ]


< blockquote>刚完成SP后,ctrl + S .. U保存该SQL文件......无论什么时候你需要,你都可以使用那个


hi how can i copy only stored procedures to another data base not tables how can i do could you please tell me

解决方案

Hi,
This may help you (with SSMS 2008) :

Right click on desired database.

Select Tasks > Generate Scripts...

In Choose Objects section select Select specific database objects

Mark the stored procedure in which you are interested.

Generate their scripts and save it.

Then run the generated script in target database.

Good Luck.


One of the options is to use the script generator wizard. The below link provides more information on the same
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[^]


Just after completing SP, ctrl+S.. U save that SQL file... Whenever u need, u can make use of that


这篇关于我怎样才能只复制存储过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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