Simon's SQL

SQL,DBA,tuning,Trouble Shooting,Performance

sp_rename will not change sys.syscomments table definition.

Posted by Simon Cho on 08/05/2013

exec sp_rename 'usp_test','uspp_test'
select text from sys.syscomments
where id=object_id('uspp_test')

The text column is still showing as “create procedure usp_test”.

It breaks to run “sp_refreshsqlmodule”

Invalid object name ‘dbo.uspp_test’.

To be able to resolve it, run again “alter procedure ” statement.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s