Dependencies are Gone after SmartRename
erbentraut
Posts: 7
I have a SQL 2k db for which I am renaming several tables that to my knowledge have never been previously renamed through EM or the sp_rename stored procedure. After running a smart rename on the table which there are several dependencies (stored procs, views, etc). The depenencies are gone after running the rename script. The rename does change all the depenant objects correctly, and if I recompile the SP's or resave the views, the dependencies re-appear.
Is this a known issue or something I could be doing wrong? Any help is appreciated.
Thanks
Steve Erbentraut
Is this a known issue or something I could be doing wrong? Any help is appreciated.
Thanks
Steve Erbentraut
Comments
Hi Steve,
I'm not entirely sure what you mean by the "the dependencies disappear". Do you mean information in the sysdepends table? If so, then it is unfortunately an issue with SQL Server. Sysdepends is not a reliable source of dependency information, and in the majority of cases its contents are corrupt. This is actually one reason we use our own dependency mapping engine, and have a product (Dependency Tracker) that finds out and visualizes dependencies that are otherwise difficult to find out.
Regards,
Andras
Red Gate Software Ltd.
Well, not even then . This is of course another discussion, but you can create stored procedures that reference ones that do not exist yet. Also, any circular dependency (not uncommon at all ) will mess up sys.depends. But Brian is right that sysdepends should be certainly not considered after database schema changes.
Regards,
Andras
Red Gate Software Ltd.