Engine
System Schemas
SYSADMIN Schema

SYSADMIN Schema

The SYSADMIN schema provides administrative information and actions for managing and monitoring the virtual database.

Key Features:

  • Access information about usage, materialized views, virtual database resources, triggers, stored procedures, and active sessions.
  • Perform administrative tasks such as refreshing materialized views, setting metadata properties, and canceling or terminating sessions and transactions.

Tables and Views

SYSADMIN.Usage

This table supplies information about how views and procedures are defined.

Column NameTypeDescription
VDBNamestringVDB name
UIDstringObject UID
object_typestringType of object (e.g., StoredProcedure, ForeignProcedure, Table, View, Column, etc.)
NamestringObject Name or parent name
ElementNamestringName of column or parameter (may be null for table/procedure).
Uses_UIDstringUsed object UID
Uses_object_typestringUsed object type
Uses_SchemaNamestringUsed object schema
Uses_NamestringUsed object name or parent name
Uses_ElementNamestringUsed column or parameter name (may be null for table/procedure-level dependency).

Examples:

  • Find all incoming usage:
    WITH im_using AS (
        SELECT 0 AS level, uid, Uses_UID, Uses_Name, Uses_Object_Type, Uses_ElementName
        FROM usage
        WHERE uid = (SELECT uid FROM sys.tables WHERE name='table name' AND schemaName='schema name')
        UNION ALL
        SELECT level + 1, usage.uid, usage.Uses_UID, usage.Uses_Name, usage.Uses_Object_Type, usage.Uses_ElementName
        FROM usage, im_using
        WHERE level < 10 AND usage.uid = im_using.Uses_UID
    )
    SELECT * FROM im_using;
     
  • Find all outgoing usage:
  WITH uses_me AS (
      SELECT 0 AS level, uid, Uses_UID, Name, Object_Type, ElementName
      FROM usage
      WHERE uses_uid = (SELECT uid FROM sys.tables WHERE name='table name' AND schemaName='schema name')
      UNION ALL
      SELECT level + 1, usage.uid, usage.Uses_UID, usage.Name, usage.Object_Type, usage.ElementName
      FROM usage, uses_me
      WHERE level < 10 AND usage.uses_uid = uses_me.UID
  )
  SELECT * FROM uses_me;

SYSADMIN.MatViews

Provides information about all materialized views in the virtual database.

Column NameTypeDescription
VDBNamestringVDB name
SchemaNamestringSchema Name
NamestringShort group name
TargetSchemaNamestringName of the materialized table schema (null for internal materialization).
TargetNamestringName of the materialized table.
ValidbooleanTrue if the materialized table is currently valid (null for external materialization).
LoadStatebooleanLoad state: NEEDS_LOADING, LOADING, LOADED, FAILED_LOAD (null for external materialization).
UpdatedtimestampTimestamp of the last full refresh (null for external materialization).
CardinalityintegerNumber of rows in the materialized view table (null for external materialization).

Example:

SELECT * FROM SYSADMIN.MatViews;

SYSADMIN.VDBResources

Provides the current VDB contents.

Column NameTypeDescription
resourcePathstringPath to the contents.
contentsblobContents as a blob.

Example:

SELECT * FROM SYSADMIN.VDBResources;

SYSADMIN.Triggers

Provides the triggers in the virtual database.

Column NameTypeDescription
VDBNamestringVDB name
SchemaNamestringSchema Name
TableNamestringTable name
NamestringTrigger name
TriggerTypestringTrigger Type
TriggerEventstringTriggering Event
StatusstringIs Enabled
BodyclobTrigger Action (FOR EACH ROW …)
TableUIDstringTable Unique ID

Example:

SELECT * FROM SYSADMIN.Triggers;

SYSADMIN.Views

Provides the views in the virtual database.

Column NameTypeDescription
VDBNamestringVDB name
SchemaNamestringSchema Name
NamestringView name
BodyclobView Definition Body
UIDstringTable Unique ID

Example:

SELECT * FROM SYSADMIN.Views;

SYSADMIN.StoredProcedures

Provides the stored procedures in the virtual database.

Column NameTypeDescription
VDBNamestringVDB name
SchemaNamestringSchema Name
NamestringProcedure name
BodyclobProcedure Definition Body
UIDstringUnique ID

Example:

SELECT * FROM SYSADMIN.StoredProcedures;