SQL/MX 3.2.1 Management Manual (H06.26+, J06.15+)

when 'D' then 'Delete'
when 'U' then 'Update'
when 'R' then 'Refer'
else 'Unknown'
end as prvtype,
is_grantable as grantable
from tbl_privileges t, objects o
where t.table_uid = o.object_uid
and o.object_name = 'ORDERS'
and o.object_type = 'BT'
and o.schema_uid =
(select schema_uid
from nonstop_sqlmx_<sys name>.system_schema.schemata
where
schema_name = 'SALES' and
cat_uid =
(select cat_uid
from nonstop_sqlmx_<sys name>.system_schema.catsys
where cat_name = 'SAMDBCAT'
)
)
for read uncommitted access;
GRANTABLE
---------
PRVTYPE
-------
GRANTEE_T
---------
GRANTEE_ID
-----------
GRANTOR_T
---------
GRANTOR_ID
----------
Y
Y
Delete
Insert
User
User
65535
65535
System
System
-2
-2
YReferUser65535System-2
Y
Y
Select
Update
User
User
65535
65535
System
System
-2
-2
Displaying all Privileges for a View
This example displays all privileges for the view SAMDBCAT.SALES.CUSTLIS:
>>set schema samdbcat.definition_schema_version_<schema version>;
--- SQL operation complete.
>> select grantor as grantor_id,
case (grantor_type)
when 'S' then 'System'
when 'U' then 'User'
else 'Unknown'
end as grantor_t,
grantee as grantee_id,
case (grantee_type)
when 'P' then 'Public'
when 'U' then 'User'
else 'Unknown'
end as grantee_t,
case (privilege_type)
when 'S' then 'Select'
when 'I' then 'Insert'
when 'D' then 'Delete'
when 'U' then 'Update'
when 'R' then 'Refer'
else 'Unknown'
end as prvtype,
is_grantable as grantable
from tbl_privileges t, objects o
where t.table_uid = o.object_uid
and o.object_name = 'CUSTLIST'
and o.object_type = 'VI'
and o.schema_uid =
Displaying Information About Privileges 145