SQL/MX 2.x Installation and Management Guide (G06.24+, H06.03+)

Querying SQL/MX Metadata
HP NonStop SQL/MX Installation and Management Guide523723-004
8-22
Displaying Catalog Information
Displaying Catalog Information
This subsection discusses:
Displaying a Catalog UID on page 8-22
Displaying All Catalogs Visible on a Node on page 8-23
Determining Whether a Catalog is Local or Remote on page 8-23
Displaying All Schemas in a Catalog on page 8-24
Displaying the Guardian Location of the Metadata Tables for a Catalog on
page 8-24
Displaying the Attributes of a Catalog on page 8-25
Related topic:
Displaying All Tables in a Catalog on page 8-31
The CATSYS table on each node is the system schema table that lists all catalogs
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 Catalog UID
Because catalog names can be up to 128 characters in length, each catalog is
assigned a unique identifier (UID). Use the catalog UID to efficiently join between
metadata tables to display relationships.
This example displays, for each catalog, the catalog name, the catalog UID, and all the
nodes where the catalog is visible:
>> set schema nonstop_sqlmx_figaro.system_schema;
>> select substring(cat_name, 1, 20) as cat_name, cr.cat_uid,
node_name
from catsys cs, cat_references cr
where cs.cat_uid = cr.cat_uid
and cr.replication_rule='A'
for read uncommitted access
order by cs.cat_name;
CAT_NAME CAT_UID NODE_NAME
-------------------- -------------------- ---------
CAT 6739902643326133620 \FIGARO
NONSTOP_SQLMX_FIGARO 6739902642481382249 \FIGARO
PSDB 6742156871006226409 \FIGARO
SAMDBCAT 6742156872955712923 \FIGARO