SQL/MX Guide to Stored Procedures in Java (G06.24+, H06.03+)

Managing SPJs in NonStop SQL/MX
HP NonStop SQL/MX Guide to Stored Procedures in Java523727-004
6-9
Showing Privileges on the SPJs
AND ot.schema_uid = st.schema_uid
AND ot.object_uid = pr.table_uid;
The schema version number vernum for NonStop SQL/MX Releases 2.0 and 2.1
is 1200.
For the output, see Interpreting Privileges Information on page 6-10.
4. To end logging, enter the LOG command without the name of the log file:
LOG;
Interpreting Ownership and Grantor Information
The first query in Step 2 returns the owners, grantors of privileges, and grantees for all
SPJs in a catalog, as shown:
The owners, grantors, and grantees are represented by user ID numbers. Use the
USER_GETINFO_ procedure to return the user name associated with the user ID
number. For more information, see the Guardian Procedure Calls Reference Manual.
By default, the system (represented by -2 in the GRANTOR column) grants ownership
privileges to the creator of each schema and its SPJs, who happens to be user ID
2053 in this case, as shown in the OBJECT_OWNER column. The GRANTOR_TYPE
column shows whether the system (S) or a user (U) was responsible for granting
privileges to other users.
In the example, the super ID (65535), acting on behalf of the object owner (2053),
granted privileges on the MONTHLYORDERS procedure to PUBLIC (represented by
-1 in the GRANTEE column). The super ID, acting on behalf of the object owner
(2053), also granted privileges on the ADJUSTSALARY procedure to HR.MGRNA
(2054) and HR.MGREU (2051). The user named HR.MGRNA (2054) granted
privileges to MKG.RAYMOND (2069), RD.MCKAY (2068), and CORP.GREEN (2055),
as shown in the highlighted rows.
SCHEMA PROCEDURE OBJECT_OWNER GRANTOR GRANTOR_TYPE GRANTEE
-------- --------------- ------------ ----------- ------------ ------
PERSNL ADJUSTSALARY 2053 -2 S 2053
PERSNL ADJUSTSALARY 2053 2054 U 2069
PERSNL ADJUSTSALARY 2053 2054 U 2068
PERSNL ADJUSTSALARY 2053 2054 U 2055
PERSNL ADJUSTSALARY 2053 2053 U 2054
PERSNL ADJUSTSALARY 2053 2053 U 2051
SALES DAILYORDERS 2053 -2 S 2053
SALES LOWERPRICE 2053 -2 S 2053
SALES MONTHLYORDERS 2053 -2 S 2053
SALES MONTHLYORDERS 2053 2053 U -1
SALES TOTALPRICE 2053 -2 S 2053
--- 11 row(s) selected.