Removes one or more Java-SQL classes, packages, or JARs from a database.
Use when Java classes are installed in the database. See Java in Adaptive Server Enterprise for more information.
remove java class class_name[, class_name]... | package package_name[, package_name]... | jar jar_name[, jar_name]...[retain classes]
the name of one or more Java classes to be removed from the database. The classes must be installed in the current database.
the name of one or more Java packages to be removed. The packages must be stored in the current database.
either a SQL identifier or character string value of up to 30 bytes that contains a valid SQL identifier.
Each jar_name must be equal to the name of a retained JAR in the current database.
specifies that the named JARs are no longer retained in the database, and the retained classes have no associated JAR.
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.
All removed classes are:
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.
To remove a Java-SQL class from the database, you must:
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.
You must be a System Administrator or Database Owner to use remove java.
Values in event and extrainfo columns of sysaudits are:
Event |
Audit option |
Command or access audited |
Information in extrainfo |
---|---|---|---|
94 |
remove |
remove java |
|