Search

SP_Helptext should show the renamed name. by BHAVIN VIJAY MEHTA

Closed
as By Design Help for as By Design

1
0
Sign in
to vote
Type: Bug
ID: 765546
Opened: 10/1/2012 6:59:00 AM
Access Restriction: Public
0
Workaround(s)
0
User(s) can reproduce this bug
(1)Created new procedure named My Proc

Create proc Myproc
as
select 1

(2) sp_rename Myproc, NewMyProc

Result:
Caution: Changing any part of an object name could break scripts and stored procedures.

(3) Now when I executed : sp_Helptext NewMyProc

The actual Result which I got is :

Create proc Myproc
as
select 1

The result I was expecting was:

Create proc NewMyProc
as
select 1





Details (expand)

Product Language

English

Version

SQL Server 2008 SP3

Category

SQL Engine

Operating System

Other

Operating System Language

US English

Steps to Reproduce

No Idea

Actual Results

Create proc Myproc
as
select 1

Expected Results

Create proc NewMyProc
as
select 1

Platform

32

Virtualization

Other (e.g. VM Ware, specify in Description)
File Attachments
0 attachments
Sign in to post a comment.
Posted by Microsoft on 10/19/2012 at 3:08 PM
Thanks for reporting this.

sp_helptext shows the body of the proc the way it was defined. sp_rename does not change that. I can see the value of changing the body with the new name, but it is a low priority at this point.
Sign in to post a workaround.