Invalid Objects creates incorrect ALTER script
I have just been using the "Find Invalid Objects" functionality. When I view the ALTER script for some objects the script is incorrect. The object name it uses seems to be the original name I gave the object, but I have since updated the name using SP_RENAME.
Here's a script to explain what I mean - it creates a new SP referencing an object that doesn't exist. Then I change the name of the SP. The ALTER script that SQL Prompt will produce will still use the original SP name.
CREATE PROCEDURE dbo.myTestProc AS SELECT * FROM dbo.nonExistantObject GO EXEC sp_rename 'myTestProc' , 'myNewTestProc' GO