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!

Calling java host command in trigger/PLSQL

346818May 7 2010 — edited May 7 2010
I created a java call to execute a linux host command that calls a shell script that will echo out a result. It is owned by SYS and has granted execute to SYSTEM. SYSTEM has a table that monitors accesses to the RDBMS. When a user logs on from a remote server vis sqlplus, this LOGON trigger write to the SYSTEM table (successfully). SYSTEM has a trigger that runs a linux command to execute a shell script that pulls the actual IP address from the remote system. I can run this call from a PLSQL block (outside the trigger) and get a response back like "user:101.101.101.111" but when I have the same user log on, the trigger fires - no errors or exceptions yet no rows are returned. Is there some restriction in a trigger versus just a plsql block call? The java code used is what I found on (http://www.oracle-base.com/articles/8i/ ... mPLSQL.php) and it works perfectly OUTSIDE the trigger but nothing is returned in the trigger firing steps. Any idea?

rdbms: 11.1.0.7, Redhat 4

I know the code works because I can write the host command output to a file. Later in the trigger I can open the file and can read the data that should have been returned in the java host call.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 4 2010
Added on May 7 2010
10 comments
1,806 views