Triggers, IDs, Dependencies, and Comments

sys.triggers

nametypereferencesdescription
"id"INTEGERThe unique internal trigger identifier.
"name"VARCHARIts SQL name.
"table_id"INTEGERsys.tables.idThe corresponding triggering table identifier
"time"SMALLINTBEFORE/AFTER
"orientation"SMALLINTFOR EACH ROW/FOR EACH STATEMENT
"event"SMALLINTUpdate/insert/delete/truncate event.
"old_name"VARCHARThe correlation SQL name for the previous state.
"new_name"VARCHARThe correlation SQL name for the new state.
"condition"VARCHARThe SQL condition.
"statement"VARCHARThe SQL statement(s) to be executed.

sys.ids

nametypereferencesdescription
"id"INTEGERsys.*.idThe identifier of the object. The referenced table where this object id is stored is available in column "sys_table".
"name"VARCHARThe name of the object.
"schema_id"INTEGERsys.schemas.idIf applicable: The schema identifier the object belongs to, else NULL.
"table_id"INTEGERsys.tables.idIf applicable: The table identifier the object belongs to, else NULL.
"table_name"VARCHARsys.tables.nameIf applicable: The table name the object belongs to, else NULL.
"obj_type"VARCHARObject type name.
"sys_table"VARCHARCorresponding system table name where details on the object can be queried.

sys.dependencies

nametypereferencesdescription
"id"INTEGERsys.ids.idA row with "id" x and "depend_id" y means that y depends on x
"depend_id"INTEGERsys.ids.idA row with "id" x and "depend_id" y means that y depends on x
"depend_type"SMALLINTsys.dependency_types.dependency_type_idThe type of the depender y

sys.dependency_types

nametypereferencesdescription
"dependency_type_id"SMALLINTThe unique identifier for the dependency type.
"dependency_type_name"VARCHARThe unique name of this dependency type.

sys.dependencies_vw

nametypereferencesdescription
"id"INTEGERsys.ids.idThe identifier of the object which has a dependency.
"obj_type"VARCHARObject type name.
"name"VARCHARThe name of the object.
"used_by_id"INTEGERsys.ids.idThe identifier reference on which it depends. The combination of "id" and "used_by_id" forms a unique key.
"used_by_obj_type"VARCHARObject type name of the used_by_id.
"used_by_name"VARCHARThe name of the object referenced by the used_by_id.
"depend_type"SMALLINTsys.dependency_types.dependency_type_idTo which sys..id it depends: a table or view, a column, a function, an auth, an object.
"dependency_type_name"VARCHARsys.dependency_types.dependency_type_nameThe name of the dependency type.

sys.comments

nametypereferencesdescription
"id"INTEGERsys.ids.idThe identifier of the object which has a comment.
"remark"VARCHARThe remark comment associated to the object.

Following convenient views exist to find specific dependencies more easily:

SELECT * FROM sys.dependency_owners_on_schemas;
SELECT * FROM sys.dependency_schemas_on_users;
SELECT * FROM sys.dependency_tables_on_foreignkeys;
SELECT * FROM sys.dependency_tables_on_functions;
SELECT * FROM sys.dependency_tables_on_indexes;
SELECT * FROM sys.dependency_tables_on_procedures;
SELECT * FROM sys.dependency_tables_on_triggers;
SELECT * FROM sys.dependency_tables_on_views;
SELECT * FROM sys.dependency_views_on_functions;
SELECT * FROM sys.dependency_views_on_procedures;
SELECT * FROM sys.dependency_views_on_views;
SELECT * FROM sys.dependency_columns_on_functions;
SELECT * FROM sys.dependency_columns_on_indexes;
SELECT * FROM sys.dependency_columns_on_keys;
SELECT * FROM sys.dependency_columns_on_procedures;
SELECT * FROM sys.dependency_columns_on_triggers;
SELECT * FROM sys.dependency_columns_on_types;
SELECT * FROM sys.dependency_columns_on_views;
SELECT * FROM sys.dependency_keys_on_foreignkeys;
SELECT * FROM sys.dependency_functions_on_functions;
SELECT * FROM sys.dependency_functions_on_procedures;
SELECT * FROM sys.dependency_functions_on_triggers;
SELECT * FROM sys.dependency_functions_on_types;
SELECT * FROM sys.dependency_functions_on_views;
SELECT * FROM sys.dependency_args_on_types;