Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change name of stored procedure in SQL Server 2008

I have a stored procedure which I edit through Visual Studio 2008. Is there a simple way to change the name of the stored procedure? Right now if I look at the sproc's properties, the name of the sproc is grayed out.

like image 806
Kimball Robinson Avatar asked Jul 02 '10 22:07

Kimball Robinson


2 Answers

EXEC sp_rename OLDNAME, NEWNAME

This is assuming you can execute SQL statements via VS2008.

like image 138
Derek Flenniken Avatar answered Oct 31 '22 07:10

Derek Flenniken


If you have SSMS, you can right-click on the procedure name and choose rename.

The other option is to drop the procedure and recreate it with the new name.

like image 21
josephj1989 Avatar answered Oct 31 '22 06:10

josephj1989