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

Table Of Contents
Displaying all Privileges for a Column
This example displays all privileges for the column EMPNUM in the table
SAMDBCAT.PERSNL.EMPLOYEE:
>>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 col_privileges cp, cols c, objects o
where cp.table_uid = o.object_uid
and c.object_uid = o.object_uid
and c.column_number = cp.column_number
and c.column_name = 'EMPNUM'
and o.object_name = 'EMPLOYEE'
and o.object_type = 'BT'
and o.schema_uid =
(select schema_uid
from nonstop_sqlmx_<sys name>.system_schema.schemata
where
schema_name = 'PERSNL' 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
Refer
Update
Unknown
Unknown
65535
65535
System
System
-2
-2
Displaying Object Integrity and Consistency
The mxtool VERIFY command detects and reports inconsistencies between the information
contained in the metadata, the resource forks, and the file labels. It does not verify data integrity.
This command is often used together with the mxtool INFO command, which displays various
aspects of a database.
An object has definitional integrity if it is consistently described in the metadata, the resource forks,
and the file labels, and if the descriptions of all related objects are valid. A database can become
146 Querying SQL/MX Metadata