According to 10 Steps to Create and Run a Sample External Procedure Program on Unix (Doc ID 312564.1) I tried to get the sample running. But I still get "ORA-28575: unable to open RPC connection to external procedure agent", but I can't find the reason.
$ sqlplus system/xxx
SQL*Plus: Release 12.2.0.1.0 Production on Thu Jul 12 14:28:07 2018
Copyright (c) 1982, 2017, Oracle. All rights reserved.
Last Successful login time: Wed Jul 11 2018 10:44:06 +02:00
Connected to:
Oracle Database 12c Standard Edition Release 12.2.0.1.0 - 64bit Production
SQL> CREATE LIBRARY shell_lib is '/oracletst/db/SDST/lib/shell.so';
2 /
Library created.
SQL> CREATE OR REPLACE PROCEDURE shell(command IN char)
AS EXTERNAL
NAME "sh"
LIBRARY shell_lib
LANGUAGE C
PARAMETERS (command string);
/ 2 3 4 5 6 7
Procedure created.
SQL> exec shell('/bin/ls');
BEGIN shell('/bin/ls'); END;
*
ERROR at line 1:
ORA-28575: unable to open RPC connection to external procedure agent
ORA-06512: at "SYSTEM.SHELL", line 1
ORA-06512: at line 1
SQL>