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. NULL when event is LOGIN.
"time"SMALLINTAction time: 0 = BEFORE. 1 = AFTER
"orientation"SMALLINT0 = FOR EACH ROW, 1 = FOR EACH STATEMENT
"event"SMALLINTEvent type: 0 = INSERT, 1 = DELETE, 2 = UPDATE, 3 = TRUNCATE, 4 = LOGIN.
"old_name"VARCHARThe correlation SQL name for the previous state. NULL if not set.
"new_name"VARCHARThe correlation SQL name for the new state. NULL if not set.
"condition"VARCHARThe WHEN clause condition. NULL if not set.
"statement"VARCHARThe original create (or replace) trigger statement. Keywords and unquoted names are converted to lowercase.

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;