Dependency Management
SYSADMIN.getResourceDependencies
Given a resource name, this system procedure returns all its dependencies:
SYSADMIN.getResourceDependencies(IN resourceName string NOT NULL, IN resourceType string, OUT dependentResourceName string NOT NULL RESULT, OUT dependentResourceType string NOT NULL, OUT parentResourceName string, OUT parentResourceType string, OUT permissionRoleName string, OUT permissionText string)
Examples
1. All descendants of all elements of the schema are shown, but with only those parents which belong to this schema:
SELECT * FROM (CALL SYSADMIN.getResourceDependencies('sch_a', 'SCHEMA')) AS a;
2. All descendants of the table are shown, but with this table as a parent and only those other parents which are descendants of this table:
SELECT * FROM (CALL SYSADMIN.getResourceDependencies('sch_a.test_a', 'TABLE')) AS a;
3. All descendants of the view are shown, but with this view as a parent and only those other parents which are descendants of this view:
SELECT * FROM (CALL SYSADMIN.getResourceDependencies('sch_a.v_a2', 'VIEW')) AS a;
4. All descendants of the procedure are shown, but with this procedure as a parent and only those other parents which are descendants of this procedure:
SELECT * FROM (CALL SYSADMIN.getResourceDependencies('sch_a.pr_a3', 'PROC')) AS a;
5. The full dependency graph is shown:
SELECT * FROM (CALL SYSADMIN.getResourceDependencies('*', null)) AS a;
// or
SELECT * FROM (CALL SYSADMIN.getResourceDependencies(resourceName => '*')) AS a;
SYSADMIN.getViewAndProcCreationOrder
This system procedure gets the creation order of views and procedures:
SYSADMIN.getViewAndProcCreationOrder(OUT creationOrder string NOT NULL RESULT)
Example
SELECT * FROM (CALL SYSADMIN.getViewAndProcCreationOrder()) AS p