Title: RE: calling an external procedure

There are also some security advisories related to extprocs ... so read them as well.

Raj
--------------------------------------------------------------------------------
Rajendra dot Jamadagni at nospamespn dot com
All Views expressed in this email are strictly personal.
QOTD: Any clod can have facts, having an opinion is an art !


-----Original Message-----
From: Goulet, Dick [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 03, 2003 9:56 AM
To: Multiple recipients of list ORACLE-L
Subject: RE: calling an external procedure


Frank,

        You've got the TNSNAMES and Listener entries fouled up.  Here are the ones I use, the critical Keys are marked:

TNSNAMES:

extproc_connection_data.world =
(DESCRIPTION =
    (ADDRESS =
      (PROTOCOL = IPC)
       (KEY = extproc_agent)  <--- Key1
    )
  (CONNECT_DATA = (SID = 11)  <--- Key2
                  (server=dedicated))
)

Listener:

EXTPROC_LISTENER =
  (ADDRESS_LIST =
        (ADDRESS =
          (PROTOCOL = IPC)
          (KEY = extproc_agent) <---- Key1
        )
  )
SID_LIST_EXTPROC_LISTENER =
  (SID_LIST =
    (SID_DESC =
       (SID_NAME = 11)  <---- Key2
       (ORACLE_HOME = /ora1/81764)
       (PROGRAM = extproc)
    )
  )

BTW: Oracle's recommendation is to use a seperate listener for extproc calls.

Dick Goulet
Senior Oracle DBA
Oracle Certified 8i DBA

-----Original Message-----
Sent: Thursday, July 03, 2003 8:26 AM
To: Multiple recipients of list ORACLE-L


Hi all,

before I smash my head against the wall..........

I am trying to execute an external procedure defined in a C .dll.

I have set up my tnsnames/listener.ora as following :
----------------------------------------------------------------------------
---------------
# C:\ORANT\NET80\ADMIN\TNSNAMES.ORA Configurationfile
:C:\ORANT\net80\admin\tnsnames.ora
# Generated by Oracle Net8 Assistant

Tcp-loopback.world =
  (DESCRIPTION =
    (ADDRESS_LIST =
        (ADDRESS =
          (PROTOCOL = TCP)
          (Host = 127.0.0.1)
          (Port = 1521)
        )
    )
    (CONNECT_DATA = (SID = ORCL)
    )
  )
extproc_connection_data.world =
  (DESCRIPTION =
    (ADDRESS =
        (PROTOCOL = IPC)
        (KEY = ORCL)
    )
    (CONNECT_DATA = (SID = extproc)
    )
  )
       
# C:\ORANT\NET80\ADMIN\LISTENER.ORA Configuration
File:C:\ORANT\net80\admin\listener.ora
# Generated by Oracle Net8 Assistant
LISTENER =
  (ADDRESS_LIST =
        (ADDRESS=
          (PROTOCOL= IPC)
          (KEY= oracle.world)
        )
        (ADDRESS=
          (PROTOCOL= IPC)
          (KEY= ORCL)
        )
        (ADDRESS=
          (PROTOCOL= TCP)
          (Host= ff1)
          (Port= 1521)
        )
        (ADDRESS=
          (PROTOCOL= TCP)
          (Host= ff1)
          (Port= 1526)
        )
        (ADDRESS=
          (PROTOCOL= SPX)
          (Service= inventory_lsnr)
        )
        (ADDRESS=
          (PROTOCOL= NMP)
          (SERVER= nt_inventory_box)
          (PIPE= ORAPIPE)
        )
  )
STARTUP_WAIT_TIME_LISTENER = 0
CONNECT_TIMEOUT_LISTENER = 10

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = ff1)
      (SID_NAME = ORCL)
    )
    (SID_DESC =
      (SID_NAME = extproc)
      (PROGRAM=extproc)
      (ORACLE_HOME=$ORACLE_HOME)
    )
  )

LOG_DIRECTORY_LISTENER = c:\orant\net80\trace
TRACE_DIRECTORY_LISTENER = c:\orant\net80\trace
TRACE_LEVEL_LISTENER = admin
----------------------------------------------------------------

The plsql test code is :

drop library zPrintString;
create library zPrintString as 'c:/newsys/bin/PrintString.dll';

select * from user_libraries;

create or replace procedure PrintString
                (OutPutString IN VARCHAR2)
                as external
                Library zPrintString
                name "zPrintString"
                parameters (OutPutString STRING);

begin
        execute PrintString('testing');
end;
------------------------------------------------------------------

Oracle tells me, that it is not able, to loead the dll.
Error message is :

ORA-06520: PL/SQL: Error loading external library
ORA-06522: Unable to load DLL
ORA-06512: at "SYS.PRINTSTRING", line 0
ORA-06512: at line 2

------------------------------------------------------------------

is anyone able, to help ?

TNX Frank

________________________________________________________________________


Confidentiality Notes
This email and any files transmitted is intended only for the person or
entity to which it is addressed and may contain confidential and/or
privileged material. If you are not the authorised recipient, any use,
disclosure, copying, distribution or any action taken or omitted to be taken
in reliance on it, is prohibited. If you received this in error, please
contact the sender and delete the material from any computer.
E-mail messages are not necessarily secure. Scheidt & Bachmann does not
accept responsibility for any changes made to this message after it was
sent.
Thank you for your cooperation!
Diese E-Mail und alle angehängten Dateien ist ausschließlich für die Person
/ Personen bestimmt, an die diese adressiert ist und könnte vertrauliche und
/ oder rechtlich geschützte Informationen enthalten. Sollten Sie nicht der
für diese E-Mail bestimmte Adressat oder nicht zum Empfang berechtigt sein,
ist Ihnen jeder Gebrauch, sowie jede Veröffentlichung, Vervielfältigung oder
Weitergabe wie auch das Ergreifen oder Unterlassen von Maßnahmen im
Vertrauen auf erlangte Information untersagt. Sollten Sie diese E-Mail
irrtümlich erhalten haben, benachrichtigen Sie bitte den Absender und
löschen diese E-Mail von jedem Computer.
E-Mail-Mitteilungen sind nicht notwendigerweise sicher. Scheidt & Bachmann
übernimmt keine Verantwortung für Veränderungen dieser Mitteilung, die nach
dem Senden vorgenommen wurden.
Herzlichen Dank für Ihre Unterstützung!
----------------------------------------------------------------------------
-----------------------------------------
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Foelz.Frank
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Goulet, Dick
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

*********************************************************************This e-mail 
message is confidential, intended only for the named recipient(s) above and may 
contain information that is privileged, attorney work product or exempt from 
disclosure under applicable law. If you have received this message in error, or are 
not the named recipient(s), please immediately notify corporate MIS at (860) 766-2000 
and delete this e-mail message from your computer, Thank 
you.*********************************************************************1

Reply via email to