"Compile Invalid" packages issue in 22.71

Right clicking on "packages" and running "Compile Invalid" generates SQL of the form:
alter PACKAGE BODY xxx compile body;
These should be of the form
alter PACKAGE xxx compile body;

Yea I saw this one it has been fixed...

Similar Messages

  • Error message when compiling invalid packages and procedures

    Hi.
    I have a routine for copying certain data from a production database to a test database. To do this I disable constraints and triggers, truncate tables, copy tables and enable triggers and constraints again.
    Now several of my functions, procedures and packages are made invalid and marked with a red cross. In SQL Developer I can compile invalid functions, procedures and packages. When I compile functions it works fine, but when compiling procedures and packages I get the following error message:
    An error was encountered performing the requested operation:
    ORA-00904: "ATTRIBUTE": Invalid identifier
    Vendor code 904
    When I click OK on this message I get a confirmation saying:
    Packages have been compiled with #0.CNT# errors.
    I had this error in both the previous and the new version. Is this a bug or is there a way to come around it? When I copy and modify the SQL generated to perform this task and run it in SQL Plus it works fine.
    I use Windows 2000 5.00.2195 Service Pack 4, SQL Developer version 1.2.1, Oracle 9.2.0.8.0 and Java version 1.5.0_11
    Message was edited by:
    SvSig

    i have now upgraded to Java 1.6 update 2. I still get basically the same error, but it is presented a little bit differently:
    An error was encountered performing the requested operation:
    ORA-00904: "ATTRIBUTE": invalid identifier
    00904. 00000 - "%s: invalid identifier"
    *Cause:
    *Action:
    Vendor code 904
    Are there other possible error causes than the operating system version and the database version?
    We are going to install an Oracle 10 test database in a couple of weeks, so then I will find out whether the database version is the problem.

  • Compile all invalid packages together + connect as sysdba only

    Hi
    I've installed a Ora 10.2, and imported a dump. This dump contained some users, a lot of tables and stored procs.
    My first question: There is an imported user with I can connect as sysdba only. I can't connect as normal... it is problem because there is an application upper the db and I can't tell the applicataion that connect as sysdba. (it is only a sandbox for me...) What should I modify on this user to connect as normal user?
    The second question: The schema (upper) contains lot of invalid packages. I have only the free Toad and I can't compile all of them only step by step... (I don't want do this step by step because there are about 300 packages...). How could I complile all of them e.g. from Sqlplus? Any other solution?
    Thanks in advance!
    Alex

    ok, there is a user e.g. "xxxx"
    I can connect with this user as sysdba only. "CONNECT xxxx/yyyy@db as sysdba". Without "as sysdba" I got "ORA-01017: invalid username/password; logon denied" So I can connect only as sysdba... but this is a simple user so I don't want to connect as sysdba...

  • Re-compiling a package in a stored procedure

    Hi All,
    We are using Oracle 10g. I have coded a stored procedure that does many things one of which is re-creating a Materialized View using Dynamic SQL. However, when this Materialized View is created, a package that this stored procedure needs, becomes invalid. What is the syntax for recompiling the package using Dynamic SQL? I tried something like script listed below, but I am getting "*ORA-24344: success with compilation error*" error message. I like to re-compile the package before it's use in this stored procedure.
    DECLARE
          v_sql         VARCHAR2 (1000);
          object_name   VARCHAR2 (50) := 'TEST.PS2_FNS366';
    BEGIN
           dbms_output.put_line('This is a test.');
           v_sql := 'Alter package ' || object_name || ' compile  package';
           dbms_output.put_line (v_sql);
           EXECUTE IMMEDIATE v_sql;
           v_sql := 'Alter package ' || object_name || ' compile  body';
           dbms_output.put_line (v_sql);
           EXECUTE IMMEDIATE v_sql;     
    END;Thanks,
    Seyed

    Hi Justin,
    I agree with you. Initially, I didn't want to use materialized view in the stored procedure to load a table, but I a kind of was forced into it. I first tried using an Oracle View, but then the Oracle package using it was not finding the view. Then I tried to grant select to it, that failed too. That is when I decided to use a materialized view because, at least I could issue the needed grants.
    After seeing your e-mail and Frank's, I went back to my original plan. I re-created the old view and then tried to give it the right grants. Here is what I tried and the resulting error message:
    GRANT SELECT ON STUDENT.v_ben_reg_case_number TO SCOTT A grant similar to above results in ORA-01720: grant option does not exit for one of the underlying tables. Our DBA tried granting a developer role a system privilege called under_any_role, but that didn't solve it either.
    Thank you for your assistance,
    Seyed

  • Invalid Packages question

    Hi All,
    First of all, here the background information about the database:
    Oracle EBS R12.0.4
    RDBMS 10.2.0.2
    AIX 5L 5.3 64 bits
    I have a question about invalid packages. When looking at ssome invalid package in TOAD, when I click on "ERROR" tab (or query dba_errors), I can see this message:
    PLS-00923: native compilation failed: C compilation or linking failed:spdzj.c:Could not invoke program /usr/local/bin/gcc: No such file or directory
    For now, I got the sysadmin to create a soft link from /usr/local/bin to point to /usr/bin/gcc and I could compile the packages.
    When I log on the server as the RDBMS owner, and do the following:
    env | grep gcc -> return nothing
    which gcc -> /usr/bin
    Considering the gcc should be going to /usr/bin and that when I type "which gcc" it return the one in /usr/bin, where in Oracle is it set to be in /usr/local/bin?
    I looked into some configuration files and didn't find anything that would 'hardcode' the path to GCC.
    Anyone ever got this issue?
    Thank you,
    Felix

    Pl see if MOS Doc 269012.1 (PL/SQL Native Compilation in Oracle 10g) can help you
    HTH
    Srini

  • How to get return code of compiling a package

    Hi,
    i want to compile a package and if it was not succesfull to write the error_message from "show errors" into a file.
    thx
    Wolle

    the problem with compiling individual packages is that you might inadvertently invalidate others. you should also programmatically check package dependencies too so you dont break any accidentally.
    if you're only compiling package bodies, this shouldn't be an issue, but if youre also compiling specs, this is something you should keep an eye on.
    i wrote an application that uploads new packages i commit in cvs to our database and then recompiles them. it then reports whether or not compilation was successful. this helps eliminate alot of user error when people manually recompile packages in HA environments. however, i recompile the entire schema when i do this (this is not something run very often). i can get away with this at my shop because the schema is very small, but this might not be a practical solution for everyone.
    this is how i check for dependencies:
    FROM public_dependency pd, user_objects uo
    WHERE referenced_object_id IN (select object_id from user_objects where object_name= UPPER(?))
    AND uo.object_id = pd.object_id
    this is useful for saving a snapshot of current package (in case of reversion):
    SELECT TEXT FROM USER_SOURCE WHERE NAME = ?
    this is how you can recompile the schema:
    DBMS_UTILITY.COMPILE_SCHEMA(?, TRUE, TRUE);
    i do a check for invalid objects in the schema before i even start (And exit with error if any are found) :
    SELECT OBJECT_NAME, STATUS
    FROM USER_OBJECTS
    WHERE (OBJECT_TYPE='PACKAGE' OR OBJECT_TYPE='PACKAGE BODY')
    AND STATUS <> 'VALID'
    Hope this info helps.
    Edited by: user577162 on Aug 25, 2008 2:21 PM

  • Internal error while compiling a package

    When I update a view within from a pulic procedure the package compiles without any issue. However If I make the same procedure as private(no declartion in specifcation)
    the package gives an internal error

    What Oracle version?
    Please give the code and the error message.

  • Package load Failed! Invalid package Title, manifest file cannot be found

    Greetings. I am new to UPK and am seeking guidance on an upgrade to 11.1.
    A little background on what we are trying to do:
    We have two machines:
    Windows 2003 machine in domain 'X' | UPK 11.0.0.1.
    Windows 2008 R2 virtual machine in domain 'Y' | UPK 11.0 on the new machine first, install the 11.0.0.1 patch, and then upgrade to 11.1.
    We are using the same database as the old machine. Developer Server is Standard Authentication, Knowledge Center is Windows authentication.
    ==========================================================================================
    So far we have installed 11.1 with the respective database upgrades, but are lost as to how to migrate the old Content Root data. We have copied all the content to the new Content Root, added it to IIS like the old machine, and verified that the UPK database Content Root path is correct and working.
    For the rest of the post, I am remoted into the server from my local workstation, and then using IE to access KCenter on the server's FQDN, not via localhost.
    Since I am green, so I presumed that I would need to import the titles under Manager in KCenter. I zipped each content folder individually (they are named "1", "9", etc), and then attempted to import each zip file.
    NOTE: At this stage sometimes we are prompted to authenticate again. When it does, sometimes the credentials that we know work, get rejected and we are prompted again. This will repeat until we get a 401 and we have to start over. We have verified that the Windows account currently in session with the site is valid and has administrator authority within KC.
    NOTE2: On the first few tries, .NET complained that maxRequestLength was not large enough. I had our servers team increase it on the actual server in order for us to proceed.
    Provided we don't have to authenticate again, or that it actually accepts our credentials, we get to the 30% mark and then receive the error: *"Package load Failed! Invalid package Title, manifest file cannot be found"*
    Does anyone have any wisdom for this process? The title importation section in the deployment manual is not helping, and the administrator from whom I am taking over this software has not had to deal with this before.
    Thank you,
    Ian
    Edited by: 986290 on Feb 5, 2013 10:21 AM

    Hi Marc, thanks for the post,
    I have gone through an extensive troubleshooting process with Oracle, including their development team, in order to fully complete our project setup. As a supplemental bit of information, we also were having connection errors when attempting to publish directly to the knowledge center.
    As far as the context of this post, here is the solution in brief:
    1) Verify that the package being imported was published from the same version of the Developer Client as the Knowledge Center installation's.
    2) Check for database consistency issues. In our case we were using a database that was built in another domain. After numerous attempts with Oracle support on the line to determine the inconsistency, it was decided to completely reinstall and build a new database from scratch in the new domain.
    3) Check application pool identities and access (while we had some inconsistencies here, correcting them did not change the behavior of the import/publish errors)
    In review, a lot of what we had setup was correct. Our primary point of failure, we feel, was using the old database. Technically this should not have been a problem, but Murphy likes to get his way sometimes.
    Cheers,
    Ian

  • Help required in compilation of package body.....

    Hi ..
    While taking the export i encounter the error message..
    . exporting synonyms
    . exporting views
    . exporting stored procedures
    . exporting operators
    . exporting referential integrity constraints
    . exporting triggers
    EXP-00056: ORACLE error 6550 encountered
    ORA-06550: line 1, column 26:
    PLS-00201: identifier 'XDB.DBMS_XDBUTIL_INT' must be declared
    ORA-06550: line 1, column 14:
    PL/SQL: Statement ignored
    EXP-00056: ORACLE error 6550 encountered
    ORA-06550: line 1, column 26:
    PLS-00201: identifier 'XDB.DBMS_XDBUTIL_INT' must be declared
    ORA-06550: line 1, column 14:
    PL/SQL: Statement ignored
    EXP-00000: Export terminated unsuccessfully..
    SELECT status,object_id,object_type,owner,object_name
    FROM dba_objects
    WHERE object_name = 'DBMS_XDBUTIL_INT';
    gives the output as...
    status object type owner object_name
    valid synonym public DBMS_XDBUTIL_INT
    valid package xdb DBMS_XDBUTIL_INT
    invalid package body xdb DBMS_XDBUTIL_INT
    when i try to compile the invalid object...
    SQL> alter package XDB.DBMS_XDBUTIL_INT COMPILE BODY;
    Warning: Package Body altered with compilation errors.
    SQL> sho err
    Errors for PACKAGE BODY XDB.DBMS_XDBUTIL_INT:
    LINE/COL ERROR
    61/7 PL/SQL: Statement ignored
    61/17 PLS-00306: wrong number or types of arguments in call to
    'IS_HIERARCHY_ENABLED_INTERNAL'
    74/7 PL/SQL: Statement ignored
    74/29 PLS-00302: component 'GENERATE_TRGNM' must be declared
    108/9 PL/SQL: Statement ignored
    108/37 PLS-00302: component 'TRUNCATE_NAME' must be declared
    123/7 PLS-00201: identifier 'SYS.DBMS_SYS_SQL' must be declared
    123/7 PL/SQL: Statement ignored
    135/9 PL/SQL: Statement ignored
    LINE/COL ERROR
    135/37 PLS-00302: component 'TRUNCATE_NAME' must be declared
    153/9 PL/SQL: Statement ignored
    153/33 PLS-00302: component 'TRUNCATE_NAME' must be declared
    168/7 PLS-00201: identifier 'SYS.DBMS_SYS_SQL' must be declared
    168/7 PL/SQL: Statement ignored
    181/9 PL/SQL: Statement ignored
    181/33 PLS-00302: component 'TRUNCATE_NAME' must be declared
    Since the code is wrapped .. i cant do anything.. needs ur help.
    sorry for explaining in such a detail...
    Message was edited by:
    437022

    Hi,
    In side the Package Body,
    a) invalid arguments for IS_HIERARCHY_ENABLED_INTERNAL
    b) invalid components GENERATE_TRGNM, etc.
    First, you need to correct the above errors and then
    try to compile the Package Body
    Regards,
    Sailaja

  • How to compile invalid objects parallel

    how to compile invalid objects parallelly in EBS 11i / 11g R2 DB in Linux

    SQL> alter package apps.AD_PA_SUBMIT_REQUEST compile body;
    Warning: Package Body altered with compilation errors.
    SQL> show error
    Errors for PACKAGE BODY APPS.AD_PA_SUBMIT_REQUEST:
    LINE/COL ERROR
    674/4 PL/SQL: Statement ignored
    674/16 PLS-00302: component 'SET_AGGREGATE_LIST' must be declared
    SQL> alter package AD_PA_SUBMIT_REQUEST compile;
    alter package AD_PA_SUBMIT_REQUEST compile
    ERROR at line 1:
    ORA-04043: object AD_PA_SUBMIT_REQUEST does not existPlease run adpasrb.pls and adpasrs.pls under $AD_TOP/patch/115/sql directory to recreate this package and see if you get the same error or not.
    SQL> alter package apps.AD_PA_INSERT_PACKAGE compile body;
    Warning: Package Body altered with compilation errors.
    SQL> show error
    Errors for PACKAGE BODY APPS.AD_PA_INSERT_PACKAGE:
    LINE/COL ERROR
    149/3 PL/SQL: SQL Statement ignored
    186/24 PL/SQL: ORA-02289: sequence does not exist
    SQL> show error
    Errors for PACKAGE BODY APPS.AD_PA_INSERT_PACKAGE:
    LINE/COL ERROR
    149/3 PL/SQL: SQL Statement ignored
    186/24 PL/SQL: ORA-02289: sequence does not existPlease run adpaipb.pls and adpaips.pls under $AD_TOP/patch/115/sql directory to recreate this package and see if you get the same error or not.
    SQL> alter package apps.CS_WF_ACTIVITIES_PKG compile body;
    Warning: Package Body altered with compilation errors.
    SQL> show error
    Errors for PACKAGE BODY APPS.CS_WF_ACTIVITIES_PKG:
    LINE/COL ERROR
    611/9 PL/SQL: SQL Statement ignored
    624/35 PL/SQL: ORA-00918: column ambiguously definedPlease see these docs.
    CS_WF_ACTIVITIES_PKG Invalid Package With "ORA-00918: column ambiguously defined" [ID 464633.1]
    Invalid Package CS_WF_ACTIVITIES_PKG [ID 375355.1]
    Thanks,
    Hussein

  • How to compile all package body using sqlplus ?

    hi all,
    How to compile all package body using sqlplus ?
    Please help.
    Amy

    dbms_utility.compile_schema will compile all the invalid objects in a schema, including the invalid package bodies. If you only want to compile the invalid package bodies, you could write your own dynamic SQL stored procedure to do that using the user_source view, but that's a lot more effort for a very minimal benefit.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Package owner - invalid packages

    Hello guys,
    I have this problem: I have two DB schemes A and B. I modified the code in both schemes. After compilation, many packages were invalidated. So I compiled all invalid packages, no compilation errors, everything ok.
    Now if I run this query in scheme A:
    SELECT *
    FROM ALL_OBJECTS
    WHERE OBJECT_TYPE IN ('PACKAGE', 'PACKAGE BODY')
    AND STATUS = 'INVALID';I get two records.
    The first one shows an invalid package where owner is scheme C - this is ok, because in scheme C is really such invalid package which has granted execute to scheme A.
    The second one shows an invalid package body, where owner is scheme A. But in scheme A, there is no such package. The "invalid" package is in fact in scheme B, it is in fact not invalid and it has no grants at all. So scheme A has no access to that package at all.
    Recompilation of this package in scheme B has no impact on the result. Why is the package marked as invalid and why is scheme A assigned as an owner???
    Now I run exactly same query in scheme B and get one record.
    One package is marked as invalid where owner is scheme B. However this package is in scheme A and scheme A is the owner of this package. Again the package is not invalid and recompilation of that package has no impact... In this case the package has granted execute to scheme B, so scheme B has the access to this package.
    Can anyone help me with this?
    Thanks, Dan

    I found the problem...
    After I did those changes to that packages, I first compiled the bodies to wrong schemes. So the bodies were created without specifications. I didn't see those packages because SQL Developer doesn't display them in such case...
    So I droped them now.

  • Compiling Procedures/Packages/Functions

    I'm fairly new to the arena of compiling Procedures/Packages/Funcitons but I was given the task of updating a development DB with a lot of newly created/updated Objects. I have created a shell script to go through all the new files and create or replace all the new objects in sqlplus. My question is how to compile all the newly created objects and their dependencies correctly? I have been using SQL Developer to verify that everything has compiled but I see that some are marked invalid which I assume is because a dependency was compiled after it. What would be my best way to making sure everything is valid? I hope this makes sense but any help would be appreciated.

    You can use a script like this to build your own sql statement to compile the invalid objects. You can add your own statement for other object types at the end with a union, ie TYPE body.
    You will probably need to run it repeated until all objects are VALID. You can put it in a PL/SQL block with a loop and execute immediate so reduce the manual work.
    --PACKAGE
    select 'alter package ' || object_name || ' compile;' from user_objects
    WHERE Status = 'INVALID'
    and object_type= 'PACKAGE'
    union
    -- PACKAGE BODY
    select 'alter package ' || object_name || ' compile body;' from user_objects
    WHERE Status = 'INVALID'
    and object_type= 'PACKAGE BODY'
    union
    --PROCEDURE
    select 'alter procedure ' || object_name || ' compile;' from user_objects
    WHERE Status = 'INVALID'
    and object_type= 'PROCEDURE'
    union
    --FUNCTION
    select 'alter function ' || object_name || ' compile;' from user_objects
    WHERE Status = 'INVALID'
    and object_type= 'FUNCTION'
    union
    --TRIGGER
    select 'alter trigger ' || object_name || ' compile;' from user_objects
    WHERE Status = 'INVALID'
    and object_type= 'TRIGGER'
    union
    --VIEW
    select 'alter view ' || object_name || ' compile;' from user_objects
    WHERE Status = 'INVALID'
    and object_type= 'VIEW'

  • Compile Invalid Objects fails on first error

    When attempting to compile invalid objects (Views or Packages) from the connection tree, the process fails on the first generated error and does not continue with the remaining invalid objects.
    This is the code used by SQL Developer...
    begin
    FOR cur IN (SELECT OBJECT_NAME, OBJECT_TYPE, owner
    FROM all_objects
    WHERE object_type = :OBJECT_TYPE
    and owner = :OBJECT_OWNER
    AND status = 'INVALID' ) LOOP
    if cur.OBJECT_TYPE = 'PACKAGE BODY' then
    EXECUTE IMMEDIATE 'alter ' || cur.OBJECT_TYPE || ' ' || cur.OBJECT_NAME || ' compile body';
    else
    EXECUTE IMMEDIATE 'alter ' || cur.OBJECT_TYPE || ' ' || cur.OBJECT_NAME || ' compile';
    end if;
    end loop;
    end;
    ...and this is the code used by a 'leading competitor' doing the same kind of process (amended by us to provide feedback)...
    DECLARE
    V_OWNER varchar2(30);
    V_VIEWNAME varchar2(30);
    C_ID integer;
    I_RESULT integer;
    CURSOR c is select OWNER, OBJECT_NAME from all_objects where owner in ('OCTOPUS', 'MILOGUSER') and object_type = 'VIEW' and STATUS = 'INVALID';
    BEGIN
    I_RESULT := -1;
    OPEN c;
    LOOP
    FETCH c into V_OWNER, V_VIEWNAME;
    EXIT WHEN c%NOTFOUND;
    DBMS_OUTPUT.PUT_LINE(V_OWNER ||'.' ||V_VIEWNAME);
    BEGIN
    C_ID := DBMS_SQL.open_cursor;
    DBMS_SQL.PARSE(C_ID, 'ALTER VIEW '|| V_OWNER || '.' || V_VIEWNAME || ' COMPILE', DBMS_SQL.v7);
    I_RESULT := DBMS_SQL.EXECUTE(C_ID);
    EXCEPTION
    WHEN OTHERS THEN I_RESULT := -1; END;
    DBMS_OUTPUT.PUT_LINE(I_RESULT);
    DBMS_SQL.CLOSE_CURSOR(C_ID);
    END LOOP;
    END;
    Note: the exception part of the code allows the process to continue and wouldn't take much to incorporate into SQL Developer

    Bug logged andy.
    B

  • While Compile the Package it shows "alter session set plsql_trace=false"

    Hi,
    My package was working fine and suddenly the status is invalid
    so i tried compiling the package that time sql developer got hanged, package also not getting compiled.
    i asked DBA to find out the status, they said the following query is running from your machine.
    "Alter session set plsql_trace=false". once they kill the session, sql developer got released.
    What could be the reason for this?? please help me to resolve this.......
    Thanks,
    G

    Most "set events" are workarounds or needed for Oracle support to do some debugging. Using them is at your own risk, and probably not supported by Oracle if you get into trouble.

Maybe you are looking for

  • AD upgrade from 9.1.1.7.0 to 11.1.1.5.0

    Hi, i am trying to upgarde the AD from 9.1.1.7.0 to 11.1.1.5.0 version.but i can't able to do this. i got the following error (after defining the connector and enter the exist AD name & version in database) while trying to upgrade the AD in OIM-->Adv

  • SD card content video does not show in finder

    Last week I installed Mavericks - after some troubles with mail and excellent support from Apple Helpdesk which in the end made it possible to retrieve all old mails... I encountered another bug today. I inserted my SD card to transfer therapy sessio

  • Cannot Access Certain Websites from MBP

    I've tried setting DNS to 8.8.8.8 as well as connecting via Ethernet as well as with my wireless broadband dongle, and still no luck. In fact, when I connect my dongle my internet connection goes even worse and I can hardly load any websites at all!

  • Problem with Safari - Solutions?

    I have had a problem with Safari (3.1.1) for a while and have been waiting for each update to fix it. I was wondering if it is a problem everyone is having, or if not, what can I do to fix it. Here is the problem - for the RSS feeds there is a number

  • How can I get an mpeg4 iMovie into iDVD?

    How can I import an mpeg4 iMovie into iDVD?