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

Table Of Contents
>>select substring(schema_name,1,30) as schema_name, cat_uid, schema_uid from
nonstop_sqlmx_<system name>.system_schema.schemata;
SCHEMA_UID
--------------------
CAT_UID
--------------------
SCHEMA_NAME
------------------------------
3675445194285370963
3675445194291605119
3675445194283461677
3675445194283461677
DEFINITION_SCHEMA_VERSION_3100
U4SCH
36776969926318544983677696992630416073DEFINITION_SCHEMA_VERSION_3100
36776969926384626333677696992630416073U1SCH
36799487411114664443679948741094715385DEFINITION_SCHEMA_VERSION_3100
36799487411179374963679948741094715385SCHU2
36799487450554526843679948745044608021DEFINITION_SCHEMA_VERSION_3100
36799487450621064733679948745044608021SCHU3
36822004657835599893682200465783544535DEFINITION_SCHEMA_VERSION_3100
36822004657918619903682200465783544535MXCS_SCHEMA
36822004657918492453682200465783544535SYSTEM_DEFAULTS_SCHEMA
36822004657836219243682200465783544535SYSTEM_SCHEMA
36822004657915508273682200465783544535SYSTEM_SECURITY_SCHEMA
36822004657918959933682200465783544535SYSTEM_SQLJ_SCHEMA
3682200716849609564
3682200716856171166
3682200716839720065
3682200716839720065
DEFINITION_SCHEMA_VERSION_3100
U8SCH
--- 16 row(s) selected.
Displaying all Objects in a Schema
This example selects information from the CATSYS, SCHEMATA, and OBJECTS tables to display
a list of all the objects within the SALES schema in the SAMDBCAT catalog. You can use a similar
set of SELECT statements to display all the views or indexes on a node.
>> set schema samdbcat.definition_schema_version_<schema version>;
--- SQL operation complete.
>> select substring (object_name, 1, 25) as object_name,
object_name_space as name_space,
object_type as type,
case object_security_class
when 'UT' then 'User Table'
when 'SM' then 'System Metadata'
else 'OTHER'
end as sec_class
from nonstop_sqlmx_<system name>.system_schema.catsys c,
nonstop_sqlmx_<system name>.system_schema.schemata s,
objects o
where c.cat_uid = s.cat_uid
and c.cat_name = 'SAMDBCAT'
and s.schema_uid = o.schema_uid
and s.schema_name = 'SALES'
order by object_name
for read uncommitted access;
SEC_CLASS
----------
TYPE
----
NAME_SPACE
----------
OBJECT_NAME
-------------------------
User Table
User Table
VI
BT
TA
TA
CUSTLIST
CUSTOMER
User TableNNCNCUSTOMER_412443172_5188
User TablePKCNCUSTOMER_817253172_5188
User TableCCCNDATE_CONSTRNT
OTHERBTTAHISTOGRAMS
OTHERPKCNHISTOGRAMS_249558842_5188
OTHERNNCNHISTOGRAMS_948848842_5188
OTHERBTTAHISTOGRAMS_FREQ_VALS
OTHERPKCNHISTOGRAMS_FREQ_VALS_3649
OTHERNNCNHISTOGRAMS_FREQ_VALS_8547
122 Querying SQL/MX Metadata