Removes one or more Java-SQL classes, packages, or JARs from a database, when Java classes are installed in the database.
remove java class class_name[, class_name]... | package package_name[, package_name]... | jar jar_name[, jar_name]...[retain classes]
If a remove java statement is contained in a stored procedure, the current database is the database that is current when the procedure is created, not the database that is current when the procedure is called.
If a remove java statement is not contained in a stored procedure, the current database is the database that is current when the remove statement is executed.
If class or package is specified and any removed class has an associated JAR, then an exception is raised.
If any stored procedure, table, or view contains a reference to a removed class as the datatype of a column, variable, or parameter, then an exception is raised.
Deleted from the current database.
Unloaded from the Java Virtual Machine (Java VM) of the current connection. The removed classes are not unloaded from the Java VMs of other connections.
If any exception is raised during the execution of remove java, then all actions of remove java are cancelled.
You cannot remove a Java-SQL class if that class is directly referenced by a SQLJ stored procedure or function.
Delete all SQLJ stored procedures or functions that directly reference the class using drop procedure and drop function.
Delete the Java-SQL class from the database using remove java.
When you use remove java, an exclusive table lock is placed on sysxtypes.
If jar is specified, then an exclusive table lock is placed on sysjars.
Java in Adaptive Server Enterprise
sp_helpjava in Reference Manual: Procedures
sysjars, sysxtypes in Reference Manual: Tables
extractjava, installjava in the Utility Guide
You must be a system administrator or database owner to use remove java.
The permission checks for remove jar class differ based on your granular permissions settings.
Setting | Description |
---|---|
Enabled | With granular permissions enabled, you must be a user with manage database privilege. |
Disabled | With granular permissions disabled, you must be the database owner. |
Values in event and extrainfo columns of sysaudits are:
Information | Values |
---|---|
Event | 94 |
Audit option | remove |
Command or access audited | remove java |
Information in extrainfo |
|