LSB
LSB

Reputation: 213

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

Upvotes: 12

Views: 18226

Answers (2)

qwqwe
qwqwe

Reputation: 1

Please note that by using the migration wizard we can only convert tables and copy data,, but cannot convert the triggers, views and stored procedures.

We’ll have to do this manually, which we might cover in one of the future article on how to migrate MS SQL stored procedures to MySQL stored procedures.

Sorry if this is not the response desired....

Upvotes: 0

CResults
CResults

Reputation: 5105

  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

Upvotes: 30

Related Questions