SQL/MX 3.2.1 Management Manual (H06.26+, J06.15+)
s.schema_name = 'SALES' and
cat_uid =
(select cat_uid from catsys where cat_name='SAMDBCAT')
for read uncommitted access;
CUR_OP
-----------
SUBVOL
--------
VERSION
-----------
OWNER
-----------
NAME
---------------
NONEZSDS53DQ300065535SALES
Displaying the Owner of a Schema
This example queries the SCHEMATA system schema table and returns the owner ID:
>> set schema nonstop_sqlmx_<system name>.system_schema;
--- SQL operation complete.
>> select substring(schema_name, 1, 30) as schema_name,
schema_owner
from schemata s, catsys c
where cat_name = 'SAMDBCAT'
and s.cat_uid = c.cat_uid
for read uncommitted access;
SCHEMA_OWNER
------------
SCHEMA_NAME
------------------------------
65535
65535
DEFINITION_SCHEMA_VERSION_3000
INVENT
65535
65535
PERSNL
SALES
Displaying Users With Catalog and Schema Creation Rights
This section discusses the following topics:
• “Displaying Users With Catalog Creation Rights” (page 124)
• “Displaying Users With Schema Creation Rights” (page 124)
Displaying Users With Catalog Creation Rights
In the following example, only Guardian users whose user IDs are 44801 and 44802 can create
catalogs in the system:
>> select grantee, privilege_type from
NONSTOP_SQLMX_COBOLT.SYSTEM_SECURITY_SCHEMA.MGM_PRIVILEGES where
PRIVILEGE_TYPE like '%CC%';
PRIVILEGE_TYPE
--------------
GRANTEE
-----------
CC44801
CC44802
--- 2 row(s) selected.
Displaying Users With Schema Creation Rights
In the following example, only the Guardian user whose user ID is 44802 can create schemas in
the catalog, CAT1:
>> select substring (c.cat_name, 1, 10) as cat_name, m.grantee,
m.privilege_type from NONSTOP_SQLMX_COBOLT.SYSTEM_SCHEMA.catsys
124 Querying SQL/MX Metadata










