The DBMS_JAVA.REVOKE_PERMISSION subprogram is used to revoke Java privileges from a specified user or role. It disables all privilege records under the object that match the input parameters and are in the enabled state.
Note
This subprogram is available starting with OceanBase Database V4.4.2 and V4.6.1.
Syntax
DBMS_JAVA.REVOKE_PERMISSION(IN permission_schema VARCHAR(65535), IN permission_type VARCHAR(65535), IN permission_name VARCHAR(65535), IN permission_action VARCHAR(65535));
Parameters
Parameter |
Note |
|---|---|
| permission_schema | The name of the user or role whose privileges need to be revoked. |
| permission_type | Java permission type, that is, the class name of the Java permission. For example,java.io.FilePermission. |
| permission_name | The target name corresponding to the permission, for example,/dev/random. |
| permission_action | The operation corresponding to the permission, for example,read. |
Usage instructions
- Before calling
DBMS_JAVA.REVOKE_PERMISSION, ensure that the tenant parameterob_enable_java_udfis enabled. Otherwise, an unsupported error will be returned. - Only the root user in MySQL-compatible mode can operate Java permissions. Other users will receive an error indicating insufficient permissions when calling these methods.
- This subprogram matches permission records under the specified object that have consistent
permission_type,permission_name, andpermission_actionvalues in the system permission type and are enabled, and then disables them. - To permanently delete a permission record, use
DBMS_JAVA_DELETE_PERMISSION.