Skip to content
Advertisement

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?

Advertisement

Answer

  • Right click on database
  • Tasks
  • Generate Scripts
  • Select the objects you wish to script
  • Script to File
  • Run generated scripts against target database
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement