The only way I can determine in VS 2012 to open an existing stored procedure for modification and save changes is the following:
1) Manually remove the initial word CREATE and retype ALTER in its place (every time).
2) From the “SQL” menu, then its “Transact-SQL Editor” submenu, choose Execute.
Given that VS2012 is in Release Candidate, I’m certain there will be no fundamental changes along these lines.
And, I understand that from a purist point of view that this is executing a query to change the procedure on the server. But from a usability point of view is there no longer a near-equivalent to a simple Save button on a toolbar? Over the course of day this is a not-inconsequential waste of time and mental focus. I could live with Ctrl+Shift+E but manually editing CREATE to ALTER every time is ridiculous.
I take it that you’re trying to apply changes to a stored procedure to your database?
You can try the following:
Go to View SQL Server Object Explorer. Right click on the SQL Server node and add your server. Open the database and identify the procedure you need to edit. Double click on the procedure, which opens the CREATE script for the object. Leave the CREATE there and simply modify this and click the ‘Update’ button. Then select Generate Script or Update database depending on whether you want to apply the changes immediately or generate the script to a query window and apply the script yourself.
If you want to generate an ALTER, you can use the Server Explorer (as distinct from the SQL Server Object Explorer, which is also in the View menu). Add your database to Data Connections. Find your procedure, right click and select Open.