Store Proc and View

  • Hi,

    can anyone help me....

    I want to script all my additional store procs and views and run it on the other DB.

    I know how to script 1 store proc or view but I want o script all in once?

    any idea....?

    thanks,

    Susan

  • Hi,

    You could use the Script Wizard available with SQL Server. Just right-click on the database in Object Explorer, go to Tasks -> Generate Scripts... Follow the wizard and select the SPs and Views you need to script.

    Regards

  • Thanks.... I will try it...

    so after that I can just run it in one hit on to different DB, right

  • Yes, you could...

  • The wizard should work. You can also select all your procedures in the Object Explorer Detail window by first clicking on the Procedures folder in the Object Explorer window. In the Object Explorer Detail window, select the procedures you want then right click and select "Script Stored Procedure as" then "CREATE To" and then you can export to a file, a new query editor window or the clipboard.

    ----------------------------------------------------The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood... Theodore RooseveltThe Scary DBAAuthor of: SQL Server 2017 Query Performance Tuning, 5th Edition and SQL Server Execution Plans, 3rd EditionProduct Evangelist for Red Gate Software

  • Thanks everyone.

    I can do it now.

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

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