Search code examples
sqlsql-server-2008copyprocedures

SQL Server - copy stored procedures from one db to another


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?


Solution

    • Right click on database
    • Tasks
    • Generate Scripts
    • Select the objects you wish to script
    • Script to File
    • Run generated scripts against target database