Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL Server: Migrate Stored Procedures between Databases, Instances

I just copied my current database to a new database to find out only the tables are copied, How do I copy all stored procs the same way in one go? I do not want to create each stored proc one by one again running create queries

Thank you in advance

This is in MS SQL

like image 577
LSB Avatar asked Mar 18 '10 15:03

LSB


1 Answers

  1. Use management studio
  2. Right click on the name of your database
  3. Select all tasks
  4. Select generate scripts
  5. Follow the wizard, opting to only script stored procedures
  6. Take the script it generates and run it on your new database
like image 155
CResults Avatar answered Nov 13 '22 04:11

CResults