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

Registering SPJs in NonStop SQL/MX
HP NonStop SQL/MX Guide to Stored Procedures in Java523727-004
4-12
Dropping an SPJ
Dropping an SPJ
The DROP PROCEDURE statement removes an SPJ from NonStop SQL/MX. You can
issue a DROP PROCEDURE statement from any application or interface that calls
NonStop SQL/MX, such as:
SQL/MX conversational interface (MXCI)
Embedded SQL programs in C, C++ or COBOL
SQLJ programs (embedded SQL in Java)
JDBC/MX programs
NonStop ODBC/MX clients
NSM/web
Required Privileges for Dropping an SPJ
To issue a DROP PROCEDURE statement, you must own the SPJ or be the super ID.
To determine the ownership of an SPJ, see Showing Privileges on the SPJs on
page 6-8.
Effect of Dropping an SPJ
Successful execution of the DROP PROCEDURE statement removes the SPJ
attributes from system metadata tables and drops the procedure label of the SPJ. The
underlying Java method and any dependent SPJ that refers to this SPJ are not
affected by the DROP PROCEDURE statement. If the DROP PROCEDURE statement
fails to execute, NonStop SQL/MX does not modify system metadata tables and does
not drop the procedure label.
Using the DROP PROCEDURE Statement
To drop an SPJ, specify the name of the SPJ in the DROP PROCEDURE statement,
as shown:
DROP PROCEDURE samdbcat.persnl.adjustsalary;
Do not specify the SQL parameters along with the procedure name. Each procedure
name represents a unique SPJ in the database because NonStop SQL/MX does not
support the overloading of procedure names.
For the syntax of the DROP PROCEDURE statement, see the SQL/MX Reference
Manual.