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,