Backup Stored Procedures ONLY, then Restore Stored Procedures ONLY??

  • Hello to all,

    here at work, we have two servers each with MSSQL running. One database is where we do all of our testing, and one is actual production.

    If we make a bunch of changes to stored procedures on the test server, how can I backup these procedures, and then restore the changes on our production server, without disturbing the list of users, database info, etc?

    Thanks so much,

    Chad Zeluff

  • On the test server right-click the database --> tasks generate scripts --> select stored procs.

    You will have select the option to create delete statements, so the previous version gets deleted.

    Once you have the script, you can run it over your production box at your discretion.

  • Much appreciation, Adam. Thank you 🙂

  • NP thanks for the feedback. 😉

  • oops sorry one more thing, Adam.

    uh...how do I execute the script? It's a .sql file. Not sure what to do.

    Sorry, still a n00b.

    Chad Z

  • Double click on the .sql file. This will open the file in SSMS then all you have to do is click the execute button 😉

  • Make sure you have the right database selected in the drop down. If you have the correct database highlighted when you open the file; SSMS will default the connection to the correct database.

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply