ORA-06575: Package or function EDN_DEQUEUE_OAOO_DELIVERY is in an invalid s

After migrating Data from one 11g server to a new one, restart SOA EM, error persists background:
background server is still reporting: "<Warning> <oracle.integration.platform.blocks.event.saq> <SOA-31013> <Error handling message (rolling back).
java.sql.SQLException: ORA-06575: Package or function EDN_DEQUEUE_OAOO_DELIVERY is in an invalid state
at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:74)
at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:135)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:210)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:473)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:423)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1095)
at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:201)
at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:1036)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1379)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3568)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3739)
at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:8150)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1535)
at weblogic.jdbc.wrapper.PreparedStatement.execute(PreparedStatement.java:99)
at oracle.integration.platform.blocks.event.saq.SAQBusinessEventBus.readOAOODelivery(SAQBusinessEventBus.java:1302)
at
oracle.integration.platform.blocks.event.saq.SAQBusinessEventBus.handleSingleOAOODelivery(SAQBusinessEventBus.java:750)
at oracle.integration.platform.blocks.event.saq.SAQBusinessEventBus.handleQueueEvents(SAQBusinessEventBus.java:669)
at oracle.integration.platform.blocks.event.saq.SAQBusinessEventBus.access$000(SAQBusinessEventBus.java:71)
at oracle.integration.platform.blocks.event.saq.SAQBusinessEventBus$1.run(SAQBusinessEventBus.java:319)
at oracle.integration.platform.blocks.executor.WorkManagerExecutor$1.run(WorkManagerExecutor.java:105)
at weblogic.work.j2ee.J2EEWorkManager$WorkWithListener.run(J2EEWorkManager.java:183)
at weblogic.work.DaemonWorkThread.run(DaemonWorkThread.java:30)"
===================================================
We found the EDN_DEQUEUE_OAOO_DELIVERY is a storage process, it failed after re-complied, details as below:
SQL> alter procedure DEV_SOAINFRA.EDN_DEQUEUE_OAOO_DELIVERY compile;
Warning: Procedure altered with compilation errors.
SQL> show error;
Errors for PROCEDURE DEV_SOAINFRA.EDN_DEQUEUE_OAOO_DELIVERY:
LINE/COL ERROR
2/9 PL/SQL: Item ignored
2/9 PLS-00201: identifier 'DBMS_AQ' must be declared
3/10 PL/SQL: Item ignored
3/10 PLS-00201: identifier 'DBMS_AQ' must be declared
8/3 PL/SQL: Statement ignored
8/3 PLS-00320: the declaration of the type of this expression is
incomplete or malformed
9/3 PL/SQL: Statement ignored
9/3 PLS-00320: the declaration of the type of this expression is
incomplete or malformed
LINE/COL ERROR
10/3 PL/SQL: Statement ignored
10/3 PLS-00320: the declaration of the type of this expression is
incomplete or malformed
12/3 PL/SQL: Statement ignored
12/59 PLS-00320: the declaration of the type of this expression is
Anybody have any suggestion will be highly appreciated.
Thanks,
Katherine

I did what could be the reason?Did it compile successfully? Do you still get the same error?
What is the status of the package now?
SQL> select owner, object_type, status
from dba_objects
where object_name = '<PACKAGE NAME>';The package may have been invalidated for different reasons (like editing the code without compiling it, one of more the objects referenced in the package became invalid, new columns added to tables/views which are used by the package, ..etc).
Thanks,
Hussein

Similar Messages

  • Package compilation and ORA-06575

    Hi,
    I've created a package & body that compiles OK (without errors or warnings) in Oracle SQL Developer and also works afterwards OK.
    When created by PL/SQL statements there are no errors but STATUS in USER_OBJECTS is 'INVALID' and ORA-06575 is issued when the package is called.
    Nevertheless Oracle SQL Developer sees the created package as INVALID,
    I can compile it (again no errors or warnings) and then it works
    I tried ALTER PACKAGE ... COMPILE & COMPILE BODY but it is still INVALID
    Can somebody help me?
    I want to be able to do all by PL/SQL statements (issued by a program)
    Thanks
    Nikolay

    Thank you Kamal,
    USER_ERRORS contains 5 messages (same MESSAGE_NUMBER, all from PACKAGE BODY)
    from more than one version of my code
    so I'm unable to find out the corresponding error. There is no date in the errors
    Question 1. How to clear USER_ERRORS before compiling - or is it cleaed automatically?
    Obviously the messages remain after closing a connection and opening a new one
    Question 2. Maybe one of my problems is - the statements CREATE PACKAGE "X"."CODE" and CREATE PACKAGE BODY "X"."CODE" are executed as user SYSTEM but the package/body is created under user "X"
    Question 3. I don't really expect, but there might be a problem that I'm using "" quotations to have lower case in identifiers; I'm using also Windows 0x0D0A CRs etc. One of the errors in USER_ERRORS says (again manually translated from german) PLS-00103 Found the symbol "" where expected some of begin end ... current cursor
    Another error says PLS-00103 found ";" where expected ....
    and the other 3 messages say my variables after " begin declare" are unexpected...
    Hope someone helps, thanks
    Nikolay

  • ORA-22905 and Cast function

    I am running a query with following code:
    select d.acct_num, lib.fmt_money(a.amt) Total Amount
    from account d, table(report.lib.expense (d.acct_num)) a
    where clause.
    Here:
    1. Report is another schema containing packqges for reporting development.
    2. lib is package name created in the report schema. It contains function such as expense.
    3. expense is a function under Lib package as
    function expense (p_acct number) return number is
    acct_num number;
    begin select xxxx into acct_num from xxx_table); return nvl(acct_num, 0);
    end expense;
    Then when I run this select statement, it gave me ORA-22905 error. Cause: attempt to access rows of an item whose type is not known at parse time or that is not of a nested table type. Action: use CAST to cast the item to a nested table type.
    I used CAST like this:
    select d.acct_num, CAST(a.amt as number ) Total Amount
    from account d, table(report.lib.expense (d.acct_num)) a
    where clause.
    It gave me ORA-00923 From keyword not found where expected.
    Please help me to find where the problem is and thank you for your help a lot.

    citicbj wrote:
    I have checked function and found that function was defined as this:
    function expense (p_exp varchar2) return number
    is
    l_exp number;
    begin
    select xxx into l_exp from xxxx where clause;
    return nvl(l_exp, 0);
    end expense;
    So this is not defined as the table of array. So I take the table off from select statement as
    select d.acct_num,
    to_number(a.amt) Total Amount
    from account d,
    report.lib.expense (d.acct_num) a
    where d.acct_num = a.acct_num;
    Then it return ORA-00933 SQL command not ptoperly ended. However, I couldn't see any not properly ended SQL code here. Please advise your comments.Should just be ...
    select
       d.acct_num,
       report.lib.expense (d.acct_num) as "Total Amount"
       --to_number(a.amt) Total Amount
    from account dNotice that i enclosed the column alias (Total Amount) in " ... that is because you can't have a column alias with spaces as you tried without doing this (the parser gets sad).
    Also, you cannot use a function returning a single value like this as a nested table (at least not the way you are trying) and in your case there's no reason. You don't want to join to it, you are passing in ACCT_NUM which the function will presumably use to filter out not relevant data.
    Finally, there's no reason to TO_NUMBER the function result ... it's already defined to return a number :)

  • DBMS_LDAP call fails with ORA-06512 Error Mapping function

    Hi,
    I am facing a problem with workflow integration with LDAP.
    I receive
    ORA-6512 Error Mapping Function on one particular line within the WF_LDAP.get_cfg_val procedure.
    WHILE my_entry IS NOT NULL
    LOOP
    my_vals := DBMS_LDAP.get_values (p_session,
    my_entry,
    p_name);
    The documentation says:
    ORA-06521 PL/SQL: Error mapping function
    Cause: An error was detected by PL/SQL trying to map the mentioned
    function dynamically.
    Action: Check the stacked error (if any) for more details.
    This is the trace of the error:
    ORA-06521 PL/SQL Error mapping Function
    ORA-06512 at SYS.DBMS_LDAP_API_FFI line 0
    ORA-06512 at SYS.DBMS_LDAP line 1332
    ORA-06512 at SYS.DBMS_LDAP line 1302
    ORA-06512 at SYS.DBMS_LDAP line 582
    This is the header of the catldap.sql file
    Rem
    Rem $Header: catldap.sql 07-jan-2000.19:15:20 akolli Exp $
    Rem
    Rem catldap.sql
    Rem
    Rem $Header: dbmsldap.sql 14-dec-2001.23:25:22 rbollu Exp $
    Rem
    Rem dbmsldap.sql
    Rem
    This is the output while running it (No errors):
    Library created.
    Package created.
    Package created.
    Package created.
    Package body created.
    Package body created.
    Package body created.
    Synonym created.
    Grant succeeded.
    Synonym created.
    Grant succeeded.
    Database is :
    compatible 9.2.0.0.0
    Am I missing something?
    I have searched all the forums and although there are many references to "Error Mapping Function", noone has reported it in the context of WF - LDAP Integration. So I am not sure how to proceed.
    Please help.
    thanks in advance,
    Libin

    Hi Libin,
    Can you please explain to me the parameters that you put in the Global Preferences, the LDAP_port,LDAP_user,and the others, because I don�t know where I need to search in the server this parameters and I don�t understand su much of OID.
    if you can give to me and little description of that parameters,this would thank for much.
    anticipated thanks
    Arlet

  • ORA-06503: PL/SQL: Function returned without value

    Hello
    Having a bit of a problem with piplined functions.
    Why does this work :
    SET SERVEROUTPUT ON
    DECLARE
    TYPE SARRAY IS TABLE OF VARCHAR2(4000);
    CURSOR CU IS SELECT * FROM DX_XML_ATTENDANCE WHERE STUD_ID = 107777 AND BASE_ID = 94;
    T_STUD NUMBER(10);
    T_BASE NUMBER(10);
    T_DATE DATE;
    T_MARKS VARCHAR2(1000);
    LEN_MARKS NUMBER;
    PDATE DATE;
    SDATE DATE;
    EDATE DATE;
    SLEN NUMBER;
    WEEKLEN NUMBER;
    INIPOS NUMBER;
    MARRAY VARCHAR2(1000);
    SUBARRAY SARRAY := SARRAY();
    SFILL VARCHAR2(14) := '--------------';
    EPOS NUMBER;
    MY_REC     DX_XML_ATTENDANCE%ROWTYPE;
    BEGIN
    SUBARRAY.EXTEND(17);
    DBMS_OUTPUT.ENABLE(100000000);
    --FOR MY_REC IN CU
    OPEN CU;
    LOOP
         FETCH CU INTO MY_REC;
         EXIT WHEN (CU%NOTFOUND);
    T_STUD := MY_REC.STUD_ID;
    T_BASE := MY_REC.BASE_ID;
    T_DATE := TO_DATE(MY_REC.START_DATE, 'DD/MM/YYYY');
    T_MARKS := MY_REC.MARKS;
    LEN_MARKS := LENGTH(T_MARKS);
    EPOS := LEN_MARKS / 2;
    SDATE := ROUND(TO_DATE(T_DATE), 'W') - 1;
    INIPOS := TO_NUMBER(TO_CHAR(T_DATE, 'D'));
    SLEN := INIPOS + 3;
    PDATE := SDATE;
    EDATE := SDATE + EPOS;
    MARRAY := SUBSTR(T_MARKS, 1, SLEN);
    WEEKLEN := LENGTH(MARRAY);
    IF WEEKLEN < 14 THEN
         MARRAY := SUBSTR(SFILL, 1, 14 - WEEKLEN) || MARRAY;
    END IF;
    SUBARRAY(1) := T_STUD;
    SUBARRAY(2) := T_BASE;
    SUBARRAY(3) := PDATE;
    FOR i IN 4 .. 17 LOOP
         SUBARRAY(i) := SUBSTR(MARRAY, i - 3, 1);
    END LOOP;
    DBMS_OUTPUT.PUT_LINE(SUBARRAY(1)||' '||SUBARRAY(2)||' '||SUBARRAY(3)||' '||SUBARRAY(4)||' '||
         SUBARRAY(5)||' '||SUBARRAY(6)||' '||SUBARRAY(7)||' '||SUBARRAY(8)||' '||SUBARRAY(9)||' '||
         SUBARRAY(10)||' '||SUBARRAY(11)||' '||SUBARRAY(12)||' '||SUBARRAY(13)||' '||SUBARRAY(14)||' '||
         SUBARRAY(15)||' '||SUBARRAY(16)||' '||SUBARRAY(17));
    WHILE PDATE < EDATE LOOP
         PDATE := PDATE + 7;
         MARRAY := SUBSTR(T_MARKS, SLEN + 1, 14);
         WEEKLEN := LENGTH(MARRAY);
         IF WEEKLEN < 14 THEN
              MARRAY := MARRAY || SUBSTR(SFILL, 1, 14 - WEEKLEN);
         END IF;
         FOR i IN 4 .. 17 LOOP
              SUBARRAY(i) := SUBSTR(MARRAY, i - 3, 1);
         END LOOP;
         SUBARRAY(3) := PDATE;
    DBMS_OUTPUT.PUT_LINE(SUBARRAY(1)||' '||SUBARRAY(2)||' '||SUBARRAY(3)||' '||SUBARRAY(4)||' '||
         SUBARRAY(5)||' '||SUBARRAY(6)||' '||SUBARRAY(7)||' '||SUBARRAY(8)||' '||SUBARRAY(9)||' '||
         SUBARRAY(10)||' '||SUBARRAY(11)||' '||SUBARRAY(12)||' '||SUBARRAY(13)||' '||SUBARRAY(14)||' '||
         SUBARRAY(15)||' '||SUBARRAY(16)||' '||SUBARRAY(17));
         PDATE := PDATE + 7;
         SLEN := SLEN + 14;
    END LOOP;
    END LOOP;
    END;
    and this does not :
    CREATE OR REPLACE PACKAGE BODY PARSE_ATTENDANCE AS
    FUNCTION ENUM_MARKS(SEL_SQL IN VARCHAR2)
    RETURN TMP_ATT_DATA_TBL PIPELINED
    IS
    V_SQL           VARCHAR(1000):= SEL_SQL;
    V_CURSOR      SYS_REFCURSOR;
    V_ROW          TMP_ATT_HOLDING:=TMP_ATT_HOLDING(NULL, NULL, NULL, NULL);
    T_STUD           NUMBER(10);
    T_BASE           NUMBER(10);
    T_DATE           DATE;
    T_MARKS      VARCHAR2(1000);
    LEN_MARKS      NUMBER;
    PDATE          DATE;
    SDATE          DATE;
    EDATE          DATE;
    SLEN           NUMBER;
    WEEKLEN      NUMBER;
    INIPOS           NUMBER;
    MARRAY           VARCHAR2(1000);
    SUBARRAY      SARRAY := SARRAY();
    SFILL           VARCHAR2(14) := '--------------';
    EPOS           NUMBER;
    BEGIN
    SUBARRAY.EXTEND(17);
    OPEN V_CURSOR FOR V_SQL;
    LOOP
         FETCH V_CURSOR INTO V_ROW.STUD_ID, V_ROW.BASE_ID, V_ROW.START_DATE, V_ROW.MARKS;
         EXIT WHEN V_CURSOR%NOTFOUND;
    T_STUD := V_ROW.STUD_ID;
    T_BASE := V_ROW.BASE_ID;
    T_DATE := TO_DATE(V_ROW.START_DATE, 'DD/MM/YYYY');
    T_MARKS := V_ROW.MARKS;
    LEN_MARKS := LENGTH(T_MARKS);
    EPOS := LEN_MARKS / 2;
    SDATE := ROUND(TO_DATE(T_DATE), 'W') - 1;
    INIPOS := TO_NUMBER(TO_CHAR(T_DATE, 'D'));
    SLEN := INIPOS + 3;
    PDATE := SDATE;
    EDATE := SDATE + EPOS;
    MARRAY := SUBSTR(T_MARKS, 1, SLEN);
    WEEKLEN := LENGTH(MARRAY);
    IF WEEKLEN < 14 THEN
         MARRAY := SUBSTR(SFILL, 1, 14 - WEEKLEN) || MARRAY;
    END IF;
    SUBARRAY(1) := T_STUD;
    SUBARRAY(2) := T_BASE;
    SUBARRAY(3) := PDATE;
    FOR i IN 4 .. 17 LOOP
         SUBARRAY(i) := SUBSTR(MARRAY, i - 3, 1);
    END LOOP;
    PIPE ROW(TMP_ATT_DATA_OBJ(SUBARRAY(1),SUBARRAY(2),SUBARRAY(3),SUBARRAY(4),
         SUBARRAY(5),SUBARRAY(6),SUBARRAY(7),SUBARRAY(8),SUBARRAY(9),
         SUBARRAY(10),SUBARRAY(11),SUBARRAY(12),SUBARRAY(13),SUBARRAY(14),
         SUBARRAY(15),SUBARRAY(16),SUBARRAY(17)));
    WHILE PDATE < EDATE LOOP
         PDATE := PDATE + 7;
         MARRAY := SUBSTR(T_MARKS, SLEN + 1, 14);
         WEEKLEN := LENGTH(MARRAY);
         IF WEEKLEN < 14 THEN
              MARRAY := MARRAY || SUBSTR(SFILL, 1, 14 - WEEKLEN);
         END IF;
         FOR i IN 4 .. 17 LOOP
              SUBARRAY(i) := SUBSTR(MARRAY, i - 3, 1);
         END LOOP;
         SUBARRAY(3) := PDATE;
         PIPE ROW(TMP_ATT_DATA_OBJ(SUBARRAY(1),SUBARRAY(2),SUBARRAY(3),SUBARRAY(4),
         SUBARRAY(5),SUBARRAY(6),SUBARRAY(7),SUBARRAY(8),SUBARRAY(9),
         SUBARRAY(10),SUBARRAY(11),SUBARRAY(12),SUBARRAY(13),SUBARRAY(14),
         SUBARRAY(15),SUBARRAY(16),SUBARRAY(17)));
         PDATE := PDATE + 7;
         SLEN := SLEN + 14;
    END LOOP;
    END LOOP;
    END ENUM_MARKS;
    END PARSE_ATTENDANCE;
    (This is then called like SELECT * FROM
    TABLE(
    PARSE_ATTENDANCE.ENUM_MARKS(
    'SELECT STUD_ID, BASE_ID, START_DATE, MARKS
    FROM DX_XML_ATTENDANCE WHERE STUD_ID = 107777
    AND BASE_ID = 94'))
    I get the same error, around this section near the bottom :
         PDATE := PDATE + 7;
         SLEN := SLEN + 14;
    Can any one help?

    Here is an example. you are missing an return statement.
    SQL> create or replace type varchar2_table is table of varchar2(10) ;
      2  /
    Type created.
    SQL> show errors
    No errors.
    SQL> create or replace function get_data return varchar2_table pipelined is
      2  begin
      3      pipe row(('Test')) ;
      4  end ;
      5  /
    Function created.
    SQL> show errors
    No errors.
    SQL> select * from table(get_data) ;
    ERROR:
    ORA-06503: PL/SQL: Function returned without value
    ORA-06512: at "KKISHORE.GET_DATA", line 3
    no rows selected
    SQL> create or replace function get_data return varchar2_table pipelined is
      2  begin
      3      pipe row(('Test')) ;
    4 return ;
      5  end ;
      6  /
    Function created.
    SQL> show errors
    No errors.
    SQL> select * from table(get_data) ;
    COLUMN_VAL
    Test
    SQL>

  • Export failed with error ORA-04063: package body "SYS.DBMS_CUBE_EXP" has er

    Hi
    We are having 11.2.0.2 database on Linux 5. From last two days the export backup is getting failed with the below error.
    . exporting post-schema procedural objects and actions
    EXP-00008: ORACLE error 4063 encountered
    ORA-04063: package body "SYS.DBMS_CUBE_EXP" has errors
    ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_CUBE_EXP"
    ORA-06512: at line 1
    EXP-00083: The previous problem occurred when calling SYS.DBMS_CUBE_EXP.schema_i
    . exporting statistics
    Export terminated successfully with warnings.
    When I checked the status of this package DBMS_CUBE_EXP its showing invalid. I tried to compile the body of the package. But it was throwing below error.
    SQL> show errors
    Errors for PACKAGE BODY DBMS_CUBE_EXP:
    LINE/COL ERROR
    53/5 PL/SQL: SQL Statement ignored
    54/10 PL/SQL: ORA-04045: errors during recompilation/revalidation of
    SYS.DBA_XDS_INSTANCE_SETS
    ORA-01422: exact fetch returns more than requested number of rows
    I tried to query this view or describe the above view. But it was throwing the same error.
    ERROR at line 1:
    ORA-04045: errors during recompilation/revalidation of
    SYS.DBA_XDS_INSTANCE_SETS
    ORA-01422: exact fetch returns more than requested number of rows
    I couldnt get a proper solution from google regarding this view or to compile the above package.
    Now we are stcuked without the backups. It would be great if you guys look into it.
    Thanks
    SHIYAS M

    Yes I tried with take the export with SYS user. This time it thrown the error in the first and last too same as before.
    About to export specified users ...
    . exporting pre-schema procedural objects and actions
    EXP-00008: ORACLE error 4063 encountered
    ORA-04063: package body "SYS.DBMS_CUBE_EXP" has errors
    ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_CUBE_EXP"
    ORA-06512: at line 1
    EXP-00083: The previous problem occurred when calling SYS.DBMS_CUBE_EXP.schema_info_exp
    . exporting foreign function library names for user U_20102
    . exporting PUBLIC type synonyms
    . exporting private type synonyms
    . exporting object type definitions for user U_20102
    About to export U_20102's objects ...
    I ran below scripts as per u provided the link
    @$ORACLE_HOME/rdbms/admin/catdpb.sql and utlrp.sql
    Still it didnt get compiled.
    One more thing I tried running expdp. It totally got failed by throwing the similar error. It didnt even export the tables too.
    ===============================================================================
    Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
    ORA-39126: Worker unexpected fatal error in KUPW$WORKER.GET_TABLE_DATA_OBJECTS []
    ORA-31642: the following SQL statement fails:
    BEGIN "SYS"."DBMS_CUBE_EXP".SCHEMA_CALLOUT(:1,0,1,'11.02.00.00.00'); END;
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 86
    ORA-06512: at "SYS.DBMS_METADATA", line 1245
    ORA-04063: package body "SYS.DBMS_CUBE_EXP" has errors
    ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_CUBE_EXP"
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 86
    ORA-06512: at "SYS.KUPW$WORKER", line 8353
    ----- PL/SQL Call Stack -----
    object line object
    handle number name
    0x1a3257060 19208 package body SYS.KUPW$WORKER
    0x1a3257060 8385 package body SYS.KUPW$WORKER
    0x1a3257060 12748 package body SYS.KUPW$WORKER
    0x1a3257060 2546 package body SYS.KUPW$WORKER
    0x1a3257060 9054 package body SYS.KUPW$WORKER
    0x1a3257060 1688 package body SYS.KUPW$WORKER
    0x1a8bc1630 2 anonymous block
    Estimate in progress using BLOCKS method...
    Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
    ORA-39126: Worker unexpected fatal error in KUPW$WORKER.GET_TABLE_DATA_OBJECTS []
    ORA-31642: the following SQL statement fails:
    BEGIN "SYS"."DBMS_CUBE_EXP".SCHEMA_CALLOUT(:1,0,1,'11.02.00.00.00'); END;
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 86
    ORA-06512: at "SYS.DBMS_METADATA", line 1245
    ORA-04063: package body "SYS.DBMS_CUBE_EXP" has errors
    ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_CUBE_EXP"
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 86
    ORA-06512: at "SYS.KUPW$WORKER", line 8353
    ----- PL/SQL Call Stack -----
    object line object
    handle number name
    0x1a3257060 19208 package body SYS.KUPW$WORKER
    0x1a3257060 8385 package body SYS.KUPW$WORKER
    0x1a3257060 12748 package body SYS.KUPW$WORKER
    0x1a3257060 2546 package body SYS.KUPW$WORKER
    0x1a3257060 9054 package body SYS.KUPW$WORKER
    0x1a3257060 1688 package body SYS.KUPW$WORKER
    0x1a8bc1630 2 anonymous block
    Job "SYS"."SYS_EXPORT_SCHEMA_01" stopped due to fatal error at 17:58:34
    =========================================================================

  • Encryption of pl/sql package/procedures/function code

    Is it possible to make the code inside a package/procedure/function un readable to other users.
    As is some of the api package body code in portal ?
    thanks in anticipation.
    SD,

    PL/SQL Wrap Utilityhttp://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96624/c_wrap.htm#LNPLS016
    Note, however that you cannot revert back to original un-wrapped code from a code that has been wrapped. You would need access to the original source files to get the original source code.

  • Expdp with ORA-04063: package body "SYS.DBMS_CUBE_EXP" error

    Hi,
    I try to use expdp to export all tables from schema BAW, but hit the following error. Oracle version is 11.2.0.2, and the package body "SYS.DBMS_CUBE_EXP" is invalid. Any idea to fix it?
    Starting "BAW"."SYS_EXPORT_SCHEMA_01": baw/******** directory=DATA_PUMP_DIR met
    rics=yes schemas=baw dumpfile=baw.dmp
    Estimate in progress using BLOCKS method...
    Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
    ORA-39126: Worker unexpected fatal error in KUPW$WORKER.GET_TABLE_DATA_OBJECTS [
    ORA-31642: the following SQL statement fails:
    BEGIN "SYS"."DBMS_CUBE_EXP".SCHEMA_CALLOUT(:1,0,1,'11.02.00.02.00'); END;
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 86
    ORA-06512: at "SYS.DBMS_METADATA", line 1245
    ORA-04063: package body "SYS.DBMS_CUBE_EXP" has errors
    ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_CUBE_EXP"
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 86
    ORA-06512: at "SYS.KUPW$WORKER", line 8353
    ----- PL/SQL Call Stack -----
    object line object
    handle number name
    7000004c9656fe0 19208 package body SYS.KUPW$WORKER
    7000004c9656fe0 8385 package body SYS.KUPW$WORKER
    7000004c9656fe0 12748 package body SYS.KUPW$WORKER
    7000004c9656fe0 2546 package body SYS.KUPW$WORKER
    7000004c9656fe0 9054 package body SYS.KUPW$WORKER
    7000004c9656fe0 1688 package body SYS.KUPW$WORKER
    7000004c9659720 2 anonymous block
    object line object
    handle number name
    7000004c9656fe0 19208 package body SYS.KUPW$WORKER
    7000004c9656fe0 8385 package body SYS.KUPW$WORKER
    7000004c9656fe0 12748 package body SYS.KUPW$WORKER
    7000004c9656fe0 2546 package body SYS.KUPW$WORKER
    7000004c9656fe0 9054 package body SYS.KUPW$WORKER
    7000004c9656fe0 1688 package body SYS.KUPW$WORKER
    7000004c9659720 2 anonymous block
    Estimate in progress using BLOCKS method...
    Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
    ORA-39126: Worker unexpected fatal error in KUPW$WORKER.GET_TABLE_DATA_OBJECTS [
    ORA-31642: the following SQL statement fails:
    BEGIN "SYS"."DBMS_CUBE_EXP".SCHEMA_CALLOUT(:1,0,1,'11.02.00.02.00'); END;
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 86
    ORA-06512: at "SYS.DBMS_METADATA", line 1245
    ORA-04063: package body "SYS.DBMS_CUBE_EXP" has errors
    ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_CUBE_EXP"
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 86
    ORA-06512: at "SYS.KUPW$WORKER", line 8353
    ----- PL/SQL Call Stack -----
    object line object
    handle number name
    7000004c9656fe0 19208 package body SYS.KUPW$WORKER
    7000004c9656fe0 8385 package body SYS.KUPW$WORKER
    7000004c9656fe0 12748 package body SYS.KUPW$WORKER
    7000004c9656fe0 2546 package body SYS.KUPW$WORKER
    7000004c9656fe0 9054 package body SYS.KUPW$WORKER
    7000004c9656fe0 1688 package body SYS.KUPW$WORKER
    7000004c9659720 2 anonymous block
    Job "BAW"."SYS_EXPORT_SCHEMA_01" stopped due to fatal error at 16:07:26
    e

    The simple solution to this problem is, and its working perfectly with me on 11gR2 resolving the subject error.
    To avoid this problem, perform relational exports excluding OLAP's Analytic Workspaces.
    1) Remove workspace package from export:
    a. Connect sys/password as sysdba
    b. create table sys.exppkgact$_backup as select * from sys.exppkgact$;
    (Backup package before deleting it)
    c. delete from sys.exppkgact$ where package = 'DBMS_CUBE_EXP' and schema= 'SYS';
    d. commit;
    4) Run the export.

  • Error ORA-06502 When using function REPLACE in PL/SQL

    Hi,
    I have a PL/SQL procedure which gives error 'Error ORA-06502 When using function REPLACE in PL/SQL' when the string value is quite long (I noticed this with a string 9K in length)
    variable var_a is of type CLOB
    and the assignment statement where it gives the error is
    var_a := REPLACE(var_a, '^', ''',''');
    Can anyone please help!
    Thanks

    Even then that shouldn't do so:
    SQL> select overload, position, argument_name, data_type, in_out
      2  from all_arguments
      3  where package_name = 'STANDARD'
      4  and object_name = 'LPAD'
      5  order by 1,2
      6  /
    OVERLOAD   POSITION ARGUMENT_NAME                  DATA_TYPE                      IN_OUT
    1                 0                                VARCHAR2                       OUT
    1                 1 STR1                           VARCHAR2                       IN
    1                 2 LEN                            BINARY_INTEGER                 IN
    1                 3 PAD                            VARCHAR2                       IN
    2                 0                                VARCHAR2                       OUT
    2                 1 STR1                           VARCHAR2                       IN
    2                 2 LEN                            BINARY_INTEGER                 IN
    3                 0                                CLOB                           OUT
    3                 1 STR1                           CLOB                           IN
    3                 2 LEN                            NUMBER                         IN
    3                 3 PAD                            CLOB                           IN
    4                 0                                CLOB                           OUT
    4                 1 STR1                           CLOB                           IN
    4                 2 LEN                            NUMBER                         INI wonder what happened?

  • Package/procedure/function calls done with in a package

    Hi Experts,
    Can anybody suggest me the table/ a query to find the package/procedure/function calls (with in the same db or remote) done with in a package.
    It would be great if we can provide a tree like structure of the objects being called/used.
    btw.. dba_dependencies will provide me the info about the global procedures only not the local ones used with in the package body.
    Appreciate your time..
    Thanks
    Manju

    manjukn wrote:
    Hi Experts,
    Can anybody suggest me the table/ a query to find the package/procedure/function calls (with in the same db or remote) done with in a package.
    It would be great if we can provide a tree like structure of the objects being called/used.
    btw.. dba_dependencies will provide me the info about the global procedures only not the local ones used with in the package body.
    Appreciate your time..What database version do you have?
    11g I think provides some sort of fine grained dependency information which can detail packages, but prior to 11g you can only get dependencies on the database objects themselves of which functions/procedures within a package are not, as the package itself is the object.
    I don't think there's any easy way to find out from any tables or views and I think third party tools would have to parse the code to determine such things themselves, so that may be one of your only options.

  • How can I create packages procedure & function in user-define Library

    hi.
    i am already created packages procedure & function in database and use so on.
    now i would like to create these in library file.
    please anyone give me example of any procedure or function to store in library.
    thanks
    Ali

    <FONT FACE="Arial" size=2 color="2D0000">> please send me one simple example for create library
    then create any function in library.
    2nd is any package can be create in library or not??
    Thanks S.K
    AliHave you checked the link?
    A simple example is provided.
    I think What I understood from your post is that, you want to put function/ Proc and want to call that as Library ..
    Which is not  possible.
    For exampel an external routine is a third-generation language procedure stored in a
    dynamic link library (DLL), registered with PL/SQL, and called by the DBA to perform
    special-purpose processing.
    In Unix a dynamic link library is known as a shared object (so).
    At run time, PL/SQL loads the library dynamically, then calls the routine as if it were a
    PL/SQL subprogram. To safeguard our database, the routine runs in a separate address
    space, but it participates fully in the current transaction. Furthermore, the routine can
    make a call back to the database to perform SQL operations.
    To identify a DLL we have to use CREATE LIBRARY command.
    The CREATE LIBRARY command is used to create a schema object, library, which
    represents an operating-system shared library, from which SQL and PL/SQL can call
    external third-generation-language (3GL) functions and procedures.
    Learn something more on External Procedures
    -SK
    </FONT>

  • Fitting Package (Fit Function) - Please help!

    Hey I'm a noob and I want someone to explain or give me links or just any info regarding:
    Fitting Package (Fit Function) - If anyone knows anything about thise please tell me!
    Thanks in advance!

    Hello,
    I am not sure what Fitting Package you are referring to.  In general, if you are looking for resources to study curve fitting (which I presume is the functionality underlying the Fitting Package you mention), you may want to look at the following site:
    http://mathworld.wolfram.com/search/index.cgi?num=&q=curve+fitting
    Google is bound to return some useful results by searching relevant keywords as well!
    I hope this helps and best of luck!
    Best Regards,
    JLS
    Best,
    JLS
    Sixclear

  • Content Exchange -- Package Upload function not work.

    I try to upload a zip file from my computer into the repository by using package upload function in portal. The file size export by ice is 1.09 GB is not work it has error The page cannot be displayed but small file size is work. How can i do?

    Hi folks,
    same problem here while trying to transport a large KM package (28GB à 2GB volumes) from EP 7.0 to EP 7.31 SP6. The package upload iView in my target system EP 7.31 crashs with "This page cannot be displayed". I cant find any appropriate exceptions in NWA.
    I guess ICE transport isnt an option at all for transporting KM content from 7.0 to 7.31 (http://scn.sap.com/thread/3249426), but i tryed it also, without any success, same behaviour. As i stringent need all metadata (ACL's for example), WebDAV is probably also not reasonable, as far i know you cant transport KM metadata with this method.
    Unfortunately Detlev`s link dont works, so i cant get any clues from there. I also tryed to split one KMC archive in volumes à 100MB, but it dont works, because the following volumes are not uploaded and i cant see any KM packages at all.
    So, i know i can create smaller KM packages manually, but regarding the data amount its extremly time-consuming. I cant imagine our colleagues from SAP AG are regarding the case of a KM import of large files as realistic, but dont give us a working option to import them. Does anybody have any idea how to handle this issue? Thank you in advance,
    best regards

  • Convert package to function..

    can anyone convert this package to function so that we can use it in sql command..
    {color:#993300}create or replace package metaphone
    is
    function generate(s varchar2) return varchar2;
    end metaphone;
    show errors;{color}
    {color:#993300}create or replace package body metaphone
    is
    type rule_rec is record
    f_off integer,
    f_match varchar2(10),
    f_result varchar2(10)
    type rule_tab is table of rule_rec index by binary_integer;
    g_rules rule_tab;
    g_vowels constant varchar2(5) := 'AEIOU';
    function cmp_rule
    p_rule rule_rec,
    p_off pls_integer,
    p_str varchar2
    ) return boolean;
    function generate(s varchar2) return varchar2
    is
    l_s varchar2(32767);
    l_r varchar2(32767);
    begin
    -- get rid of non-alpha characters
    for i in 1..length(s) loop
    if upper(substr(s,i,1)) between 'A' and 'Z' then
    l_s := l_s || upper(substr(s,i,1));
    end if;
    end loop;
    if l_s is null then
    return null;
    end if;
    -- clean up the word a bit
    if l_s like 'AE%' or l_s like 'GN%' or l_s like 'KN%'
    or l_s like 'PN%' or l_s like 'WR%'
    then
    l_s := substr(l_s,2); -- drop first letter
    elsif l_s like 'X%' then
    l_s := 'S' || substr(l_s,2); -- change to S
    elsif l_s like 'WH%' then
    l_s := 'W' || substr(l_s,2); -- change to W
    end if;
    for i in 1..length(l_s) loop
    if i &gt; 1 and substr(l_s,i-1,1) = substr(l_s,i,1)
    and substr(l_s,i,1) != 'C'
    then
    -- drop the second of doubled letter except C
    null;
    elsif instr(g_vowels,substr(l_s,i,1)) &gt; 0 then
    -- ignore all except initial vowels
    if i = 1 then
    l_r := l_r || substr(l_s,i,1);
    end if;
    elsif substr(l_s,i,2) = 'GH'
    and i &lt; length(l_s)-2
    and instr(g_vowels,substr(l_s,i+1,1)) = 0
    then
    -- a difficult rule:
    -- silent if in "gh" and not at end or before a vowel
    null;
    else
    -- scan for word patterns
    for r in 1..g_rules.count loop
    if cmp_rule(g_rules(r),i,l_s) then
    l_r := l_r || g_rules(r).f_result;
    exit;
    end if;
    end loop;
    end if;
    end loop;
    return l_r;
    end generate;
    procedure add_rule(p_off integer,p_match varchar2,p_result varchar2)
    is
    l_rule_rec rule_rec;
    begin
    l_rule_rec.f_off := p_off;
    l_rule_rec.f_match := p_match;
    l_rule_rec.f_result := p_result;
    g_rules(g_rules.count+1) := l_rule_rec;
    end add_rule;
    function cmp_rule
    p_rule rule_rec,
    p_off pls_integer,
    p_str varchar2
    ) return Boolean
    is
    ch1 char;
    ch2 char;
    begin
    if p_rule.f_match like '%c%' or p_rule.f_match like '%v%' then
    for i in 1..length(p_rule.f_match) loop
    ch1 := substr(p_rule.f_match,i,1);
    ch2 := substr(p_str,p_off+p_rule.f_off+i,1);
    if ch2 is null then
    return false;
    end if;
    if ch1 = 'v' then
    if instr(g_vowels,ch2) = 0 then
    return false;
    end if;
    elsif ch1 = 'c' then
    if instr(g_vowels,ch2) != 0 then
    return false;
    end if;
    elsif ch1 != ch2 then
    return false;
    end if;
    end loop;
    return true;
    end if;
    if p_off &lt;= -p_rule.f_off then
    return false;
    end if;
    return p_rule.f_match
    = substr(p_str,p_off+p_rule.f_off,length(p_rule.f_match));
    end cmp_rule;
    begin
    -- initialize the rules table
    -- order is important
    add_rule(-1,'MB',null);
    add_rule(0,'B','B');
    add_rule(0,'CIA','X');
    add_rule(0,'CH','X');
    add_rule(0,'CI','S');
    add_rule(0,'CE','S');
    add_rule(0,'CY','S');
    add_rule(0,'C','K');
    add_rule(0,'DGE','J');
    add_rule(0,'DGY','J');
    add_rule(0,'DGI','J');
    add_rule(0,'D','T');
    add_rule(0,'F','F');
    add_rule(0,'GN',null);
    add_rule(0,'GNED',null);
    add_rule(0,'GI','J');
    add_rule(0,'GE','J');
    add_rule(0,'GY','J');
    add_rule(0,'G','K');
    add_rule(-1,'vHc',null);
    add_rule(-1,'CH',null);
    add_rule(-1,'PH',null);
    add_rule(-1,'SH',null);
    add_rule(-1,'TH',null);
    add_rule(0,'H','H');
    add_rule(0,'J','J');
    add_rule(-1,'CK',null);
    add_rule(0,'K','K');
    add_rule(0,'L','L');
    add_rule(0,'M','M');
    add_rule(0,'N','N');
    add_rule(0,'PH','F');
    add_rule(0,'P','P');
    add_rule(0,'Q','K');
    add_rule(0,'R','R');
    add_rule(0,'SH','X');
    add_rule(0,'SIO','X');
    add_rule(0,'SIA','X');
    add_rule(0,'S','S');
    add_rule(0,'TIA','X');
    add_rule(0,'TIO','X');
    add_rule(0,'TH','0');
    add_rule(0,'TCH',null);
    add_rule(0,'T','T');
    add_rule(0,'V','F');
    add_rule(0,'Wv','W');
    add_rule(0,'W',null);
    add_rule(0,'X','KS');
    add_rule(0,'Yv','Y');
    add_rule(0,'Y',null);
    add_rule(0,'Z','S');
    end metaphone;
    show errors;{color}
    {color:#993300}source
    http://www.zdnetasia.com/builder/architect/db/0,39044553,39200579,00.htm
    Regards
    venkat...
    {color}

    Its already a function. Only thing is that its within a package. So you can just use it in SQL like this.
    SELECT package_name.function_name FROM dual;See below...
    SQL> create or replace package metaphone
      2  is
      3      function generate(s varchar2) return varchar2;
      4  end metaphone;
      5  /
    Package created.
    SQL> show errors;
    No errors.
    SQL>
    SQL> create or replace package body metaphone
      2  is
      3      type rule_rec is record
      4      (
      5          f_off       integer,
      6          f_match     varchar2(10),
      7          f_result    varchar2(10)
      8      );
      9      type rule_tab is table of rule_rec index by binary_integer;
    10      g_rules rule_tab;
    11      g_vowels constant varchar2(5) := 'AEIOU';
    12      --
    13      function cmp_rule
    14      (
    15          p_rule rule_rec,
    16          p_off pls_integer,
    17          p_str varchar2
    18      ) return boolean;
    19      --
    20      function generate(s varchar2) return varchar2
    21      is
    22          l_s varchar2(32767);
    23          l_r varchar2(32767);
    24      begin
    25          -- get rid of non-alpha characters
    26          for i in 1..length(s) loop
    27              if upper(substr(s,i,1)) between 'A' and 'Z' then
    28                  l_s := l_s || upper(substr(s,i,1));
    29              end if;
    30          end loop;
    31          if l_s is null then
    32              return null;
    33          end if;
    34          -- clean up the word a bit
    35          if l_s like 'AE%' or l_s like 'GN%' or l_s like 'KN%'
    36          or l_s like 'PN%' or l_s like 'WR%'
    37          then
    38              l_s := substr(l_s,2);           -- drop first letter
    39          elsif l_s like 'X%' then
    40              l_s := 'S' || substr(l_s,2);    -- change to S
    41          elsif l_s like 'WH%' then
    42              l_s := 'W' || substr(l_s,2);    -- change to W
    43          end if;
    44          for i in 1..length(l_s) loop
    45              if i > 1 and substr(l_s,i-1,1) = substr(l_s,i,1)
    46                  and substr(l_s,i,1) != 'C'
    47              then
    48                  -- drop the second of doubled letter except C
    49                  null;
    50              elsif instr(g_vowels,substr(l_s,i,1)) > 0 then
    51                  -- ignore all except initial vowels
    52              if i = 1 then
    53                  l_r := l_r || substr(l_s,i,1);
    54              end if;
    55              elsif substr(l_s,i,2) = 'GH'
    56                  and i < length(l_s)-2
    57                  and instr(g_vowels,substr(l_s,i+1,1)) = 0
    58              then
    59                  -- a difficult rule:
    60                  -- silent if in "gh" and not at end or before a vowel
    61                  null;
    62              else
    63                  -- scan for word patterns
    64                  for r in 1..g_rules.count loop
    65                      if cmp_rule(g_rules(r),i,l_s) then
    66                          l_r := l_r || g_rules(r).f_result;
    67                          exit;
    68                      end if;
    69                  end loop;
    70              end if;
    71          end loop;
    72          return l_r;
    73      end generate;
    74      --
    75      procedure add_rule(p_off integer,p_match varchar2,p_result varchar2)
    76      is
    77          l_rule_rec  rule_rec;
    78      begin
    79          l_rule_rec.f_off := p_off;
    80          l_rule_rec.f_match := p_match;
    81          l_rule_rec.f_result := p_result;
    82          g_rules(g_rules.count+1) := l_rule_rec;
    83      end add_rule;
    84      --
    85      function cmp_rule
    86      (
    87          p_rule rule_rec,
    88          p_off pls_integer,
    89          p_str varchar2
    90      ) return Boolean
    91      is
    92          ch1 char;
    93          ch2 char;
    94      begin
    95          if p_rule.f_match like '%c%' or p_rule.f_match like '%v%' then
    96              for i in 1..length(p_rule.f_match) loop
    97                  ch1 := substr(p_rule.f_match,i,1);
    98                  ch2 := substr(p_str,p_off+p_rule.f_off+i,1);
    99                  if ch2 is null then
    100                      return false;
    101                  end if;
    102                  if ch1 = 'v' then
    103                      if instr(g_vowels,ch2) = 0 then
    104                          return false;
    105                      end if;
    106                  elsif ch1 = 'c' then
    107                      if instr(g_vowels,ch2) != 0 then
    108                          return false;
    109                      end if;
    110                  elsif ch1 != ch2 then
    111                      return false;
    112                  end if;
    113              end loop;
    114              return true;
    115          end if;
    116          if p_off <= -p_rule.f_off then
    117              return false;
    118          end if;
    119          return p_rule.f_match
    120                  = substr(p_str,p_off+p_rule.f_off,length(p_rule.f_match));
    121      end cmp_rule;
    122  begin
    123      -- initialize the rules table
    124      -- order is important
    125      add_rule(-1,'MB',null);
    126      add_rule(0,'B','B');
    127      add_rule(0,'CIA','X');
    128      add_rule(0,'CH','X');
    129      add_rule(0,'CI','S');
    130      add_rule(0,'CE','S');
    131      add_rule(0,'CY','S');
    132      add_rule(0,'C','K');
    133      add_rule(0,'DGE','J');
    134      add_rule(0,'DGY','J');
    135      add_rule(0,'DGI','J');
    136      add_rule(0,'D','T');
    137      add_rule(0,'F','F');
    138      add_rule(0,'GN',null);
    139      add_rule(0,'GNED',null);
    140      add_rule(0,'GI','J');
    141      add_rule(0,'GE','J');
    142      add_rule(0,'GY','J');
    143      add_rule(0,'G','K');
    144      add_rule(-1,'vHc',null);
    145      add_rule(-1,'CH',null);
    146      add_rule(-1,'PH',null);
    147      add_rule(-1,'SH',null);
    148      add_rule(-1,'TH',null);
    149      add_rule(0,'H','H');
    150      add_rule(0,'J','J');
    151      add_rule(-1,'CK',null);
    152      add_rule(0,'K','K');
    153      add_rule(0,'L','L');
    154      add_rule(0,'M','M');
    155      add_rule(0,'N','N');
    156      add_rule(0,'PH','F');
    157      add_rule(0,'P','P');
    158      add_rule(0,'Q','K');
    159      add_rule(0,'R','R');
    160      add_rule(0,'SH','X');
    161      add_rule(0,'SIO','X');
    162      add_rule(0,'SIA','X');
    163      add_rule(0,'S','S');
    164      add_rule(0,'TIA','X');
    165      add_rule(0,'TIO','X');
    166      add_rule(0,'TH','0');
    167      add_rule(0,'TCH',null);
    168      add_rule(0,'T','T');
    169      add_rule(0,'V','F');
    170      add_rule(0,'Wv','W');
    171      add_rule(0,'W',null);
    172      add_rule(0,'X','KS');
    173      add_rule(0,'Yv','Y');
    174      add_rule(0,'Y',null);
    175      add_rule(0,'Z','S');
    176  end metaphone;
    177  /
    Package body created.
    SQL> select metaphone.generate('stephens') from dual
      2  /
    METAPHONE.GENERATE('STEPHENS')
    STFNSEdited by: Karthick_Arp on Jan 14, 2009 11:29 PM

  • Package,procedure,functions

    Iam having one requirement. i.e. i want know which package,procedure,function is calling....?
    for ex:
    procedure a
    -- p1
    call_procedure_b;
    -- p2
    call_procedure_c;
    at p1,p2 i want to know which is being called?
    is there any possibiliyt like that?
    can anybody help me on this?

    user632359 wrote:
    can u please provide me with an example?Here's some code someone posted a while back (can't remember who), but I saved it for a rainy day...
    create or replace procedure who_called_me( owner      out varchar2,
                             name       out varchar2,
                             lineno     out number,
                             caller_t   out varchar2 )
    as
        call_stack  varchar2(4096) default dbms_utility.format_call_stack;
        n           number;
        found_stack BOOLEAN default FALSE;
        line        varchar2(255);
        cnt         number := 0;
    begin
        loop
            n := instr( call_stack, chr(10) );
            exit when ( cnt = 3 or n is NULL or n = 0 );
            line := substr( call_stack, 1, n-1 );
            call_stack := substr( call_stack, n+1 );
            if ( NOT found_stack ) then
                if ( line like '%handle%number%name%' ) then
                    found_stack := TRUE;
                end if;
            else
                cnt := cnt + 1;
                -- cnt = 1 is ME
                -- cnt = 2 is MY Caller
                -- cnt = 3 is Their Caller
                if ( cnt = 3 ) then
                    lineno := to_number(substr( line, 13, 6 ));
                    line   := substr( line, 21 );
                    if ( line like 'pr%' ) then
                        n := length( 'procedure ' );
                    elsif ( line like 'fun%' ) then
                        n := length( 'function ' );
                    elsif ( line like 'package body%' ) then
                        n := length( 'package body ' );
                    elsif ( line like 'pack%' ) then
                        n := length( 'package ' );
                    elsif ( line like 'anonymous%' ) then
                        n := length( 'anonymous block ' );
                    else
                        n := null;
                    end if;
                    if ( n is not null ) then
                       caller_t := ltrim(rtrim(upper(substr( line, 1, n-1 ))));
                    else
                       caller_t := 'TRIGGER';
                    end if;
                    line := substr( line, nvl(n,1) );
                    n := instr( line, '.' );
                    owner := ltrim(rtrim(substr( line, 1, n-1 )));
                    name  := ltrim(rtrim(substr( line, n+1 )));
                end if;
            end if;
        end loop;
    end;
    create or replace function who_am_i return varchar2
    is
        l_owner        varchar2(30);
        l_name      varchar2(30);
        l_lineno    number;
        l_type      varchar2(30);
    begin
       who_called_me( l_owner, l_name, l_lineno, l_type );
       return l_owner || '.' || l_name;
    end;
    /

Maybe you are looking for

  • Why is text on Google lists smaller than it is in my Internet Explorer browser?

    I have already solved this problem myself, but don't know how to get rid of my question! In Settings, I opted under Options for a certain size of type, and that solved my problem, and I learned that Control and two plus characters will increase the s

  • Flash video performance on Vista poor

    I have windows vista service pack 2 (32 bit) installed on a laptop with the following specs: Intel Celeron M 520 1.6Ghz with 1GB of Ram I am using Internet Explorer 9 and have Flash player version 11.7.700.169 installed. The youtube video's (which us

  • Full Page Background in Internet Explorer 8 and Below

    I am currently trying to achieve a full page background image using the method found here: http://cookbooks.adobe.com/post_Scale_Background_image_to_browser_size-17590.html Everything works fine in FF, Chrome, and Safari, but when I preview the page

  • Issue with trigger, multi-table insert and error logging

    I find that if I try to perform a multi-table insert with error logging on a table that has a trigger, then some constraint violations result in an exception being raised as well as logged: <pre> SQL> select * from v$version; BANNER Oracle Database 1

  • BBPSTART  giving ERROR URL in Test Services in SE80

    Hi All, Iam getting following error , I have all checked all basic settings ICM is running,FQDN is maintained, site INTERNAL is active, Services SYSTEM,SHUFFLER,WEBGUI published. Service cannot be reached What has happened? URL http:/e.g Error URL//