Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2004
    Location
    STL
    Posts
    45

    Unanswered: copying stored procedures?

    Hi all, is there a way I can simply copy the stored procedures in one DB, and "paste" them over into another DB that is identical? Thanks!

  2. #2
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    You can script out any database object (right click and select Generate SQL from the menu), or you can import/export data and objects between databases (right click on the database and select import/export data in the menu).
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  3. #3
    Join Date
    Jul 2004
    Location
    Mars
    Posts
    137

    Thumbs up

    If the tables and views (and other objects) referenced in the stored procedure are same in both the database, then you can simply copy the Stored procedure and paste it in the other DB and use it.

    You can view the stroed procdure in the Enterprise Manager by just double clicking on the procudure name or you can view the stored procedure in Query Analyser by using the stored procure sp_help <your sp name>
    Sudar

    --
    My Blog

Posting Permissions

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