Combination of packages repeteiively becoming invalid

Hello all,
We are using Oracle 9.2.0.7.0 on Toad and SQL Developer on a database with a vast number of packages. At the moment for no clear reason 7 packages repetitively become invalid for no transparent reason. When we recompile using dbms_utility.compile_schema all object will reinstate themselves, and become valid. The next moment you look and want to use the packages they will be invalid again.
We have tried to compare the packages with a comparable database, where the same revisions of the packages exist. On the test database these are correct and valid, on the acceptance database they (the 7 mentioned before) fall over.
Can anybody give us any indications on where to find the problem? We have tried recompiling the forms that are part of the applications, but these are all valid. We are out of ideas now.
Any help is greatly appreciated.
Thanks,
-victorbax-

http://download.oracle.com/docs/cd/B28359_01/server.111/b28310/general007.htm#
This link might give you a clue on what might have happend inside
http://it.toolbox.com/blogs/database-solutions/keep-track-of-oracle-object-dependences-2521
Edited by: Maran Viswarayar on Sep 24, 2008 4:28 PM

Similar Messages

  • Compile debug causes package to become invalid

    We're running 10.2.0.4.0 and I have a large package (7730 lines) which compiles fine on it's own. However, if I try to enable debug mode, I get an error:
    SQL> alter package mypkg compile debug package;
    Warning: Package altered with compilation errors.
    SQL> show errors;
    No errors.
    If I perform another alter command without the debug parameter, then it compiles fine:
    SQL> alter package mypkg compile package;
    Package altered.
    Also, if I compile this package using the "Compile for Debug" button in SQL Developer then I actually get an error message:
    Error(1): PLS-00707: unsupported construct or internal error [2603]
    Does anyone have any idea what's going on here? I've spent the past couple days searching for a solution and while I've seen many cases of people having the PLS-00707 error, I wasn't able to find anyone who only receives it when compiling for debug.

    SQL> CONN SCOTT
    Connected.
    SQL> SELECT * fROM V$VERSION;
    BANNER
    Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
    PL/SQL Release 9.2.0.1.0 - Production
    CORE 9.2.0.1.0 Production
    TNS for 32-bit Windows: Version 9.2.0.1.0 - Production
    NLSRTL Version 9.2.0.1.0 - Production
    SQL> ALTER PACKAGE P1 COMPILE DEBUG;
    Package altered.
    SQL> alter session set events='10938 trace name context level 14';
    Session altered.
    SQL> SELECT P1.ADD_NUM(5,6) FROM DUAL;
    SELECT P1.ADD_NUM(5,6) FROM DUAL
    ERROR at line 1:
    ORA-03113: end-of-file on communication channel
    SQL> SELECT NAME FROM V$DATABASE;
    SELECT NAME FROM V$DATABASE
    ERROR at line 1:
    ORA-03114: not connected to ORACLE
    SQL> SELECT SYSDATE FROM DUAL;
    SELECT SYSDATE FROM DUAL
    ERROR at line 1:
    ORA-03114: not connected to ORACLE
    can one tell me how to solve this problem? thanks in advance.

  • Problem: Objects become invalid so easily

    Hi All,
    We are running Oracle 9i Standard Edition, which was downgraded from the Enterprise Edition, because they want to save $50K/year.
    I have noticed even in the enterprise edition that some objects (sprocs, functions, triggers, packages) could become invalid for no reason (no schema changes and no changes in some sprocs/functions called by some others). I have googled this problem and found a few tips on the the internet and at least one seasoned DBA said Oracle objects can become invalid for no obvious reasons. After the downgrade, things got worse. The DBA runs a script to compile all packages, sprocs, functions, triggers once every hour. Then things got even worse. But I think the DBA script did not run more than once in a row to resolve some dependency issues. So now the DBA runs his script every two minutes. The problem is gone, but is there any better way to do this? Or should it happen in the first place? I figure that if Oracle runs like this, it should be out of business soon, because the MS SQL guys say they never have to explicitly re-compile invalid obejcts. At first the DBA thought that when PowerBuilder calls the sprocs, the sprocs do not re-compile because Sybase does not know how to program against Oracle. Then one day I was using SQL*Plus to run the sprocs and got the explicit error message for invalid objects and then the DBA was convinced otherwise.
    Thanks.
    Ben

    Thanks a lot. Yes you are right. The re-complie did cause other objects to be invalid. that's why I asked to dba to run his script more than once in a row. Now the problem seems to be gone. But here is what I found at http://www.dbazine.com/oracle/or-articles/hordila2. It is true when a package or sproc becomes invalid, they often times do not auto re-compile. See his comments on that.
    Application Malfunctions and Data InconsistenciesPart of maintaining quick response times for the database is making sure that as many objects as possible have a valid status. At least frequently used objects should not be invalid. Some objects (views, triggers, procedures, functions, packages, package bodies) can become invalid under certain circumstances: after massive data loads, imports, batches, even without explicit schema changes, after schema restructuring (drop, re-name, alter of objects). Very often, developers leave behind on purpose lots of invalid objects, to serve as a library of source code for future needs, or as a source code backup for the production objects. Some of these events are thought of as normal, or maybe bad style, while others are treated as bugs.
    Anyway, if this happens, applications may stop working at all or may start working slower, incorrectly or incompletely. Mal-functioning triggers calling invalid procedures, etc., for example, can lead to data inconsistencies, missed data propagation, etc. In a complex system, this is a serious situation and may go undetected for some length of time.
    Failed RecompilingFor some objects (views, triggers), the Oracle system may attempt automatically to recompile and validate them at the first run. This will slow the first runs of the application, but the system will function correctly, and be faster on the next runs. For stored programs, most of the time, this auto-recompile does not happen. The DBA needs to detect and recompile them as soon as possible.
    Some objects need to be re-developed/edited for references to be successfully recompiled and to become valid again. And other objects may
    Ben

  • PL/SQL packages containing DB Links suddenly becomes invalid

    Hi all --
    I was wondering in anyone has come accross the issue my data warehouse team has been experiencing with PL/SQL packages utilizing DB Links. We currently use db links to load some of the data from our transactional databases into the data warehouse tables. The packages once compiled remain valid for a short period of time and then suddenly become invalid. When attempting to recompile the package we receive ORA-00904 errors even though running the statement through SQL Plus works fine. We've tried dropping the database link and re-creating it, but the package still will not recompile. The only way to correct the issue is to shutdown and restart the database. The db links in question are from a 10G Release 2 database to a 8.1.7.4 database. Any insight would be helpful.

    We often had similar issues over dblinks between two 8.1.7.2 databases. The result was ORA 600 errors which could only be corrected by shutdown/re-start. Our DBAs eventually came up with flushing the shared pool, instead of the shutdown/re-start.
    ALTER SYSTEM FLUSH SHARED_POOL;

  • Package procedure in invalid state

    Hi all,
    We are having an application in C# and backend oracle 10g placed in Location1.
    There is modification in Packaged procedure. So we remotely (from Location2) connected to Location1 and that Packaged procedure is created.
    This Packaged procedure has been created (in Location1 ) without any errors. But this procedure is in INVALID state. We tried to compile it remotely by using following statements, but still this is in invalid state .
    ALTER PACKAGE my_package COMPILE;
    ALTER PACKAGE my_package COMPILE BODY;
    If we run this package and package body manually, without any modifications after creating it remotly, it is becoming VALID state.
    I am not getting any idea, why it is creating in INVALID state. Any help is appreciated.
    Thanks in advance,
    Pal

    Ok, here's a previous response that I gave re. packages and their "states". Should give you a good idea what a state is...
    Packages tend to fail because of their "package state". A package has a "state" when it contains package level variables/constants etc. and the package is called. Upon first calling the package, the "state" is created in memory to hold the values of those variables etc. If an object that the package depends upon e.g. a table is altered in some way e.g. dropped and recreated, then because of the database dependencies, the package takes on an INVALID status. When you next make a call to the package, Oracle looks at the status and sees that it is invalid, then determines that the package has a "state". Because something has altered that the package depended upon, the state is taken as being out of date and is discarded, thus causing the "Package state has been discarded" error message.
    If a package does not have package level variables etc. i.e. the "state" then, taking the same example above, the package takes on an INVALID status, but when you next make a call to the package, Oracle sees it as Invalid, but knows that there is no "state" attached to it, and so is able to recompile the package automatically and then carry on execution without causing any error messages. The only exception here is if the thing that the package was dependant on has changes in such a way that the package cannot compile, in which case you'll get an Invalid package type of error.
    And if you want to know how to prevent discarded package states....
    Move all constants and variables into a stand-alone package spec and reference those from your initial package. Thus when the status of your original package is invlidated for whatever reason, it has no package state and can be recompiled automatically, however the package containing the vars/const will not become invalidated as it has no dependencies, so the state that is in memory for that package will remain and can continue to be used.
    As for having package level cursors, you'll need to make these local to the procedures/functions using them as you won't be able to reference cursors across packages like that (not sure about using REF CURSORS though.... there's one for me to investigate!)
    This first example shows the package state being invalided by the addition of a new column on the table, and causing it to give a "Package state discarded" error...
    SQL> set serveroutput on
    SQL>
    SQL> create table dependonme (x number)
      2  /
    Table created.
    SQL>
    SQL> insert into dependonme values (5)
      2  /
    1 row created.
    SQL>
    SQL> create or replace package mypkg is
      2    procedure myproc;
      3  end mypkg;
      4  /
    Package created.
    SQL>
    SQL> create or replace package body mypkg is
      2    v_statevar number := 5; -- this means my package has a state
      3
      4    procedure myproc is
      5      myval number;
      6    begin
      7      select x
      8      into myval
      9      from dependonme;
    10
    11      myval := myval * v_statevar;
    12      DBMS_OUTPUT.PUT_LINE('My Result is: '||myval);
    13    end;
    14  end mypkg;
    15  /
    Package body created.
    SQL>
    SQL> exec mypkg.myproc
    My Result is: 25
    PL/SQL procedure successfully completed.
    SQL>
    SQL> select object_name, object_type, status from user_objects where object_name = 'MYPKG'
      2  /
    OBJECT_NAME
    OBJECT_TYPE         STATUS
    MYPKG
    PACKAGE             VALID
    MYPKG
    PACKAGE BODY        VALID
    SQL>
    SQL>
    SQL> alter table dependonme add (y number)
      2  /
    Table altered.
    SQL>
    SQL> select object_name, object_type, status from user_objects where object_name = 'MYPKG'
      2  /
    OBJECT_NAME
    OBJECT_TYPE         STATUS
    MYPKG
    PACKAGE             VALID
    MYPKG
    PACKAGE BODY        INVALID
    SQL>
    SQL> exec mypkg.myproc
    BEGIN mypkg.myproc; END;
    ERROR at line 1:
    ORA-04068: existing state of packages has been discarded
    ORA-04061: existing state of package body "CRISP_INTELL.MYPKG" has been invalidated
    ORA-06508: PL/SQL: could not find program unit being called: "CRISP_INTELL.MYPKG"
    ORA-06512: at line 1
    SQL>
    SQL> select object_name, object_type, status from user_objects where object_name = 'MYPKG'
      2  /
    OBJECT_NAME
    OBJECT_TYPE         STATUS
    MYPKG
    PACKAGE             VALID
    MYPKG
    PACKAGE BODY        INVALID
    SQL>
    SQL> exec mypkg.myproc
    PL/SQL procedure successfully completed.
    SQL>
    SQL> select object_name, object_type, status from user_objects where object_name = 'MYPKG'
      2  /
    OBJECT_NAME
    OBJECT_TYPE         STATUS
    MYPKG
    PACKAGE             VALID
    MYPKG
    PACKAGE BODY        VALIDAnd this next example shows how having the package variables in their own package spec, allows the package to automatically recompile when it is called even though it became invalidated by the action of adding a column to the table.
    SQL> drop table dependonme
      2  /
    Table dropped.
    SQL>
    SQL> drop package mypkg
      2  /
    Package dropped.
    SQL>
    SQL> set serveroutput on
    SQL>
    SQL> create table dependonme (x number)
      2  /
    Table created.
    SQL>
    SQL> insert into dependonme values (5)
      2  /
    1 row created.
    SQL>
    SQL> create or replace package mypkg is
      2    procedure myproc;
      3  end mypkg;
      4  /
    Package created.
    SQL>
    SQL> create or replace package mypkg_state is
      2    v_statevar number := 5; -- package state in seperate package spec
      3  end mypkg_state;
      4  /
    Package created.
    SQL>
    SQL> create or replace package body mypkg is
      2    -- this package has no state area
      3
      4    procedure myproc is
      5      myval number;
      6    begin
      7      select x
      8      into myval
      9      from dependonme;
    10
    11      myval := myval * mypkg_state.v_statevar;  -- note: references the mypkg_state package
    12      DBMS_OUTPUT.PUT_LINE('My Result is: '||myval);
    13    end;
    14  end mypkg;
    15  /
    Package body created.
    SQL>
    SQL> exec mypkg.myproc
    My Result is: 25
    PL/SQL procedure successfully completed.
    SQL>
    SQL> select object_name, object_type, status from user_objects where object_name = 'MYPKG'
      2  /
    OBJECT_NAME
    OBJECT_TYPE         STATUS
    MYPKG
    PACKAGE             VALID
    MYPKG
    PACKAGE BODY        VALID
    SQL>
    SQL> alter table dependonme add (y number)
      2  /
    Table altered.
    SQL>
    SQL> select object_name, object_type, status from user_objects where object_name = 'MYPKG'
      2  /
    OBJECT_NAME
    OBJECT_TYPE         STATUS
    MYPKG
    PACKAGE             VALID
    MYPKG
    PACKAGE BODY        INVALID
    SQL>
    SQL> exec mypkg.myproc
    My Result is: 25
    PL/SQL procedure successfully completed.

  • When do indexes become invalid?

    When do indexes become invalide?

    Indexes can become invalid or unusable whenever a DBA tasks shifts the ROWID values, thereby requiring an index rebuild. These DBA tasks that shift table ROWID's include:
    Table partition maintenance - Alter commands (move, split or truncate partition) will shift ROWID's, making the index invalid and unusable.
    CTAS maintenance - Table reorganization with "alter table move" or an online table reorganization (using the dbms_redefinition package) will shift ROWIDs, creating unusable indexes.
    Oracle imports - An Oracle import (imp utility) with the skip_unusable_indexes=y parameter
    SQL*Loader (sqlldr utility) - Using direct path loads (e.g. skip_index_maintenance) will cause invalid and unusable indexes.
    Cheers

  • When do VI and queue references become invalid?

    Hi all,
    I have a fairly complicated problem, so please bear with me.
    1)  I have a reentrant SubVI (let's call it VI "Assign") that has an input cluster of (VI ref, queue ref) (let's call the cluster type "Refs").  If the VI ref is invalid (first execution), the VI ref and queue ref are assigned values and are passed on as an output cluster of same type.  (The VI does other things too, but for simplicity only this is important.)
    2)  The VI that calls VI "Assign" (let's call it VI "Store") is not reentrant and has a local variable of type "Refs" that is wired to the input and output of VI "Assign".  This VI effectively stores the references.  The references returned by VI "Assign" are always valid right after the call, but after the problem condition described below, they are invalid at the start of all calls before they are passed to VI "Assign".
    3)  VI "Store" is called by multiple non-reentrant VIs, so the local variables of VI "Assign" retain their values (Has been tested and verified to retain their values).  The VI causing the problem in this case is a template VI of which multiple copies are launched (let's call it VI "Template").
    The problem is that the moment an instance of VI "Template" is closed, the queue reference becomes invalid, although the actual variant value of the reference remains the same.  The VI ref can become invalid or not, depending on small changes, but is always reproducible.  I assume there must be some similarity between VI and queue refs.  After spending some time researching, the Labview help states for the Open VI Ref component "If you do not close this reference, it closes automatically after the top-level VI associated with this function executes."  In this case I assumed it means that the moment the reentrant VI "Assign" finishes, the references will get cleared ??  So I made a non-reentrant VI (let's call it VI "NR Assign") that only assigns values to the references and VI "Assign" now calls this VI (It effectively does what I described VI "Assign" does).  I keep this VI alive by using it in a VI which never terminates and since it never terminates, the references should never become invalid.  Anyone still following?  This didn't solve the problem though.  If I reproduce the same scenario using only one instance of the template VI, it works just fine.  Furthermore, the VI and queue references are never closed, to aid analysis of the problem.  Can anyone shine some light on what happens when a template VI terminates?  Could this be the problem?
    Unfortunately I cannot include the code.
    Thank you whoever is able to make sense of this.
    Christie

    Christie wrote:
    Hi all,
    I have a fairly complicated problem, so please bear with me.
    1)  I have a reentrant SubVI (let's call it VI "Assign") that has an input cluster of (VI ref, queue ref) (let's call the cluster type "Refs").  If the VI ref is invalid (first execution), the VI ref and queue ref are assigned values and are passed on as an output cluster of same type.  (The VI does other things too, but for simplicity only this is important.)
    2)  The VI that calls VI "Assign" (let's call it VI "Store") is not reentrant and has a local variable of type "Refs" that is wired to the input and output of VI "Assign".  This VI effectively stores the references.  The references returned by VI "Assign" are always valid right after the call, but after the problem condition described below, they are invalid at the start of all calls before they are passed to VI "Assign".
    3)  VI "Store" is called by multiple non-reentrant VIs, so the local variables of VI "Assign" retain their values (Has been tested and verified to retain their values).  The VI causing the problem in this case is a template VI of which multiple copies are launched (let's call it VI "Template").
    The problem is that the moment an instance of VI "Template" is closed, the queue reference becomes invalid, although the actual variant value of the reference remains the same.  The VI ref can become invalid or not, depending on small changes, but is always reproducible.  I assume there must be some similarity between VI and queue refs.  After spending some time researching, the Labview help states for the Open VI Ref component "If you do not close this reference, it closes automatically after the top-level VI associated with this function executes."  In this case I assumed it means that the moment the reentrant VI "Assign" finishes, the references will get cleared ??  So I made a non-reentrant VI (let's call it VI "NR Assign") that only assigns values to the references and VI "Assign" now calls this VI (It effectively does what I described VI "Assign" does).  I keep this VI alive by using it in a VI which never terminates and since it never terminates, the references should never become invalid.  Anyone still following?  This didn't solve the problem though.  If I reproduce the same scenario using only one instance of the template VI, it works just fine.  Furthermore, the VI and queue references are never closed, to aid analysis of the problem.  Can anyone shine some light on what happens when a template VI terminates?  Could this be the problem?
    Unfortunately I cannot include the code.
    Thank you whoever is able to make sense of this.
    Christie
    All LabVIEW refnums do get deallocated automatically when the top-level VI in whose hierarchy the refnum was created goes idle (stops executing). You will have to make sure that the creation of a refnum is done inside a VI hierarchy that stays running for the entire time you want to use that refnum.
    Rolf Kalbermatter
    Message Edited by rolfk on 06-27-2007 11:52 AM
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Office 2013 with Visio and Project Error - Package manifest is invalid

    In July I successfully created an App-V install of Office 2013 VL using the ODT. This week I decided to try just doing Visio as we don't install it or Project on all systems. I used my same customconfig.xml and just changed the ProPlusVolume to VisioProVolume
    and changed the source path. Everything downloaded and packaged fine. I was able to import into SCCM just fine and create a deployment to my test collection. However when I run the install out of Software Center I get (as part of a much longer error) the message
    in AppEnforce.log that the package manifest is invalid. Thinking that maybe I had to include Office as long with Visio I tried packaing all three items but still get the same error. Has anyone else seen this behavior and/or ideas how to fix it? Can I sequence
    just Visio or just Project? I'm including my config.xml just in case I've got something wrong with it that I haven't caught. Thanks
     <Configuration>
      <Add SourcePath="<networkpath>\Microsoft\AppVOffice2013\Sept\" OfficeClientEdition="32" >
        <Product ID="ProPlusVolume">
        <Language ID="en-us" />
        </Product>
        <Product ID="VisioProVolume">
        <Language ID="en-us" />
        </Product>
        <Product ID="ProjectProVolume">
        <Language ID="en-us" />
        </Product>
      </Add>
      <Display Level="None" AcceptEULA="TRUE" />
      <Logging Name="OfficeSetup.txt" Path="%temp%" />
      <Property Name="AUTOACTIVATE" Value="1" />
    </Configuration>

    Hy. I'm having the same problema.
    I'm trying to create na app-v package (v.5 SP2) of Office 2013.
    I downloaded the Office Deployment Tool for Click-to-Run from here:
    http://www.microsoft.com/en-us/download/details.aspx?id=36778
    I installed it into C:\Office2013pck shared that folder as 
    \\APPVMANAGER\Office2013 and mapped as Z:\.
    I changed the configuration.xml file to:
    <Configuration>
    <Add OfficeClientEdition="32" >
    <Product ID="ProPlusVolume">
    <Language ID="en-us" />
    </Product>
    <Product ID="VisioProVolume">
    <Language ID="en-us" />
    </Product>
    </Add>
    </Configuration>
    Then I ran in na elevated cmd:
    >Z:
    >\\APPV-CL-WIN7DEF\Office2013\setup.exe /download
    \\APPV-CL-WIN7DEF\Office2013\configuration.xml
    and
    >\\APPV-CL-WIN7DEF\Office2013\setup.exe /packager
    \\APPV-CL-WIN7DEF\Office2013\configuration.xml
    \\APPV-CL-WIN7DEF\Office2013\Appv
    Everything seemed to work fine.
    The creted folder had Office\Data\15.0.4649.1001 folder (I guessed this is a version number)
    When I tried to add the package to App-V Server (in the Console) I get the following error:
    An unexpected error occurred while retrieving AppV package manifest. Windows error code: 1465 - Windows was unable to parse the requested XML data.
    I tryied to publish it from powershell, getting the same error message agalluci image post shows.
    From the Event Log I got this additional information:
    There was a problem retrieving the requested package \\APPVMANAGER\AppVpck\Office\VisioProVolume_ProPlusVolume_en-us_x86.appv for import. Error message: Unspecified error
    Element '{http://schemas.microsoft.com/appv/2010/manifest}UsedKnownFolders' is unexpected according to content model of parent element '{http://schemas.microsoft.com/appx/2010/manifest}Package'.
    I haven't found any indication of which file is the manifest app-v file.
    I also haven't found any .xml with the "UsedKnownFolders" tag (I changed the .appv package extension to .zip and explored some of the files).
    I tryied creating a package for 32 and 64 bits, only office, office and visio, and office visio and project running Windos 7 and Windows 2012.
    Thanks in advance for any help.

  • MATERIALIZED VIEW BECOMES INVALID AFTER REFRESH

    Hello All,
    I have wierd problem ,
    In my enviroinment we have a MATERIALIZED VIEW ,which is refreshed by a sheduled DBMS_SNAPSHOT.REFRESH Job post the refresh it becomes invalid and every time we have to compile it manually ,Could anybody help with a solution .Thanks a lot in Advance .
    DETAILS :
    ======
    VERSION:Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
    HOST: IBM AIX

    Is the MV part of a refresh group?
    Post the command and parameters used by the scheduled job to do the refresh as well as the parameters you use when you do it manually.

  • PL/SQL Functions becoming 'invalid'

    We have created a set of functions which are used by
    applications and triggers within our system. Everything ran over
    the weekend and all triggers were operating and functions were
    performing as expected. Yesterday the it was noticed that one of
    the functions had become 'Invalid' which stopped the processing
    of the system. The function is invoked by a trigger on insert
    into a table.
    Does anyone know what would cause a function to go 'Invalid'
    like this?
    Thanks
    Jeff M.

    Hi,
    If you alter or modify the objects(DDL Operations), then the
    procedures, functions, views..etc will be invalid. And also it
    applies recursively,i.e,if these procedures and functions are
    referred in some other procedure and functions, they also will
    become invalid. So before applying a DDL operation on any object
    better find the it's references from DBA_dependencies and
    recompile them after the DDL operation.
    Regards,
    G. Rajakumar.

  • SQL Plus session - "schema.package" has been invalidated on making any chng

    Hi
    I am in the process of testing a stored procedure. Whenever I make changes to the procedure I am executing it from the SQL Plus session. But whenever I make a change to the procedure - i have to close that particular SQL Plus session and open another one. I get the message:
    ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-04061: existing state of has been invalidated
    ORA-04061: existing state of package body
    "schema.package" has been invalidated
    ORA-04065: not executed, altered or dropped package body
    Is there a way that I do not have to open a new SQL Plus session everytime I make change to the package?

    It does not help :(. I get this problem in a SQL+ session only when I make a change in a JDev session. I have to log off the SQL+ session and log back in and it is OK again without re-compling anything. I don't have a problem with two SQL+ session. Isn't that strange?
    ben

  • Variable becomes invalid during loop (CS6 based)

    First off I know that CC fixed this, but unfortunately my hands are tied and I have to use CS6 for this process. The script below is built to allow user to select precomp layers within a master comp. It then strips each precomp down to just itself and then the project is reduced to just the master comp and associated assets. It's actually inspired by Jeff Almasol's script he made for me years ago. I've just customized my own variation due to an issue in CS6 with the Reduce Project function. The issue arrising is that the loop goes off and processes the first selected precomp properly, but the master comp variable becomes invalid upon the second precomp processed. The script involves saving the project file and reopening the main source project during the loop process. Any thoughts as to why the variable is becoming invalid? The lines marked BOLD and ITALIC are the trouble spots.
         function compToProjectsScript(thisObj){
              try{
                   var masterComp, curItem, selLayerIndices, selLayerIndicesLength, curLayer, curLayerName, saveFolder, newFileInfo, curLayerIndex, folderString, allItems;
                   ///FUNCTIONS
                   //retrieveSelectedLayersIndex
                   function retrieveSelectedLayersIndex(compObj){
                        var selLayers, selLayersLength, layerIndex;
                        layerIndex = new Array();
                        selLayers = compObj.selectedLayers;
                        selLayersLength = selLayers.length;
                        for(var l=0; l<selLayersLength; l++){
                             if(selLayers[l].source instanceof CompItem){
                                  layerIndex.push(selLayers[l].index);
                        return layerIndex;
                   //reduceCompToLayer
                   function reduceCompToLayer(layerObj, compObj){
                        var layerCount = compObj.numLayers;
                        var lastLayer = compObj.layer(layerCount);
                        layerObj.moveBefore(lastLayer);
                        for(var i=1; i<=layerCount-2; i++){
                             firstLayerLocked = compObj.layer(1).locked;
                             if(firstLayerLocked == true){
                                  firstLayerLocked = false;
                                  compObj.layer(1).remove();
                             }else{
                                  compObj.layer(1).remove();
                   //retrieveParentCompIndexNum
                   function retrieveParentCompIndexNum(){
                        var proj, openedComp, parentComp, itemcount;
                        proj = app.project;
                        openedComp = proj.activeItem;
                        itemcount = proj.numItems;
                        if(openedComp instanceof CompItem){
                             parentComp = {'name': openedComp.name, 'id': openedComp.id};
                             for(var i=1; i<=itemcount; i++){
                                  if(proj.item(i).name == parentComp.name && proj.item(i).id == parentComp.id){
                                       return i;
                  masterComp = app.project.item(retrieveParentCompIndexNum());     //VARIABLE SET
                   selLayerIndices = retrieveSelectedLayersIndex(masterComp);
                   selLayerIndicesLength = selLayerIndices.length;
                   var curProjFile = app.project.file;
                   if(curProjFile != null){
                        saveFolder = Folder.selectDialog("Choose a \"save to\" folder.");
                        if(saveFolder != null){
                             folderString = Folder.decode(saveFolder).toString();
                             app.project.save(new File(folderString + "/_Duplicate_" + curProjFile.name));
                             var dupFile = app.project.file;
                             app.beginUndoGroup("compToProject");
                                  for(var i=0; i<selLayerIndicesLength; i++){
                                            app.beginSuppressDialogs();
                                                 curLayerIndex = selLayerIndices[i];
                                                 curLayer = masterComp.layer(curLayerIndex);     //BECOMES INVALID ON SECOND PASS
                                                 curLayerName = curLayer.name;
                                                 reduceCompToLayer(curLayer, masterComp);
                                                 app.project.reduceProject(masterComp);
                                                 newFileInfo = folderString + "/" + curLayerName + ".aep";
                                                 app.project.save(new File(newFileInfo));
                                            app.endSuppressDialogs(true);
                                       app.open(curProjFile);
                             app.endUndoGroup();
                             writeLn("All done.");
                   }else{
                        alert("Save project first, then try again.");
              }catch(err){alert("Error at line #" + err.line.toString() + "\r" + err.toString());}
         compToProjectsScript(this);

    Here's that final setup I went with:
    //START
         function compToProjectsScript(thisObj){
              try{
                   var masterComp, curItem, selLayerIndices, selLayerIndicesLength, curLayer, curLayerName, saveFolder, newFileInfo, curLayerIndex, folderString, allItems;
                   ///FUNCTIONS
                   //retrieveSelectedLayersIndex
                   function retrieveSelectedLayersIndex(compObj){
                        var selLayers, selLayersLength, layerIndex;
                        layerIndex = new Array();
                        selLayers = compObj.selectedLayers;
                        selLayersLength = selLayers.length;
                        for(var l=0; l<selLayersLength; l++){
                             if(selLayers[l].source instanceof CompItem){
                                  layerIndex.push(selLayers[l].index);
                        return layerIndex;
                   //reduceCompToLayer
                   function reduceCompToLayer(layerObj, compObj){
                        var layerCount = compObj.numLayers;
                        var lastLayer = compObj.layer(layerCount);
                        layerObj.moveBefore(lastLayer);
                        for(var i=1; i<=layerCount-2; i++){
                             firstLayerLocked = compObj.layer(1).locked;
                             if(firstLayerLocked == true){
                                  compObj.layer(1).locked = false;
                                  compObj.layer(1).remove();
                             }else{
                                  compObj.layer(1).remove();
                   //retrieveParentCompIndexNum
                   function retrieveParentCompIndexNum(){
                        var proj, openedComp, parentComp, itemcount;
                        proj = app.project;
                        openedComp = proj.activeItem;
                        itemcount = proj.numItems;
                        if(openedComp instanceof CompItem){
                             parentComp = {'name': openedComp.name, 'id': openedComp.id};
                             for(var i=1; i<=itemcount; i++){
                                  if(proj.item(i).name == parentComp.name && proj.item(i).id == parentComp.id){
                                       return i;
                   compIndex = retrieveParentCompIndexNum();
                   masterComp = app.project.item(compIndex);
                   selLayerIndices = retrieveSelectedLayersIndex(masterComp);
                   selLayerIndicesLength = selLayerIndices.length;
                   var curProjFile = app.project.file;
                   if(curProjFile != null){
                        saveFolder = Folder.selectDialog("Choose a \"save to\" folder.");
                        if(saveFolder != null){
                             folderString = Folder.decode(saveFolder).toString();
                             app.project.save(new File(folderString + "/_Duplicate_" + curProjFile.name));
                             var dupFile = app.project.file;
                             app.beginUndoGroup("compToProject");
                                  for(var i=0; i<selLayerIndicesLength; i++){
                                            app.beginSuppressDialogs();
                                                 sourceComp = app.project.activeItem;
                                                 curLayerIndex = selLayerIndices[i];
                                                 curLayer = sourceComp.layer(curLayerIndex);
                                                 curLayerName = curLayer.name;
                                                 reduceCompToLayer(curLayer, sourceComp);
                                                 app.project.reduceProject(sourceComp);
                                                 newFileInfo = folderString + "/" + curLayerName + ".aep";
                                                 app.project.save(new File(newFileInfo));
                                            app.endSuppressDialogs(true);
                                       app.open(dupFile);
                             app.endUndoGroup();
                             writeLn("All done.");
                   }else{
                        alert("Save project first, then try again.");
              }catch(err){alert("Error at line #" + err.line.toString() + "\r" + err.toString());}
         compToProjectsScript(this);
    //END

  • R-Tree Index becomes invalid

    Hi,
    I've a index that becomes invalid almost every day. I get the error message
    ORA-29902: error in executing ODCIIndexStart() routine
    ORA-13203: failed to read USER_SDO_GEOM_METADATA view
    ORA-13203: failed to read USER_SDO_GEOM_METADATA view
    ORA-29400: data cartridge error
    ORA-01013: user requested cancel of current operation
    ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 286
    after rebuilding the index everything works fine again.
    Does anybody know a solution on that problem?
    Peter

    Is there a nightly process that is causing things to change? I think we need more info to be able to help you.
    Is it possible that this index is in a different tablespace and backups aren't shutting them down/bringing them back up in the right order?
    Any manner of things could cause this, beyond the Oracle bug for spatial indexes in 10G, with large number of records. Ours handle this fine night after night, so something must be causing your data to change or affecting the index.
    What happens every night, or at the end of the day that could be affecting it?

  • Object Fields Mysteriously Becoming Invalid

    I am not exactly sure what code to post with this considering the nature of what's going on, so I'll do my best to explain and then perhaps I can provide code based on your responses.
    When my application loads in the AppDelegate I create 3 objects of the "Item" type and then create an array out of those objects and add that array to an ItemListController which has a property for an NSMutableArray. The program then loads a UINavigationController with each of those objects in it being drawn with a subClass of UITableViewCell. As it stands now, if I click on any one of those objects more than 3 times, the object itself does not become nil, but all of the fields within it do.
    - (void)applicationDidFinishLaunching:(UIApplication *)application {
    Item *sword = [[Item alloc] initWithName:@"Sword" description:@"This is a sword"];
    //sword.itemPrice = (int *)524;
    Item *shield = [[Item alloc] initWithName:@"Shield" description:@"This is a shield"];
    //shield.itemPrice = (int *)322;
    Item *subligar = [[Item alloc] initWithName:@"Subligar" description:@"This is a subligar"];
    //subligar.itemPrice = (int *)1034;
    [subligar setImageWithPath:@"Hello.png"];
    if(self.itemListController == nil) {
    ItemListController *controller = [[ItemListController alloc] init];
    self.itemListController = controller;
    [controller release];
    NSMutableArray *itemArray = [[NSMutableArray alloc] initWithObjects:sword, shield, subligar, nil];
    self.itemListController.items = itemArray;
    [itemArray release];
    // Configure and show the window
    [window addSubview:[navigationController view]];
    [window makeKeyAndVisible];
    The click handler of my TableView right now simply calls the AppDelegate's instance of ItemListController and then gets the object back from the items array at the index at which the user clicked. From there, I set a few properties and load a view tailored to that Item.
    Presently, all of the logic that sets properties with the Item and loads the view for that object is commented out and so the only behavior occurring is the Item being retrieved from the AppDelegate's ItemListController.items and then being stored in a temporary object which is later released. But like I said above, *after 3 requests for my object all of its fields become invalid*. I have no idea what is causing it because the object itself is never being released within that time. Below is the code from the click event of the table cell:
    - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    calls++;
    NSLog(@"Hit Count: %d", calls);
    iPhoneHelloWorldAppDelegate *appDelegate = (iPhoneHelloWorldAppDelegate *)[[UIApplication sharedApplication] delegate];
    Item *item = (Item *)[appDelegate.itemListController.items objectAtIndex:indexPath.row];
    //lastItem = item;
    if(self.itemView == nil) {
    ItemViewController *viewController = [[ItemViewController alloc] initWithNibName:@"ItemViewController" bundle:[NSBundle mainBundle]];
    self.itemView = viewController;
    [viewController release];
    if(calls > 3) {
    NSLog(@"item retainCount = %d", [item retainCount]);
    [item release];
    Here's a snapshot from the debugger after my Item object dies:
    http://img514.imageshack.us/img514/4567/picture2az5.png

    Hi,
    Item *item = (Item *)[appDelegate.itemListController.items objectAtIndex:indexPath.row];
    //lastItem = item;
    if(self.itemView == nil) {
    ItemViewController *viewController = [[ItemViewController alloc] initWithNibName:@"ItemViewController" bundle:[NSBundle mainBundle]];
    self.itemView = viewController;
    [viewController release];
    if(calls > 3) {
    NSLog(@"item retainCount = %d", [item retainCount]);
    // Why do you relase item? I don't see any retain or method wich increases the retain-count.
    [item release];

  • Objects using dblinks become invalid

    I am using numerous functions / procedures / synonyms which point to other databases via dblinks. All was well when the dbLinks / synonyms were public. Last week I was asked to put up a test schema on the same database so I duly made all the public dblinks & synonyms private. All seemed well, everything compiled so I made it live.
    Now we get intermittent problems whereby the procedures using the synonyms & dblinks suddenly become invalid. They refuse to automatically compile, causing errors in the applications using the database. SOmetimes they automatically recompile after a time, sometimes they refuse to compile until I do them manually in SQL developer.
    anybody have any idea why this should be happening?
    Main database is Oracle Enterprise 11.1.0.7 64 bit, connecting to one of same version, one of 10.2.0.4 64 bit. All running on AIX 6.1.

    Hi,
    Same thing is happening here.
    DB A with PROC_SP (Strore procedure)
    DB B with 2 users; user TEST1 referencing [email protected] and user TEST2 referencing also [email protected]
    When compiling code on user TEST1 that uses [email protected], the code on TEST2 becames invalid, and vice-versa.
    Did you solve your problem ?
    My Database version is 11.2.0.2.0, both DB (A and B) use the same version (Exadata with 11R2)
    Thanks in advance.

Maybe you are looking for