Time when Oracle object become invalid

We can find if there are invalid objects in the database.
But is there a way to find when the object become invalid. I am interested in finding the time when object become invalid.
Let me know if Oracle can tell this information.
Thank you.
--harvey                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Hi harvey;
Please check below thread:
Determine when objects become invalid
Determine when objects become invalid
http://stackoverflow.com/questions/1467604/determining-when-an-oracle-database-object-became-invalid
Also see:
http://download.oracle.com/docs/cd/B28359_01/server.111/b28310/general007.htm
Regard
Helios

Similar Messages

  • 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

  • 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

  • When an Object got invalid?

    Hi All,
    Is there any way to findout when(date / time) an object got invalid, as the LAST_DDL_TIME and TIMESTAMP columns of the DBA_OBJECTS do not change if the parent object gets affected and child become invalid right?

    Enfact I want to know at what time an object became INVALID,
    there are 2 n more DBA's applying the Script for the Database, One is working on an assignment to remove the unwanted Objected from DB and the other is working on normal development , now both executed their script which invalidated around 200 Objects, I want to know Invalid objects by each action (Cleanup or Development action) As I am aware of the time the statements were executed, one way to get the list, is to revert the changes and work pro-activly, but it would be very easy for me if I group the list of objects invalidated by the time.otherwise I would have to get the list of all objects before and after every action activity, which is frequent
    Thanks

  • When a Index become invalid?

    How can I force my index to become invalid?
    Thanks.
    Paulo.

    Hi, thanks for your answer. But it is not yet clear for me.
    Whats the difference between the status INVALID and UNUSABLE?
    Can you help me?
    Edited by: paulo on Mar 14, 2012 9:40 PM

  • 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;

  • Why Synonym becomes INVALID when changes are made on the related object ?

    Hi all,
    WHY SYNONYMS becomes invalid when changes are made on related OBJECTS ?
    Is there any specific reasons for this.?
    Is there any method or procedures to make the synonym VALID as soon as the we perform any alteration on the related object.
    Thanks
    Himabala

    Synonym will be validated when it is accessed, no need to take an action.

  • 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 PROC_SP@A and user TEST2 referencing also PROC_SP@A.
    When compiling code on user TEST1 that uses PROC_SP@A, 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.

  • Triggering on when objects are INVALID

    Hi, I'd like to have a trigger which compile an objects right after the object's status changes to INVALID. How can I do it ?
    Is there any trigger event ? or should I use audit ?

    Przemek Piechota wrote:
    Hi, I'd like to have a trigger which compile an objects right after the object's status changes to INVALID. How can I do it ?
    Is there any trigger event ? or should I use audit ?It's possible to have INVALID objects when making change on an object without checking its dependencies. So before making any change in the production database, you HAVE to be sure that no any objects will be INVALID by checking its dependencies from DBA_DEPENDENCIES view
    There're generally two ways to be notifed when there are an INVALID object in any database
    The first method is using OEM. Go to Administration->Metric and POlicy Settings-> and set the value for the Owner's Invalid Object Count metric and change Collection Schedule to any time you want
    The second method is writing a shell script which queries (each 10 minute for example) all your databases (using status column of the DBA_OBJECTS view) and send you email or sms message when finds any INVALID object
    Kamran Agayev A.
    Oracle ACE
    My Oracle Video Tutorials - http://kamranagayev.wordpress.com/oracle-video-tutorials/

  • 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

  • Performance issue: stmt.execute() takes a long time when using Oracle objs

    Folks,
    I have a PL/SQL API that returns a REF CURSOR over an Oracle object that contains other objects. In the JDBC layer, when I do a stmt.execute(), it takes about 1.2s for this statement to run while the execution of the PL/SQL API in the database takes only about 100ms or so. When I connect to a database that is physically located really far away, the delta here increases (perhaps due to the network latency).
    I believe it is not as efficient to use Oracle ADTs in conjunction with JDBC. However, not using an Oracle object and replacing that with a bunch of linear arrays is not really an option for me considering the amount of change involved and what a maintenance nightware that would be. At the same time, I need to get this to perform better. Any thoughts?
    I suspect that there are a number of network round trips with Oracle objects are involved. If that is infact true, what are my options?
    I use Oracle 10g, and the Oracle JDBC thin driver. Thanks.

    I have an Oracle object that has say 3 fields - number, number and number_table (indexed table of numbers). Right now, I return a REF CURSOR and do a getObject() in the java layer. But, I want to try and change this so that I return linear arrays (meaning, all these fields are not embedded in an Oracle object). Dont know if that would make things quicker but wanted to check to see if there were other alternatives.
    Also, can I define a procedure that returns an OUT parameter which is an indexed table, and then do a registerOutParameter(<index>, OracleTypes.ARRAY)? I tried that but it gives me a PLS-00306 error (wrong number of types of arguments).

  • Oracle Object Type Constructor Called Multiple Times

    I have an object type with a custom constructor. In SQL, when I reference the attributes the constructor is called multiple times in Oracle 11.2.0.4.
    Why is the constructor called multiple times?
    How do I stop it?
    My current work around is to reference the attributes and use the /*+ materialize */ hint.
    Problem Setup
        create or replace type Foo as object
          Bar1 NUMBER,
          Bar2 NUMBER,
          Bar3 NUMBER,
          CONSTRUCTOR FUNCTION Foo(p_Bar1 NUMBER, p_Bar2 NUMBER, p_Bar3 NUMBER)
            RETURN SELF AS RESULT
            DETERMINISTIC
        create or replace type body Foo is
          -- Member procedures and functions
          CONSTRUCTOR FUNCTION Foo(p_Bar1 NUMBER, p_Bar2 NUMBER, p_Bar3 NUMBER)
            RETURN SELF AS RESULT
            DETERMINISTIC
          AS
          BEGIN
            SELF.Bar1 := p_Bar1;
            SELF.Bar2 := p_Bar2;
            SELF.Bar3 := p_Bar3;
            dbms_output.put_line('Foo Constructor Called');
            RETURN;
          END;
        end;
    Problem
        -- Constructor is called 6 times!
        -- Once for each column and once for each predicate in the where clause.
        SELECT x.f.bar1 AS bar1, x.f.bar2 AS bar2, x.f.bar3 AS bar3, f
        FROM (
          SELECT foo(p_Bar1 => 1, p_Bar2 => 2, p_Bar3 => 3) f
          FROM dual d
        ) x
        WHERE x.f.bar1 = x.f.bar1 AND x.f.bar2 = x.f.bar2
    Output
    Foo Constructor Called
    Foo Constructor Called
    Foo Constructor Called
    Foo Constructor Called
    Foo Constructor Called
    Foo Constructor Called
    Workaround
        -- Work Around
        -- Constructor is called 3 times
        -- Once for each column in the inline view.
        -- Note, I removed column f (the object type) because it's not compatible with the materialize hint.
        WITH y AS (
          SELECT /*+ materialize */ x.f.bar1 AS bar1, x.f.bar2 AS bar2, x.f.bar3 AS bar3
          FROM (
            SELECT foo(p_Bar1 => 1, p_Bar2 => 2, p_Bar3 => 3) f
            FROM dual d
          ) x
        SELECT y.bar1, y.bar2, y.bar3
        FROM y
        WHERE y.bar1 = y.bar1 AND y.bar2 = y.bar2

    Another work-around is described in this thread... Accessing fields of a custom object type... which makes use of a collection type combined with the TABLE operator, like so...
    create or replace type FooTable as table of Foo;
    SELECT x.bar1 AS bar1, x.bar2 AS bar2, x.bar3 AS bar3, value(x) f
        FROM table(FooTable(
          foo(p_Bar1 => 1, p_Bar2 => 2, p_Bar3 => 3)
        )) x
        WHERE x.bar1 = x.bar1 AND x.bar2 = x.bar2
    BAR1 BAR2 BAR2 F
    1    2    3    (1, 2, 3)
    Foo Constructor Called
    Hope that helps...
    Gerard

  • Some times when I press the home button to read my finger the screen becomes black and it shows the Apple logo, this take a few seconds to get back the screen and this has been happening even 3 or 4 times in a row!   What should I do?

    Some times when I press the home button to read my finger the screen becomes black and it shows the Apple logo, this take a few seconds to get back the screen and this has been happening even 3 or 4 times in a row!
    What should I do?

    Basic troubleshooting from the User's Guide is reset, restart, restore (first from backup then as new).  Try each of these in order until the issue is resolved.

  • Object Class Invalid when downloading the pricing procedure from ECC to CRM

    Hi,
    I want to download the pricing procedure for that I have created the ZDNL_CUST_CND which contains only the following tablesT683, T683S, T683T and T683U.
    When I check in R3AM1 status is Red.
    The following Error have been found in SLG1
    •     Object class invalid
    •     Error in inbound data check
    Message no. CND_MAP120
    Diagnosis
    During the receiving inspection, serious errors were found in the consistency of the exchange object.
    System Response
    Data exchange is terminated
    •     Data exchange terminated     
    Message no. CND_MAP122
    Diagnosis
    Data exchange has been terminated due to serious errors. No exchanged data has been posted in the system.
    The following Error has been found in SMQ1
    •     R3AD_CONDITIONS     STOP
    Details of STOP
    Set by Host name: litldq; Transaction: ; Report: SAPMSSY1
    I have checked the connection, everything is perfect.
    What may be the problem?
    Thanks

    Hi,
      Please try to re-generate the adapter object (ZDNL_CUST_CND) services using trx.
    SMOGGEN
    . After this, try re-running the load.
    I assume that your CRM inbound mapping module are correctly coded. If the problem persists, try de-registering the R3AD_CONDITIONS inbound queue using trx.
    SMQR
    and then debugging the inbound queue from the same trx. after re-starting the load.
    Reward if this helps!
    Regards,
    Sudipta.

Maybe you are looking for

  • Error while  opening  a queryin BI 7?

    When I am opeing a query in BI 7 analyzer first I will be getting a warning message saying creating of TEXTELEMENT_24 failed and after that I will be getting error message A critical program error has occured. program will now terminate. Please refer

  • Software Component Dependencies PI 7.1

    Hi experts, I'm work with SAP NetWeaver PI 7.1 and I have two scenarios with ccBPM to implement an interface from SCV B to SCV A, and another interface from SCV B to SCV A. For the visibility of metadata between SCV have defined a dependency in SCV A

  • How to have slide show play automatic and then stop?

    How do I get my iMovie to burn to iDVD without a theme and play when inserted into a DVD player automatically once and then stop?

  • Printing documents in color

    I want to print documents in a color, rather than black, but I can't figure out how to make that happen.  I'm sure it is a small adjustment but I just can't seem to figure it out.  I've looked through the manual and gone through all the online help b

  • Portals and SLD

    Hi all, I've configured an SLD in solman, I've configured in visual administrator the SLD Data Supplier service to connect to Solman and also I've created the RFC Destination at JCO RFC Provider, everything seems ok. In my SLD I can see my landscape