Issue with renaming the objects using Management Studio 2005 | SansSQL

Wednesday, October 15, 2008

Issue with renaming the objects using Management Studio 2005

Whenever we rename an object like stored procedure, function, view or trigger using the management studio in SQL server 2005, the syscomments table will not be updated. Hence when we try to get the text/code of the renamed object using the sp_helptext or OBJECT_DEFINITION () we will get the text/code of the object with the old name itself.

Try it yourself:

Use AdventureWorks
Go
CREATE PROC TestRename AS
Print ‘XYZ’
GO

Now, rename this SP using the management studio object list to “RenameTest”
Now Execute the below Query on AdventureWorks Database.

sp_helptext RenameTest

Now if you observer the result pane, the result will be the same statement with the procedure name still not changed even after renaming the SP using the management studio. The result will be as shown below.

CREATE PROC TestRename AS
Print 'XYZ'

3 comments:

Huongkvb said...

Mua vé tại đại lý vé máy bay Aivivu, tham khảo

giá vé máy bay đi Mỹ khứ hồi

có chuyến bay từ mỹ về việt nam chưa

vé máy bay khứ hồi từ đức về việt nam

các chuyến bay từ nga về việt nam

giá thuê máy bay từ anh về việt nam

các chuyến bay từ châu âu về việt nam

khách sạn cách ly nha trang

chuyen bay chuyen gia ve viet nam

MartenJames said...

To read your articles. developers can easily learn new things. Moreover, from us you can get budget-friendly Private Transportation Services in Vail CO, and surrounding areas.

toniaa said...

In the aftermath of a car crash, having the right attorneys by your side is essential for navigating the legal process and seeking justice. That's why I recommend John Stenson Accident & Injury Law Firm Near Me for anyone in need of car crash attorneys. With their extensive experience and dedication to their clients' well-being, you can trust that your case will be handled with the utmost care and expertise. With John Stenson Accident & Injury Law Firm Near Me, you'll have compassionate advocates fighting tirelessly on your behalf to ensure that your rights are protected and that you receive the compensation you deserve.

Post a Comment

Ads