begin
dbms_java.grant_permission
('SCOTT',
'java.io.FilePermission',
'<<ALL FILES>>',
'execute');
dbms_java.grant_permission
('SCOTT',
'java.lang.RuntimePermission',
'*',
'writeFileDescriptor' );
end;
Friday, 18 January 2019
grant dbms_java.grant_permission
Revoke DBMS_JAVA permissions
Revoke dbms_java permission
Query the dba_java_policy table
$sqlplus / as sysdba
SQL>select * from dba_java_policy
KING GRANTEE TYPE SCHEMA TYPE NAME NAME ACTION ENABLED SEQ
GRANT XXPMS SYS java.io.FilePermission * read ENABLED 178
GRANT XXPMS SYS java.io.FilePermission /- read,write ENABLED 181
GRANT XXPMS SYS java.io.FilePermission /bin/ls execute ENABLED 180
Using the SEQ value, you can run the following statement to revoke the granted java permissions
eg: suppose you want to revoke SEQ 178
Query the dba_java_policy table
$sqlplus / as sysdba
SQL>select * from dba_java_policy
KING GRANTEE TYPE SCHEMA TYPE NAME NAME ACTION ENABLED SEQ
GRANT XXPMS SYS java.io.FilePermission * read ENABLED 178
GRANT XXPMS SYS java.io.FilePermission /- read,write ENABLED 181
GRANT XXPMS SYS java.io.FilePermission /bin/ls execute ENABLED 180
Using the SEQ value, you can run the following statement to revoke the granted java permissions
eg: suppose you want to revoke SEQ 178
begin
DBMS_JAVA.disable_permission(178);
DBMS_JAVA.delete_permission(178);
end;