12

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

2
  • 1
    Please tag with product (SQL Server, mysql, Oracle, etc.). Most people won't be able to help you without this information. Commented Mar 18, 2010 at 15:21
  • Which version of SQL Server are you using? 2000? 2005? 2008? Commented Mar 18, 2010 at 15:28

2 Answers 2

30
  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
Sign up to request clarification or add additional context in comments.

1 Comment

No problem. Can you tick my answer to show others it worked? :-)
0

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....

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.