Skip to Main Content

Oracle Database Discussions

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!

TRUNCATE TABLE giving error even with DROP ANY TABLE system privilege

sabyakgpDec 18 2020

Hi
I have a table called TEST1.T1:
create table test1.t1 (id int, constraint pk_id primary key(id));
and another called TEST1.T2:
create table test1.t2 (id int, constraint fk_id foreign key(id) references test1.t1(id) on delete cascade);
I have created a stored procedure in another schema TEST2.TPROC
create or replace procedure test2.tproc as
begin
execute immediate 'TRUNCATE TABLE TEST1.T1 CASCADE';
end tproc;
My user id is smitra and I have granted execute role to the user on this procedure:
grant execute on test2.tproc to smitra;
I also granted DROP ANY TABLE TEST2 user:
grant drop any table to test2;
When I execute this SP:
exec test2.tproc;
I get error:
BEGIN test2.tproc; END;
ERROR at line 1:
ORA-01031: insufficient privileges
ORA-06512: at "TEST2.TPROC", line 4
ORA-06512: at line 1
My question is when the TEST2 user, in which the procedure is defined, has the DROP ANY TABLE system privilege why it's throwing this error?
The only I was able to resolve the error is to change the DEFINER RIGHTS of the SP to INVOKER RIGHTS. Can somebody please explain why I am getting this error? I am using Oracle 12.1

Comments

karianna

This Q should be moved to the Java Security community, but it looks like you have a classpath issue where that class/method is not being loaded.

Pankaj Shakya

Thanks @"karianna", but while i type complete path in url, all jars are being accessed.

e.g http://10.25.85.74:8080/PIMS/applet/dsc-1.0.jar

Is there any problem with my JNLP file?

karianna

I'm not familiar with JNLP - perhaps it needs download="eager" on the bouncy castle lib and you should also check that the bouncy castle JARs actually contain the method you're invoking.

Pankaj Shakya

I have already tried it with eager...but no change and  checked all jars, they are containing all methods and classes which are being invoked. I have been working on this problem since last 3 days, all the solutions which i found weren't helpful. Also tried oracle demo of Java Web Start, i am doing the same as mentioned.

I have also got a ref site, downloaded jnlp and when tried to execute - The same problem was there.

https://www.qoppa.com/files/pdfnotes/demo/jPDFNotes_savetoweb.jnlp

Pankaj Shakya

I have already tried it with eager...but no change and  checked all jars, they are containing all methods and classes which are being invoked. I have been working on this problem since last 3 days, all the solutions which i found weren't helpful. Also tried oracle demo of Java Web Start, i am doing the same as mentioned.

I have also got a ref site, downloaded jnlp and when tried to execute - The same problem was there.

https://www.qoppa.com/files/pdfnotes/demo/jPDFNotes_savetoweb.jnlp

user13654132

Do you still solve dthis problem? cause im having the same issues here. Webutil function works fine when using browser but problem when using webstart.

1 - 6

Post Details

Added on Dec 18 2020
5 comments
485 views