Home » RDBMS Server » Networking and Gateways » c program call from plsql
c program call from plsql [message #575561] Thu, 24 January 2013 02:13 Go to next message
myadi26
Messages: 4
Registered: December 2012
Location: india
Junior Member
hi,
my db version is:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production

entry in my listener.ora file
===========================
# listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(PROGRAM = extproc)
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
)
(SID_DESC =
(GLOBAL_DBNAME = orcl)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
(SID_NAME = orcl)
)
)

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = 1521))
)
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = extproc0))
)
)

ADR_BASE_LISTENER = /u01/app/oracle

entry in tnsnames.ora file:
===============================
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = extproc0))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl.example.com)
)
)

listener is running perfectly.
created c program,
compile the program by gcc -c <filename>
ld -shared -o <filename.so> <filename.o>
cp <filename.so> $ORACLE_HOME/bin

create library & function from db. when I am invoking this function it is throwing error message:

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

tnx in advance
Re: c program call from plsql [message #575562 is a reply to message #575561] Thu, 24 January 2013 02:35 Go to previous message
Michel Cadot
Messages: 58640
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
ORA-28546: connection initialization failed, probable Net8 admin error
 *Cause:   A failure occurred during initialization of a network connection
           from the Oracle server to a second process:  The connection
           was completed but a disconnect occurred while trying to
           perform protocol-specific initialization, usually due to
           use of different network protocols by opposite sides
           of the connection.  This usually is caused by incorrect
           Net8 administrative setup for database links or external
           procedure calls.   The most frequent specific causes are:
           --  Database link setup for an Oracle-to-Oracle connection
               instead connects to a Heterogeneous Services agent
               or an external procedure agent.
           --  Database link setup for a Heterogeneous Services connection
               instead connects directly to an Oracle server.
           --  The extproc_connection_data definition in tnsnames.ora
               connects to an Oracle instance instead of an external
               procedure agent.
           --  Connect data for a Heterogeneous Services database link,
               usually defined in tnsnames.ora, does not specify (HS=).
           --  Connect data for an Oracle-to-Oracle database link,
               usually defined in tnsnames.ora, specifies (HS=).
 *Action:  Check Net8 administration in the following ways:
           --  When using TNSNAMES.ORA or an Oracle Names server, make sure
               that the connection from the ORACLE server uses the correct
               service name or SID.
           --  Check LISTENER.ORA on the connection end point's host machine
               to assure that this service name or SID connects to the
               correct program.
           --  Confirm in TNSNAMES.ORA or the equivalent service definition
               that service 'extproc_connection_data' does NOT contain
               (HS=), or that the service definition used by a
               Heterogeneous Services database link DOES contain (HS=).


Quote:
(CONNECT_DATA =
(SERVICE_NAME = orcl.example.com)
)


should be
    (CONNECT_DATA =
      (SID = PLSExtProc)
      (PRESENTATION = RO)
    )

Regards
Michel
Previous Topic: ERROR [08004] [Oracle][ODBC][Ora]ORA-12154: TNS:could not resolve the connect identifier specified (merged)
Next Topic: ORA-12518 Tns: Listener does not currently know of service
Goto Forum:
  


Current Time: Fri Aug 01 02:53:10 CDT 2014

Total time taken to generate the page: 0.12295 seconds