Ora-06508 - could not find program

Need your HELP!!!
ERROR:
ORA-06508: PL/SQL: could not find program unit being called: "NZH_MAIM.NZHMF_BOREHOLE_LEVEL_EYAL"
what is it mean? and how i fix it?

It means that you have not deplyed the program unit and if deplyed then it failed during deployment.
and now this error comes when same program unit is beign executed....

Similar Messages

  • Error : ORA-06508: PL/SQL: could not find program unit being called

    Hi
    I got surprise issue while testing my Oracle code . Let me explain first the environment detail . Our appliaction built on
    Java/J2EE(Weblogic) and backend is Oracle 11g re2 . While calling from java it call thru different user which have been provide
    synonym and exectue option for corresponding procdure ,
    I created on package EXTRACT_CUSTOMER_INFO_PK which will exract data to text file using UTL_FILE ( direcory , UTL_FILE grant is provided to DB user).
    Now this package has been called from rp_execute_procedure_pr -- Here I is the code
    CREATE OR REPLACE PROCEDURE RP_EXECUTE_PROCEDURE_PR
    i_atlas_job_schedule_fk IN atlas_job_schedule.atlas_job_schedule_pk%TYPE,
    i_job_id IN atlas_job.job_id%TYPE,
    i_parm_value IN atlas_job_schedule.parm_value%TYPE,
    o_status_code OUT NUMBER,
    o_status_mesg OUT VARCHAR2
    IS
    -------Other old code which is not relevent for this issue ----
    --------Other old code which is not relevent for this issue ----
    ----Below code I added ----
    ELSIF l_job_id = 'CUST_EXTRACT' THEN
    EXTRACT_CUSTOMER_INFO_PK.customer_report ( i_parm_value ,
                   o_status_code,
    o_status_mesg ) ;
    -- o_status_code := -99999999;
    --o_status_mesg := 'PARTHA PARTHA PARTHAcess terminated!';
    ELSE
    o_status_code := -20300;
    o_status_mesg := 'Job Id : ' || l_job_id || ' NOT found. Process terminated!';
    END IF;
    update_log_auto
    ajs_rec.atlas_job_schedule_pk ,
    'Processing End Time (GMT): '
    EXCEPTION
    WHEN eProcError THEN
    o_status_code := SQLCODE;
    o_status_mesg := SUBSTR(vMsg ||'-'||SQLERRM, 1, 200);
    WHEN OTHERS THEN
    o_status_code := -20300;
    o_status_mesg := SUBSTR(SQLERRM, 1, 200);
    update_log_auto
    ajs_rec.atlas_job_schedule_pk ,
    'Error : '||SQLERRM||' '
    update_log_auto
    ajs_rec.atlas_job_schedule_pk,
    'Processing End Time (GMT): '
    END RP_EXECUTE_PROCEDURE_PR;
    Now It compiled sucesfully . And while I did SIT then RP_EXECUTE_PROCEDURE_PR run fine and extracted txt file . But while I called it from Java procedure It gives us error like
    Error : ORA-06508: PL/SQL: could not find program unit being called 02-AUG-2012 13:16:51.
    As I told RP_EXECUTE_PROCEDURE_PR old proc and used by other proc , So I first suspect issue is newly added code or may be some grant or synonym ( Although it should not be )
    so I created public synony amd gave execute grant to my pkg to public .
    But it repeat same error .
    I did lot of R&D on my pkg but nothing happen . Finally I remane my new pkg RP_EXTRACT_CUSTOMER_INFO_PK and it works fine
    I need to know what is the RCA for it . I donot think any dependecy issue as renaming pkg is working fine .
    NB my DB user is iATLAS and Javauser is SUDEEP
    Thanks in Advance
    Debashis Mallick

    First of all If i run the main procedure in like below in my Schema it is working fine
    begin
    -- Call the procedure
    rp_execute_procedure_pr(i_atlas_job_schedule_fk => :i_atlas_job_schedule_fk,
    i_job_id => :i_job_id,
    i_parm_value => :i_parm_value,
    o_status_code => :o_status_code,
    o_status_mesg => :o_status_mesg);
    end;
    So thre is no question of parameter .... or Invalid state etc . If it is parameter or Invalid state issue it will give other error.
    Here problem is not syntax issue .
    let me give u more detail regards this issue
    1.. All objects corresponding to procedure all Valid
    2.. If I test on the proc on my schema like above code . It works fine
    3.rp_execute_procedure_pr is a old procudere which called for differner report generartion based on parameter passing . Also as extract_customer_info_pk called with in rp_execute_procedure_pr So there is no question of synonym or privilage issue for new procedure.
    4. Suprising thing is if I rename and recreate package like extract_customer_info_pk _1 or rp_extract_customer_info_pk . Which are exactly same as extract_customer_info_pk and replace those new one with extract_customer_info_pk then it work fine in my java application
    I think I make it clear the issue
    Edited by: debashisora on Aug 3, 2012 5:31 AM
    Edited by: debashisora on Aug 3, 2012 5:40 AM

  • 11.5.10.2 to R12.1.1 upgrade: Error loading seed data for GL_DEFAS_ACCESS_SETS:  DEFINITION_ACCESS_SET = SUPER_USER_DEFAS,  ORA-06508: PL/SQL: could not find program unit being called

    Hello,
    EBS version : 11.5.10.2
    DB version : 11.2.0.3
    OS version : AIX 6.1
    As a part of 11.5.10.2 to R12.1.1 upgrade, while applying merged 12.1.1 upgrade driver(u6678700.drv), we got below error :
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    ATTENTION: All workers either have failed or are waiting:
               FAILED: file glsupdas.ldt on worker  3.
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    drix10:/fmstop/r12apps/apps/apps_st/appl/admin/FMSTEST/log>tail -20 adwork003.log
    Restarting job that failed and was fixed.
    Time when worker restarted job: Wed Aug 07 2013 10:36:14
    Loading data using  FNDLOAD function.
    FNDLOAD APPS/***** 0 Y UPLOAD @SQLGL:patch/115/import/glnlsdas.lct @SQLGL:patch/115/import/US/glsupdas.ldt -
    Connecting to APPS......Connected successfully.
    Calling FNDLOAD function.
    Returned from FNDLOAD function.
    Log file: /fmstop/r12apps/apps/apps_st/appl/admin/FMSTEST/log/US_glsupdas_ldt.log
    Error calling FNDLOAD function.
    Time when worker failed: Wed Aug 07 2013 10:36:14
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    drix10:/fmstop/r12apps/apps/apps_st/appl/admin/FMSTEST/log>tail -20 US_glsupdas_ldt.log
    Current system time is Wed Aug  7 10:36:14 2013
    Uploading from the data file /fmstop/r12apps/apps/apps_st/appl/gl/12.0.0/patch/115/import/US/glsupdas.ldt
    Altering database NLS_LANGUAGE environment to AMERICAN
    Dumping from LCT/LDT files (/fmstop/r12apps/apps/apps_st/appl/gl/12.0.0/patch/115/import/glnlsdas.lct(120.0), /fmstop/r12apps/apps/apps_st/appl/gl/12.0.0/patch/115/import/US/glsupdas.ldt) to staging tables
    Dumping LCT file /fmstop/r12apps/apps/apps_st/appl/gl/12.0.0/patch/115/import/glnlsdas.lct(120.0) into FND_SEED_STAGE_CONFIG
    Dumping LDT file /fmstop/r12apps/apps/apps_st/appl/gl/12.0.0/patch/115/import/US/glsupdas.ldt into FND_SEED_STAGE_ENTITY
    Dumped the batch (GL_DEFAS_ACCESS_SETS SUPER_USER_DEFAS , GL_DEFAS_ACCESS_SETS SUPER_USER_DEFAS ) into FND_SEED_STAGE_ENTITY
    Uploading from staging tables
      Error loading seed data for GL_DEFAS_ACCESS_SETS:  DEFINITION_ACCESS_SET = SUPER_USER_DEFAS,  ORA-06508: PL/SQL: could not find program unit being called
    Concurrent request completed
    Current system time is Wed Aug  7 10:36:14 2013
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

    Below is info about file versions and INVALID packages related to GL.
    PACKAGE BODY GL_DEFAS_ACCESS_SETS_PKG is invalid with error component 'GL_DEFAS_DBNAME_S' must be declared.
    I can see GL_DEFAS_DBNAME_S is a VALID sequence accessible by apps user with or without specifying GL as owner.
    SQL> select text from dba_source where name in ('GL_DEFAS_ACCESS_DETAILS_PKG','GL_DEFAS_ACCESS_SETS_PKG') and line=2;
     TEXT
    /* $Header: glistdds.pls 120.4 2005/05/05 01:23:16 kvora ship $ */
    /* $Header: glistddb.pls 120.16 2006/04/10 21:28:48 cma ship $ */
    /* $Header: glistdas.pls 120.4 2005/05/05 01:23:02 kvora ship $ */
    /* $Header: glistdab.pls 120.5 2006/03/13 19:56:21 cma ship $ */ 
    SQL> select * from all_objects where object_name in ('GL_DEFAS_ACCESS_DETAILS_PKG','GL_DEFAS_ACCESS_SETS_PKG')
      2 ; OWNER OBJECT_NAME SUBOBJECT_NAM OBJECT_ID DATA_OBJECT_ID OBJECT_TYPE CREATED LAST_DDL_TIME TIMESTAMP STATUS T G S NAMESPACE
    EDITION_NAME
    APPS GL_DEFAS_ACCESS_DETAILS_PKG 1118545 PACKAGE 05-AUG-13 05-AUG-13 2013-08-05:18:54:51 VALID N N N 1 
    APPS GL_DEFAS_ACCESS_SETS_PKG 1118548 PACKAGE 05-AUG-13 06-AUG-13 2013-08-05:18:54:51 VALID N N N 1 
    APPS GL_DEFAS_ACCESS_SETS_PKG 1128507 PACKAGE BODY 05-AUG-13 06-AUG-13 2013-08-06:12:56:50 INVALID N N N 2 
    APPS GL_DEFAS_ACCESS_DETAILS_PKG 1128508 PACKAGE BODY 05-AUG-13 05-AUG-13 2013-08-05:19:43:51 VALID N N N 2 
    SQL> select * from all_objects where object_name='GL_DEFAS_DBNAME_S'; OWNER OBJECT_NAME SUBOBJECT_NAM OBJECT_ID DATA_OBJECT_ID OBJECT_TYPE CREATED LAST_DDL_TIME TIMESTAMP STATUS T G S NAMESPACE
    EDITION_NAME
    GL GL_DEFAS_DBNAME_S 1087285 SEQUENCE 05-AUG-13 05-AUG-13 2013-08-05:17:34:43 VALIDN N N 1 
    APPS GL_DEFAS_DBNAME_S 1087299 SYNONYM 05-AUG-13 05-AUG-13 2013-08-05:17:34:43 VALIDN N N 1 
    SQL> conn apps/apps
    Connected.
    SQL> SELECT OWNER, OBJECT_NAME, OBJECT_TYPE, STATUS
    FROM DBA_OBJECTS
    WHERE OBJECT_NAME = 'GL_DEFAS_ACCESS_SETS_PKG'; 2 3 OWNER OBJECT_NAME OBJECT_TYPE STATUS
    APPS GL_DEFAS_ACCESS_SETS_PKG PACKAGE VALID
    APPS GL_DEFAS_ACCESS_SETS_PKG PACKAGE BODY INVALID SQL> ALTER PACKAGE GL_DEFAS_ACCESS_SETS_PKG COMPILE; Warning: Package altered with compilation errors. SQL> show error
    No errors.
    SQL> ALTER PACKAGE GL_DEFAS_ACCESS_SETS_PKG COMPILE BODY; Warning: Package Body altered with compilation errors. SQL> show error
    Errors for PACKAGE BODY GL_DEFAS_ACCESS_SETS_PKG: LINE/COL ERROR
    39/17 PLS-00302: component 'GL_DEFAS_DBNAME_S' must be declared 
    drix10:/fmstop/r12apps/apps/apps_st/appl/gl/12.0.0/patch/115/odf>cat $GL_TOP/patch/115/sql/glistdab.pls|grep -n GL_DEFAS_DBNAME_S
    68: SELECT GL.GL_DEFAS_DBNAME_S.NEXTVAL
    81: fnd_message.set_token('SEQUENCE', 'GL_DEFAS_DBNAME_S');
    SQL> show user
    USER is "APPS"
    SQL> SELECT GL.GL_DEFAS_DBNAME_S.NEXTVAL
      FROM dual; 2                         -- with GL.
      NEXTVAL
      1002
    SQL> SELECT GL_DEFAS_DBNAME_S.NEXTVAL from dual;               --without GL. or using synonym.
      NEXTVAL
      1003
    drix10:/fmstop/r12apps/apps/apps_st/appl/gl/12.0.0/patch/115/odf>strings -a $GL_TOP/patch/115/sql/glistdab.pls|grep '$Header'
    REM | $Header: glistdab.pls 120.5 2006/03/13 19:56:21 cma ship $ |
    /* $Header: glistdab.pls 120.5 2006/03/13 19:56:21 cma ship $ */
    drix10:/fmstop/r12apps/apps/apps_st/appl/gl/12.0.0/patch/115/odf>strings -a $GL_TOP/patch/115/sql/glistdas.pls |grep '$Header'
    REM | $Header: glistdas.pls 120.4 2005/05/05 01:23:02 kvora ship $ |
    /* $Header: glistdas.pls 120.4 2005/05/05 01:23:02 kvora ship $ */

  • ORA-06508 PL/SQL: could not find program unit being

    Hi all,
    I'm having the following problem: I have a trigger that gets fired before update of a field. The trigger source code calls a function from a package. This function calls another function.
    When the trigger was executed I got the following error ORA-06508 PL/SQL: could not find program unit being call(referring to the second function called).
    This trigger works well, but from time to time gets this error. (The database has a lot of users and there is a chance that more users fire the same trigger).
    What can I do to solve this problem as it's very inconvenient? Any suggestions?
    Thanks.

    Try running the following query:
    select *
    from
    v$db_object_cache
    where sharable_mem > 10000
    and type in ('PACKAGE','PACKAGE BODY','FUNCTION','PROCEDURE')
    and KEPT='NO'
    order by sharable_mem desc
    See which objects are taking up a lot of SGA memory, you may need to pin them to prevent fragmentation. If you see DBMS_STATS in there it means that you Oracle is dynamically collecting stats which is not good - you need to set up a background task to do that.

  • ORA-06508: PL/SQL: could not find program unit being called: "APPS.FND_GSM_

    Hi All,
    We are following Export/Import Process for Oracle Applications Release 11i Database Instances Using Oracle Database 10g Release 2
    note: 362205.1
    Source OS = AIX
    Target OS = RHEL 5
    DB version = 10.2.0.4
    At Section 5: Update the imported Applications Release 11i database instance
    Perform post-import steps outlined in the Interoperability documents
    At post-import step: Implement and run AutoConfig
    Completed the below tasks:
    Copied the appsutil.zip file to to new OS ORacle home
    Generated the Database Context File
    While Running adconfig get the error
    ADX Database Utility
    getConnectionUsingAppsJDBCConnector() -->
    APPS_JDBC_URL='null'
    Trying to get connection using SID based connect descriptor
    getConnection() -->
    sDbHost : ORADB
    sDbDomain : quest-global.com
    sDbPort : 1521
    sDbSid : TST
    sDbUser : apps
    Trying to connect using SID...
    getConnectionUsingSID() -->
    JDBC URL: jdbc:oracle:thin:@ORADB.quest-global.com:1521:TST
    Connection obtained
    -------------------ADX Database Utility Finished---------------
    Result : Failed to upload the Context file to the DataBase
         Uploading Context file and its templates to the database...FAILED
    StackTrace:
    java.lang.Exception: oracle.apps.ad.autoconfig.oam.InDbCtxFileException: SQLException : ORA-04063: package body "APPS.FND_GSM_UTIL" has errors
    ORA-06508: PL/SQL: could not find program unit being called: "APPS.FND_GSM_UTIL"
    ORA-06512: at line 1
         at oracle.apps.ad.tools.configuration.FileSysDBCtxMerge.updateDBCtx(FileSysDBCtxMerge.java:685)
         at oracle.apps.ad.tools.configuration.FileSysDBCtxMerge.updateDBFiles(FileSysDBCtxMerge.java:222)
         at oracle.apps.ad.context.CtxValueMgt.processCtxFile(CtxValueMgt.java:1579)
         at oracle.apps.ad.context.CtxValueMgt.main(CtxValueMgt.java:661)
    Updating rdbms version in Context file to db102
    Updating rdbms type in Context file to 64 bits
    Kindly suggest
    Regards,
    SK

    HI,
    As per note 369693.1 - Using Oracle Applications with a Split Configuration Database Tier on Oracle 10g Release 2
    Section 4: Post-Migration Tasks
    Reconfigure the application tier to connect to the target database machine
    i have updated the context file parameters s_dbhost, s_dbdomain, s_dbport, s_apps_jdbc_connect_descriptor, s_isDB
    but will running autoconfig i get the error
    Making database connection using DBUtil
    ADX Database Utility
    getConnectionUsingAppsJDBCConnector() -->
    APPS_JDBC_URL='NULL'
    Trying to connect using APPS_JDBC_URL
    Exception occurred: java.sql.SQLException: No suitable driver
    Trying to get connection using SID based connect descriptor
    getConnection() -->
    sDbHost : oradb
    sDbDomain : quest-global.com
    sDbPort : 1521
    sDbSid : TST
    sDbUser : APPS
    Trying to connect using SID...
    getConnectionUsingSID() -->
    JDBC URL: jdbc:oracle:thin:@oradb.quest-global.com:1521:TST
    Exception occurred: java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
    Trying to connect using SID as ServiceName
    getConnectionUsingServiceName() -->
    JDBC URL: jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oradb.quest-global.com)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=TST)))
    Exception occurred: java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
    Trying to connect using SID as ServiceName.DomainName
    getConnectionUsingServiceName() -->
    JDBC URL: jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oradb.quest-global.com)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=TST.quest-global.com)))
    Exception occurred: java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
    Connection could not be obtained; returning null
    -------------------ADX Database Utility Finished---------------
    Exception occurred while preseeding variables in the context file: java.sql.SQLException: Could not get connection to the database
    StackTrace:
    java.sql.SQLException: Could not get connection to the database
         at oracle.apps.ad.tools.configuration.CVMHelper.processNewContextFile(CVMHelper.java:884)
         at oracle.apps.ad.context.CtxValueMgt.preSeed2Ctx(CtxValueMgt.java:1714)
         at oracle.apps.ad.context.CtxValueMgt.processCtxFile(CtxValueMgt.java:1516)
         at oracle.apps.ad.context.CtxValueMgt.main(CtxValueMgt.java:661)
    is there any check we can do to test the DB conection?
    Thanks
    SK

  • Getting Errors: could not find program unit being called ORA-0651

    Hello,
    I'm new to Oracle and I need your help. I'm using Oracle SQL Developer and I have a package that compiles without errors (only warnings) but it still shows a little red x in package's body icon. I get the following error message:
    ORA-04063: package body "SAFETYUSER.SEL_INCIDENT_INFO" has errors ORA-06508: PL/SQL: could not find program unit being called ORA-06512: at line 1
    Here is the body of the package. I would appreciate your help.:
    create or replace PACKAGE BODY "SEL_INCIDENT_INFO" as
    procedure sel_0022Info
    in_ID0022 in number,
    out_eName out t_varChar2,
    out_mName out t_varChar2,
    out_Work out t_varChar2,
    out_Loc out t_varChar2,
    out_Sign out t_varChar2,
    out_obsDate out t_varChar2,
    out_veh out t_varChar2,
    out_vehType out t_varChar2,
    out_vehTag out t_varChar2,
    out_secSup out t_varChar2,
    out_dlic out t_varChar2,
    out_dlType out t_varChar2,
    out_rc out t_varChar2,
    out_JTitle out t_varChar2,
    out_actTake out t_varChar2,
    out_jobfunc out t_varchar2,
    out_ecuid out t_varchar2,
    out_mcuid out t_varchar2
    is
    -- cursor to get ecuid ID for entered employee cuid
    CURSOR cur0022 IS
    select o.ecuid,o.mcuid,o.workperf,o.loc,o.obsdate,o.sign,o.dlid,o.secid,o.vehid, o.action, o.eID (NMC 11/28/2006)
    select o.euid,o.muid,o.workperf,o.loc,o.obsdate,o.sign,o.dlid,o.secid,o.vehid, o.action, o.eID
    from TBL_0022 o
    where o.id0022 = in_ID0022;
    -- variables
    out_eFN varchar2(50);
    out_mFN varchar2(50);
    out_eJF varchar2(4);
    out_DL varchar2(100);
    out_DLT varchar2(100);
    out_Sec varchar2(100);
    out_Vh varchar2(50);
    out_VhT varchar2(50);
    out_VhTg varchar2(50);
    out_eID varchar2(7);
    out_eRC varchar2(10);
    out_signFull varchar2(50);
    out_eJT varchar2(100);
    -- rows for cursors
    row0022 cur0022%rowtype;
    begin
    open cur0022;
    fetch cur0022 into row0022;
    sel_eFullName(row0022.ecuid,out_eFN, out_eJF,out_eID,out_eRC,out_eJT); (NMC 11/28/2006)
    sel_eFullName(row0022.euid,out_eFN, out_eJF,out_eID,out_eRC,out_eJT); -- Changed ecuid to euid NMC 11/28/2006
    --sel_mFullName(row0022.mcuid,out_mFN);
    sel_DL(row0022.DLID,out_DL,out_DLT);
    sel_Sec(row0022.secid,out_Sec);
    sel_Veh(row0022.vehid,out_Vh,out_VhT,out_VhTg);
    out_veh(1) := out_vh;
    out_vehType(1) := out_vht;
    out_vehTag(1) := out_vhtg;
    out_secSup(1) := out_Sec;
    out_dlic(1) := out_DL;
    out_dlType(1) := out_DLT;
    out_eName(1) := out_eFN;
    out_mName(1) := out_mFN;
    out_Work(1) := row0022.workperf;
    out_Loc(1) := row0022.loc;
    sel_mfullname(row0022.sign,out_signFull);
    out_Sign(1) := row0022.sign;--out_signFull;
    out_obsDate(1) :=row0022.obsdate;
    out_actTake(1) :=row0022.action;
    out_jobFunc(1) := out_eJF;
    out_rc(1) := out_eRC;
    out_ecuid(1) := row0022.ecuid; (NMC 11/28/2006)
    out_ecuid(1) := row0022.euid; -- Changed ecuid to euid. (NMC 11/28/2006)
    out_mcuid(1) := row0022.mcuid;  (NMC 11/28/2006)
    out_mcuid(1) := row0022.muid; -- Changed mcuid to muid. (NMC 11/28/2006)
    out_JTitle(1) := out_eJT;
    close cur0022;
    end;
    procedure sel_eFullName
    in_0022EcuID in varchar2, --number,
    out_eFN out varChar2,
    out_eJF out varchar2,
    out_eID out varchar2,
    out_eRC out varchar2,
         out_eJT out varchar2
    is
    -- cursor to get ecuid ID for entered employee cuid
    CURSOR curCUID IS
    select e.efn, e.eln,e.jobfunc,ecuid,rc,e.eid, e.jTitle
    from TBL_EINFO e
    where e.ecuid = in_0022ecuid
    order by e.eid desc;--eid = in_0022EID;
    -- rows for cursors
    rowCUID curCUID%rowtype;
    begin
    open curCUID;
    fetch curCUID into rowCUID;
    out_eFN := rowCUID.efn||' '||rowCUID.eln;
    out_eJF := rowCUID.jobfunc;
    out_eID := rowCUID.eid;--ecuid;
    out_eRC := rowCUID.rc;
    out_eJT := rowCUID.jTitle;
    close curCUID;
    end;
    procedure sel_mFullName
    in_mcuid in varchar2,
    out_mFN out varChar2
    is
    -- cursor to get ecuid ID for entered employee cuid
    CURSOR curCUID IS
    select m.mname
    from TBL_managers m
    where m.mcuid = in_mcuid;
    -- rows for cursors
    rowCUID curCUID%rowtype;
    begin
    open curCUID;
    fetch curCUID into rowCUID;
    out_mFN := rowCUID.mname;
    close curCUID;
    end;
    procedure sel_DL
    in_DLID in number,
    out_DL out varChar2,
    out_DLT out varChar2
    )is
    -- get Last DL
    CURSOR curDL(parDLID number)IS
    SELECT D.DL, D.DLTYPE, D.DLID
    FROM tbl_DL D
    WHERE D.DLID = parDLID;
    -- rows for cursors
    rowDL curDL%rowtype;
    begin
    -- get DL if not 0
    open curDL(in_DLID);
    fetch curDL into rowDL;
    if(rowDL.DL!='0')then
    out_DL := rowDL.dl;
    else
    out_DL := '';
    end if;
    if(rowDL.DLType !='0')then
    out_DLT := rowDL.dltype;
    else
    out_DLT := '';
    end if;
    close curDL;
    end;
    procedure sel_Sec
    in_SecID in number,
    out_Sec out varChar2
    )is
    -- get Last Second Supervisor
    CURSOR curSec(parSecID number)IS
    SELECT s.Super
    FROM tbl_SecSup s
    WHERE s.secsID = parSecID;
    -- rows for cursors
    rowSec curSec%rowtype;
    begin
    -- get Sec if not 0
    open curSec(in_SecID);
    fetch curSec into rowSec;
    if(rowSec.Super!='0')then
    out_Sec := rowSec.Super;
    else
    out_Sec := '';
    end if;
    close curSec;
    end;
    procedure sel_Veh
    in_VehID in number,
    out_Veh out varChar2,
    out_VType out varChar2,
    out_VTag out varChar2
    )is
    -- get Last Second Supervisor
    CURSOR curVeh(parVehID number)IS
    SELECT v.vehicle, v.vehtype, vehtagnumber
    FROM tbl_Vehicle v
    WHERE v.vehID = parVehID;
    -- rows for cursors
    rowVeh curVeh%rowtype;
    begin
    -- get vehicle if not 0
    open curVeh(in_VehID);
    fetch curVeh into rowVeh;
    if(rowVeh.vehicle!='0')then
    out_Veh := rowVeh.Vehicle;
    else
    out_Veh := '';
    end if;
    if(rowVeh.vehtype!='0')then
    out_VType := rowVeh.vehtype;
    else
    out_VType := '';
    end if;
    if(rowVeh.vehtagnumber!='0')then
    out_VTag := rowVeh.vehtagnumber;
    else
    out_VTag := '';
    end if;
    close curVeh;
    end;
    procedure sel_ObsIds(
    in_IncID in number,
    out_obsID out t_number
    is
    -- cursor
    cursor curFindObsID is
    select o.obsID from tbl_obs o where o.id0022 = in_incID;
    -- variables
    obsExist tbl_Obs.obsid%type;
    pcount number default 1;
    begin
    FOR xLoop IN curFindObsID
    LOOP
    out_obsID(pcount) := xLoop.obsID;
    pcount := pcount + 1;
    END LOOP;
    end;
    procedure sel_ObsIdsWSitem(
    in_IncID in number,
    in_SitemID in number,
    out_obsID out t_number
    is
    -- cursor
    cursor curObsIDwSitemID is
    select o.obsID from tbl_obs o where o.id0022 = in_incID and o.sitem_id = in_sitemID;
    -- variables
    pcount number default 1;
    begin
    FOR xLoop IN curObsIDwSitemID
    LOOP
    out_obsID(pcount) := xLoop.obsID;
    pcount := pcount + 1;
    END LOOP;
    end;
    procedure delObsId(
    in_obsID in number
    is
    begin
    DELETE FROM tbl_obs o WHERE (o.obsID=in_obsID);
    end;
    procedure sel_last0022(
    in_ecuid in varchar2,
    --in_mcuid in varchar2,
    out_secSup out t_varChar2,
    out_dlic out t_varChar2,
    out_dlType out t_varChar2,
    out_rc out t_varChar2,
    out_veh out t_varChar2,
    out_vehtag out t_varChar2,
    out_vehtype out t_varChar2,
    out_eName out t_varChar2,
    out_mcuid out t_varChar2,
    out_ecID out t_varchar2,
    out_jobFunc out t_varChar2,
    out_jTitle out t_varchar2
    is
    ---cursor
    cursor curGetLast0022 is
    select o.vehid, o.dlid, o.secid, o.eid, o.mcuid (NMC 11/28/2006)
    select o.vehid, o.dlid, o.secid, o.eid, o.muid
    from tbl_0022 o
    -- where o.ecuid = in_ecuid and o.mcuid = in_mcuid (NMC 11/28/2006)
    where o.euid = in_ecuid and o.mcuid = in_mcuid Changed ecuid to euid (NMC 11/28/2006)
    order by o.id0022 desc;
    ---variables
    row0022 curGetLast0022%rowtype;
    out_eFN varchar2(50);
    out_mFN varchar2(50);
    out_eJF varchar2(4);
    out_DL varchar2(50);
    out_DLT varchar2(50);
    out_Sec varchar2(50);
    out_Vh varchar2(50);
    out_VhT varchar2(50);
    out_VhTg varchar2(50);
    out_eRC varchar2(10);
    out_eID varchar2(7);
    out_eJT varchar2(100);
    pOut_mCuid varchar2(7);
    begin
    open curGetLast0022;
    fetch curGetLast0022 into row0022;
    sel_eFullName(in_ecuid,out_eFN, out_eJF,out_eID,out_eRC,out_eJT);
    --sel_mFullName(in_mcuid,out_mFN);
    sel_DL(row0022.DLID,out_DL,out_DLT);
    sel_Sec(row0022.secid,out_Sec);
    sel_Veh(row0022.vehid,out_Vh,out_VhT,out_VhTg);
    out_veh(1) := out_vh;
    out_vehType(1) := out_vht;
    out_vehTag(1) := out_vhtg;
    out_secSup(1) := out_Sec;
    out_dlic(1) := out_DL;
    out_dlType(1) := out_DLT;
    out_eName(1) := out_eFN;
         if(row0022.mcuid IS NULL)then
              sel_EInfoMCuid(in_ecuid,pOut_mCuid);
              out_mcuid(1) := pOut_mCuid;
         else
              out_mcuid(1) := row0022.mcuid; (NMC 11/28/2006)
    out_mcuid(1) := row0022.muid; -- Changed mcuid to muid. (NMC 11/28/2006)
         end if;
         --sel_EInfoMCUID(in_ecuid,pOut_mCuid);
         --out_mcuid(1) := pOut_mCuid;
    out_rc(1) := out_eRC;
    out_ecID(1) := out_eID;
    out_jobfunc(1) := out_eJF;
         out_jTitle(1) := out_eJT;
    close curGetLast0022;
    end;
    procedure sel_EInfoMCUID(
    pIn_ecuid in varchar2,
    out_mcuid out varchar2
    is
    -- cursor
    cursor curEInfoMCuid is
    select e.eid, e.mcuid from tbl_einfo e where e.ecuid = pIn_ecuid order by e.eid desc;
    -- variables
    rowMCuid curEInfoMCuid%rowtype;
    begin
         open curEInfoMCuid;
         fetch curEInfoMCuid into rowMCuid;
         close curEInfoMcuid;
         out_mcuid := rowMCuid.mcuid;
    end;
    procedure sel_empInfo
    in_0022EcuID in varchar2, --number,
    out_eFN out t_varchar2,
    out_eJF out t_varchar2,
    out_eID out t_varchar2,
    out_eRC out t_varchar2,
         out_eJT out t_varchar2,
         out_eStA out t_varchar2,
         out_eStaN out t_varchar2,
         out_eMcuid out t_varchar2
    is
    -- cursor to get ecuid ID for entered employee cuid
    CURSOR curCUID IS
    select e.efn, e.eln,e.jobfunc,ecuid,rc,e.eid, e.jTitle,e.stA, e.stacode,e.MCUID
    from TBL_EINFO e
    where e.ecuid = in_0022ecuid
    order by e.eid desc;--eid = in_0022EID;
    -- rows for cursors
    rowCUID curCUID%rowtype;
    begin
    open curCUID;
    fetch curCUID into rowCUID;
    out_eFN(1) := rowCUID.efn||' '||rowCUID.eln;
    out_eJF(1) := rowCUID.jobfunc;
    out_eID(1) := rowCUID.eid;--ecuid;
    out_eRC(1) := rowCUID.rc;
    out_eJT(1) := rowCUID.jTitle;
    out_eStA(1) := rowCUID.sta;
    out_eStaN(1) := rowCUID.staCode;
    out_eMcuid(1) := rowCUID.mcuid;
    close curCUID;
    end;
    end;

    This is the results of that query:
    PLW-07203: Message 7203 not found; No message file for product=plsql, facility=PLW
    PLW-07203: Message 7203 not found; No message file for product=plsql, facility=PLW
    PLW-07203: Message 7203 not found; No message file for product=plsql, facility=PLW
    PLW-07203: Message 7203 not found; No message file for product=plsql, facility=PLW
    PLW-07203: Message 7203 not found; No message file for product=plsql, facility=PLW
    PLW-07203: Message 7203 not found; No message file for product=plsql, facility=PLW
    PLW-07203: Message 7203 not found; No message file for product=plsql, facility=PLW
    PLW-07203: Message 7203 not found; No message file for product=plsql, facility=PLW
    PLW-07203: Message 7203 not found; No message file for product=plsql, facility=PLW
    PLW-07203: Message 7203 not found; No message file for product=plsql, facility=PLW
    PLW-07203: Message 7203 not found; No message file for product=plsql, facility=PLW
    PLW-07203: Message 7203 not found; No message file for product=plsql, facility=PLW
    PLW-07203: Message 7203 not found; No message file for product=plsql, facility=PLW
    PLW-07203: Message 7203 not found; No message file for product=plsql, facility=PLW
    PLW-07203: Message 7203 not found; No message file for product=plsql, facility=PLW
    PLW-07203: Message 7203 not found; No message file for product=plsql, facility=PLW
    PLW-07203: Message 7203 not found; No message file for product=plsql, facility=PLW
    PLW-07203: Message 7203 not found; No message file for product=plsql, facility=PLW
    PLW-07203: Message 7203 not found; No message file for product=plsql, facility=PLW
    PLW-07203: Message 7203 not found; No message file for product=plsql, facility=PLW
    PLW-07203: Message 7203 not found; No message file for product=plsql, facility=PLW
    PLW-07203: Message 7203 not found; No message file for product=plsql, facility=PLW
    PLW-07203: Message 7203 not found; No message file for product=plsql, facility=PLW
    PLW-07203: Message 7203 not found; No message file for product=plsql, facility=PLW
    PLW-07203: Message 7203 not found; No message file for product=plsql, facility=PLW
    PLW-07203: Message 7203 not found; No message file for product=plsql, facility=PLW
    PLW-07203: Message 7203 not found; No message file for product=plsql, facility=PLW
    PLW-07203: Message 7203 not found; No message file for product=plsql, facility=PLW
    PLW-07203: Message 7203 not found; No message file for product=plsql, facility=PLW
    PLW-07203: Message 7203 not found; No message file for product=plsql, facility=PLW
    PLW-07203: Message 7203 not found; No message file for product=plsql, facility=PLW
    PLW-07203: Message 7203 not found; No message file for product=plsql, facility=PLW
    PLW-07203: Message 7203 not found; No message file for product=plsql, facility=PLW
    PLW-07203: Message 7203 not found; No message file for product=plsql, facility=PLW
    PLW-07203: Message 7203 not found; No message file for product=plsql, facility=PLW
    PLW-07203: Message 7203 not found; No message file for product=plsql, facility=PLW
    PLW-07203: Message 7203 not found; No message file for product=plsql, facility=PLW
    PLW-07203: Message 7203 not found; No message file for product=plsql, facility=PLW
    PLW-07203: Message 7203 not found; No message file for product=plsql, facility=PLW
    PLW-07203: Message 7203 not found; No message file for product=plsql, facility=PLW
    40 rows selected

  • PL/SQL: Could not find program unit being called: mydb.pkg_alert (newbie)

    This is my first attempt at a pretty in debt package. All the procedures and functions work successfully on their own. When i try and put them into a package and run the package, i get these errors?
    ORA-04063: package body "mydb.PKG_ALERT" has errors
    ORA-06508: PL/SQL: could not find program unit being called: "mydb.PKG_ALERT"
    ORA-06512: at line 6
    Here's my package:
    create or replace PACKAGE pkg_alert AS
    FUNCTION fcn_chck_dt(p_date date)
    RETURN VARCHAR2;
    FUNCTION fcn_chck_decline(p_date date)
    RETURN NUMBER;
    PROCEDURE sp_run_alert(p_date date);
    END pkg_monitor;
    Here's my package body code: Your assistance is greatly appreciated:
    create or replace
    PACKAGE BODY PKG_ALERT AS
    FUNCTION fcn_chck_dt(p_date date) return VARCHAR2 is
    --DECLARE
    v_table_name VARCHAR2(35);
         v_string VARCHAR2(1024);
         v_result number;
         v_output VARCHAR2(1024);
    v_date VARCHAR2(100);
    v_dt VARCHAR2(100);
         CURSOR c_table is
              select table_name
              from user_tab_columns
              where COLUMN_NAME = 'date'
              and table_name NOT LIKE '%BIN%';
         BEGIN
    OPEN c_table;
         loop
              FETCH c_table into v_table_name;
              exit when c_table%NOTFOUND;
              v_string:='select decode(to_date(max(date),''yyyymmdd''),'''||p_date||''',1,0)'|| ' from ' || v_table_name;
    execute immediate v_string into v_result;
    v_date:='select max(date)'|| ' from ' || v_table_name;
    execute immediate v_date into v_dt;
    if v_result=0 then
              v_output:=v_output||CRLF||v_table_name||': '||v_dt;
    end if;
    end loop;
    close c_table;
    return v_output;
    END fcn_chck_dt;
    FUNCTION fcn_chck_decline(p_date date) return NUMBER is
    --DECLARE
         v_dt NUMBER;
         v_active NUMBER;
         v_delta NUMBER;
         v_perc_delta NUMBER;
         v_old_s varchar2(1024);
         v_old_dt number;
         v_string varchar2(1024);
         v_result NUMBER;
         CURSOR c_prev IS
              select date,daily_active,
              daily_active-lag(daily_active) over(order by date),
              trunc(((daily_active-lag(daily_active) over(order by date))/daily_active)*100,2)
              from pop_stats
              where to_date(date,'YYYYMMDD') between p_date-1 and p_date
              order by date desc;
    ---bringing back two rows and all records on purpose.
         BEGIN
              OPEN c_prev;
              FETCH c_prev INTO v_dt,v_active,v_delta,v_perc_delta;
         close c_prev;
         v_old_s := 'select max(date) from alert_stats';
         execute immediate v_old_s into v_old_dt;
         if v_dt!=v_old_dt then
         insert into ALERT_stats(date,
                   daily_active,
                   daily_delta,
                   daily_delta_percent)
                        values(v_dt,
                        v_active,
                        v_delta,
                        v_perc_delta);
              end if;
         v_string:='select value from config_tbl where name=''decline''';
         execute immediate v_string into v_result;
         if v_perc_delta <= v_result then
         return v_perc_delta;
              end if;
         END fcn_chck_decline;
    PROCEDURE sp_run_alert(p_date date) IS
    --DECLARE
    v_result varchar2(1024);
    BEGIN
         insert into ALERT_stats(date)
    values(p_date);
    CRLF char(2) := chr(10)||chr(13);
    v_result :='';
    v_result := v_result||fcn_chck_dt(p_date);
    v_result := v_result||fcn_chck_decline(p_date);
    if v_result.length > 0 then
    utl_mail.send('alerts@localhost','[email protected]',NULL,NULL,
    'Alert','Alert Summary: '||v_result,'text/plain; charset=us-ascii',NULL);
    end if;
    END sp_run_alert;
    END PKG_ALERT;

    Take a look at the bolded sections of your code especialy the last line of your package spec
    create or replace PACKAGE pkg_alert AS
    FUNCTION fcn_chck_dt(p_date date)
    RETURN VARCHAR2;
    FUNCTION fcn_chck_decline(p_date date)
    RETURN NUMBER;
    PROCEDURE sp_run_alert(p_date date);
    END pkg_monitor;

  • Error in executing mappings "could not find program unit being called"

    I am trying to deploy a mapping from the control center in Oracle WareHouse Builder usign Oracle 11g . Here is what i exactly do , first I generate the mapping it goes okay with an insignificant warning .. After that I right click the mapping and click start (for exection to begin).. Eventually I get the error
    STAGES_MAP
    Error
    ORA-04063: package body "ACME_DWH.STAGES_MAP" has errors
    ORA-06508: PL/SQL: could not find program unit being called: "ACME_DWH.STAGES_MAP"
    ORA-06512: at line 1
    what does "could not find program unit being called" mean ?? I validated all my tables and its realated table and successfully deployed them ... but now the mappings is giving me trouble ??? Whas going on... I am confused.... Thansk....

    ScoobySi wrote:
    It sounds as though you've generated but haven't actually deployed the mapping to the DB? That error usually occurs when the package for the mapping is missing from the DB or the parameters have changed.
    Ignore above, just read properly, as MccM suggests try to compile package on DB to determine error. If there are no errors, refresh control center or close it and reopen it as it may be trying to call package with old set of parameters.
    Si
    Edited by: ScoobySi on Nov 30, 2010 4:20 PMExactly , I generated the mappings and then in the control center right clicking on the mappings and consider (default- create new) i deploy it. It goes ahead but tells mer there is a warning , which i already know but chose to ignore. Then i right click on the mappings again and I select start unfortunately at this point this error comes up and my DB doesnt get populated :( ...
    I am a bit new so could you kindly go step by step here , how can i compile my package on DB ??? Btw i am using toad to connect to oracle 11g , are u suggesting that using toad i should compile the package ?? if so how ?? hwo would i know the package location ??? as for the second method
    "If there are no errors, refresh control center or close it and reopen it as it may be trying to call package with old set of parameters." I doubt it will work as i already tried it. I definitely think there is a problem with the package.. i dont think there is any other problemm... I would really appreciate your help thanks...

  • Error: could not find program unit being called

    I am getting the following error:
    FRM-40735: WHEN-NEW-FORM-INSTANCE trigger raised unhandled exception ORA-06508 (see below for description)
    when I call this from my WHEN-NEW-FORM-INSTANCE TRIGGER:
    check_button('PROJECT.SHIFT_DATES','project.first_deadline');
    I have an attached library with the following Program Unit:
    PROCEDURE check_button (button in VARCHAR2, field in VARCHAR2)
    IS
    BEGIN
    if get_item_property(field,update_allowed)='TRUE' then
    SET_ITEM_PROPERTY(button,ENABLED,PROPERTY_TRUE);
    ELSE
    SET_ITEM_PROPERTY(button,ENABLED,PROPERTY_FALSE);
    END IF;
    END;
    It works fine when I run it through the debugger, and when I replace the procedure call to the full code in the trigger.
    ORA-06508: PL/SQL: could not find program unit being called
    Cause: An attempt was made to call a stored program that could not be found. The program may have been dropped or incompatibly modified, or have compiled with errors.
    Action: Check that all referenced programs, including their package bodies, exist and are compatible.
    null

    Make sure the library (pll file) is in the path indicated by your FORMS60_PATH in the registry.
    Hope that helps,
    Karim.

  • PL/SQL: could not find program unit being called

    Hi all,
    We have a J2EE aplication running on tomcat which uses a connection pool based on JDBC 10g driver to acces a 9.2.0.5 Oracle Database.
    When we compile our PL/SQL packages we always get the error "PL/SQL: could not find program unit being called" when we access our J2EE application.
    It seems as if our JDBC Driver was caching PL/SQL package definitions. Is there any way to avoid so?
    Thanks in advance.

    Hi Shui,
    Does the directory where you have all the fmx, mmx have plx (compiled version of pll's).
    If no, generate plx and keep them in that directory.
    Also, did you set the FORMS90_PATH in registry / default.env? Better to use default.eve for runtime environment settings.
    Regards,
    Arun

  • ORA-06508 - PL/SQL: could not find program unit being called

    Hi,
    I'm working on an Oracle Database 11g Release 11.1.0.6.0 - 64bit Production With the Real Application Clusters option.
    Since 2 weeks I'm facing problems with a job.
    The job executes
    dispatch.pk_process.check_geofence;every 2 seconds, forces to run on instance 1.
    Some time, now it's once a day, in a different moment, the job start failing returning the ORA-06508.
    The job body is:
      PROCEDURE check_geofence
      IS
        CURSOR tt IS
          SELECT id_data, id_device, id_vehicle, date_event, date_write
            FROM t_process
           WHERE id_type_process = ln_process_geofence
           ORDER BY date_event;
        id_user_ NUMBER;    
        errc_    NUMBER;
        errm_    VARCHAR2(500);
        i        NUMBER;
      BEGIN
        id_user_ := dispatch.pk_security.login_hard('process_geofence','process_geofence');
        i := 0;
        FOR t IN tt LOOP
          BEGIN
            pk_space_target.check_inout_space_target (
                   in_id_data    => t.id_data,
                   in_id_device  => t.id_device,
                   in_id_vehicle => t.id_vehicle,
                   id_date_event => t.date_event,
                   id_date_write => t.date_write
          EXCEPTION
            WHEN OTHERS THEN
              errm_ := 'process geofence: '||SUBSTR(SQLERRM, 1, 500)||' - '||DBMS_UTILITY.FORMAT_ERROR_BACKTRACE;
              errc_ := SQLCODE;
              INSERT INTO t_data_error (id_data, date_error, error_number, error_message)
                   VALUES (t.id_data, SYSDATE, errc_, errm_);
          END;
          DELETE FROM t_process WHERE id_data = t.id_data AND id_type_process = ln_process_geofence;
          i := i + 1;
          IF i mod 100 = 0 THEN COMMIT; END IF;
        END LOOP;
        id_user_ := dispatch.pk_security.logout;
      END;the error is returned while executing the procedure
    pk_space_target.check_inout_space_targetI know the ORA-06508 could happen on open connections after a recompile.
    But I did not recompile anything.
    The only solution that works is to compile package pk_space_target introducing some error (decompile it) and re-compile without the error.
    Than to the same with pk_process.
    After the last recompile, everything start to work fine again.
    Do you have any suggestion on how/what investigate?
    I cannot find any cause!!
    Thanks in advance,
    Samuel

    At the end I opend a SR and the problem was a timestamp mistmatch between 2 packages:
    Connected to:
    Oracle Database 11g Release 11.1.0.6.0 - 64bit Production
    With the Real Application Clusters option
    SQL> alter session set nls_date_format='dd-mon-yy hh24:mi:ss';
    Session altered.
    SQL> select do.name dname, po.name pname, p_timestamp, po.stime p_stime
    2 from sys.obj$ do, sys.dependency$ d, sys.obj$ po
    3 where p_obj#=po.obj#(+)
    4 and d_obj#=do.obj#
    5 and do.status=1 /*dependent is valid*/
    6 and po.status=1 /*parent is valid*/
    7 and po.stime!=p_timestamp /*parent timestamp does not match*/
    order by 2,1; 8
    DNAME
    PNAME
    P_TIMESTAMP P_STIME
    PK_EVOLUTION
    PK_SPATIAL
    15-sep-11 08:50:11 09-oct-12 10:01:32Then I re-compiled the pk_evolution, and the row disappeared:
    SQL> r
    1 select do.name dname, po.name pname, p_timestamp, po.stime p_stime
    2 from sys.obj$ do, sys.dependency$ d, sys.obj$ po
    3 where p_obj#=po.obj#(+)
    4 and d_obj#=do.obj#
    5 and do.status=1 /*dependent is valid*/
    6 and po.status=1 /*parent is valid*/
    7 and po.stime!=p_timestamp /*parent timestamp does not match*/
    8* order by 2,1
    no rows selectedThis solved the problem.
    Samuel

  • Could not find program unit being called

    We're facing a development problem, which while it isn't stopping us from working, but it's seriously slowing down our progress. It goes something like this ...
    We have a ColdFusion interface to an Oracle PACKAGE, "package A". "Package A" invokes "package B", and "package B" invokes "package C". We're actively working on "package C", the last in the chain, and then testing those changes from the ColdFusion interface.
    Everytime we run a CREATE OR REPLACE on "package C" (we've tried both compiling only the BODY, as well as the SPEC and the BODY), we get the following error from ColdFusion when we test from the interface:
    ORA-06508  PL/SQL: Could not find the program unit being calledIf we wait a bit, everything starts working again. Note that while we are waiting, "package C" is not being recompiled. So it's functioning fine. Our best guess is that there something happening due the connection pooling process in place. Maybe ... if you're lucky enough to latch onto a new connection, then the error doesn't appear? But, if you connect to a session that was present when "package C" was recompiled, then you get the ORA-06508? These connections are using a JDBC driver.
    I guess I expected to get the ORA-04061 error ("Existing state of the package has been discarded"), and that is coming up more rarely than the ORA-06508, but the "could not find the program unit" is just stopping our efforts until everything starts working again.
    I found some suggestions online (http://www.orafaq.com/forum/t/14555/2/) which claim that the SHARED POOL should be flushed and that will help with this error, but I'm not sure I need to bring an A-bomb to a fist-fight. Plus, these PACKAGES aren't huge, so I'm not sure we're encountering the memory limits focused upon in those other posts:
    package A: 1533 lines
    package B: 1015 lines
    package C: 1842 lines
    Anyone have a suggestion for us to follow-up on? Like I said, we're not dead in the water, but this is getting pretty frustrating.
    Thanks,
    --=Chuck

    I think the problem is related to the connection pooling. If you have 5 persistent sessions held open by the application server say C1, C2, ... C5 then if you have called the package from C1 , C2, and C3 then if the package is recompiled the session copy of the package variables and records no longer matches the package and an error is issued. But if the call is made from C4 or C5 it works since the work in storage areas are all initialized from the new version of the package.
    In the old days (7.x, 8.0) I remember seeing a Package State has changed message but recently at least on AIX we see the Program Unit not found when this happens. We used to see this message only if we could not load the package into the shared pool due to memory issues.
    Anyhow we bounce one of our Web based applications to avoid this program. That is the local customer has us stop the application, make the change, revalidate packages, and restart so they never see the error since with a large connection pool significant time can pass between the change and an error being encountered.
    In theory you should just be able to reissue the package procedure call since the first call should have resulted in the work in storage being re-initialized.
    HTH -- Mark D Powell --

  • (ORA-06508: PL/SQL: could not find program unit being called) utl_file

    hi all,
    I am using Oracle XE and forms 6i and am facing the above error when i try to use the utl_file utility.
    WHEN BUTTOn PRESSED
         IF (:EXPORT_IMPORT_DATA = 'E') THEN
              message(lc_status);
                             SECURITY.PKG_gen_trnsfr_data_flat_file.PROC_gen_trnsfr_data_flat_file(:DATA_FILE_PATH, :DATA_FILE_NAME, lc_status);
    PKG_GEN_TRNSFR_DATA_FLAT_FILE body
    create or replace PACKAGE BODY PKG_gen_trnsfr_data_flat_file IS
    PROCEDURE proc_gen_trnsfr_data_flat_file(p_file_location IN VARCHAR2, p_file_name IN VARCHAR2, po_status OUT VARCHAR2) IS
         lh_filename UTL_FILE.FILE_TYPE;
         ls_data VARCHAR2(2000);
         ln_count NUMBER;
         lc_error VARCHAR2(10000);
    CURSOR cur_FPM_DAMAGE_COMPENSATION IS SELECT RPAD(nvl(PDCO_CASE_CLASS,' '),1) || RPAD(nvl(PDCO_CASE_DISPOSAL_PENDING,' '),1) || RPAD(nvl(PDCO_CASE_DISPOSAL_TYPE,' '),1) || RPAD(nvl(PDCO_CC_NO,0),9) || RPAD(nvl(PDCO_CF_NO,0),9) || RPAD(nvl(PDCO_COMPEN_REALISED,0),18) || RPAD(nvl(PDCO_CONFISCATED_PRODUCE,' '),25) || RPAD(nvl(PDCO_CR_NO,0),9) || RPAD(nvl(PDCO_DAMAGE_DETAILS,' '),90) || RPAD(nvl(PDCO_DAMAGE_REPORT_NO,0),13) || RPAD(NVL(TO_CHAR(PDCO_DATE_ORDER_COMPOUNDING,'DD-MON-RRRR'),' '),15) || RPAD(NVL(TO_CHAR(PDCO_DATE_PROSECUTION,'DD-MON-RRRR'),' '),15) || RPAD(NVL(TO_CHAR(PDCO_DISPOSAL_DATE,'DD-MON-RRRR'),' '),15) || RPAD(nvl(PDCO_DR_NO,0),9) || RPAD(nvl(PDCO_FOREST_NAME,' '),50) || RPAD(NVL(TO_CHAR(PDCO_ISSUE_DATE,'DD-MON-RRRR'),' '),15) || RPAD(nvl(PDCO_LASTUPDATE_BY,' '),30) || RPAD(NVL(TO_CHAR(PDCO_LASTUPDATE_ON,'DD-MON-RRRR'),' '),15) || RPAD(nvl(PDCO_NO_OF_PERSONS_IN_THE_CASE,0),6) || RPAD(nvl(PDCO_NO_ORDER_FOR_COMPOUNDING,' '),15) || RPAD(nvl(PDCO_OFFENCE_DETAILS,' '),90) || RPAD(nvl(PDCO_OFFENCE_TYPE,' '),1) || RPAD(nvl(PDCO_OFFENDER_ADDRESS,' '),90) || RPAD(nvl(PDCO_OFFENDER_NAME,' '),200) ||
    RPAD(nvl(PDCO_OFFICIAL_NAME,' '),30) || RPAD(nvl(PDCO_RA_SIGN,' '),30) || RPAD(NVL(TO_CHAR(PDCO_RA_SIGN_DATE,'DD-MON-RRRR'),' '),15) || RPAD(NVL(TO_CHAR(PDCO_RECEIPT_DATE,'DD-MON-RRRR'),' '),15) || RPAD(nvl(PDCO_RR_NO,0),18) || RPAD(nvl(PDCO_TOOLS,0),18) || RPAD(nvl(PDCO_TOTAL,0),18) || RPAD(nvl(PDCO_VALUE_CONFISCATED_PROD,0),18) || RPAD(nvl(PDCO_VFP,0),18) || RPAD(nvl(PDCO_YDIV_DIVISION_CODE,' '),8) || RPAD(nvl(PDCO_YRAN_RANGE_CODE,' '),8) outstring FROM FPM_DAMAGE_COMPENSATION;
    CURSOR cur_FPM_DAMAGE_COMPENSATION_R IS SELECT RPAD(nvl(CIRCLE,' '),90) || RPAD(nvl(DIVISION,' '),90) || RPAD(nvl(PREV_A,0),9) || RPAD(nvl(PREV_B,0),9) || RPAD(nvl(PREV_TOTAL,0),11) || RPAD(nvl(TOT_A,0),11) || RPAD(nvl(TOT_B,0),11) || RPAD(nvl(TOT_C,0),11) || RPAD(nvl(T_A,0),9) || RPAD(nvl(T_B,0),9) || RPAD(nvl(T_C,0),9) || RPAD(nvl(X_A,0),9) || RPAD(nvl(X_B,0),9) || RPAD(nvl(X_C,0),9) || RPAD(nvl(Y_A,0),9) || RPAD(nvl(Y_B,0),9) || RPAD(nvl(Y_C,0),9) || RPAD(nvl(Z_A,0),9) || RPAD(nvl(Z_B,0),9) || RPAD(nvl(Z_C,0),9) outstring FROM fpm.FPM_DAMAGE_COMPENSATION_R;
    CURSOR cur_FPM_ENCROACHMENT IS SELECT RPAD(nvl(PENC_AREA_UNDER_ENCROACH,0),18) || RPAD(nvl(PENC_BALANCE_AREA_UN_ENC,0),18) || RPAD(nvl(PENC_ENCROACH_ID,' '),8) || RPAD(nvl(PENC_FOREST_NAME,' '),50) || RPAD(nvl(PENC_LASTUPDATE_BY,' '),30) || RPAD(NVL(TO_CHAR(PENC_LASTUPDATE_ON,'DD-MON-RRRR'),' '),15) || RPAD(nvl(PENC_LEGAL_STATUS_OF_FOREST,' '),90) || RPAD(NVL(TO_CHAR(PENC_PERIOD_FROM_UNDER_ENC,'DD-MON-RRRR'),' '),15) || RPAD(nvl(PENC_PRESENT_STATUS,' '),90) || RPAD(nvl(PENC_YDIV_DIVISION_CODE,' '),8) outstring FROM FPM_ENCROACHMENT;
    CURSOR cur_FPM_ENCROACHMENT_REMOVALS IS SELECT RPAD(nvl(PENR_ACTION_TAKEN,' '),90) || RPAD(nvl(PENR_AREA_REMOVED_ENCMNT,0),18) || RPAD(NVL(TO_CHAR(PENR_DATE,'DD-MON-RRRR'),' '),15) || RPAD(nvl(PENR_LASTUPDATE_BY,' '),30) || RPAD(NVL(TO_CHAR(PENR_LASTUPDATE_ON,'DD-MON-RRRR'),' '),15) || RPAD(nvl(PENR_PENC_ENCROACHMENT_ID,' '),8) || RPAD(nvl(PENR_PENC_YDIV_DIVISION_CODE,' '),8) outstring FROM FPM_ENCROACHMENT_REMOVALS;
    CURSOR cur_FPM_FIRE IS SELECT RPAD(nvl(PFIR_ACTION_TAKEN,' '),90) || RPAD(nvl(PFIR_AREA_EFFECTED,0),18) || RPAD(nvl(PFIR_CAUSE_OF_FIRE,' '),2) || RPAD(nvl(REPLACE(REPLACE(PFIR_DAMAGE_DETAILS,CHR(13),' '),CHR(10),' '),' '),200) || RPAD(nvl(PFIR_DAMAGE_VALUE,0),18) || RPAD(NVL(TO_CHAR(PFIR_DATE_OF_FIRE,'DD-MON-RRRR'),' '),15) || RPAD(NVL(TO_CHAR(PFIR_DATE_VISIT_DFO,'DD-MON-RRRR'),' '),15) || RPAD(NVL(TO_CHAR(PFIR_DATE_VISIT_RANGEOFFICER,'DD-MON-RRRR'),' '),15) || RPAD(nvl(PFIR_DFO_COMMENTS,' '),90) || RPAD(nvl(PFIR_DFO_SIGN,' '),30) || RPAD(NVL(TO_CHAR(PFIR_DFO_SIGN_DATE,'DD-MON-RRRR'),' '),15) || RPAD(nvl(PFIR_FIRE_NO,' '),10) || RPAD(nvl(PFIR_FOREST_NAME,' '),50) || RPAD(nvl(PFIR_LASTUPDATE_BY,' '),30) || RPAD(NVL(TO_CHAR(PFIR_LASTUPDATE_ON,'DD-MON-RRRR'),' '),15) || RPAD(nvl(PFIR_NO_OF_TREES,0),18) || RPAD(nvl(PFIR_QTY_OTH_FORST_PROD_BRNT,0),18) || RPAD(nvl(PFIR_RANGEOFFICER_COMMENTS,' '),90) || RPAD(nvl(PFIR_REPORTING_PERSON,' '),30) || RPAD(nvl(PFIR_VALUE_OTH_FORST_PROD_BRNT,0),18) || RPAD(nvl(PFIR_VALUE_TREES_BURNT,0),18) || RPAD(nvl(PFIR_VOLUME_TREES_BURNT,0),18) || RPAD(nvl(PFIR_YDIV_DIVISION_CODE,' '),8) || RPAD(nvl(PFIR_YRAN_RANGE_CODE,' '),8) outstring FROM FPM_FIRE;
    CURSOR cur_FPM_JFM_MASTER IS SELECT RPAD(nvl(PJFM_BSCM_SCHEME_CODE,' '),8) || RPAD(nvl(PJFM_JFM_ID,0),13) || RPAD(nvl(PJFM_LASTUPDATE_BY,' '),30) || RPAD(NVL(TO_CHAR(PJFM_LASTUPDATE_ON,'DD-MON-RRRR'),' '),15) || RPAD(NVL(TO_CHAR(PJFM_LAUNCH_DATE,'DD-MON-RRRR'),' '),15) || RPAD(nvl(PJFM_LOCATION,' '),20) || RPAD(nvl(PJFM_YDIV_DIVISION_CODE,' '),8) outstring FROM FPM_JFM_MASTER;
    CURSOR cur_FPM_JFM_DETAILS IS SELECT RPAD(NVL(TO_CHAR(PJFD_DATE,'DD-MON-RRRR'),' '),15) || RPAD(nvl(PJFD_EXPENDITURE,0),18) || RPAD(nvl(PJFD_LASTUPDATE_BY,' '),30) || RPAD(NVL(TO_CHAR(PJFD_LASTUPDATE_ON,'DD-MON-RRRR'),' '),15) || RPAD(nvl(PJFD_NO_OF_FPS,0),13) || RPAD(nvl(PJFD_OTHER_AREA_INCLUDED,0),18) || RPAD(nvl(PJFD_OVERALL_AREA_REGENERATED,0),18) || RPAD(nvl(PJFD_PF_AREA_INCLUDED,0),18) || RPAD(nvl(PJFD_PJFM_JFM_ID,0),13) || RPAD(nvl(PJFD_RF_AREA_INCLUDED,0),18) || RPAD(nvl(PJFD_VALUE_BENEFIT_CASH,0),18) || RPAD(nvl(PJFD_VALUE_BENEFIT_GOODS,0),18) outstring FROM FPM_JFM_DETAILS;
    CURSOR cur_FPM_PROTECTION_FIRE_MASTER IS SELECT RPAD(nvl(PPFM_AREA_ATTEM_TO_BE_PROT,0),18) || RPAD(nvl(PPFM_FINANCIAL_YEAR,' '),9) || RPAD(nvl(PPFM_LASTUPDATE_BY,' '),30) || RPAD(NVL(TO_CHAR(PPFM_LASTUPDATE_ON,'DD-MON-RRRR'),' '),15) || RPAD(nvl(PPFM_YDIV_DIVISION_CODE,' '),8) outstring FROM FPM_PROTECTION_FIRE_MASTER;
    CURSOR cur_FPM_PROTECTION_FIRE_DET IS SELECT RPAD(nvl(PPFD_AREA_ACTUALLY_PROTECTED,0),18) || RPAD(nvl(PPFD_COST,0),18) || RPAD(nvl(PPFD_FAILURE,0),18) || RPAD(nvl(PPFD_LASTUPDATE_BY,' '),30) || RPAD(NVL(TO_CHAR(PPFD_LASTUPDATE_ON,'DD-MON-RRRR'),' '),15) || RPAD(nvl(PPFD_PPFM_FINANCIAL_YEAR,' '),9) || RPAD(nvl(PPFD_PPFM_YDIV_DIVISIN_CODE,' '),8) outstring FROM FPM_PROTECTION_FIRE_DETAILS;
    BEGIN
    lc_error := 'begin';
    lc_error := p_file_location || p_file_name ;
         lh_filename := UTL_FILE.FOPEN(p_file_location, p_file_name, 'w',32767);
    lc_error := 'filename';
         SELECT COUNT(*) INTO ln_count FROM FPM_DAMAGE_COMPENSATION;
         lc_error := 'line 1';
         UTL_FILE.PUT_LINE(lh_filename, RPAD(ln_count,10) || 'FPM_DAMAGE_COMPENSATION');
         lc_error := 'line2';
         FOR i IN cur_FPM_DAMAGE_COMPENSATION LOOP
         UTL_FILE.PUT_LINE(lh_filename, i.outstring);
         END LOOP;
         SELECT COUNT(*) INTO ln_count FROM fpm.FPM_DAMAGE_COMPENSATION_R;
         UTL_FILE.PUT_LINE(lh_filename, RPAD(ln_count,10));
         FOR i IN cur_FPM_DAMAGE_COMPENSATION_R LOOP
         UTL_FILE.PUT_LINE(lh_filename, i.outstring);
         END LOOP;
         SELECT COUNT(*) INTO ln_count FROM FPM_FIRE;
         UTL_FILE.PUT_LINE(lh_filename, RPAD(ln_count,10)||'FPM_FIRE');
         FOR i IN cur_FPM_FIRE LOOP
         UTL_FILE.PUT_LINE(lh_filename, i.outstring);
         END LOOP;
         SELECT COUNT(*) INTO ln_count FROM FPM_JFM_MASTER;
         UTL_FILE.PUT_LINE(lh_filename, RPAD(ln_count,10));
         FOR i IN cur_FPM_JFM_MASTER LOOP
         UTL_FILE.PUT_LINE(lh_filename, i.outstring);
         END LOOP;
         SELECT COUNT(*) INTO ln_count FROM FPM_JFM_DETAILS;
         UTL_FILE.PUT_LINE(lh_filename, RPAD(ln_count,10));
         FOR i IN cur_FPM_JFM_DETAILS LOOP
         UTL_FILE.PUT_LINE(lh_filename, i.outstring);
         END LOOP;
         SELECT COUNT(*) INTO ln_count FROM FPM_PROTECTION_FIRE_MASTER;
         UTL_FILE.PUT_LINE(lh_filename, RPAD(ln_count,10));
         FOR i IN cur_FPM_PROTECTION_FIRE_MASTER LOOP
         UTL_FILE.PUT_LINE(lh_filename, i.outstring);
         END LOOP;
         SELECT COUNT(*) INTO ln_count FROM FPM_PROTECTION_FIRE_DETAILS;
         UTL_FILE.PUT_LINE(lh_filename, RPAD(ln_count,10));
         FOR i IN cur_FPM_PROTECTION_FIRE_DET LOOP
         UTL_FILE.PUT_LINE(lh_filename, i.outstring);
         END LOOP;
         SELECT COUNT(*) INTO ln_count FROM FPM_ENCROACHMENT;
         UTL_FILE.PUT_LINE(lh_filename, RPAD(ln_count,10));
         FOR i IN cur_FPM_ENCROACHMENT LOOP
         UTL_FILE.PUT_LINE(lh_filename, i.outstring);
         END LOOP;
         SELECT COUNT(*) INTO ln_count FROM FPM_ENCROACHMENT_REMOVALS;
         UTL_FILE.PUT_LINE(lh_filename, RPAD(ln_count,10));
         FOR i IN cur_FPM_ENCROACHMENT_REMOVALS LOOP
         UTL_FILE.PUT_LINE(lh_filename, i.outstring);
         END LOOP;
         UTL_FILE.FCLOSE_ALL;
         po_status := 'NO ERROR';      
         EXCEPTION
                   WHEN UTL_FILE.INVALID_PATH      OR UTL_FILE.INVALID_MODE THEN
                                       po_status := 'I 1';
                   WHEN UTL_FILE.INVALID_FILEHANDLE OR UTL_FILE.INVALID_OPERATION OR UTL_FILE.INTERNAL_ERROR OR UTL_FILE.WRITE_ERROR THEN
                                       po_status := 'I 2';
                   WHEN OTHERS THEN
                                       po_status := lc_error;
                                       LC_ERROR:='I 4';
                                       dbms_output.put_line(LC_ERROR);
    END;
    END;
    If i uncomment UTL_FIle.Fopen statement, the error text will be the path name and file name.
    Can anyone advise as to what should be done to resolve this on XE. It worked fine on 8i.
    I have runcatproc.sql and utlfile.sql also
    regards
    kunal

    Hi
    On 8i you would have set the UTL_DIR_PATH parameter
    in the init.ora file. Did you do this for your XE
    database? I hope you are referring to the UTL_FILE_DIR parameter. I have set this parameter to value *.
    Although the better approach would be to
    create a directory object for the file path, an
    option which was introduced in 9i..
    Can you please elaborate me on this. I tried declaring the create directory statement in the package, but that didnt help. I have already created one through sql command line. How can i use this directory as an alternative to utl_file

  • Could not find pgm unit being called in PKG ONT_HEADER_Def_Hdlr FOB_POINT

    Hi,
    I have written a custom function to get the value for the FOB_POINT at the header level in the sales order only for iStore orders
    This function is attached to the defaulting rules and ran the 'Default handler package'
    When the order is placed from iStore, i get the error
    Error messages from Order Management
    ORA-06508: PL/SQL: could not find program unit being called in Package ONT_HEADER_Def_Hdlr Procedure Default_Record: FOB_POINT_CODE 1
    There is an error in order submission.
    I check the package which i created is valid.
    Any pointers to this please
    Regards,
    Prasad

    Hi,
    Thanks for all your quick response, the package is created in APPS schema only. I did not bounce the middle tier after compiling the defaulting rules.
    Do we need to ??
    Regards,
    Prasad

  • Invoice validation program error:Could not find operating unit options

    Dear Team,
    Once my Payables Open Interface Import program successfully completed, I am trying to running invoice validation program which is ended with warning as bellow,
    (Bulk CALCULATE) START SYSDATE 17-DEC-2012 04:04:19
    Could not find operating unit options
    Encountered unexpected error: User-Defined Exception
    (Bulk CALCULATE) END SYSDATE 17-DEC-2012 04:04:23
    and invoice placing into Dist Variance hold,
    my interface program placed data in to based tables (ap_invoices_all and lines_all ) but distributions are not getting generating. Can you please do help me.
    Find attached excel sheet for ur references.
    Thanks
    Sathiya

    Make sure the library (pll file) is in the path indicated by your FORMS60_PATH in the registry.
    Hope that helps,
    Karim.

Maybe you are looking for

  • Problem with copy serviceorder and personel number

    we have a lot of old serviceorders which can be used as a template for new serviceorders . the only problem is that the personel numbers are copied also. is it possible to prevent that the personel numbers of the old serviceorder are not copied to th

  • Standard BAPI/RFC for in-transit shipments

    All experts, I am new to SAP functional area. I am looking for a standard BAPI/RFC that will get me all in-transit shipments. Is it available and if so what is the name of the BAPI ? Or a custom one needs to be written? Thanks in advance for you help

  • Any difference in the architecture of VC 7.0 and VC 7.1

    Hi All, Can anyone explain me if there is any difference in the architecture of VC 7.0 and VC 7.1 Also, is there any diff in terms of browsers for the applications deployed on Adobe Flex and WD HTML Nikhil Bansal

  • What are Wireframes in portal? is it a sap tool?

    Hi  Guru's, What are Wireframes in portal? is it a sap tool?   According to my search in web it seems to be a tool where we will be developing prototype for our web project. Does sap has any new tool which is similar to Wireframes. Regards, Kiran Kum

  • Error when trying to post an EDI invoice

    Hi, We are trying to post an EDI invoice and the following error message is generated Document contains same order item more than once - Message no. M8321 I do not understand why this is being generated as GR-IV has been defined and the idoc holds th