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-10
Showing Privileges on the SPJs
Interpreting Privileges Information
The second query in Step 3 returns the grantees and the privileges they have on each
SPJ in a catalog, as shown:
The 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 owner of each SPJ (which is 2053 in this case) has these privileges:
EXECUTE privilege, represented by E in the PRIVILEGE_TYPE column
WITH GRANT OPTION privilege, represented by Y in the IS_GRANTABLE column
In the example, these users have the EXECUTE (E) and WITH GRANT OPTION (Y)
privileges on the ADJUSTSALARY procedure:
SPJ owner (2053)
The super ID (65535)
HR.MGRNA (2054)
HR.MGREU (2051)
These users have the EXECUTE (E) privilege but not the WITH GRANT OPTION (N)
privilege on the ADJUSTSALARY procedure:
MKG.RAYMOND (2069)
RD.MCKAY (2068)
CORP.GREEN (2055)
As shown in the highlighted row, all users of the system (that is, PUBLIC users) have
the EXECUTE (E) privilege on the MONTHLYORDERS procedure. The
GRANTEE_TYPE column shows whether the grantee is a public grant (P) or a user
grant (U).
SCHEMA PROCEDURE GRANTEE GRANTEE_TYPE PRIVILEGE_TYPE IS_GRANTABLE
-------- -------------- -------- ------------ -------------- ------------
PERSNL ADJUSTSALARY 2053 U E Y
PERSNL ADJUSTSALARY 2069 U E N
PERSNL ADJUSTSALARY 2068 U E N
PERSNL ADJUSTSALARY 2055 U E N
PERSNL ADJUSTSALARY 2054 U E Y
PERSNL ADJUSTSALARY 2051 U E Y
SALES DAILYORDERS 2053 U E Y
SALES LOWERPRICE 2053 U E Y
SALES MONTHLYORDERS 2053 U E Y
SALES MONTHLYORDERS -1 P E N
SALES TOTALPRICE 2053 U E Y
--- 11 row(s) selected.