cancel
Showing results for 
Search instead for 
Did you mean: 

Find Dependencies

Former Member
1,969

Which system tables or views can I query to find dependencies for a given object? I need a list of objects that both use or is used by an object.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

For views/tables, you can use the sa_dependent_views system procedure.

It is much more problematic for other objects such as stored procedures. In SQL Anywhere, stored procedures are not "compiled" when created - they only need to be syntactically correct. Name resolution is done when the procedure is loaded, and with SQL Invoker semantics the objects that a procedure might reference will be different for each invoker. Also, since procedures/triggers/UDFs all permit EXECUTE IMMEDIATE, it can be very difficult to determine accurately which objects are referenced from a procedure/trigger/UDF.

Former Member
0 Kudos

Thanks a lot. I'll take a look at sa_dependent_views.

Answers (0)