Link to home
Start Free TrialLog in
Avatar of tuchfeld
tuchfeld

asked on

How do I update a Stored Procedure in Microsoft SQL Server Management Studio

Hi,
If I right click on the SP and choose Modify,
edit the code.
click Parse,
and then Execute.
It gives Error:
Msg 2714, Level 16, State 3, Procedure sp_name, Line 2 [Batch Start Line 4]
There is already an object named 'sp_name' in the database.
What am I doing wrong?
ASKER CERTIFIED SOLUTION
Avatar of Raja Jegan R
Raja Jegan R
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tuchfeld
tuchfeld

ASKER

Thanks, Raja Jegan R.
I wonder.. are you saying that procedures with CREATE cannot be edited?
To clarify, If you right click on a Procedure and Choose Modify, then it will create ALTER PROCEDURE statement only and not CREATE PROCEDURE statement. If it comes as CREATE, then you would need to modify that to ALTER to get it work..

Out of curiosity, what is the SSMS version you have as I havne't seen this behavior across any SSMS versions.
Try updating SSMS to the latest version and check once..
Also if possible, share us the procedure which is giving you problems so that we can have a look into it once..
indeed it asks me for update.. and I ignored it.. maybe I should..
User generated image
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks Raja Jegan R.