Rebuild/repair sysdepends | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Rebuild/repair sysdepends

I have a database that has been through a lot of trauma. The sysdepends is way off. How can I make it rebuild? Should be pretty easy.. Like a script that drops and re-creates all objects. (I’m not sure this can even be done with tables… or if it’s necessary.) TIA, -Mark
Its not easy and not advisable to rebuild/modify the system table. BTW what is the current issue, post the error message to assess the issue. _________
Satya SKJ
Moderator
SQL-Server-Performance.Com

HI ya, yep you could drop and recreate all functions, views, procedures and triggers but you would need to create them in the right order so that if proc1 called fn1 which used view1 then you’d create view1 then fn1 and finally proc1. Often this is not worth the effort… Cheers
Twan
what about transfering all objects to another database, dropping the old one and renaming the new one? or maybe the other way around. renaming the old database creating a new one with the correct name and transfering the objects. Just a thought. I’ve never done it myself. Bambola.
]]>