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

Table Of Contents
Displaying Schema Information
This subsection discusses:
“Displaying a Schema UID” (page 121)
“Displaying all Schemas Visible on a Node” (page 121)
“Displaying all Objects in a Schema” (page 122)
“Displaying the Attributes of a Schema” (page 123)
“Displaying the Owner of a Schema” (page 123)
Related topics:
“Locating System Schema Tables” (page 112)
“Locating System Defaults Schema Tables” (page 114)
“Displaying all Tables in a Schema” (page 126)
“Displaying all Views in a Schema” (page 129)
“Displaying the Schema Version” (page 147)
“Displaying the System Schema Version” (page 147)
“Displaying the Object Schema Version (OSV)” (page 147)
The SCHEMATA table on each node is a system schema table that describes all the schemas 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 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_<system name>.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';
NODE_NAME
---------
SCHEMA_UID
--------------------
SCHEMA_NAME
------------------------------
\DMR15
\DMR15
1950548695223685006
1950548695240365422
DEFINITION_SCHEMA_VERSION_3000
INVENT
\DMR15
\DMR15
1950548695235454934
1950548695238563835
PERSNL
SALES
Displaying all Schemas Visible on a Node
This example selects information from the CATSYS and SCHEMATA tables to display a list of all
the schemas visible on a node:
>>set schema nonstop_sqlmx_<system name>.system_schema;
--- SQL operation complete.
Displaying Schema Information 121