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!

Questions about installing using the OS_COMMAND Package

rjsosiSep 7 2021 — edited Sep 7 2021

Hi,
We’re using Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production.
I want to use the OS_COMMAND package so I can run Linux commands on the server from with in an Oracle procedure. I‘ve used this at a previous client. They don’t have it installed here. I know I need to have the OS_COMMAND pkg run and installed in the SYS schema.
When I used it before it worked perfectly. From inside and Oracle procedure I’d just add:
Shell( ‘ls -ltr’);
and that was it.
I’ve installed the OS_COMMAND package in a non-SYS schema (SLDBATCH) just to test it.
Of course I’m getting an error when I try to compile the procedure I’m testing it in.
“14:21:34 Error: ORA-29532: Java call terminated by uncaught Java exception: java.security.AccessControlException: the Permission (java.io.FilePermission /bin/sh execute) has not been granted to SLDBATCH. The PL/SQL to grant this is dbms_java.grant_permission( 'SLDBATCH', 'SYS:java.io.FilePermission', '/bin/sh', 'execute' ) ORA-06512: at "SLDBATCH.OS_COMMAND", line 56”
My question is this a function of having it ‘test’ installed under and non SYS id?
Also, was the ‘shell’ command I used, a proprietary command the DBAs at the previous place used? It there a more standard or Generic command to use?
Thanks,

This post has been answered by Solomon Yakobson on Sep 9 2021
Jump to Answer

Comments

Khalil Dahham

I have the same error simply by deploying ORDS on Tomcat locally. I'm using ORDS (21.1.3.153.1102) and Tomcat (10.0.11) installed on windows 10.

User_16TSJ
Answer

I never found the solution for the issue, but I believe it was related to Tomcat 10.x. I downgraded Tomcat to version 9 and the error went away.

Marked as Answer by User_16TSJ · Sep 19 2021
Khalil Dahham

Yes it worked on 9! This will do for now. Thanks.

cormaco

Tomcat 10 is not yet supported by Oracle:
Supported Java EE Application Servers
Application ServerSupported Release
Oracle WebLogic Server 12c Release 2 (from version 12.2.1.3 and later) and 14c Release and later
Apache Tomcat Release 8.5.x through Release 9.0.x

Mohan Poojari

I never found the solution for the issue, but I believe it was related to Tomcat 10.x. I downgraded Tomcat to version 9 and the error went away.

Yes, ORDS will absolutely NOT work on Tomcat 10 today.

1 - 6

Post Details

Added on Sep 7 2021
11 comments
3,393 views