SQL/MX 3.2 Management Manual (H06.25+, J06.14+)

Table Of Contents
LAST OPEN: 28 Jan 2011, 3:01
EOF: 12288 (0.0% USED)
EXTENTS ALLOCATED: 1
INDEX LEVELS: 1
PARTITION ARRAY FORMAT2ENABLED
Displaying Catalog Information
This subsection discusses:
“Displaying a Catalog UID” (page 118)
“Displaying all Catalogs Visible on a Node” (page 118)
“Determining Whether a Catalog is Local or Remote” (page 119)
“Displaying all Schemas in a Catalog” (page 119)
“Displaying the Guardian Location of the Metadata Tables for a Catalog” (page 119)
“Displaying the Attributes of a Catalog” (page 120)
Related topic:
“Displaying all Tables in a Catalog” (page 125)
The CATSYS table on each node is the system schema table that lists all catalogs visible from the
node. For more information about all metadata tables, see Figure 3 (page 108) in this manual 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 (SQL/MXUID). 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;
NODE_NAME
---------
CAT_UID
--------------------
CAT_NAME
-------------------
\FIGARO
\FIGARO
6739902643326133620
6739902642481382249
CAT
NONSTOP_SQLMX_FIGARO
\FIGARO
\FIGARO
6742156871006226409
6742156872955712923
PSDB
SAMDBCAT
Displaying all Catalogs Visible on a Node
The CATSYS table contains one (and only one) row for each catalog that is visible on that node.
This example displays a list of all the visible catalogs on a local node (where node-name is the
name of the local node):
>> select cat_name from nonstop_sqlmx
_node-name.system_schema.catsys;
CAT_NAME
--------------------
118 Querying SQL/MX Metadata