Views Automatically invalidated

Hi
I have created some force views in my database. Every morning when i check the invalid objects these views are automactically invalidated. When i compile them they get valid and again the next day they become invalid.
The view is a join of 2-3 tables and every night one of the tables is truncated, the indexes are dropped ,data inserted and indexes are recreated.
Any other ddl is not fired on any of the tables in the view.
The version of oracle :
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
PL/SQL Release 10.2.0.4.0 - Production
CORE 10.2.0.4.0 Production
TNS for Linux: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production
Regards
Ankit

Problem lies with your index recreation. The indexed columns are referenced in your view. Below example will illustrate my point.
SQL>
SQL> select * from rag;
       NID        SID
         1        100
         2        200
         3        200
         5        200
         6        100
         8        200
         9        100
7 rows selected.
SQL> create unique index RAG_UK ON RAG(NID);
Index created.
SQL> create view RAG_VIEW AS select NID,NID+10 Val from RAG;
View created.
SQL> select object_name,object_type,status from
  2  user_objects where object_name='RAG_VIEW';
OBJECT_NAME                                                                                                                      OBJECT_TYPE         STATUS
RAG_VIEW                                                                                                                         VIEW                VALID
SQL> drop index RAG_UK;
Index dropped.
SQL> create unique index RAG_UK ON RAG(NID);
Index created.
SQL>  select object_name,object_type,status from
  2   user_objects where object_name='RAG_VIEW';
OBJECT_NAME                                                                                                                      OBJECT_TYPE         STATUS
RAG_VIEW                                                                                                                         VIEW                INVALID

Similar Messages

  • In album view automatically display current song

    itunes 11.0.5.5
    in album view as songs are shuffled,  is there a way you can configure so that as the next song is played, the album view is updated to display the current song being played?
    right now, it does not update at it moves to play the next in the shuffle queue.

    Thanks for you help turingtest2.
    I have searced for that file and I get it twice in the same folder.  one of the files has a date stamp appended to it 2013-01-25 (todays date).
    I copied both files to another folder and moved the album artwork folder to the same folder.
    I then restarted itunes.  I did not have to request any artwork and the original artwork was still there (incorrectly).  It did not seem like anything was downloaded as itunes opened quick and when i selected album view it went to there without delay automatically with the artwork there.
    The album artwork folder was recreated in the itunes folder.
    I did a search for the *.itc files and it seems the old moved album artwork folder contained may more *.itc files than were recreated in "recreated" album artwork folder.  Not sure if that means anything.
    Hmmm.

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

  • Generate table/view automatically from xsd

    Hello all,
    following requirement: I receive xml files and appropriate xsd. I don't want to parse the xml by hand (e.g. I know of the possibility to create views from xml with extract - extracting elements manually). Is it any possibility to achieve this:
    input: xml file with xsd -> automatical processing: something what I don't know -> output: view. How I already mentioned I just know of the possibility to extract the values manually. After a brief search I found DBMS_XMLSCHEMA.registerSchema but I don't know if it helps me. Registering xsd makes the DB know how the xml look like.
    Do you have any ideas?
    Thank you in advance for your answers. I appreciate any hint.
    Kind regards,
    Anton

    >
    But you don't have to program element 1 in column 1, element 2 in column 2 etc. It handles it automatically. You just say insert into <your table 1> ds.Tables["table1 from xml"].
    >
    it's look as
    insert into <table_name>
    select *
       from <some table or view>but
    what if table will be altered, say add column
    or
    what if
    select *
       from <some table or view>will be return more columns than in <table_name>
    you get errors
    as for
    >
    ds.Tables["table1 from xml"]
    >
    not sure what is work correctly on complex schema with complex type
    if you have simple xml
    you can try to parse it dynamically:
    - parse xml to find list of tags with path
    - create script which will be generate script for xml like
    select <columns>
    from <table>
    , xmltable (
    <columns>
    )then create view on the above script
    if your xml structure will be often changing then you must be recreate your script and recreate view
    for xml sample from xsd
    http://www.codeproject.com/Articles/400016/Generate-Sample-XML-from-XSD

  • Fill a field in a customizing view automatically

    Hello all,
    I have a view cluster with me which contains two views.
    The first view is the main view and in my example, it has the resource number.
    The second view also has the resource number but as an output only field.
    The user is able to navigate to the second view only by selecting an entry in the first view.
    What I want is that when I attempt to create a new entry in the second view, the resource number field, which is an output only field gets populated automatically. How can I achieve this?
    Thanks,
    Mithun
    P.S. The foreign key relationships are maintained.

    Hi Mithun,
                      For this Functionality you need to set the maintenance flag of the Resource Number field to 'S' and generate the table maintenace to it.Now go to the view cluster and mark the second view's Dependencey as 'S' (Dependent Entry)  and the first views dependcy should be 'R' (Header Entry) . Now generate the field dependency or you can manually set it .
      Now when the user selects the first views resource number and then cliks on the second view , the resource number appears on the top of the screen which is automatically filled and in the read only format.
    Hope this input solves your problem.. 
    Cheers,
    Ravi.

  • How to load a curve and the view automatically in diadem from labview ?

    Hello,
    I want to automate a system for processing and analyzing data and for that I am using labview.
    I recently discovered software diadem and already I am able to send data from labview.
     I would now like to obtain a curve directly in the "view" is that possible?

    Hello Beneuss,
    You can create a layout template in VIEW, save it to disk and then load it when DIAdem is started. These two lines will automatically load a VIEW layout called "Example" and display the VIEW window.
    Call View.LoadLayout("Example.tdv")
    Call WndShow("VIEW")
    To automatically have a curve show up in VIEW, make sure that you assign the correct curves in the VIEW layout before you save the layout. This is done with the drag&drop functionality from the DataPortal. Just assign the channel you wish to see, and then save the layout. It will "remember" all the channel assignments and automatically show all the channels you had assigned, as long as you don't change the channel names.
    Please let me know if that helps and if there is anything else we can help you with.
         Otmar
    Otmar D. Foehner
    Business Development Manager
    DIAdem and Test Data Management
    National Instruments
    Austin, TX - USA
    "For an optimist the glass is half full, for a pessimist it's half empty, and for an engineer is twice bigger than necessary."

  • Save queries of views automatically

    Hi all,
    i have a problem: i want to save a lot of queries of views. The views are already existing, and i want to save the queries of theese views. I don't know how to do it.
    Now i do it this way:
    right click on the view -> click design. Then i copy the query and click the button 'new query' and paste the copied query and save it. This is very time-consuming since i have a lot of views.
    Is there a automatical way to do this?
    Thank you very much!
    Best Marie

    1. If you want all views to be created in another DB, then you can follow steps provided by
    Olaf Helper.
    Detail step by step for that:
    http://www.mssqltips.com/sqlservertip/1758/generate-scripts-for-sql-server-2008-object-migration/
    2. If you need to see the view definition, you can hit the below query
    Exec sp_helptext YourViewName
    3. If you need list of views and their definations, use below:
    SELECT TABLE_NAME AS ViewName
    ,VIEW_DEFINITION AS ViewDefinition
    FROM INFORMATION_SCHEMA.VIEWS
    -Vaibhav Chaudhari

  • Need to refresh Materialized Views automatically

    Hi Folks,
    GoodDay, I have created MVs for some source tables, now i need to make the refresh job automate. I mean to say no need of human interaction. The MV needs to refresh itself automatically based on certain time schedules.
    Please let me know is there any JOB need to create for my requirement..?
    It is very much better if any one provide some sample JOB code.
    Regards,
    Ramesh.

    You can dig up sample dbms.scheduler code in the Scheduler forum, or simply google search.
    Regarding the M.View, can't you inside the scheduler job, drop the m.view, and recreate it? Or if you need fresh data any moment, a regular view is probably better.

  • View Link Invalid Number

    Hi all,
    I have two view links connected to each other with 5-6 parameters. All the parameters are number but when i run the page i gate sql exception with invalid number error. Any idea about this issue?

    oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT * FROM (SELECT
    DISTINCT X.CL_LOOKUP_ID,
    X.CL_LOOKUP_ORDER,
    X.CL_LOOKUP_DETAIL_ID,
    (X.CL_LOOKUP_ORDER || ' - ' || X.CL_DESC) CODEDESC,
    ('RenderDisableSub') RENDER_ENABLED,
    XCS.VESSEL_ID,
    XCS.CL_SURVEY_TYPE_ID,
    XCS.CL_PERIOD_ID,
    XCS.SURVEY_REPORT_ID,
    XCS.SURVEY_ID,
    'N' DETAIL_YES
    FROM
    XXDENIZ.XXDP_CL_LOOKUP_VALUES_DETAIL X,
    XXDENIZ.XXDP_CL_SURVEY XCS,
    XXDENIZ.XXDP_CL_SETUP XC
    WHERE
    X.ENABLED = 'Y'
    AND XC.CL_SETUP_ID = XCS.CL_SETUP_ID
    AND X.CL_LOOKUP_DETAIL_ID = XC.CL_LOOKUP_DETAIL_ID) QRSLT WHERE ((:1 = CL_LOOKUP_ID))
         at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:891)
         at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1145)
         at oracle.apps.fnd.framework.webui.OAPageBean.renderDocument(OAPageBean.java:2970)
         at oracle.apps.fnd.framework.webui.OAPageBean.renderDocument(OAPageBean.java:2767)
         at OA.jspService(OA.jsp:41)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)
    ## Detail 0 ##
    java.sql.SQLException: ORA-01722: invalid number

  • Why are documents viewed automatically being downloaded?

    Document downloads
    is seems that every time i view a document that has been sent to me on email it is automatically saved by my MAC.  in most instances this is entirely unnecessary as i only want to view the document / pdf file and the auto saving is clogging up my document folder with files i just have to then go through and delete.  I can't seem to find how i change this settings to only save files i have opened if i want to.  Can anyone help? 
    you may have noticed i am complete novice and will try not to be offended by basic replies! Thanks

    no this doesn't work at all.
    I am sorry should have said i was using thunderbird because i could not get the mail on the mac set up for my email. 
    Any other ideas

  • Code View automatic font re-size?

    I have been using DW8 on a Mac, 10.3, and there is this lttle
    thing that keeps bugging me, gently but persistently:
    when working in Code View, if the document I am editing
    starts to get a little large, the Code View display's font
    automatically resizes (a bit smaller) without regard for the
    display settings in Preferences.
    I searched a bit through the forums and by googling, but I
    couldn't see much about this.
    Again, it's no big deal, but I was wondering if this was
    typical behavior and, mostly, if there was any way to disengage it?
    It's a mildly annoying aspect of an otherwise great product I use
    continuously.
    Any help or thoughts would be appreciated.

    In your preferences, or Cmd/Control U.
    It's under Fonts category for the size, and under the Code
    Coloring category for changing what colors are for what keywords
    etc.
    Dee

  • Problem of Materialized view become invalid

    Hi,
    I know that because of DML or DDL operation My Materialized view invalid.
    But I want to know the from which table it become invalid.
    Is there any dictionary view from which I can find ?

    Hi,
    I know that because of DML or DDL operation My Materialized view invalid.
    But I want to know the from which table it become invalid.
    Is there any dictionary view from which I can find ?

  • Refreshing webpart view automatically

    I have a document library called 'Client Documents' that has a column called
    'Client' and 'Document Type', when a user uploads a document to the library they select a client for example
    'Microsoft' and then the document type 'Network Diagram'
    I then created a view called 'Microsoft Network Diagrams' that filters the company name
    'Microsoft' and the document type 'Network Diagrams' to just show me the documents for that client.
    I then created a page with a webpart that connects to the document library
    'Client Documents' and then I select the view 'Microsoft Network Diagrams' from the webpart options which works as expected.
    The problem I have is if I make a change the to view I have to edit the webpart and re-select the view for it to update.
    Is there a way for the view to update automatically on the page?

    Hi mattsaundersmcp2013,
    In addition to Nikhil ahuja, an OOTB workaround I can provide is that, you can create a custom list view for that Document Library, add your web part into that view
    page and make the connection to the library.
    Then in other pages where you want your library appears, display that custom list view page in an OOTB Page Viewer Web Part. By doing this, when there is a change
    in the list view, you don’t have to worry about the view re-selecting.
    More information about
    Page Viewer Web Part:
    https://support.office.com/en-gb/article/Display-a-Web-page-on-a-SharePoint-page-by-adding-the-Page-Viewer-Web-Part-7f61feec-9b3d-4805-a960-07636ba59527
    Best regards,
    Patrick
    Patrick Liang
    TechNet Community Support

  • Change html code in page you're viewing automatically

    How to make firefox automatically edit certain html code on certain web pages
    Like on webpages I can right click inspect element and it will allow me to delete things off the page.
    I want this to happen automatically for certain webpages when containing certain html code

    I tend to write custom scripts for this sort of thing, but for a couple of more general purpose removers, you could investigate these:
    * "Remove it Permanently" can be trained to remove items from a page every time you visit. I believe it works by right-clicking what you want to remove. https://addons.mozilla.org/en-US/firefox/addon/remove-it-permanently/
    * A review on that page recommended Element Hiding Helper, which is a companion add-on for Adblock Plus. If you already use Adblock Plus, this is probably a more efficient combination. https://addons.mozilla.org/en-US/firefox/addon/elemhidehelper/

  • How to make view automatically scroll when keyboard show up

    Hi all
    I'm like a totally noob for objective-c coding, let alone the iPhone programing. :P
    Anyway, I somehow manage to create a simple application that receive input via UITextField, do some simple math, then display the result in other UITextFields (which can act as a input vice versa).
    Problem is, when I use the UITextField at the buttom of the screen as an input, the keyboard will block that text field out of my view, so I could not see what I'm typing at all.
    That's the question. How to make my view scrollable, and make it simply scroll itself out of the way when the keyboard is shown? I already inherit my view from UIScrollView, but don't know what to do next. Can you guys help enlighten me, please?
    Thanx

    Of course, if you're dealing with textFields, you should change a few things try something like that in your .m file :
    - (void)textFieldDidBeginEditing:(UITextField *)theTextField
    if ([theTextField isEqual:yourTextField])
    // Restore the position of the main view if it was animated to make room for the keyboard.
    if (self.view.frame.origin.y >= 0)
    [self setViewMovedUp:YES];
    // Animate the entire view up or down, to prevent the keyboard from covering the author field.
    - (void)setViewMovedUp:(BOOL)movedUp
    [UIView beginAnimations:nil context:NULL];
    [UIView setAnimationDuration:0.3];
    // Make changes to the view's frame inside the animation block. They will be animated instead
    // of taking place immediately.
    CGRect rect = self.view.frame;
    if (movedUp)
    // If moving up, not only decrease the origin but increase the height so the view
    // covers the entire screen behind the keyboard.
    rect.origin.y -= kOFFSETFORKEYBOARD;
    rect.size.height += kOFFSETFORKEYBOARD;
    else
    // If moving down, not only increase the origin but decrease the height.
    rect.origin.y += kOFFSETFORKEYBOARD;
    rect.size.height -= kOFFSETFORKEYBOARD;
    self.view.frame = rect;
    [UIView commitAnimations];
    - (void)keyboardWillShow:(NSNotification *)notif
    // The keyboard will be shown. If the user is editing the author, adjust the display so that the
    // author field will not be covered by the keyboard.
    if ([yourTextField isFirstResponder] && self.view.frame.origin.y >= 0)
    [self setViewMovedUp:YES];
    else if (![yourTextField isFirstResponder] && self.view.frame.origin.y < 0)
    [self setViewMovedUp:NO];
    #pragma mark - UIViewController delegate methods
    - (void)viewWillAppear:(BOOL)animated
    // watch the keyboard so we can adjust the user interface if necessary.
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow:)
    name:UIKeyboardWillShowNotification object:self.view.window];
    - (void)viewWillDisappear:(BOOL)animated
    [self setEditing:NO animated:YES];
    // unregister for keyboard notifications while not visible.
    [[NSNotificationCenter defaultCenter] removeObserver:self name:UIKeyboardWillShowNotification object:nil];
    be sure to invoke the method when you dismiss the keyboard, so that the view "falls back" to its normal state:
    if (self.view.frame.origin.y < 0)
    [self setViewMovedUp:NO];
    Of course, declare the method
    (void)setViewMovedUp:(BOOL)movedUp;
    in the .h file
    and the #define you will use in you .m file :
    // the amount of vertical shift upwards keep the text field in view as the keyboard appears
    #define kOFFSETFORKEYBOARD 50.0
    // the duration of the animation for the view shift
    #define kVerticalOffsetAnimationDuration 0.30
    good luck !

Maybe you are looking for

  • Personal File Sharing question

    Hi, I have a question about personal file sharing between my iMac Intel (my work computer) and an eMac (student work computer). I work at a college, and our regular back-up system on campus is just not worthwhile, so as a secondary back-up, I created

  • CURSOR MISALIGNMENT IN CAMERA RAW ? !

    Hello, I am a new photoshop user.  I have discovered an issue in Adobe Camara Raw and I need help to fix it. I am using Windows 8.1 on a Microsoft Surface Pro 3 with an Intel Core i7 1.7 ghz processor and the Intel HD 5000 graphics card.  I am also u

  • Maximum message size for internal users

    Hi, Is it possible to configure a maximum message size for internal users and also create exceptions? The templates available in Transport Rules only allow for "when size of any attachment is greater or equal". This is not ideal as users can add 50 X

  • JFileChooser and My network Places??

    Hello all, In the Filename of JFileChooser if i type \\100.100.100.100 or even \\100.100.100.100\d$ and click on open button it should ask the username and password of that pc and on appropriate combination of username and password it should show the

  • Re : Authorization-check

    hi       i wand to check authorization before select statement not  in selection-screen, can any one send me coding for this. mani.r