The forum will experience an outage sometime between February 10 at 7:00pm EST and February 12 at 11:59 EST for installation of security updates. The actual time and duration of the outage are unknown but attempts will be made to minimize the downtime. We apologize for any inconvenience.

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.

asked 06 Jul '10, 00:55

Brad%20Wery's gravatar image

Brad Wery
accept rate: 0%

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.

permanent link

answered 06 Jul '10, 02:50

Glenn%20Paulley's gravatar image

Glenn Paulley
accept rate: 43%

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

(06 Jul '10, 16:38) Brad Wery
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 06 Jul '10, 00:55

question was seen: 656 times

last updated: 06 Jul '10, 02:50