Skip to main content
Skip table of contents

Dependency Management

SYSADMIN.getResourceDependencies

Given a resource name, this system procedure returns all its dependencies:

SQL
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:

SQL
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:

SQL
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:

SQL
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:

SQL
SELECT * FROM (CALL SYSADMIN.getResourceDependencies('sch_a.pr_a3', 'PROC')) AS a;

5. The full dependency graph is shown:

SQL
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:

SQL
SYSADMIN.getViewAndProcCreationOrder(OUT creationOrder string NOT NULL RESULT)

Example

SQL
SELECT * FROM (CALL SYSADMIN.getViewAndProcCreationOrder()) AS p
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.