Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to know if a java code has permissions?

411930Sep 23 2007 — edited Sep 24 2007
Hello.

I have this function that recovers a java method:
CREATE OR REPLACE FUNCTION FERNANDO.EjecutarProcesoSOFERNANDO (param1 VARCHAR2, param2 VARCHAR2) return NUMBER
AS LANGUAGE JAVA  name 'EjecutarProcesoSOFERNANDO.ejecuta(java.lang.String, java.lang.String) return java.lang.int';
The first parameter is a os command and the second is a file (that is parameter for the command). This function is called inside another pl/sql function.

For the command to be executed I need to give permissions with dbms_java.grant_permission to the command and to the file.

My problem is that if the permissions are not granted the function EjecutarProcesoSOFERNANDO does not raise any exception nor returns any errorcode.

I need to control this some way in order to know if the command has really been executed.

How can I do that? Must I control it from pl/sql (maybe checking some dictionary table)
or should the java method return this information (I have no idea how I could do that) ?

Thanks in advance.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 22 2007
Added on Sep 23 2007
1 comment
215 views