SQL Server - 将存储过程从一个数据库复制到另一个数据库 [英] SQL Server - copy stored procedures from one db to another

查看:498
本文介绍了SQL Server - 将存储过程从一个数据库复制到另一个数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是SQL的新手,我需要做的是将两个.mdf数据库合并为一个。我使用SQL Server 2008管理器 - 任务>导入/导出表。表和视图已成功复制,但在新数据库中没有存储过程。有什么办法吗?

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?

推荐答案


  • 右键点击数据库

  • 任务

  • 生成脚本

  • 选择要脚本化的对象

  • 脚本文件

  • 针对目标数据库运行生成的脚本

    • Right click on database
    • Tasks
    • Generate Scripts
    • Select the objects you wish to script
    • Script to File
    • Run generated scripts against target database
    • 这篇关于SQL Server - 将存储过程从一个数据库复制到另一个数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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