Problem With Remote Extproc Procedure Calls ORA-28546 (Doc ID 269658.1)

Last updated on AUGUST 30, 2017

Applies to:

PL/SQL - Version 9.2.0.8 and later
Information in this document applies to any platform.
***Checked for relevance on 30-Aug-2017***

Symptoms


Attempting to call an external procedure across a database link using the following use case scenario fails with ORA-28546

Server B (The Shared Library is deployed on Server B)

1. Copy exproc.c and demo_rdbms.mk from $ORACLE_HOME/rdbms/demo
2. make -f demo_rdbms.mk extproc_with_context SHARED_LIBNAME=extproc.so OBJS=extproc.o
3. Copy extproc.so into $ORACLE_HOME/lib (see note 198523.1 EXTPROC will only load Shared Libraries that are in $ORACLE_HOME/bin or $ORACLE_HOME/lib)
4. Configure the listener to listen for external procedure calls.

Server A (Create and setup the Database Link and PLSQL Wrapper on Server A)

1. Copy exproc.sql from $ORACLE_HOME/plsql/demo
2. SQLPLUS SCOTT/TIGER
3. CREATE DATABASE LINK db1 CONNECT TO scott IDENTIFIED BY tiger USING 'connect string';
4. Test dblink using SELECT * FROM global_name@db1;
5. CREATE OR REPLACE LIBRARY demolib as '$ORACLE_HOME/lib/extproc.so' AGENT 'db1.us.oracle.com';
6. @extproc.sql

Exception:

ORA-28546: connection initialization failed, probable Net8 admin error

When run without the SQL 'AGENT' clause (.so and extproc are on/configured on server A):

SQL> CREATE OR REPLACE LIBRARY demolib as '$ORACLE_HOME/lib/extproc.so';

The extproc.sql runs successfully.

The information in the Oracle SQL Reference is misleading with respect to how to use the AGENT clause and what it's purpose is when using it with External Stored Procedure Calls.


The Oracle SQL Reference states:

Create Library Section, AGENT Clause

Specify the AGENT clause if you want external procedures to be run from a database link other than the server. Oracle will use the database link specified by agent_dblink to run external procedures. If you omit this clause, the default agent on the server (extproc) will run external procedures.

The Oracle Net Services Administrator's Guide states:

Configuring Oracle Net Services for External Procedures section

The agent must reside on the same computer as the application making the external procedure call.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms