SQL/MX 3.2.1 Guide to Stored Procedures in Java (H06.26+, J06.15+)

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.
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).
Showing the Procedure Label
The procedure label is used internally by NonStop SQL/MX to track privileges on an SPJ. NonStop
SQL/MX creates one procedure label for each SPJ. The procedure label must exist and be available
for an SPJ to be invoked successfully. Knowing the locations of the procedure labels is particularly
important when you are using SPJs in a distributed database environment. For more information,
see Using SPJs in a Distributed Database Environment (page 98).
Showing the Procedure Label of One SPJ
To show the location of the procedure label for a specific SPJ, use the SHOWDDL command. For
example, enter this command in MXCI:
SHOWDDL PROCEDURE samdbcat.sales.lowerprice;
The SHOWDDL command returns information about the procedure label in the LOCATION clause:
CREATE PROCEDURE SAMDBCAT.SALES.LOWERPRICE
(
)
EXTERNAL NAME 'Sales.lowerPrice ()'
Displaying Information About SPJs 91