简体   繁体   English

如何使用SQL Server Management Studio将所有存储过程从一个数据库传输到另一个数据库

[英]How to transfer all stored procedures from one database to another with SQL Server Management Studio

I just want to transfer all stored procedures from one database to another. 我只想将所有存储过程从一个数据库传输到另一个数据库。 SQL Server Management Studio only supports tables and views. SQL Server Management Studio仅支持表和视图。 Management Studio gives option to Import/Export data but only supports tables and views. Management Studio提供导入/导出数据的选项,但仅支持表和视图。

please help me. 请帮我。

Just to extend answer from @Anup Agarwal, 只是为了扩大@Anup Agarwal的答案,
Right Click on the database name 右键单击数据库名称
--> click Generate Scripts.. - >单击Generate Scripts ..
--> click Next - >单击“ 下一步”
--> choose Select specific data objects - >选择选择特定数据对象
--> check Stored Procedures - >检查存储过程
--> click Next - >单击“ 下一步”
--> choose Save to new query window - >选择保存到新查询窗口
--> click Next - >单击“ 下一步”
--> click Finish - >单击“ 完成”

Now, change the database name to the new database name in the query window and execute. 现在,在查询窗口中将数据库名称更改为新数据库名称并执行。

Right Click on the database and point to tasks and click on generate scripts . 右键单击数据库并指向任务 ,然后单击生成脚本 Run these scripts on new database. 在新数据库上运行这些脚本。

http://technet.microsoft.com/en-us/library/ms178078(v=sql.105).aspx http://technet.microsoft.com/en-us/library/ms178078(v=sql.105).aspx

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 阻止SQL Server Management Studio向存储过程添加注释 - Stop SQL Server Management Studio from adding comment to stored procedures 在 SQL Server Management Studio 中调试存储过程 - Debugging stored procedures in SQL Server Management Studio 如何从SQL Server Management Studio中的表生成CRUD存储过程 - How do I generate CRUD stored procedures from a table in SQL Server Management Studio SQL Server Management Studio 2014:无法在Azure SQL数据库V12上查看存储过程 - SQL Server Management Studio 2014: Unable to view stored procedures on Azure SQL Database V12 SQL Server Management Studio中需要哪些数据库角色来添加和执行存储过程 - Which database roles are needed in SQL Server Management Studio to add and execute stored procedures 如何在SQL Server数据库中一次删除所有存储过程? - How to drop all stored procedures at once in SQL Server database? 如何统计SQL服务器中一个数据库的所有存储过程? - How to count all stored procedures in the SQL Server for a database? 如何将数据库及其用户从一台 SQL 服务器转移到另一台服务器? - How to transfer a database AND its users from one SQL Server to another? SQL Server Management Studio 工具,用于检查存储过程和视图中的错误 - SQL Server Management Studio tool to check errors in stored procedures and views SQL Server Management Studio-连续运行多个存储过程 - SQL Server Management Studio - run multiple stored procedures in series
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM