Note
This view is introduced since V5.0.1.
Purpose
The USER_JAVA_POLICY view displays the Java permission policies owned by the currently logged-in user. Unlike DBA_JAVA_POLICY, this view returns only the permission policy records related to the current user.
Columns
Column |
Type |
Nullable |
Description |
|---|---|---|---|
| KIND | varchar(8) | NO | The type of the policy:
|
| GRANTEE | varchar(128) | NO | The name of the authorized user. |
| TYPE_SCHEMA | varchar(128) | NO | The name of the database to which the type belongs. |
| TYPE_NAME | varchar(4096) | YES | The name of the type. |
| NAME | varchar(4096) | YES | The name of the permission target. |
| ACTION | varchar(4096) | YES | The permission action. |
| ENABLED | varchar(8) | NO | Whether the policy is enabled:
|
| SEQ | bigint(20) | NO | The sequence number of the policy. |
Query example
After creating a Java permission policy using DBMS_JAVA.GRANT_PERMISSION, query the Java permission policies owned by the current user.
obclient> SELECT * FROM oceanbase.USER_JAVA_POLICY;
The return result is as follows:
+------+---------+----------------+------------------------+------+--------+---------+------+
| KIND | GRANTEE | TYPE_SCHEMA | TYPE_NAME | NAME | ACTION | ENABLED | SEQ |
+------+---------+----------------+------------------------+------+--------+---------+------+
| GRANT| SYS | java.io | FilePermission | /tmp/-| read | ENABLED | 1 |
+------+---------+----------------+------------------------+------+--------+---------+------+
1 row in set (0.00 sec)
Related views
- DBA_JAVA_POLICY: displays the Java permission policies of all users in the current tenant.
