Scripting multiple objects uisng SQL Prompt

Provides intelligent code completion for SQL Server editors.

Scripting multiple objects uisng SQL Prompt

Postby redgater » Fri Dec 20, 2013 4:30 pm

I see that we can right click on an object and select the 'Script object as ALTER' option to script individual objects. Is there anyway to use this option (or any other option with SQL Prompt) to script out multiple objects at once?
Posts: 2
Joined: Fri Dec 20, 2013 4:25 pm

Postby David Atkinson » Fri Dec 20, 2013 4:50 pm

What is your use case for this?

You can do this to some extent from the Object Explorer Details page, as multiple object selections are possible from here, and some of the context menu items are available.
David Atkinson
Posts: 1143
Joined: Mon Dec 05, 2005 3:54 pm
Location: Twitter: @dtabase

Postby redgater » Sat Dec 21, 2013 1:26 am

I want to script out multiple encrypted stored procedures all at the same time. I can do this for unencrypted procedures using the method you mentioned. But the 'Script Objects as ALTER' option provided by SQL Prompt is not available from the object explorer details window. And that is the only option I can use to script encrypted objects.
Posts: 2
Joined: Fri Dec 20, 2013 4:25 pm

Postby Aaron Law » Sat Dec 21, 2013 9:51 am

Unfortunately I don't think there's an easy way to get to this in Prompt at the moment (although annoyingly we do already have the code in place since you can script multiple invalid objects in the "Find Invalid Objects" page). We do have a related uservoice request for scripting things from the object explorer so please add your vote to it.

In the meantime you could use SQL Compare to create a scripts folder from your database then navigate to the folder and copy the scripts out. A guide for how to do so can be found here.
Aaron Law
Posts: 597
Joined: Fri Jun 28, 2013 9:56 am
Location: Red Gate Software

Return to SQL Prompt

Who is online

Users browsing this forum: No registered users and 1 guest