SQL/MX 3.1 Installation and Management Guide (H06.23+, J06.12+)

Querying SQL/MX Metadata
HP NonStop SQL/MX Release 3.1 Installation and Management Guide663852-001
8-32
Displaying users with catalog and schema creation
rights
--- 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_NAME SCHEMA_OWNER
------------------------------ ------------
DEFINITION_SCHEMA_VERSION_3000 65535
INVENT 65535
PERSNL 65535
SALES 65535
Displaying users with catalog and schema
creation rights
This section discusses the following topics:
Displaying users with catalog creation rights on page 8-32
Displaying users with schema creation rights on page 8-32
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%';
GRANTEE PRIVILEGE_TYPE
----------- --------------
44801 CC
44802 CC
--- 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