Skip to main content

Triggers, dependencies

name type references description
"id" INTEGER   The unique internal trigger identifier.
"name" VARCHAR   Its SQL name.
"table_id" INTEGER The corresponding triggering table identifier
"time" SMALLINT  


"event" SMALLINT   Update/insert/delete event.
"old_name" VARCHAR   The correlation SQL name for the previous state.
"new_name" VARCHAR   The correlation SQL name for the new state.
"condition" VARCHAR   The SQL condition.
"statement" VARCHAR   A SQL statement to be executed.
name type references description
dependency_type_id SMALLINT   The unique identifier for the dependency type.
dependency_type_name VARCHAR   The unique name of this dependency type.
name type references description
"id" INTEGER sys.*.id The identifier which has a dependency.
"depend_id" INTEGER sys.*.id The identifier reference on which it depends. The combination of "id" and "depend_id" is unique key.
"depend_type" SMALLINT sys.dependency_types. dependency_type_id To which sys.<obj>.id it depends: a table or view, a column, a function, an auth, an object.
See sys.dependency_types for meaning of the identifiers


Following table producing convenience functions exist to find specific dependencies more easily:

SELECT * FROM sys.dependencies_schemas_on_users();
SELECT * FROM sys.dependencies_owners_on_schemas();
SELECT * FROM sys.dependencies_tables_on_views();
SELECT * FROM sys.dependencies_tables_on_indexes();
SELECT * FROM sys.dependencies_tables_on_triggers();
SELECT * FROM sys.dependencies_tables_on_foreignkeys();
SELECT * FROM sys.dependencies_tables_on_functions();
SELECT * FROM sys.dependencies_columns_on_views();
SELECT * FROM sys.dependencies_columns_on_keys();
SELECT * FROM sys.dependencies_columns_on_indexes();
SELECT * FROM sys.dependencies_columns_on_functions();
SELECT * FROM sys.dependencies_columns_on_triggers();
SELECT * FROM sys.dependencies_views_on_functions();
SELECT * FROM sys.dependencies_views_on_triggers();
SELECT * FROM sys.dependencies_functions_on_functions();
SELECT * FROM sys.dependencies_functions_os_triggers();
SELECT * FROM sys.dependencies_keys_on_foreignkeys();