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:
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”
Go
CREATE PROC TestRename AS
Print ‘XYZ’
GO
Now, rename this SP using the management studio object list to “RenameTest”
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'
2 comments:
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
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.
Post a Comment