Results 1 to 7 of 7

Thread: Stored procedures

  1. #1
    Join Date
    Jun 2006
    Posts
    7

    Stored procedures

    Hi,

    I have two databases, one is the live system and the other is probably going to be used for training. I need to copy a large number of procedures from the live DB to the training DB. Almost 100 procedures. What is the quickest method to copy a batch of procedures from one DB to another?

    I can't seem to find any way to export them.

    Is there a built in tool or a script that will do this for me

    thanks

  2. #2
    Join Date
    Jun 2006
    Posts
    7
    Anybody?

    This must be fairly common.

  3. #3
    Join Date
    Sep 2002
    Posts
    5,938
    If you use MS SQL, you can script them.

  4. #4
    Join Date
    Jun 2006
    Posts
    7
    Quote Originally Posted by rmiao
    If you use MS SQL, you can script them.
    Yes it is MS SQL. would you have an example? i can't seem to find anything in the MS documentation. or on the web

  5. #5
    Join Date
    Jun 2006
    Posts
    7
    anyone?

    this is getting important

  6. #6
    Join Date
    Sep 2005
    Posts
    168
    ENTERPISE MANAGER ->Tools -> Generate Script -> General Tab (Click on show all button ) : Check stored procedures checkbox -> Formatting Tab: Ensure Generate create and drop objects checkboxes are checked ->Options Tab:choose if there will be one file for all procs or several files per proc, better choose one file -> Press OK button -> save to a file on your pc -> after completion of the process open the file with a txt editor -> copy the content of the file -> paste it in Query Analyzer -> Execute it on the database


    --HTH--
    Last edited by mikr0s; 09-22-2006 at 07:53 AM.

  7. #7
    Join Date
    Jun 2006
    Posts
    7
    Cool!

    thanks for that.

    Cj

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •