SQL/MX 2.x Installation and Management Guide (G06.24+, H06.03+)
Querying SQL/MX Metadata
HP NonStop SQL/MX Installation and Management Guide—523723-004
8-26
Displaying a Schema UID
•
Displaying All Tables in a Schema on page 8-32
•
Displaying All Views in a Schema on page 8-36
•
Displaying the Schema Version on page 8-62
•
Displaying the System Schema Version on page 8-63
•
Displaying the Object Schema Version (OSV) on page 8-63
The SCHEMATA table on each node is a system schema table that describes all the
schemas visible from the node. For detailed information about all metadata tables, see
Table 8-1 on page 8-6 or the SQL/MX Reference Manual.
Displaying a Schema UID
Because schema names can be up to 128 characters in length, each schema is
assigned a unique identifier (UID). Use the schema UID to efficiently join between
metadata tables to display relationships.
This example, run on the system in which the catalog is defined, displays a schema
name, the schema UID, and the node where the schema is defined:
>> set schema nonstop_sqlmx_figaro.system_schema;
--- SQL operation complete.
>> select substring(schema_name,1,30) as schema_name,
s.schema_uid, node_name
from schemata s, catsys c, cat_references cr
where c.cat_name = 'SAMDBCAT'
and c.cat_uid=s.cat_uid
and c.cat_uid=cr.cat_uid
and cr.replication_rule='A';
SCHEMA_NAME SCHEMA_UID NODE_NAME
------------------------------ -------------------- ---------
DEFINITION_SCHEMA_VERSION_1200 6742156872957211894 \FIGARO
INVENT 6742156872985380066 \FIGARO
SALES 6742156872982451617 \FIGARO
PERSNL 6742156872975234658 \FIGARO