question

syam4a4 avatar image
syam4a4 asked

Delete Dependent Objects(SP's, Functions and Tables)

Hi, How can we delete dependent stored procedures. We are cleaning our DB by deleting unwanted objects. But I'm getting dependency's error. My DB is having around 600 Sp's and 200 tables. 30% of them are backup copies. Previously we used to create backup of object while modifying that. After modification when we press F5 these backup object also comes under dependency's list. So how do I delete them. Regards, Sanjay
dependency
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Grant Fritchey avatar image
Grant Fritchey answered
it's going to be difficult to do this programmatically. You have to drop the dependent objects first, but you can't simply drop all dependent objects since there will be good objects as well. From the sounds of things, I think you'll just have to drop them manually. But, it brings into question how you're running your deployments. You might want to reassess that process.
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.