ORA-06520: PL/SQL: Error loading external library

Hi
I am trying to use an external C program from sql using following steps.
copy the dll in dir ORACLE/806/BIN
create or replace library outs as
'e$/ORACLE/806/BIN/SmlCrcChecking.dll'
create or replace FUNCTION plsCheck_File_CRC (fname Varchar2)
return boolean
AS LANGUAGE C
library outs
name "Check_File_CRC";
and call the dll using
select plsCheck_File_CRC('c:\mttest.txt') from dual;
The dll is notc alled the message is
ERROR at line 1:
ORA-06520: PL/SQL: Error loading external library
ORA-06522: Unable to load DLL
Please help
Prashant

I am trying to create a Pl/SQL test env using
create or replace procedure file_test
(fname in varchar2,
status out number)
is
begin
If Check_File_CRC (fname) then
status:=0;
else
status:=1;
end if;
end;
However the following errros are displayed
Errors for PROCEDURE FILE_TEST
6/1 PL/SQL: Statement ignored
6/4 PLS-00382: expression is of wrong type
mY TNSNAMES.ORA contains following
additions
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
(CONNECT_DATA = (SID = PLSExtProc)(PRESENTATION = RO))
extproc_connection_data.world =
(DESCRIPTION =
(ADDRESS =
(PROTOCOL = IPC)
(KEY = extproc))
(CONNECT_DATA =
(SID = extproc)
AND LISTNER.ORA
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = D:\oracle\ora81)
(PROGRAM = extproc)
Message was edited by:
prashant13

Similar Messages

  • Context: Error loading external library

    Oracle 8.1.5EE, Solaris 8 (x86)
    create index quick_text on quick ( text )
    ERROR at line 1:
    ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-20000: ConText error:
    ORA-06520: PL/SQL: Error loading external library
    ORA-06522: ld.so.1: extprocPLSExtProc: fatal: relocation error: file
    /oracle/app/oracle/product/8.1.5/ctx/lib/libctxx8.so: symbol ociepgoe:
    referenced symbol not found
    ORA-06512: at "CTXSYS.DRUE", line 122
    ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 34
    ORA-06512: at line 1
    whats the problem ?!
    null

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Omar Alonso ([email protected]):
    Make sure that the Net8 listener is running and is configured to invoke external procedures.<HR></BLOCKQUOTE>
    Of cause its running and configured as follows:
    listener.ora:
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (PROGRAM=extproc) (ORACLE_HOME=/oracle/app/oracle/product/8.1.5)
    (SID_NAME=PLSExtProc)
    tnsnames.ora:
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    LD_LIBRARY_PATH - ok to lib and lib/ctx
    + /var/ld/ld.conf - correct
    + ENVS=LD_LIBRARY_PATH=... - set
    I dont understand whats the problem ;-(
    services looks like this:
    PHNET3 has 5 service handler(s)
    DEDICATED SERVER established:0 refused:0
    LOCAL SERVER
    DISPATCHER established:94 refused:0 current:13 max:254 state:ready
    D000 <machine: phnet3, pid: 19391>
    (ADDRESS=(PROTOCOL=tcp)(HOST=195.133.235.229)(PORT=34087))
    DISPATCHER established:162 refused:0 current:13 max:254 state:ready
    D001 <machine: phnet3, pid: 19393>
    (ADDRESS=(PROTOCOL=tcp)(HOST=195.133.235.229)(PORT=34088))
    DISPATCHER established:132 refused:0 current:13 max:254 state:ready
    D002 <machine: phnet3, pid: 19395>
    (ADDRESS=(PROTOCOL=tcp)(HOST=195.133.235.229)(PORT=34089))
    DEDICATED SERVER established:0 refused:0
    LOCAL SERVER
    PLSExtProc has 1 service handler(s)
    DEDICATED SERVER established:0 refused:0
    LOCAL SERVER
    null

  • Error loading external library

    I have created a library in Oracle using a C library test.so in sun solaris.
    This library contains string manipulation and memory management functions. When I call a function in this library through PL/SQL I get the error
    ORA-06520: PL/SQL: Error loading external library
    ORA-06522: ld.so.1: extprocPLSExtProc: fatal: relocation error: file /home/OraHome/8.1.7/lib/test.so: symbol endl__FR7ostream: referenced symbol not found
    Anybody knows how to set the environment so that symbols in libraries located in other directories can be traced by Oracle.
    Mohan

    Hello
    We have just come across the same problem. A .so library is
    accesible (i.e. we have the adecuate permissions through Unix)
    and the extproc procedure finds it, but we cannot access the
    functions within it. We also get the (really strange) Bad Magic
    error.
    I see that you posted this problem a long while ago and I was
    wondering if you've found a solution you could share.
    Thanks,
    Marta Tirelli

  • Error loading external library (Oracle 8.1.5)

    I'm running Oracle 8.1.5 and am trying to configure the interMedia Text option to enable long test searches using the "contains" operator.
    I've installed (and re-installed) the interMedia text option trying to get this thing working. The installations (including the re-installation) were successful and starting the ctxsrv process was successful as well. No matter what I do, however, I get the following error when I try to create a context type index:
    SQL> create index z$long_ix on z$long(data) indextype is ctxsys.context;
    create index z$long_ix on z$long(data) indextype is ctxsys.context
    ERROR at line 1:
    ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-20000: ConText error:
    ORA-06520: PL/SQL: Error loading external library
    ORA-06522: ld.so.1: extprocPLSExtProc: fatal: libskgxp8.so: open failed: No such file or directory
    ORA-06512: at "CTXSYS.DRUE", line 122
    ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 34
    ORA-06512: at line 1
    I have tried everything in the online newsgroups, FAQs, etc, but still seem to have this error come up.
    My tnsnames.ora contains:
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    (CONNECT_DATA =
    (SID = PLSExtProc)
    My listener.ora contains:
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = /dbmsu001/app/oracle/product/8.1.5)
    (ENVS=LD_LIBRARY_PATH=/dbmsu001/app/oracle/product/8.1.5/lib:/dbmsu001/app/oracle/product/8.1.5/ctx/lib)
    (PROGRAM = extproc)
    (SID_DESC =
    (SID_NAME = SWOW)
    (GLOBAL_DBNAME = devlab)
    (ORACLE_HOME = /dbmsu001/app/oracle/product/8.1.5)
    I restarted the listener each time I made changes to listener.ora and I restarted ctxsrv process each time as well to make sure. I run ctxsrv as "ctxsrv -user ctxsys/ctxsys -personality M -log ctx.log &". I exited SQL*PLus and restarted to make sure I got a new session under the new listener process.
    I don't know alot about libraries and external processes, but from what I've read, I have everything setup properly. I checked the dba_libraries view and it shows the proper filename and path for the libctxx8.so file. It should be correct as it's the same file/path I entered while installing the interMedia text option.
    I've also tried setting text_enable = FALSE in initXXX.ora to make sure that doesn't interfere. Somewhere I read that having that parameter set to TRUE may cause some problems as it's only for version prior to 8.1.5.
    If you have any additional information that can help me get this working, it would be greatly appreciated. I've spent countless hours and am just spinning my wheels now with an ever increasing level of frustration.
    Shane Marshall
    Boston, MA

    This might be best asked in the Oracel Text forum...
    But, it appears that you have extproc configured correctly, the problem is that extproc cannot find the shared object in question. It cannot dynamically load the shared object becaus it cannot find it.
    In my experience, this is due to a LD_LIBRARY_PATH unix environmental variable that does not include the directory where the shared object is. You should set this variable in the login script for the oracle user.
    From the installation guide.... I am not sure if this library is in ORACLE_HOME/lib, if not add the directory to LD_LIBRARY_PATH
    LD_LIBRARY_PATH
    Required when using Oracle products that use shared libraries. Set LD_LIBRARY_
    PATH to include $ORACLE_HOME/lib.

  • Error Loading External Library - worked on 10g, now upgraded to 11g and not

    I have an external C library that have been using for years to extracy binary data (images, docs, pdfs etc) from a blob column in a table
    This has been working on Oracle 10.2.0.1 on Windows 32 bit for years.
    I have a new server, Windows 2008 64 bit, have installed 11.2.0.1, created a database and done a full datapump export and import.
    My application seems to work fine with the exception of this external dll
    I have made sure the dll is in the correct directory on the server and the library is pointing to it :
    create or replace library EXTERNPROCEDURES as 'C:\oracle\extern\extern.dll';I then have the same wrapper code that works fine on 10g, is there something I need to do on 11g to "authorise" the external dll or anything as I know the security is tighter or is there an issue with the fact this is 64bit Oracle?
    I have set the listener.ora to be the same as on 10g
    LISTENER =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS_LIST =
            (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
          (ADDRESS_LIST =
            (ADDRESS = (PROTOCOL = TCP)(HOST = DB12)(PORT = 1521))
    SID_LIST_LISTENER =
      (SID_LIST =
        (SID_DESC =
          (SID_NAME = PLSExtProc)
          (ENVS = "EXTPROC_DLLS=ANY")
          (ORACLE_HOME = c:\oracle\ora11g)
          (PROGRAM = extproc)
        (SID_DESC =
          (GLOBAL_DBNAME = UPAD)
          (ORACLE_HOME = c:\oracle\ora11g)
          (SID_NAME = UPAD)
      )And the TNS names file
    EXTPROC_CONNECTION_DATA =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
        (CONNECT_DATA =
          (SID = PLSExtProc)
          (PRESENTATION = RO)
      )Wrapper:
    create or replace procedure OutputString(
      p_Path in varchar2,
      p_Message in varchar2,
      p_mode in varchar2,
      p_NumLines in binary_integer)
    as
    external
      library externProcedures
      name "OutputString"
      with context
      parameters (context,
                  p_Path string,
                  p_path INDICATOR,
                  p_Message string,
                  p_message INDICATOR,
                  p_mode string,
                  p_mode INDICATOR,
                  p_NumLines int,
                  p_numlines INDICATOR)
    ;And the actual pl/sql code
    create or replace procedure extract_b
    (pname in varchar2
    ,ppath in varchar2
    is
         vBlob          blob;
         vLen          number;
         vRaw          raw(10000);
         i          number;
         j          number := 10000;
    begin
         select blob_content into vBlob from wwv_document$ where name = pName;
         -- find the length of the blob column
         vLen :=  DBMS_LOB.GETLENGTH(vBlob);
         -- Read 10000 bytes at a time
         i := 1;
         if vLen < 10000 then
         -- If the col length is < 10000
              DBMS_LOB.READ(vBlob,vLen,i,vRaw);
              outputstring(pPath,rawtohex(vRaw),'wb',2*vLen);
         -- You have to convert the data to rawtohex format. Directly sending the buffer data will not work
         -- That is the reason why we are sending the length as the double the size of the data read
         else
         -- If the col length is > 10000
              DBMS_LOB.READ(vBlob,j,i,vRaw);
              outputstring(pPath,rawtohex(vRaw),'wb',2*j);
         end if;
         i := i + 10000;
         while (i < vLen ) loop
         -- loop till entire data is fetched
              DBMS_LOB.READ(vBlob,j,i,vRaw);
              outputstring(pPath,rawtohex(vRaw),'ab',2*j);
              i := i + 10000 ;
         end loop;
    end;Any ideas?
    Thanks
    Robert

    I call extract_b from sqlplus, which calls outputstring which fails with the error message posted
    Not really sure what else I can provide as I've posted the code for outputstring
    The problem is the for some reason Oracle cannot load the dll, I think the code is fine as it has run on 10g, I think the issue is maybe along the lines that there is something extra in 11g I need to do to set the external library up or it's not happy with the fact it's 64bit or the listener.ora needs to be different in 11g or something like that but I am at a loss as where to look

  • PL/SQL missing symbol while loading external library

    I have followed all the steps in creating external library in PL/SQL i.e. configuring Listerner, TNSNAMES.ORA etc. etc.
    While invoking a function call on this external library, I am getting a missing symbol error :
    ORA-06520: PL/SQL: Error loading external library
    ORA-06522: /home/qzintf/libSQLAdapter.so: undefined symbol: Fneeded32
    ORA-06512: at "EQMIG.QUARTZSQLADAPTER", line 0
    ORA-06512: at line 12
    This missing symbol "Fneeded32" is located in a tuxedo shared lib. The path of tuxedo library (libfml32.so) has already been put in the env var LD_LIBRARY_PATH, but still Oracle is not looking into this library !
    Is there any way where I can define dependency of QUARTZSQLADAPTER on libfml32.so ?? Or make oracle use load this library while loading QUARTZSQLADAPTER ??

    Is the path to libfml32.so accessible to the oracle o/s user and the so itself readable/loadable by oracle?
    You neglected to supply any details of platform and versions - please always do. Full Oracle version and version of o/s.
    If you are using Oracle 64bit (quite likely on Unix flavours), confirm that libfml32.so is a 64bit so. If 32bit then the loadlibrary call will fail as 32bit objects cannot be natively loaded into a 64bit process image.

  • ORA-06521: PL/SQL: Error mapping function with 10.1.0 external procedure

    We have an external procedure running fine on 8.1.7 on VMS. After compiling and linking succesfully under 10.1.0, I get ORA-06521 PL/SQL: Error mapping function and ORA-06522: ERROR - vms_dlsym for file x, where x in the filename of the linked executable. Another external procedure that does not connect to the 10.1.0 database runs fine. What could be causing this error in Server 10.1.0 on VMS?
    Thanks,
    Dave

    Here is the code to create the function:
    CREATE OR REPLACE FUNCTION f1
    (h_file_name IN VARCHAR2)
    RETURN BINARY_INTEGER
    IS EXTERNAL
    LIBRARY l1
    NAME "f1"
    LANGUAGE C
    WITH CONTEXT
    PARAMETERS
    (CONTEST,
    h_file_name string);
    Here is the beginning of the Pro*C:
    int f1(epctx, h_file_name)
    OCIExtProcContext *epctx;
    char h_file_name[70];
    char h_line_txt [251];
    int lineno;
    FILE *fptr;
    /* register the connection context ... */
    EXEC SQL REGISTER CONNECT USING :epctx;
    The function loads a flat file into the database. It is probably not related but are unable to SQLPLUS/ or SQLLDR/ into the database from an OS autheniticated account (get ORA-12547: TNS:lost contact.) Thanks for taking the time to look at this. There aren't many people trying this on VMS, I'd bet.

  • ORA-06521: PL/SQL: Error mapping function :ORA-06522:undefined :ODCIAggre

    Hi,
    I am getting the following error :
    SQL> select MinDistance(TT) from egg1;
    select MinDistance(TT) from egg1
    ERROR at line 1:
    ORA-06521: PL/SQL: Error mapping function
    ORA-06522: /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/custagg.so:
    undefined symbol: ODCIAggregateInitialize
    I am compiling my C program with OCI using the following command :
    g++ -Wall -c custagg.c -o custagg.o -I$ORACLE_HOME/rdbms/public -I/usr/lib
    I am linking to get a shared library custagg.so file with following command :
    ld -shared -o custagg.so custagg.o $ORACLE_HOME/lib/l*.so ../../usr/lib/libstdc++.s*
    I am not getting any errors during these two phases.
    And when i am calling the extproc custagg(Mindistance) which i implemented using ODCI(oracle data catridge interface) ...I am getting the error undefined symbol : ODCIAggregateInitialize
    So can any one please let me know what shared libraries are required to access the ODCI services and also am I compiling and linking it the right way or am I missing any libraries.
    I have the oci.h & odci.h and several other header files in my :
    $ORACLE_HOME/rdbms/public
    And while linking i am using : $ORACLE_HOME/lib/*.so files.
    So I don't know whether my directory is missing some shared files related to ODCI : can any one please let me know which files or shared libraries I am missing :
    Below are list of files in my : $ORACLE_HOME/lib :
    custagg123.o libclntsh.so libdbcfg10.so libjox10.so libocci.so.10.1 liborasdkbase.so libskgxpd.so libunwind.so.5
    custagg.so libclntsh.so.10.1 libemmas10.so libldapjclnt10.so libocijdbc10.so liborasdkbase.so.10.2 libskgxpu.so libxdb.so
    facility.lis libclsra10.so libhasgen10.so libnjni10.so libocr10.so liborasdk.so libsqlplus.so shell.so
    hsdb_odbc.so libcorejava.so libheteroxa10.so libnjssl10.so libocrb10.so liborasdk.so.10.2 libsqora.so.10.1 sysliblist
    hsdb_ora.so libcoresh10.so libhsbase.so libnnz10.so libocrutl10.so libqsmashr.so libsrvm10.so
    lclasses12.zip libcprts.so.5 libhsnav.so libnque10.so libodm10.so libskgxn2.so libsrvmhas10.so
    libagtsh.so libcxa.so.3 libimf.so libntcpaio10.so libodmd10.so libskgxns.so libsrvmocr10.so
    libagtsh.so.1.0 libcxa.so.5 libirc.a libocci.so libons.so libskgxp10.so libuini10.so
    Please reply to my queries.
    Please let me know if you want to have a look at the symbols of my object file
    Thanks & Regards,
    -NN

    Your issue may relate to XE and it may relate to OCI but it does not relate to SQL and PL/SQL. Consider posting your question in a forum where it will be on topic.
    When you do include full version information (3 decimal places) and the code that is generating the exception.

  • ORA-06521:PL/SQL:Error mapping function :ORA-06522:undefined :ODCIAggregate

    Hi,
    I am getting the following error :
    SQL> select MinDistance(TT) from egg1;
    select MinDistance(TT) from egg1
    ERROR at line 1:
    ORA-06521: PL/SQL: Error mapping function
    ORA-06522: /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/custagg.so:
    undefined symbol: ODCIAggregateInitialize
    I am compiling my C program with OCI using the following command :
    g++ -Wall -c custagg.c -o custagg.o -I$ORACLE_HOME/rdbms/public -I/usr/lib
    I am linking to get a shared library custagg.so file with following command :
    ld -shared -o custagg.so custagg.o $ORACLE_HOME/lib/l*.so ../../usr/lib/libstdc++.s*
    I am not getting any errors during these two phases.
    And when i am calling the extproc custagg(Mindistance) which i implemented using ODCI(oracle data catridge interface) ...I am getting the error undefined symbol : ODCIAggregateInitialize
    So can any one please let me know what shared libraries are required to access the ODCI services and also am I compiling and linking it the right way or am I missing any libraries.
    I have the oci.h & odci.h and several other header files in my :
    $ORACLE_HOME/rdbms/public
    And while linking i am using : $ORACLE_HOME/lib/*.so files.
    So I don't know whether my directory is missing some shared files related to ODCI : can any one please let me know which files or shared libraries I am missing :
    Below are list of files in my : $ORACLE_HOME/lib :
    custagg123.o libclntsh.so libdbcfg10.so libjox10.so libocci.so.10.1 liborasdkbase.so libskgxpd.so libunwind.so.5
    custagg.so libclntsh.so.10.1 libemmas10.so libldapjclnt10.so libocijdbc10.so liborasdkbase.so.10.2 libskgxpu.so libxdb.so
    facility.lis libclsra10.so libhasgen10.so libnjni10.so libocr10.so liborasdk.so libsqlplus.so shell.so
    hsdb_odbc.so libcorejava.so libheteroxa10.so libnjssl10.so libocrb10.so liborasdk.so.10.2 libsqora.so.10.1 sysliblist
    hsdb_ora.so libcoresh10.so libhsbase.so libnnz10.so libocrutl10.so libqsmashr.so libsrvm10.so
    lclasses12.zip libcprts.so.5 libhsnav.so libnque10.so libodm10.so libskgxn2.so libsrvmhas10.so
    libagtsh.so libcxa.so.3 libimf.so libntcpaio10.so libodmd10.so libskgxns.so libsrvmocr10.so
    libagtsh.so.1.0 libcxa.so.5 libirc.a libocci.so libons.so libskgxp10.so libuini10.so
    Please reply to my queries.
    Please let me know if you want to have a look at the symbols of my object file
    Thanks & Regards,
    -NN

    It's only a quick guess but have you checked your tnsnames.ora file to ensure you've opened the environment to find the libraries? If you set the EXTPROC_DLLS=ANY, you open the database to security issues but it should tell you if this cause because you can't access the library that contains the symbol.
    SID_LIST_CALLOUT_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = <oracle_home_directory>)
    (PROGRAM = extproc)
    (ENV = "EXTPROC_DLLS=ONLY:
    <oracle_home_directory>/customlib/writestr1.so
    ,LD_LIBRARY_PATH=<oracle_home_directory>/lib")
    )

  • Call to ldap server fails ORA-06521: PL/SQL: Error mapping function

    I am getting this error(s)
    ORA-06521: PL/SQL: Error mapping function
    ORA-06512: at "SYS.DBMS_LDAP_API_FFI", line 0
    ORA-06512: at "SYS.DBMS_LDAP", line 1338
    ORA-06512: at "SYS.DBMS_LDAP", line 1273
    ORA-06512: at "SYS.DBMS_LDAP", line 529
    ORA-06512: at line 127
    after binding and searching an ldap directory.
    Line 127 is:
    my_dn := DBMS_LDAP.get_dn(my_session, my_entry);
    Both of the 'my_xx' parameters have been successfully set earlier in the script I believe as they produce no errors and DBMS_LDAP.count_entries(my_session, my_message) returns = 1.
    I am following the example at:
    http://download-west.oracle.com/docs/cd/B10501_01/network.920/a96577/smplcode.htm#636994
    In fact any of the functions used in the 'while loop' in the above example give a similar error.
    Apparently SYS.DBMS_LDAP_API_FFI is a call to an external C program, but this would be a standard Oracle one, not one I have written.
    I am connecting to a non-Oracle ldap server, and have tried several (OpenLDAP 2.X, & Windows 2000 AD), with same results.
    Any suggestions gratefully received.
    Cheers
    KIM

    Fixed by running the catldap.sql script (ORACLE_HOME/rdbms/admin/catldap.sql) as SYS user and recreated the dbms_ldap packages. I am not sure why some of the functions worked OK and others did not.
    KIM

  • Ldap problem, ORA-06521: PL/SQL: Error mapping function

    I am getting this error(s)
    ORA-06521: PL/SQL: Error mapping function
    ORA-06512: at "SYS.DBMS_LDAP_API_FFI", line 0
    ORA-06512: at "SYS.DBMS_LDAP", line 1338
    ORA-06512: at "SYS.DBMS_LDAP", line 1273
    ORA-06512: at "SYS.DBMS_LDAP", line 529
    ORA-06512: at line 127
    after binding and searching an ldap directory.
    Line 127 is:
    my_dn := DBMS_LDAP.get_dn(my_session, my_entry);
    Both of the 'my_xx' parameters have been successfully set earlier in the script I believe as they produce no errors and DBMS_LDAP.count_entries(my_session, my_message) returns = 1.
    I am following the example at:
    http://download-west.oracle.com/docs/cd/B10501_01/network.920/a96577/smplcode.htm#636994
    In fact any of the functions used in the 'while loop' in the above example give a similar error.
    Apparently SYS.DBMS_LDAP_API_FFI is a call to an external C program, but this would be a standard Oracle one, not one I have written.
    I am connecting to a non-Oracle ldap server, and have tried several (OpenLDAP 2.X, & Windows 2000 AD), with same results.
    Any suggestions gratefully received.
    Cheers
    KIM

    Scott,
    Thanks for your concern. I should have explained. I am working in HTMLdb, successfully using ldap to authenticate, but now need to get the logged-in user's name and other details. All my attemps to use the wwv_flow_ldap functions have failed, and I am no resorting to DBMS_LDAP to get what I want. I am hoping thatsome helpful person can shed some light on this problem
    Cheers
    KIM

  • ORA-06502: PL/SQL error with dimensions and roles

    Hi everyone,
    When executing a mapping that loads a cube we are always getting that ORA-06502: PL/SQL error character string buffer too small
    The cube contains a number of dimensions, some of them with roles. We've checked that the error appears when we use two different lookup operators to fill dimension atributtes in the cube and its correspondent role. If we map dimension attributes with lookup operator, and the role attributes with constants, the mapping executes without any error. Moreover, even thought it doesnt make any sense, if we map the role dimension attributes with a lookup operator linked to a different dimension, it works too.
    We think that this could be due to attributes names, maybe they are too long, but we have tried to make them shorter and still getting the same error.
    Any ideas of what could be happening?
    Thank you so much in advance.

    The return datatype in a PLSQL function is unconstrained. Which means it does not have a size.
    The size is declared on the receiving end.
    What size variable are you trying to return your value into?
    Here is an example...
    SQL>create or replace function my_func
      2  return varchar2
      3  is
      4  begin
      5    return USER;
      6  end;
      7  /
    Function created.
    SQL>declare
      2    my_string varchar2(30);
      3  begin
      4    my_string := my_func;
      5  end;
      6  /
    PL/SQL procedure successfully completed.
    SQL>declare
      2    my_string varchar2(3);
      3  begin
      4    my_string := my_func;
      5  end;
      6  /
    declare
    ERROR at line 1:
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    ORA-06512: at line 4

  • ORA-06502: PL/SQL: error TABLE OF BOOLEAN INDEX BY BINARY_INTEGER;

    Hi,
    I've a Compiled Body Package which code I described below:
    create or replace
    PACKAGE body emp_pkg
    IS
    TYPE boolean_tabtype2
    IS
      TABLE OF BOOLEAN INDEX BY BINARY_INTEGER;
      valid_jobs boolean_tabtype2; 
    PROCEDURE add_employee(
        first_name employees.first_name%TYPE,
        last_name employees.last_name%TYPE,
        deptid employees.department_id%TYPE,
        jobid employees.job_id%type)
    IS
    BEGIN
      IF valid_deptid(deptid) THEN
      if valid_jobid(jobid) then
                  INSERT
                  INTO employees
                      employee_id,
                      first_name,
                      last_name,
                      email,
                      hire_date,
                      job_id,
                      department_id
                    VALUES
                      employees_seq.NEXTVAL,
                      first_name,
                      last_name,
                      SUBSTR(first_name,1,1)
                      ||SUBSTR(last_name,1,7)
                      ||'@buongio.com',
                      sysdate,
                      'SA_REP',
                      deptid
         ELSE
            RAISE_APPLICATION_ERROR (-20204, 'Invalid job ID. Try again.');
          END IF;
    END add_employee;
    PROCEDURE init_jobs
    is
    begin
    FOR rec IN
      (SELECT job_id FROM jobs
      LOOP
        valid_jobs(rec.job_id):=true;
      END LOOP;
    END init_jobs;
    function valid_jobid(
        jobid employees.job_id%type)
      return boolean
    is
    BEGIN
    return valid_jobs.exists(jobid);
    EXCEPTION
    WHEN no_data_found THEN
    dbms_output.put_line('no valid');
      RETURN FALSE;
    END valid_jobid ;
    BEGIN
      init_jobs;
    END emp_pkg;and the server gives me the next output
    ORA-06502: PL/SQL: error : error de conversión de carácter a número numérico o de valorI suspect that the problem is the procedure init_jobs but I don't Know what could I do to resolve it.
    Thanks in advance...

    sorry
    I forget to remove it,
    the code:
    create or replace
    PACKAGE body emp_pkg
    IS
    TYPE boolean_tabtype2
    IS
      TABLE OF BOOLEAN INDEX BY BINARY_INTEGER;
      valid_jobs boolean_tabtype2; 
    PROCEDURE add_employee(
        first_name employees.first_name%TYPE,
        last_name employees.last_name%TYPE,
        deptid employees.department_id%TYPE,
        jobid employees.job_id%type)
    IS
    BEGIN
      if valid_jobid(jobid) then
                  INSERT
                  INTO employees
                      employee_id,
                      first_name,
                      last_name,
                      email,
                      hire_date,
                      job_id,
                      department_id
                    VALUES
                      employees_seq.NEXTVAL,
                      first_name,
                      last_name,
                      SUBSTR(first_name,1,1)
                      ||SUBSTR(last_name,1,7)
                      ||'@buongio.com',
                      sysdate,
                      'SA_REP',
                      deptid
         ELSE
            RAISE_APPLICATION_ERROR (-20204, 'Invalid job ID. Try again.');
          END IF;
    END add_employee;
    PROCEDURE init_jobs
    is
    begin
    FOR rec IN
      (SELECT job_id FROM jobs
      LOOP
        valid_jobs(rec.job_id):=true;
      END LOOP;
    END init_jobs;
    function valid_jobid(
        jobid employees.job_id%type)
      return boolean
    is
    BEGIN
    return valid_jobs.exists(jobid);
    EXCEPTION
    WHEN no_data_found THEN
    dbms_output.put_line('no valid');
      RETURN FALSE;
    END valid_jobid ;
    BEGIN
      init_jobs;
    END emp_pkg;

  • DAC - Error loading shared library [pmwrtrel.dll] in the dynamic lib mgr

    Hi,
    While executing ETL load on a Windows 32-bit machine with DAC v10.1.3.4.1, we were able to execute 24 tasks out of 317 successfully. Then it fails with the following error message:
    PRE-SESS> TM_6232 Error loading shared library [pmwrtrel.dll] in the dynamic library manager. The error is [Database driver event...Error occurred loading library [pmwrtrel.dll]. System error encountered is 127. Error text is The specified procedure could not be found. .].
    PRE-SESS> CMN_1761 Timestamp Event: [Mon Mar 29 19:04:05 2010]
    PRE-SESS> WRT_8236 Error getting pre session writer object for target [W_ETL_RUN_S]
    MANAGER> PETL_24027 Pre-session task completed successfully. : (Mon Mar 29 19:04:05 2010)
    DIRECTOR> PETL_24006 Starting data movement.
    MAPPING> TM_6660 Total Buffer Pool size is 12582912 bytes and Block size is 128000 bytes.
    READER_1_1_1> DBG_21437 Reader: Source is a file-based source.
    READER_1_1_1> FR_3118 source [SQ_FILE_DUAL] code page: [7-bit ASCII]
    READER_1_1_1> FR_3071 Maximum Line sequential buffer length is 1026.
    READER_1_1_1> BLKR_16003 Initialization completed successfully.
    WRITER_1_*_1> CMN_1761 Timestamp Event: [Mon Mar 29 19:04:05 2010]
    WRITER_1_*_1> TM_6232 Error loading shared library [pmwrtrel.dll] in the dynamic library manager. The error is [Database driver event...Error occurred loading library [pmwrtrel.dll]. System error encountered is 127. Error text is The specified procedure could not be found. .].
    MANAGER> PETL_24031
    ***** RUN INFO FOR TGT LOAD ORDER GROUP [1], CONCURRENT SET [1] *****
    Thread [READER_1_1_1] created for [the read stage] of partition point [SQ_FILE_DUAL] has completed. The total run time was insufficient for any meaningful statistics.
    Thread [TRANSF_1_1_1] created for [the transformation stage] of partition point [SQ_FILE_DUAL] has completed. The total run time was insufficient for any meaningful statistics.
    Thread [WRITER_1_*_1] created for [the write stage] of partition point [W_ETL_RUN_S] has completed. The total run time was insufficient for any meaningful statistics.
    MAPPING> CMN_1793 The index cache size that would hold [7340064] rows in the lookup table for [MPLT_GET_ETL_PROC_WID.LKP_ETL_PROC_WID], in memory, is [29555310648557682] bytes
    MAPPING> CMN_1792 The data cache size that would hold [7340064] rows in the lookup table for [MPLT_GET_ETL_PROC_WID.LKP_ETL_PROC_WID], in memory, is [12948046503805036] bytes
    MANAGER> PETL_24005 Starting post-session tasks. : (Mon Mar 29 19:04:05 2010)
    MANAGER> PETL_24029 Post-session task completed successfully. : (Mon Mar 29 19:04:05 2010)
    MAPPING> TM_6018 The session completed with [0] row transformation errors.
    MANAGER> PETL_24002 Parallel Pipeline Engine finished.
    DIRECTOR> PETL_24013 Session run completed with failure.
    DIRECTOR> TM_6022
    SESSION LOAD SUMMARY
    ================================================
    DIRECTOR> TM_6252 Source Load Summary.
    DIRECTOR> CMN_1740 Table: [SQ_FILE_DUAL] (Instance Name: [SQ_FILE_DUAL])
         Output Rows [0], Affected Rows [0], Applied Rows [0], Rejected Rows [0]
    DIRECTOR> TM_6253 Target Load Summary.
    DIRECTOR> CMN_1740 Table: [W_ETL_RUN_S] (Instance Name: [W_ETL_RUN_S])
         Output Rows [0], Affected Rows [0], Applied Rows [0], Rejected Rows [0]
    DIRECTOR> TM_6023
    ===================================================
    DIRECTOR> TM_6020 Session [SIL_InsertRowInRunTable] completed at [Mon Mar 29 19:04:06 2010].
    Kindly someone tell us how to resolve this issue.
    Regards,
    Vishnu

    what BIA version are you on?
    perhaps you have to install a informatica fix or a DAC patch

  • ORA-06521: PL/SQL: Error mapping function

    Hi folks,
    I am trying to run gather_table_stats for a particular table but am getting the below error. Any ideas?
    SQL> execute DBMS_STATS.gather_table_stats( ownname=>'DBO',tabname=>'CD_JOURNAL_CHANGE_REG',method_opt=>'FOR ALL INDEXED COLUMNS',cascade=>TRUE);
    BEGIN DBMS_STATS.gather_table_stats( ownname=>'DBO',tabname=>'CD_JOURNAL_CHANGE_REG',method_opt=>'FOR ALL INDEXED COLUMNS',cascade=>TRUE); END;
    ERROR at line 1:
    ORA-06521: PL/SQL: Error mapping function
    ORA-06512: at "SYS.DBMS_STATS", line 10301
    ORA-06512: at "SYS.DBMS_STATS", line 10315
    ORA-06512: at line 1
    I have runt utlrp.sql as sys but with no avail.
    Kindest Regards,
    Will

    You did not mention if the applicable table contains an ADT columns, nested tables and so on.
    You can also do a basic test to determine if the problem is potentially with the table, or with dbms_stats itself. Create a plain table, e.g.
    create table foo( id number, foo_char varchar2(100), constraint pk_foo primary key( id ) using index );
    Using the exact same dbms_stats parameters, do this table. If it works, it points to a potential problem with the other table - some data structure/data type issue maybe. If it does not, then you have a problem with dbms_stats itself.
    You can also drop the indexes on the DBO table and try dbms_stats with different parameters. I.e. change the conditions to see if the error still occur in order to isolate the problem.
    You also could log an iTar/SR for this with Oracle Support.

Maybe you are looking for

  • System Image Recovery on Win 7 - Spectre XT 13

    There is no issue of creating a system image onto my seagate external Freeagent goflex hard disk. However, an issue is encountered during the restoring process in which the USB3.0 port turned out to be unavailable during pre-boot. The solution I disc

  • Help Needed for Newbie

    I am reformatting the hard drive for a Powerbook G4. Everything seems to have gone fine until I tried reinstalling the software that came with the powerbook. It doesnt recognize the hard disk, its completely blank when I am supposed to select a desti

  • MVC �Best Practice� (handling multiple views per action/event)

    Looking for the best approach for handling multiple views for one action/event class? Background: I have a small application using a basic MVC model, one controller servlet, multiple event classes, and multiple JSP views. For performance reasons, the

  • How do I recover missing photos in iPhoto 11?

    HI!      I recently upgraded to iPhoto 11 (from iPhoto 9, I believe). There are 12 photos missing from  the 'Photos' section of my library. There are dashed lines around the locations where the photos should be (it is a sequence of 12 pictures), so I

  • HT201401 no music audio through headset when connecting to car or stereo

    hello, Im not getting any music audio through the headset when connecting to my car or stereo I can hear iPhone noises though. I'm not having the same problem with iPhone earphones but dont think its lead compatability as both leads have worked fine