In this post, you’ll learn about the error message -616 obj type1 obj name1 cannot be dropped because it is referenced by obj type2 obj name2 in the IBM DB2 database , the reason why it occurs along with the solution to fix it
IBM DB2 Error Message
-616 obj type1 obj name1 cannot be dropped because it is referenced by obj type2 obj name2
Reason for the Error
Some types of objects cannot be dropped if there are other objects which are dependent upon them.� For example, a storage group cannot be dropped if there are one or more existing table spaces that use that storage group. Execution of the specified DROP statement would drop object ‘obj name1’ of type ‘obj type1’ on which object ‘obj name2’ of type ‘obj type2’ is dependent.
Solution
Verify that the object specified in the DROP statement was indeed the object to be dropped.� If so, all the existing objects that have a dependency on that object must be dropped first.