INVALID 상태의 OBJECT를 RECOMPILE하는 PROCEDURE

제품 : ORACLE SERVER
작성날짜 : 2002-04-18
INVALID 상태의 OBJECT를 RECOMPILE하는 PROCEDURE
===============================================
Purpose
Import를 하거나 DDL 작업을 하고 나서 procedure 나 package등의
pl/sql object가 invalid로 빠지는 경우가 있다. 이런 object들을
찾아서 recompile해주는 procedure를 소개한다.
Explanation
이 procedure는 User 내의 모든 Invalid 상태의 procedure, function,
package 등의 Object 들을 Recompile한다. Compile에러가 발생하는 경우
dbms_output package를 이용하여 화면에 display해 주게 되므로 실행하기
전에 set serveroutput on 을 반드시 실행한다.
Invalid된 object가 많은 경우라면 compile에러의 확인을 위해 spool을
받는 것이 좋다.
CREATE OR REPLACE PROCEDURE RecompileInvalid IS
CURSOR getlist IS SELECT object_type, object_name FROM
user_objects WHERE status = 'INVALID' AND
object_type IN ('PROCEDURE', 'FUNCTION', 'PACKAGE',
'PACKAGE BODY', 'TRIGGER' );
schemaname VARCHAR2(100);
CURSOR geterr ( objname VARCHAR2, objtype VARCHAR2 ) IS
SELECT text, line, position FROM user_errors WHERE
name = objname AND type = objtype;
BEGIN
SELECT username INTO schemaname FROM user_users;
FOR getlistrec IN getlist LOOP
dbms_output.put_line( 'attempting compile on ' ||
getlistrec.object_name );
dbms_ddl.alter_compile( getlistrec.object_type,
schemaname, getlistrec.object_name );
END LOOP;
FOR getlistrec IN getlist LOOP
dbms_output.put_line( '---ERROR---' );
dbms_output.put_line( 'compile failed on ' ||
getlistrec.object_name );
FOR geterrrec IN geterr( getlistrec.object_name,
getlistrec.object_type ) LOOP
dbms_output.put_line( 'line: ' || geterrrec.line ||
' col: ' || geterrrec.position );
dbms_output.put_line( substr( geterrrec.text, 1, 100 ));
END LOOP;
END LOOP;
END;
Example
SQL> spool Compile.log
SQL> set serveroutput on
SQL> exec recompileinvalid;
attempting compile on CRYPTIT
attempting compile on CRYPTIT
attempting compile on DECRYPT
attempting compile on ENCRYPT
attempting compile on SYNC_IM_INDEX
PL/SQL procedure successfully completed.
SQL> spool off

우연의 일치인지 저도 어제 rac 기술지원을 나왔는데..
통계정보를 수집하려고하니 dbms_stats가 invalid되어 있더군요.
compile 명령을 하려다가 다른 패키지도 invalid되어있기도해서
utlrp.sql을 수행했습니다.
물론 백업 후 restart한 후에 세션 모두 클리어시키고 수행했습니다.
그런데 한번 해서 안되는 경우도 있으니 invalid object의 결과를 보고
utlrp.sql을 여러번 더 수행하면 해결됩니다.
## invalidobj.sql
doc
invalid 된 object에 대한 출력
col owner format a20
col object_name format a30
select owner, object_name, OBJECT_TYPE,CREATED,LAST_DDL_TIME, STATUS
from dba_objects where status<>'VALID';
글 수정:
민천사 (민연홍)
그런데 중요한 것은.. 이것이 open상태에서 수행되더라도
오라클에서는 그냥 수행해도 문제없다고 하더라도..
제 개인적인 의견으로는 서비스 중에 수행해서는 절대 안된다고
생각합니다. 서비스에 어떠한 영향이 갈지도 모르니까요. 문제가
발생하면 그건 이 작업을 수행한 DBA탓 이겠죠. 장애보고서 써야하고
골치가 아픕니다.
저같은 경우에는 백업을 2copy를 하는데 미디어(테이프장치)를
서로 다른 미디어를 써서 2copy를 해야 작업 시작하겠다고 했고
그렇게 했습니다. 또한 세션을 모두 클리어시킨 후에 작업했구요.
장애에 대한 강박관념이라고 할지 모르겠지만 지금까지 본 봐로는
이렇게 꼼꼼하게 챙기지 않고 장애가 난다면 업계에 오래에 머무르기
힘들 것 같다는 생각이 들더군요..~
제가 장애에 너무 민감해서 말씀드리는 것이지 충고를 하는 것은 아닙니다.
오해가 없으시길 바랍니다.

Similar Messages

  • Need shell Script for Invalid object

    Hi All,
    Can anyone post me a script for checking the invalid objects in 10g/11g database.
    The should should check for invalid objects,recompile and sent the email .

    I could think fo something like below(And applicable to multiple SID's running on the server) and i tested it it works(bash shell script)
    Assumptions:
    You have environmental file to set ORACLE_HOME ORACLE_SID
    say in this example
    /oracle/env
    ls -ltr
    env_ORCL.sh
    env_TEST.sh
    env_HR.sh
    You also have uuencode rpm installed to use along with mailx command(or else get it installed not big deal). uuencode is required
    to send as mail attachment
    1)I have kept SID list in file (/oracle/INVALID directory for eg)
    cat SID.lst
    ORCL
    TEST
    HR
    If you have lot of SID's you can populate the file using ( ps -ef|grep -i pmon | grep -v grep | awk '{print$9}' | sed 's/ora_pmon_//g' > SID.lst)
    2) Here are the list of SQL's(/oracle/INVALID directory
    cat invalid_pre.sql (For listing invalid objects per instance)
    set echo off
    set heading off
    set time off
    set timing off
    spool invalid.log append
    break on instance_name
    select instance_name , a.*
    from (select owner,count(*) from dba_objects where status='INVALID' group by owner) a, v$instance;
    spool off
    exit;
    cat invalid_compile.sql--to recompile invalid objects
    set echo off
    set termout off
    set feedback off
    @?/rdbms/admin/utlrp.sql 4; (Note you change degree 4 or 8 accordingly)
    exit;
    cat invalid_post.sql--to list post recompilation
    set echo off
    set heading off
    set time off
    set timing off
    spool invalid_post.log append
    break on instance_name
    select instance_name , a.*
    from (select owner,count(*) from dba_objects where status='INVALID' group by owner) a, v$instance;
    spool off
    exit;
    3)here is the shell script
    cat invalid.sh
    for i in `cat SID11g.lst`
    do
    cd /oracle/env/
    source env_$i.sh
    cd /oracle/INVALID
    sqlplus "/as sysdba" @invalid_pre.sql
    sqlplus "/as sysdba" @invalid_compile.sql
    sqlplus "/as sysdba" @invalid_post.sql
    done
    uuencode invalid.log invalid.log | mailx -s "Invalid" <your mail id>
    uuencode invalid_post.log invalid_post.log | mailx -s "Invalid" <your mail id>
    4) Finally run the shell script, hopefully you should receive email :-)
    I have tested it on bash
    ./invalid.sh
    Once tested you can schedule it in cron
    Edited by: vreddy on Jul 19, 2012 9:57 AM

  • Updating INVALID status of objects in procedure

    Hi guys.
    I'm trying to create a procedure to update/recompile all invalid objects.
    I am having a few issues with the syntax, and was wondering if any of you have done anything like thsi before. I obviously have not. :)
    Here's teh code:
    CREATE OR REPLACE PROCEDURE recompile_sp
    IS
    CURSOR recompile_cur
      IS
       SELECT object_name, status
       FROM user_objects
       WHERE STATUS='INVALID';
    BEGIN
    FOR rec_cur IN recompile_cur LOOP
      ALTER rec_cur.object_name COMPILE;
    END LOOP;
    END;
    /

    I know your way makes way more sense, but the
    assignment (yes, I'm in school) is asking for a
    procedure to update teh invalid objects, which is why
    I was looking to do it that way in the first place.Fair enough :-)
    The correct way would be, as stated by others:
    begin
       dbms_utility.compile_schema(<schema>);
    end;Doing it it like in your procedure, you should probably do something like this:
    (NOT recommended, NOT tested)
    CREATE OR REPLACE PROCEDURE recompile_sp
    IS
       CURSOR recompile_cur
       IS
          SELECT object_name, object_type, status
            FROM user_objects
           WHERE status = 'INVALID';
       PROCEDURE exe(rec IN recompile_cur%ROWTYPE)
       IS
       BEGIN
          EXECUTE IMMEDIATE    'ALTER '
                            || rec.object_type
                            || ' '
                            || rec.object_name
                            || ' COMPILE';
       EXCEPTION
          WHEN OTHERS
          THEN
             dbms_output.put_line(sqlerrm);
       END exe;
    BEGIN
       FOR rec_cur IN recompile_cur
       LOOP
          BEGIN
             exe(rec_cur);
          END;
       END LOOP;
    END recompile_sp;
    /Regards
    Peter

  • CURSOR to recompile all INVALID objects

    Ok, I know I'm using the atler-compile pre-defined trigger here, and I'm cool with that.
    I'm creating an anonymous block to recompile all INVALID objects. I've come up with a basic CURSOR to pull all INVALID objects into the cursor, and then using the alter_compile trigger to recomipile them.
    However, I can't figure out how to call them all into the trigger...One of the inputs for the alter_compile trigger is the name of the object...hwo can I get around that?
    DECLARE
    CURSOR compile_cur
      IS
       SELECT object_name, status
        FROM user_objects
         WHERE status='INVALID';
    BEGIN
    FOR rec_cur IN compile_cur LOOP
      DBMS_DDL.ALTER_COMPILE('PROCEDURE', 'SYSTEM','BB_JOBTEST');
    END LOOP;
    END;
    /

    You can issue a single statement to compile all triggers, procedures, packages, functions in the schema.
    SQL> EXEC DBMS_UTILITY.compile_schema(schema => 'Schema_Name');
    This will compile all the objects regardless of it's current status.
    Shailender Mehta

  • Invalid Object error in Stored Procedure

    
    Royal Thomas

    It was a bit of a puzzler, but here is a repro that demonstrates Thomas's problem:
    CREATE USER svante WITHOUT LOGIN WITH DEFAULT_SCHEMA = guest
    ALTER ROLE db_owner ADD MEMBER svante
    go
    EXECUTE AS USER = 'svante'
    go
    CREATE PROCEDURE dbo.testis AS
    SELECT @@procid AS beata INTO sture
    SELECT * FROM sture
    go
    EXEC testis  -- Invalid object name 'sture'.
    go
    REVERT
    go
    EXEC testis -- Succede
    go
    DROP USER svante
    DROP TABLE guest.sture 
    DROP TABLE sture
    DROP PROCEDURE testis
    What is happening is this: In the statement
       SELECT @@procid AS beata INTO sture
    the table is created in the default schema of the current user, not in the default schema of the procedure owner (which is dbo, since the procedures was created in dbo). This was certainly unexpected, at least for me.
    But in
      SELECT * FROM sture
    the regular rules, and here sture resolves to dbo.sture, not guest.sture.
    Thomas should make sure that he uses dbo.xxxx in all his SELECT INTO statements.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Invalid Object when Calling Stored Procedure from JDBC Adapter

    JDBC Outbound adapter in XI 2.0 connected to SQL Server.  I've coded my mapping to format the XSL mapping properly but the Adapter appears to not be able to find the Stored Procedure.  Error message returned is "Invalid Object spStoredProcedureName".
    Does anybody have any clue as to what I'm missing???

    I know this is trivial, but did you use the "full" name of the SP as <schema>.<procname>???
    HTH

  • Recompile all invalid objects in live database

    Hi Expers,
    Just need a clarification on recompiling all invalid objects in production database when the systems is busy.
    i thought of recompile all the invalid objects using utlrp.sql script in my production database since some of few synonyms were invalid after application patch script been implemented last weekeend.
    we have identifed the invalid objects now, i thought to run the utlrp.sql, what will be the consequences.
    Regards,
    Salai

    Hi Hemanth,
    I'd reserve utlrp.sql for upgrades, downgrades and patchsets. I do agree 101% with above point, I a not denying on that.
    If you really have a large number of invalid objects, you might choose to compile a few "selected" objects every hour instead of running a single-shot "compile all invalid objects". Rare but a possible requirement.I came across such requirement during early days of career during pushing product enhancement to production and we would have get to know the things and number of objects which would go invalid as we use to carry out testing on test databases.
    I agree completely utlrp.sql is suggested and should opt for.
    - Pavan Kumar N

  • How to recompile all invalid objects of APPS?

    Dear all:
    How to recompile all invalid objects of APPS? my environment is ORACLE 9.2.0.5 32bit.
    Regards
    Terry

    varun4dba wrote:
    hi Terry,
    did you tried adadmin?
    thanks.Do you mean:
    Compile/Reload Database Objects
    1. Compile APPS schema
    2. Compile menu information
    3. Recreate grants and synonyms for APPS schema
    4. Compile flexfield data in AOL tables
    5. Reload JAR files to database
    6. Return to Main Menu

  • Recompiling Invalid Object (Got Error)

    OWNER          OBJECT_NAME               OBJECT_TYPE STATUS
    AI     C_SMS_P               PACKAGE BODY     INVALID
    PUBLIC     KRN_MESSAGEDISPATCH          SYNONYM          INVALID
    QF     DOPPELTE_QOTS_BEREINIGEN     PROCEDURE     INVALID
    QF     INSTR_DPLR_ID               TRIGGER          INVALID
    QLEXP     EXPORT                    PACKAGE BODY     INVALID
    QLEXP     EXPORT_ORGANIZER               PACKAGE BODY     INVALID
    QLEXP     QLEXP_ABO                    PACKAGE BODY     INVALID
    (A) For above object first i have tried like:
    EXEC DBMS_DDL.alter_compile('PACKAGE BODY','AI','C_SMS_P');
    EXEC DBMS_DDL.alter_compile('PACKAGE BODY','BLOOMIMP','BLOOMBERG');
    EXEC DBMS_DDL.alter_compile('SYNONYM','PUBLIC','KRN_MESSAGEDISPATCH');
    EXEC DBMS_DDL.alter_compile('PROCEDURE','QF','DOPPELTE_QOTS_BEREINIGEN');
    EXEC DBMS_DDL.alter_compile('TRIGGER','QF','INSTR_DPLR_ID');
    EXEC DBMS_DDL.alter_compile('PACKAGE BODY','QLEXP','EXPORT');
    EXEC DBMS_DDL.alter_compile('PACKAGE BODY','QLEXP','EXPORT_ORGANIZER');
    EXEC DBMS_DDL.alter_compile('PACKAGE BODY','QLEXP','QLEXP_ABO');
    But its not working
    (B) then i have tried like this and got:
    SQL> ALTER PACKAGE AI.C_SMS_P COMPILE BODY;
    ALTER PACKAGE AI.C_SMS_P COMPILE BODY
    ORA-04052: error occurred when looking up remote object [email protected]
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01017: Benutzername/Kennwort ungültig; Anmeldung abgelehnt
    ORA-02063: preceding line from PRICE
    SQL> ALTER PACKAGE BLOOMIMP.BLOOMBERG COMPILE BODY;
    Package body altered
    SQL> ALTER PROCEDURE QF.DOPPELTE_QOTS_BEREINIGEN COMPILE;
    ALTER PROCEDURE QF.DOPPELTE_QOTS_BEREINIGEN COMPILE
    ORA-04052: error occurred when looking up remote object [email protected]
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01017: Benutzername/Kennwort ungültig; Anmeldung abgelehnt
    ORA-02063: preceding line from PRICE
    SQL> ALTER TRIGGER QF.INSTR_DPLR_ID COMPILE;
    Warning: Trigger altered with compilation errors
    SQL> ALTER PACKAGE QLEXP.EXPORT COMPILE BODY;
    Warning: Package body altered with compilation errors
    SQL> ALTER PACKAGE QLEXP.EXPORT_ORGANIZER COMPILE BODY;
    Warning: Package body altered with compilation errors
    SQL> ALTER PACKAGE QLEXP.QLEXP_ABO COMPILE BODY;
    Warning: Package body altered with compilation errors
    So , anyone please let me know why (A) is not working, (B) got that warning.

    >
    ORA-04052: error occurred when looking up remote object [email protected]
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01017: Benutzername/Kennwort ungültig; Anmeldung abgelehnt
    ORA-02063: preceding line from PRICE
    It seems that the database link PRICE.WORLD does not work because username/password are invalid ?
    Can you check it ?
    What is your Oracle version ?

  • Invalid objects in APEX Schemas after import.

    Hi,
    After importing the APEX_040100 user in the database I got several invalid objects that are causing APEX not to work.
    I gave up to compile them. After using all kind of tricks such as compile one schema at a time or compile all of them using the utlprp.sql script
    or using EXEC DBMS_DDL.alter_compile('PACKAGE', 'MY_SCHEMA', 'MY_PACKAGE');
    or one object art a time using command sililar to:
    ALTER PACKAGE my_package COMPILE;
    ALTER PACKAGE my_package COMPILE BODY;
    ALTER PROCEDURE my_procedure COMPILE;
    ALTER FUNCTION my_function COMPILE;
    ALTER TRIGGER my_trigger COMPILE;
    ALTER VIEW my_view COMPILE;
    I can't find any documentation to show how to recompile them properly.
    So I am asking:
    1. How can we recompile all objects in APEX?
    2. How can we re-install APEX?
    3. How can we revert to previous version if both have problems?
    Thanks
    Yannis
    Here is the list of invalid objects:
    APEX_040100     PACKAGE     WWV_FLOW_DYNAMIC_EXEC     INVALID
    APEX_040100     PACKAGE     WWV_FLOW_LOAD_DATA     INVALID
    APEX_040100     PACKAGE     WWV_FLOW_SAMPLE_APP     INVALID
    APEX_040100     PACKAGE     WWV_FLOW_UTILITIES     INVALID
    APEX_040100     PACKAGE BODY     APEXWS     INVALID
    APEX_040100     PACKAGE BODY     HTMLDB_UTIL     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_4000_UI     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_ADMIN_API     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_ADVISOR     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_AJAX     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_API     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_APPLICATION_INSTALL     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_ASFCOOKIE     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_AUDIT     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_AUTHENTICATION     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_AUTHENTICATION_ENGINE     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_AUTHORIZATION     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_BUILDER     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_BUTTON     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_CALENDAR3     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_CALENDAR_AJAX     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_CHECK     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_COLLECTION     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_CONDITIONS     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_COPY_PAGE     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_CREATE_APP_FROM_QUERY     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_CREATE_MODEL_APP     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_CSS_API_PRIVATE     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_CUSTOM_AUTH     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_CUSTOM_AUTH_STD     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_DATALOAD_XML     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_DATA_QUICK_FLOW     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_DATA_UPLOAD     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_DICTIONARY     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_DISP_PAGE_PLUGS     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_DML     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_DOWNLOAD     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_DRAG_LAYOUT     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_DYNAMIC_EXEC     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_ERROR     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_F4000_P4150     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_F4000_PLUGINS     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_F4000_UTIL     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_FILE_MGR     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_FLASH_CHART     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_FLASH_CHART2     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_FLASH_CHART5     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_FLASH_CHART5_UTIL     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_FLASH_CHART_UTIL     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_FND_DEVELOPER_API     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_FND_USER_API     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_FORMS     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_FORM_CONTROL     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_GENERATE_DDL     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_GENERATE_TABLE_API     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_GENERIC_ATTR     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_GEN_API2     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_HINT     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_HTML_API_PRIVATE     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_IMP_PARSER     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_INSTALL_WIZARD     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_INSTANCE_ADMIN     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_ITEM     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_JAVASCRIPT     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_JOB     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_LANG     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_LDAP     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_LIST     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_LOAD_DATA     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_LOAD_EXCEL_DATA     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_LOGIN     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_MAIL     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_META_DATA     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_META_UTIL     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_MODEL_API     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_NATIVE_AUTHENTICATION     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_NATIVE_DYNAMIC_ACTION     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_NATIVE_ITEM     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_PAGE_CACHE_API     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_PLSQL_EDITOR     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_PLSQL_JOB     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_PLUGIN_ENGINE     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_PLUGIN_F4000     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_PLUGIN_UTIL     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_PPR_UTIL     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_PRINT_UTIL     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_PROCESS     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_PROCESS_UTILITY     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_PROVISION     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_PROVISIONING     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_QUERY_API     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_REGEXP     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_REGION_LAYOUT     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_RENDER_QUERY     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_RENDER_SHORTCUT     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_REST     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_SAMPLE_APP     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_SC_TRANSACTIONS     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_SECURITY     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_SERIES_ATTR     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_SESSION     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_SESSION_MON     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_SVG     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_SW_API     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_SW_PAGE_CALLS     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_SW_PARSER     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_SW_SCRIPT     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_SW_UTIL     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_TABLE_DRILL     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_TAB_MGR     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_TEAM     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_TEAM_GEN_API     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_TEMPLATES_UTIL     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_THEME_FILES     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_THEME_MANAGER     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_TREE     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_TREE_REGION     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_UPGRADE     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_UPGRADE_APP     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_UTILITIES     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_VALIDATION     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_WEBSERVICES_API     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_WEB_SERVICES     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_WIZARD_API     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_WIZ_CONFIRM     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_WORKSHEET     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_WORKSHEET_AJAX     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_WORKSHEET_API     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_WORKSHEET_DIALOGUE     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_WORKSHEET_EXPR     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_WORKSHEET_FORM     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_WORKSHEET_STANDARD     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_WORKSPACE_REPORTS     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_WS_API     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_WS_ATTACHMENT     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_WS_DIALOG     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_WS_EXPORT     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_WS_FLASH_CHART     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_WS_FORM     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_WS_GEOCODE     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_WS_IMPORT     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_WS_IMPORT_API     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_WS_SECURITY     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_WS_SETUP     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_WS_STICKIES     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_WS_UI     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_WS_WEBPAGE     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_XLIFF     INVALID
    APEX_040100     PACKAGE BODY     WWV_META_CLEANUP     INVALID
    APEX_040100     PACKAGE BODY     WWV_MIG_ACC_LOAD     INVALID
    APEX_040100     PACKAGE BODY     WWV_MIG_FRMMENU_LOAD_XML     INVALID
    APEX_040100     PACKAGE BODY     WWV_MIG_FRM_LOAD_XML     INVALID
    APEX_040100     PACKAGE BODY     WWV_MIG_FRM_OLB_LOAD_XML     INVALID
    APEX_040100     PACKAGE BODY     WWV_MIG_FRM_UPDATE_APX_APP     INVALID
    APEX_040100     PACKAGE BODY     WWV_MIG_FRM_UTILITIES     INVALID
    APEX_040100     PACKAGE BODY     WWV_MIG_RPT_LOAD_XML     INVALID
    APEX_040100     PACKAGE BODY     WWV_RENDER_CALENDAR2     INVALID
    APEX_040100     PACKAGE BODY     WWV_RENDER_CHART2     INVALID
    APEX_040100     PACKAGE BODY     WWV_RENDER_REPORT3     INVALID
    APEX_040100     PROCEDURE     APEX_ADMIN     INVALID
    APEX_040100     PROCEDURE     F     INVALID
    APEX_040100     PROCEDURE     HTMLDB_ADMIN     INVALID
    APEX_040100     PROCEDURE     WS     INVALID
    APEX_040100     SYNONYM     APEX_COLLECTIONS     INVALID
    APEX_040100     SYNONYM     HTMLDB_COLLECTIONS     INVALID
    APEX_040100     TRIGGER     WWV_FLOW_FEEDBACK_T1     INVALID
    APEX_040100     VIEW     WWV_FLOW_ADVISOR_RESULT     INVALID
    APEX_040100     VIEW     WWV_FLOW_COLLECTIONS     INVALID
    APEX_040100     VIEW     WWV_FLOW_SEARCH_RESULT     INVALID
    APEX_040100     VIEW     WWV_MULTI_COMPONENT_EXPORT     INVALID

    yannisr wrote:
    Hi,
    After importing the APEX_040100 user in the database I got several invalid objects that are causing APEX not to work.Hi,
    You mean you did export APEX_040100 schema from one database and import it to another database?
    There is also public synonyms and if I recall correct some objects are in SYS schema that belongs to Apex and are needed.
    Regards,
    Jari
    http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0

  • Compile Invalid Objects

    Hi friends,
    how do i compile all the invalid objects in one time ???
    thanks,
    Raj

    Hi,
    Here's what I do when I need to recompile a user's schema. Don't say it's bullet proof, but so far it has worked for me. I use it after each deployment to a schema.
    procedure recompile_schema
    is
       l_type   user_objects.object_type%type;
       l_name   user_objects.object_name%type;
       l_stat   user_objects.status%type;
       compile_error exception;
       pragma exception_init(compile_error, -24344);
       cursor dep_cur
       is
              select object_id
                from (select o1.object_id
                            ,o1.object_name
                            ,o1.object_type
                            ,o1.status
                            ,d1.referenced_name
                            ,d1.referenced_type
                            ,case
                                when exists (select null
                                               from user_dependencies d2
                                              where d2.referenced_name = d1.name
                                                and d2.referenced_type = d1.type)
                                then
                                   1
                                else
                                   0
                             end
                                is_referenced
                        from user_dependencies d1, user_objects o1
                       where o1.object_type in
                                   ('PACKAGE'
                                   ,'PROCEDURE'
                                   ,'FUNCTION'
                                   ,'PACKAGE BODY'
                                   ,'VIEW'
                                   ,'MATERIALIZED VIEW'
                                   ,'TRIGGER'
                                   ,'SYNONYM')
                         and d1.name = o1.object_name
                         and d1.type = o1.object_type)
               where is_referenced = 1
          start with is_referenced = 0
          connect by object_name = prior referenced_name
                 and object_type = prior referenced_type
            group by object_id
            order by max(level) desc, object_id;
       procedure do_compile(pi_object_type   in user_objects.object_type%type
                           ,pi_object_name   in user_objects.object_name%type)
       is
       begin
          --dbms_output.put_line('Compiling: ' || pi_object_name);
          if pi_object_type = 'PACKAGE BODY'
          then
             exe('ALTER PACKAGE ' || pi_object_name || ' COMPILE BODY');
          else
             exe('ALTER ' || pi_object_type || ' ' || pi_object_name || ' COMPILE');
          end if;
       exception
          when compile_error
          then
             dbms_output.put_line(sqlerrm);
       end do_compile;
    begin
       dbms_output.put_line('recompiling invalid objects in schema ' || user);
       -- loop through all objects in order of dependancy.
       for rec in dep_cur
       loop
          -- select the objects attributes (type, name and status).
          select object_type, object_name, status
            into l_type, l_name, l_stat
            from user_objects
           where object_id = rec.object_id;
          -- if the object is invalid, recompile it.
          if l_stat = 'INVALID'
          then
             dbms_output.put_line('Compiling(1): ' || l_name);
             do_compile(l_type, l_name);
          end if;
       end loop;
       -- Recompile all remaining INVALID OBJECTS (all those without dependencies).
       for rec
       in (select object_type, object_name
             from user_objects
            where status = 'INVALID'
              and object_type in
                        ('PACKAGE'
                        ,'PROCEDURE'
                        ,'FUNCTION'
                        ,'TRIGGER'
                        ,'PACKAGE BODY'
                        ,'VIEW'
                        ,'MATERIALIZED VIEW'
                        ,'TRIGGER'
                        ,'SYNONYM'))
       loop
          dbms_output.put_line('Compiling(2): ' || rec.object_name);
          do_compile(rec.object_type, rec.object_name);
       end loop;
    end recompile_schema;Regards
    Peter

  • REUSE SETTINGS supresses error messages when compiling an invalid object

    Hello,
    my test:
    Create a table and a packaged procedure referencing the table. Then drop the table and recompile the package:
    CREATE TABLE x (
        y     NUMBER
    CREATE OR REPLACE PACKAGE y
    AS
    PROCEDURE z;
    END y;
    SHOW ERRORS
    CREATE OR REPLACE PACKAGE BODY y
    AS
    PROCEDURE z
    IS
      v_count PLS_INTEGER;
    BEGIN
      SELECT COUNT(*)
      INTO v_count
      FROM x;
    END z;
    END y;
    SHOW ERRORS
    DROP TABLE x;
    PROMPT 1.Compile package
    ALTER PACKAGE y COMPILE;
    SHOW ERRORS
    PROMPT 2.Compile package body
    ALTER PACKAGE y COMPILE BODY;
    SHOW ERRORS
    PROMPT 3.Compile package with "REUSE SETTINGS"
    ALTER PACKAGE y COMPILE REUSE SETTINGS;
    SHOW ERRORS
    PROMPT 4.Compile package body with "REUSE SETTINGS"
    ALTER PACKAGE y COMPILE BODY REUSE SETTINGS;
    SHOW ERRORS
    SELECT object_name
          ,object_type
    FROM   user_objects
    WHERE  status = 'INVALID';
    --DROP PACKAGE y;Partly unexpected output
    Tabelle wurde erstellt.
    Package wurde erstellt.
    Keine Fehler.
    Package Body wurde erstellt.
    Keine Fehler.
    Tabelle wurde gelöscht.
    1.Compile package
    Warnung: Paket wurde mit Kompilierungsfehlern geõndert.
    Keine Fehler.
    2.Compile package body
    Warnung: Paketrumpf wurde mit Kompilierungsfehlern geõndert.
    Fehler bei PACKAGE BODY Y:
    LINE/COL ERROR
    8/3      PL/SQL: SQL Statement ignored
    10/8     PL/SQL: ORA-04044: procedure, function, package, or type is not
             allowed here
    3.Compile package with "REUSE SETTINGS"
    Warnung: Paket wurde mit Kompilierungsfehlern geõndert.
    Keine Fehler.
    4.Compile package body with "REUSE SETTINGS"
    Warnung: Paketrumpf wurde mit Kompilierungsfehlern geõndert.
    Keine Fehler.
    OBJECT_NAME     OBJECT_TYPE
    Y               PACKAGE BODY
    1 Zeile wurde ausgewõhlt.It says
    - Table created
    - Package created
    - Package body created
    - Table dropped
    - Package header compiled with errors (why?)
    - Package body compiled with errors (shown error is expected)
    - Package header compiled with errors (again why?)
    - Package body compiled with errors (no errors shown)
    So why is the header compiled with errors, when the object is valid.
    And why is no error shown for COMPILE REUSE SETTINGS when there are errors for the body?
    I use REUSE SETTINGS when recompiling invalid objects that were compiled for debug with
    ALTER PACKAGE abc COMPILE PLSQL_DEBUG = TRUE REUSE SETTINGSRegards
    Marcus
    Version:
    SQL*Plus: Release 10.2.0.1.0 - Production on Di Jan 27 12:45:20 2009
    Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options

    Hi,
    From SQL Reference Manual [REUSE SETTINGS|http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_1007.htm#BGBGEIGD]:
    Specify REUSE SETTINGS to prevent Oracle from dropping and reacquiring compiler switch settings. With this clause, Oracle preserves the existing settings and uses them for the recompilation of any parameters for which values are not specified elsewhere in this statement.
    For backward compatibility, Oracle Database sets the persistently stored value of the PLSQL_COMPILER_FLAGS initialization parameter to reflect the values of the PLSQL_CODE_TYPE and PLSQL_DEBUG parameters that result from this statement.
    Regards,

  • Migration from windows to Linux -- Invalid objects.

    Hi DBA's
    After Migration there are no of invalid objects are there, specially APPLSYS, what action should I take.
    SQL> select owner, object_name, object_type from all_objects where status<>'VALID' order by owner;
    OWNER OBJECT_NAME OBJECT_TYPE
    APPLSYS AQ$WF_CONTROL VIEW
    APPLSYS AQ$WF_JAVA_DEFERRED VIEW
    APPLSYS AQ$WF_JAVA_ERROR VIEW
    APPLSYS AQ$WF_JMS_IN VIEW
    APPLSYS AQ$WF_JMS_JMS_OUT VIEW
    APPLSYS AQ$WF_JMS_OUT VIEW
    APPLSYS AQ$WF_NOTIFICATION_IN VIEW
    APPLSYS AQ$WF_NOTIFICATION_OUT VIEW
    APPLSYS AQ$WF_WS_JMS_IN VIEW
    APPLSYS AQ$WF_WS_JMS_OUT VIEW
    APPLSYS AQ$WF_WS_SAMPLE VIEW
    OWNER OBJECT_NAME OBJECT_TYPE
    APPS AMV_IMT_PUB PACKAGE
    APPS AMV_IMT_PUB PACKAGE BODY
    APPS CSS_DEF_IMT_PUB PACKAGE
    APPS CSS_DEF_IMT_PUB PACKAGE BODY
    APPS CS_KB_CONC_PROG_PKG PACKAGE BODY
    APPS CS_SR_ADDR_SYNC_INDEX_PKG PACKAGE BODY
    APPS CS_SR_SYNC_INDEX_PKG PACKAGE BODY
    APPS EDR_INDEXED_XML_UTIL PACKAGE BODY
    APPS EDW_GEOGRAPHY_M_C PACKAGE BODY
    APPS EDW_HR_AGE_BAND_M_C PACKAGE BODY
    APPS EDW_HR_ASG_CHNG_M_C PACKAGE BODY
    OWNER OBJECT_NAME OBJECT_TYPE
    APPS EDW_HR_ASSGNMNT_M_C PACKAGE BODY
    APPS EDW_HR_GRADE_M_C PACKAGE BODY
    APPS EDW_HR_JOBS_M_C PACKAGE BODY
    APPS EDW_HR_MVMNT_TYP_M_C PACKAGE BODY
    APPS EDW_HR_POSITION_M_C PACKAGE BODY
    APPS EDW_HR_PRSN_TYP_M_C PACKAGE BODY
    APPS EDW_HR_REASON_M_C PACKAGE BODY
    APPS EDW_HR_REC_ACT_M_C PACKAGE BODY
    APPS EDW_HR_RQN_VCNCY_M_C PACKAGE BODY
    APPS EDW_HR_SERVICE_M_C PACKAGE BODY
    APPS EDW_MRP_DM_CLS_M_C PACKAGE BODY
    OWNER OBJECT_NAME OBJECT_TYPE
    APPS EDW_MRP_FORECAST_M_C PACKAGE BODY
    APPS EDW_MRP_PLAN_M_C PACKAGE BODY
    APPS EDW_MTL_INVENTORY_LOC_M_C PACKAGE BODY
    APPS EDW_OPI_ACTV_M_C PACKAGE BODY
    APPS EDW_OPI_LOT_M_C PACKAGE BODY
    APPS EDW_OPI_OPRN_M_C PACKAGE BODY
    APPS EDW_OPI_PRDL_M_C PACKAGE BODY
    APPS EDW_ORGANIZATION_M_C PACKAGE BODY
    APPS EDW_POA_LN_TYPE_M_C PACKAGE BODY
    APPS EDW_POA_SPLRITEM_M_C PACKAGE BODY
    APPS EE PROCEDURE
    OWNER OBJECT_NAME OBJECT_TYPE
    APPS EGO_ITEM_TEXT_PVT PACKAGE BODY
    APPS EGO_ITEM_TEXT_UTIL PACKAGE
    APPS EGO_ITEM_TEXT_UTIL PACKAGE BODY
    APPS EGO_MTL_SYSTEM_ITEMS_B_TR1 TRIGGER
    APPS EGO_MTL_SYSTEM_ITEMS_TL_TR1 TRIGGER
    APPS EMAIL PROCEDURE
    APPS EMAIL PACKAGE BODY
    APPS ENI_DENORM_HRCHY PACKAGE BODY
    APPS FII_AP_HOLD_DATA_F_C PACKAGE BODY
    APPS FII_AP_INV_LINES_F_C PACKAGE BODY
    APPS FII_AP_INV_ON_HOLD_F_C PACKAGE BODY
    OWNER OBJECT_NAME OBJECT_TYPE
    APPS FII_AP_INV_PAYMTS_F_C PACKAGE BODY
    APPS FII_AP_SCH_PAYMTS_F_C PACKAGE BODY
    APPS FII_AR_E_REVENUE_F_C PACKAGE BODY
    APPS FII_AR_TRX_DIST_F_C PACKAGE BODY
    APPS FII_PA_BUDGET_F_C PACKAGE BODY
    APPS FII_PA_COST_F_C PACKAGE BODY
    APPS FII_PA_REVENUE_F_C PACKAGE BODY
    APPS FII_PA_UOM_CONV_F_C PACKAGE BODY
    APPS FND_IMUTL PACKAGE BODY
    APPS FND_TS_MIG_UTIL PACKAGE BODY
    APPS HR_EDW_WRK_CMPSTN_F_C PACKAGE BODY
    OWNER OBJECT_NAME OBJECT_TYPE
    APPS HZ_DQM_SYNC PACKAGE BODY
    APPS HZ_PARTY_STAGE PACKAGE BODY
    APPS HZ_PURGE PACKAGE BODY
    APPS IBC_IMT_PUB PACKAGE
    APPS IBC_IMT_PUB PACKAGE BODY
    APPS IBE_SEARCHUPDATE_PVT PACKAGE BODY
    APPS IBE_SEARCH_SETUP_PVT PACKAGE BODY
    APPS ICX_POR_INTERMEDIA_INDEX PACKAGE BODY
    APPS IRC_DOCUMENT_API PACKAGE BODY
    APPS IRC_POSTING_CONTENT_API PACKAGE BODY
    APPS ISC_EDW_BOOK_SUM1_F_C PACKAGE BODY
    OWNER OBJECT_NAME OBJECT_TYPE
    APPS JTA_NOTES_IMT_PUB PACKAGE
    APPS JTA_NOTES_IMT_PUB PACKAGE BODY
    APPS JTF_AMVIMT_PUB PACKAGE
    APPS JTF_AMVIMT_PUB PACKAGE BODY
    APPS JTF_TASK_IDX_UTL PACKAGE BODY
    APPS OKC_ARTICLE_KEYWORD_PVT PACKAGE BODY
    APPS OKC_TEMPLATE_KEYWORD_PVT PACKAGE BODY
    APPS OPI_EDW_COGS_F_C PACKAGE BODY
    APPS OPI_EDW_OPMCOGS_F_C PACKAGE BODY
    APPS OPI_EDW_OPMINV_DAILY_STAT_F_C PACKAGE BODY
    APPS OPI_EDW_OPM_JOB_DETAIL_F_C PACKAGE BODY
    OWNER OBJECT_NAME OBJECT_TYPE
    APPS OPI_EDW_OPM_JOB_RSRC_F_C PACKAGE BODY
    APPS OPI_EDW_UOM_CONV_F_C PACKAGE BODY
    APPS RA_CUSTOMER_TEXT_PKG PACKAGE BODY
    APPS WF_DIAGNOSTICS PACKAGE BODY
    ODM AQ$DMS_QUEUE_TABLE VIEW
    OWAPUB DEBUG_CARTX PACKAGE BODY
    OWAPUB OWA_OPT_LOCK PACKAGE BODY
    OWAPUB OWA_UTIL PACKAGE BODY
    XXQUDRA XXQUDRA_GETPHONE FUNCTION
    97 rows selected.
    Best Regards,
    Suresh Gelda

    Hi Sawwan,
    I created the dblink.
    SQL> select * from user_db_links;
    no rows selected
    SQL> create database link APPS_TO_APPS connect to
    apps identified by apps
    using
    '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=aqherp)
    (Port=1526))(CONNECT_DATA=(SID=PROD)))'
    / 2 3 4 5 6
    Database link created.
    SQL> alter view APPLSYS.AQ$WF_CONTROL compile;
    Warning: View altered with compilation errors.
    SQL> show error
    Errors for PACKAGE BODY APPS.EDW_GEOGRAPHY_M_C:
    LINE/COL ERROR
    109/4 PL/SQL: SQL Statement ignored
    147/9 PL/SQL: ORA-04052: error occurred when looking up remote object
    APPS.EDW_GEOG_LOCATION_LCV@APPS_TO_APPS.QUDRAH.COM
    ORA-00604: error occurred at recursive SQL level 3
    ORA-12154: TNS:could not resolve service name
    211/4 PL/SQL: SQL Statement ignored
    259/7 PL/SQL: ORA-04052: error occurred when looking up remote object
    APPS.EDW_GEOG_POSTCODE_CITY_LCV@APPS_TO_APPS.QUDRAH.COM
    ORA-00604: error occurred at recursive SQL level 3
    ORA-12154: TNS:could not resolve service name
    LINE/COL ERROR
    304/4 PL/SQL: SQL Statement ignored
    349/9 PL/SQL: ORA-04052: error occurred when looking up remote object
    APPS.EDW_GEOG_CITY_LCV@APPS_TO_APPS.QUDRAH.COM
    ORA-00604: error occurred at recursive SQL level 3
    ORA-12154: TNS:could not resolve service name
    394/4 PL/SQL: SQL Statement ignored
    439/8 PL/SQL: ORA-04052: error occurred when looking up remote object
    APPS.EDW_GEOG_POSTCODE_LCV@APPS_TO_APPS.QUDRAH.COM
    ORA-00604: error occurred at recursive SQL level 3
    LINE/COL ERROR
    ORA-12154: TNS:could not resolve service name
    492/4 PL/SQL: SQL Statement ignored
    537/8 PL/SQL: ORA-04052: error occurred when looking up remote object
    APPS.EDW_GEOG_STATE_REGION_LCV@APPS_TO_APPS.QUDRAH.COM
    ORA-00604: error occurred at recursive SQL level 3
    ORA-12154: TNS:could not resolve service name
    583/4 PL/SQL: SQL Statement ignored
    628/8 PL/SQL: ORA-04052: error occurred when looking up remote object
    APPS.EDW_GEOG_STATE_LCV@APPS_TO_APPS.QUDRAH.COM
    LINE/COL ERROR
    ORA-00604: error occurred at recursive SQL level 3
    ORA-12154: TNS:could not resolve service name
    681/4 PL/SQL: SQL Statement ignored
    726/8 PL/SQL: ORA-04052: error occurred when looking up remote object
    APPS.EDW_GEOG_REGION_LCV@APPS_TO_APPS.QUDRAH.COM
    ORA-00604: error occurred at recursive SQL level 3
    ORA-12154: TNS:could not resolve service name
    771/4 PL/SQL: SQL Statement ignored
    816/8 PL/SQL: ORA-04052: error occurred when looking up remote object
    LINE/COL ERROR
    APPS.EDW_GEOG_COUNTRY_LCV@APPS_TO_APPS.QUDRAH.COM
    ORA-00604: error occurred at recursive SQL level 3
    ORA-12154: TNS:could not resolve service name
    871/3 PL/SQL: SQL Statement ignored
    902/8 PL/SQL: ORA-04052: error occurred when looking up remote object
    APPS.EDW_GEOG_AREA2_LCV@APPS_TO_APPS.QUDRAH.COM
    ORA-00604: error occurred at recursive SQL level 3
    ORA-12154: TNS:could not resolve service name
    953/4 PL/SQL: SQL Statement ignored
    LINE/COL ERROR
    983/9 PL/SQL: ORA-04052: error occurred when looking up remote object
    APPS.EDW_GEOG_AREA1_LCV@APPS_TO_APPS.QUDRAH.COM
    Thanks
    ORA-00604: error occurred at recursive SQL level 3
    ORA-12154: TNS:could not resolve service name

  • Problem with ORA-24372 invalid object for describe

    I have unresolved problem with oracle message: ORA-24372 invalid object for describe. There is the client-server application which installed on users PCs. Client application is program on Delphi 7 that installed on several users PCs which works with Oracle DB 10g server (clients on users side 8.1.7) by means ODAC 5.7. Each user by means this application works with data on Oracle server. Each group of users uses its own schema. Each of this schema has grants to select data and execute procs in the main schema. During the time of operation I modified and compiled some procs in the main schema. As the result I found some depended Invalid objects in main schema. I recompiled them. There is no invalid objects in all schemas. But when I starts application in one user place (he uses for example schema X1) I see oracle message: ORA-24372 invalid object for describe. Other users in group which uses schema X1 works without this problem. There is finite aggregate of users of schema Х1 which has this message but some users of schema Х1 has no problem. All users has identical software and there is no any invalid objects in schemas! I try to start application on my PC using schema X1 and finds ORA-24372 then I try to start application on neighbors PC and it is all ok! It happened after I recompiled main schema in the time of users operation. What should I do to resolve this problem? Where to find the source of the problem: in client or in server?

    To Mr. Sven Weller
    The purpose of creation X1 (X2, Х3…) was restriction of users to access objects in the Main Schema. X1 has no any objects except function that returns her name for internal purposes. X1 has many synonyms for objects in the Main schema. There is no invalid objects in X1!

  • Bogus Invalid Object in MERGE Statement

    Let me begin by saying that I have been working with MERGE since its inception, and I am familiar with the fundamental gotcha's. This problem is more inexplicable. (It's one of those things that I expect, when someone explains it, will be a DOH! moment.)
    I am building a one-time conversion script to merge an existing User table with a new User table. Since I am only in the development mode, I didn't want to modify the true table yet. So I made a copy of the table to work with, using the following familiar
    syntax.
    SELECT *
    INTO uam.User2
    FROM uam.[User]
    Imagine my surprise when the MERGE statement refused to recognize uam.User2 - although it recognizes uam.[User] just fine.
    In the interests of competeness, here is the MERGE Statement in question.
    MERGE  uam.[User2]
    as tgt
    USING (SELECT
    UserID
    ,FirstName
    ,LastName
    ,CompanyID
    ,AuthenticationID
    ,isActive
    ,PrimaryEmailID
    ,CreatedByUserName
    ,CreatedByDtim
    ,@User
    _User
    ,GETDATE()
    _GETDATE
    FROM #User
    ) as src
      ON tgt.UserID = (src.UserID * -1)
    WHEN NOT MATCHED
    THEN
    INSERT
    (FirstName
    ,LastName
    ,CompanyID
    ,AuthenticationID
    ,isActive
    ,PrimaryEmailID
    ,CreatedByUserName
    ,CreatedByDtim
    ,LastUpdatedUserName
    ,LastUpdatedDtim
    VALUES
    (src.FirstName
    ,src.LastName
    ,src.CompanyID
    ,src.AuthenticationID
    ,src.isActive
    ,src.PrimaryEmailID
    ,src.CreatedByUserName
    ,src.CreatedByDtim
    ,_User
    ,_GETDATE
    OUTPUT INSERTED.UserID
    ,tgt.UserID
    INTO #UserMapping;
    The procedure refuses to run, flagging the tgt.UserID as 
    Msg 4104, Level 16, State 1, Line 140
    The multi-part identifier "tgt.UserID" could not be bound.
    SSMS also flags the uam.[User2] on the MERGE line as "Invalid object name 'uam.User2'" on mouse-over.
    A few notes:
    I have a SELECT * FROM uam.User2 immediately before this MERGE, and it works just fine. And yes, it returns a UserID column.
    If I change the name from uam.User2 to uam.[User], it works just fine.
    I know the JOIN is a little strange (I really wanted just an INSERT where I could see the original UserID and the newly inserted UserID together, and INSERT will not let me OUTPUT directly from a table - hence the MERGE), but I also tried it with a straight-up
    tgt.UserID = src.UserID. Nothing changed about the errors.
    I also went back and re-created the uam.User2 table directly from the code that built uam.[User]. Nothing changed.
    I'm flummoxed. This has all the earmarks of a "well-that-was-dumb" coding error, but for the life of me I cannot see what would change between using these two tables, since one is a copy of the other...
    Any insight would be much appreciated!
    Duncan Davenport

    OK, I have it.
    DOH!  (told ya)
    So, while intellisense (typically) flags this table as not existing, that's just Intellisense doing the nonsense it always does. This obfuscated the ACTUAL error - which was the wrong schema defined in the output clause. The error itself pointed at the wrong
    line (nothing new there either). Once I fixed the OUTPUT clause, everything worked as expected - although SSMS is still putting squiggly red lines under everything that is working anyway. Yeah, we've all seen THAT behavior - no big deal.
    Anyway, that's the answer. It's magic - in that the error messages specialize in misdirection :)...
    Closing this. (I wonder if I get credit for answering my own question?)

Maybe you are looking for

  • Index is not used (why and what should i do) table too big

    hi guys, having a headache now. (on 10gR2 on linux system) I used to have a large table and this is how i managed it. (i am on standard edition (thus i have no partitioning) i would have a 1) cron job run daily to keep track of the lowest and highest

  • ZBA in EBS - Trading partner issue

    Hi SAP gurus Can anyone help me with how you folks set up populating the trading partner field for ZBA postings in EBS? I read in a lot of places & here are the pointers I already have.  - We can fill the trading partner field in GL master data assum

  • [INS-20802] 11.2 Grid Infrastructure Configuration failed on Windows

    I had sucessfully installed the 11.2.0.1 grid infrastructure on two VM nodes with windows 2003R2. But when I was doing brand new installation of 11.2.0.1 grid infrastructure on the same OS on a two node clusters, it faile with the following errors: [

  • I can't set up my account

    i have a wesite as my mail server and mail won't connect. i'm not sure what it is that i'm doing wrong

  • IPhone entre New York et Paris

    Bonjour, Je travaille actuellement a New York et je meurs d'envie de m'acheter un iPhone a l'Apple Store. J'ai deja un telephone AT&T donc ma carte SIM va fonctionner aux USA. Par contre, je rentre a Paris en fevrier et je me demande si je vais pouvo