Check the status of the Table views

Hi all

I would like to check the status of the Oracle Table and the view that the procedure we had on the another db and we trying to replicate that after the passage of Oracle g10.
There probably too much sence at all for Oracle, but I can't say that as a new user, I'm sure that wilwl RAISE exception if something goes wrong, but still, we are then. Too much heritage, etc...
These points of view in question created every day with a lot of logic, that is why we do that (I think).
What would be the path of the right way to do it? I can surely do SO (SELECT COUNT (*)... > 0) THEN OK, as we expect those table alwayse be filled with something, but is there a way to check how healthy all elect, constraints, etc...
These VIEWS are quite large, almost 500 K lines.

Is there any CHECK in Oracle, as in some other languages/platforms.


Thank you for your comments, probably I'll get armed good enough to convince someone don't do it-)


Best
Trent
SQL> select status, count(*) from dba_tables group by status order by 1;

STATUS        COUNT(*)
-------- ----------
VALID            2834

The same can be done for the INDEX.

Please trust Oracle in order to maintain the integrity of the data.

Tags: Database

Similar Questions

  • How to check the table have are all views in oracle

    Hello
    How to check the table have are all views in oracle
    SELECT * FROM user_dependencies
    WHERE type='VIEW'
    AND referenced_type='TABLE'
    AND referenced_name ='Your_Table_Name' 
    

    You can use dba_dependencies to find views in the different schema.

  • The reference to the table, view, or the sequence is not allowed in this context

    Hello

    I am triying to run the SP that I describe below and the OS gives me an error:
    CREATE OR REPLACE PROCEDURE DWARE.P_CSCV_AGR_MONTH_REVENUE
    (
        TBL_NAME VARCHAR2,
        START_DATE DATE,
        RESULT_ OUT NUMBER
      ) AS
      BEGIN
      
      DECLARE 
      
        v_tbl_name VARCHAR2(30);
        v_start_date DATE;
        v_result NUMBER := 0;
        
        v_select_aux VARCHAR2(32767) := ' ';
        v_temp_table VARCHAR2(30);
        v_exists NUMBER;
    
      BEGIN
        v_tbl_name := TBL_NAME;
        v_start_date := START_DATE;
      
        v_temp_table := 'temp_' || v_tbl_name;
        
        SELECT count(*) INTO v_exists FROM tab WHERE lower(tname) = lower(v_temp_table);
        IF (v_exists = 1) THEN
          v_select_aux := '
            DROP TABLE ' || v_temp_table || ' CASCADE CONSTRAINTS PURGE
          ';
          EXECUTE IMMEDIATE (v_select_aux);
          COMMIT;
        END IF;
        
        v_select_aux := 'CREATE TABLE ' || v_temp_table || ' AS 
                                  SELECT ch.date_ month_revenue,
                                       s.date_sub month_sub,
                                       s.codpromoter,
                                       u.OPERATOR,
                                       SUM (ch.total) AS TOTAL_OK
                                       FROM cscv_sub_charges_' || to_char(v_start_date, 'YYYY_MM')|| ' ch
                                       INNER JOIN cscv_subs s
                                       ON ch.id_sub = s.ID
                                       INNER JOIN cscv_users u
                                       ON s.id_user    = u.ID
                                WHERE ch.STATUS = 0
                                GROUP BY ch.date_, s.date_sub, s.codpromoter, u.OPERATOR';
                                
        EXECUTE IMMEDIATE (v_select_aux);
        COMMIT;  
         v_select_aux := '
     INSERT INTO ' || v_tbl_name || ' (
             month_revenue,
             month_sub,
             codpromoter,
             operator,
             TOTAL_0,
             TOTAL_1,
             TOTAL_2,
             TOTAL_3,
             TOTAL_4,
             TOTAL_5,
             TOTAL_6,
             TOTAL_7,
             TOTAL_8,
             TOTAL_9,
             TOTAL_10,
             TOTAL_11
          )
            SELECT 
             month_revenue,
             month_sub,
             codpromoter,
             operator,
             TOTAL_0,
             TOTAL_1,
             TOTAL_2,
             TOTAL_3,
             TOTAL_4,
             TOTAL_5,
             TOTAL_6,
             TOTAL_7,
             TOTAL_8,
             TOTAL_9,
             TOTAL_10,
             TOTAL_11
            FROM 
            (
               SELECT 
                  month_revenue,
                  month_sub,
                  codpromoter,
                  operator,
                  sum(total_ok) total_0,
                  0 total_1,
                  0 total_2,
                  0 total_3,
                  0 total_4,
                  0 total_5,
                  0 total_6,
                  0 total_7,
                  0 total_8,
                  0 total_9,
                  0 total_10,
                  0 total_11
                 FROM '|| v_temp_table ||'
              WHERE to_char(month_sub,''mm/yyyy'') = to_char(sysdate,''mm/yyyy'')
              GROUP BY month_revenue,month_sub,codpromoter, operator
              UNION ALL
              SELECT 
                  month_revenue,
                  month_sub,
                  codpromoter,
                  operator,
                  0,
                  sum(total_ok),
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0
                 FROM '|| v_temp_table ||'
              WHERE to_char(month_sub,''mm/yyyy'') = to_char((to_date(sysdate,''dd/mm/yy'') - INTERVAL ''1'' MONTH),''mm/yyyy'')
              GROUP BY month_revenue,month_sub,codpromoter, operator
              ) 
            GROUP BY month_revenue,
             month_sub,
             codpromoter,
             operator
               ';    
        
        EXECUTE IMMEDIATE (v_select_aux);
        v_result := v_result + SQL%ROWCOUNT;
        COMMIT;
        
        v_select_aux := '
          DROP TABLE ' || v_temp_table || ' CASCADE CONSTRAINTS PURGE
        ';
        EXECUTE IMMEDIATE (v_select_aux);
        COMMIT;
        
        RESULT_ := v_result;
      END;
      END P_CSCV_AGR_MONTH_REVENUE;
    /
    ------------------------------
    BEGIN
    DWARE.P_CSCV_AGR_MONTH_REVENUE(CSCV_AGR_MONTH_REVENUE,'01/01/2010');
    END;
    /
    and the output is:
    Error at line 1
    ORA-06550: líne 2, column 32:
    PLS-00357: The reference to the table, view or sequence 'CSCV_AGR_MONTH_REVENUE'  is not allowed in this context
    ORA-06550: líne 2, column 1:
    PL/SQL: Statement ignored
    What could I do to fix the problem?

    Thanks in advance...

    Hello

    Signature of the procedure is

    CREATE OR REPLACE PROCEDURE DWARE.P_CSCV_AGR_MONTH_REVENUE
    (
    TBL_NAME VARCHAR2,
    START_DATE DATE,
    RESULT_ OUT NUMBER
    ) 
    

    either he's expecting two input parameters, tbl_name in VARCHAR2 and the other START_DATE date format format. Also you need a variable with the number data type to store the value of the PARAMETER RESULT_

    Now, look at the way you call this procedure

     BEGIN
    DWARE.P_CSCV_AGR_MONTH_REVENUE(CSCV_AGR_MONTH_REVENUE,'01/01/2010');
    END;
    /
    

    first parameter must be a VARCHAR2, so place CSCV_AGR_MONTH_REVENUE in single quotes.
    second parameter must be a date, so use to_date() function.
    Finally declare a variable with the data type of number to maintain the value of the parameter RESULT_

    Something like this:

    declare
    t_num number;
    begin
    a('CSCV_AGR_MONTH_REVENUE',to_date('01/01/2010','MM/DD/YYYY'),t_num);
    dbms_output.put_line(t_num);
    end;
    

    Vivek L

  • Watch not the tables, views,... in vs2010

    Hello

    I installed ODP.net + ODT (11i) for use with vs2010 & oracle 10.02.0010 (upgrade to oracle 11).
    The product is installed correctly, I can connect to the database using ODBC and PACO.
    However, when connecting with the ODP in vs2010 I do not see the tables, views, or stored procedures (can not see anything really). When you use ODBC, everything works: I see all the tables, views, etc. which are in the database, and I can ask questions them.
    I also tried to run a query by using the ODP.net and it gave me: ORA-00942: table or view does not exist.

    I did a search on the forums, but none of the planned solutions, nothing changed for me.

    Someone at - it ideas?

    Published by: user13493229 on 18-mei-2011 11:05

    Hello

    First of all, make sure that you see "ODP.NET" in the connection to Server Explorer dialog box.

    Then, check the tab "Filters" of the connection dialog box. By default, we block public synonyms and schema objects that you do not own.

    If you still do not see objects, then most likely your DBA not gave you enough privileges to use these tools.

    Try looking the advice I gave in the following thread explaining how to enable tracing ODP.NET. First glance to see that the SQL involved in the ORA-942.
    Then look at the other SQL we deliver and see why you are not able to get all the lines of the.

    VS2010 ORA-00942 table or view does not exist

  • My computer is slow and I checked the event viewer, and it says I have reached my limits of interruption of security.

    My computer is slow and I checked the event viewer, and it says I have reached my limits of interruption of security. I ran Netstat-no, but data flashed on the screen, but I can't freeze it at the screen to display the data. What keys down to hold the data on the screen to display it.
    Thank you, OTTO

    original title: interruption tcp/ip connect limits

    Hello

    Try the steps below and check if the problem persists.

    Step 1:

    Run the fix provided in the link below to reset TCP/IP and check if that helps.

    How to reset the Protocol Internet (TCP/IP)

    http://support.Microsoft.com/kb/299357

    Note:

    Step above contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click on the number below to view the article in the Microsoft Knowledge Base:

    How to back up and restore the registry in Windows

    http://support.Microsoft.com/kb/322756

    Step 2:

    You can check the link provided below for more information on the use of Net command in Windows XP stat.

    Netstat

    http://www.Microsoft.com/resources/documentation/Windows/XP/all/proddocs/en-us/netstat.mspx?mfr=true

  • Complete export dashboard in excel gives error generate document in the table view of subtotals

    Hi all

    We have dashboard with several tabs and you try to export the whole dashboard in excel.

    Excel file is generated with all tabs on the dashboard as the leaves, but few of these leaves are empty with error message of document generation in the first cell.

    After further analysis, we concluded that the cause is seen with subtotals on table. PivotTables with subtotals are generated correctly.

    Workaround obvious to re-create the table views in the articulation points is not possible due to a large number of reports.

    We run Oracle Business Intelligence Product Version 11.1.1.7.150120 (Build 150113.1200 64-bit)

    Any ideas or solutions to this problem would be appreciated.

    Thank you;

    Klaudio

    We just found guilty

    Lines per page to display in the table must be 999999999 max which is more than enough for our needs.

  • How to check the table (null / not null) on the screen?

    Hello all :)


    I am beginner in JDEV

    I have problem with table.
    When you view the table, I want to know if the existing data in the table are empty or not (check the query zero / non-zero)? How to do

    someone help me... :))

    THX
    agungdmt

    Hello

    If you use ADF BC, access the iterator and call getEstimatedRowCound

    Table richeTableau = get JSF component binding to table

    TableBinding JUCtrlHierBinding = (JUCtrlHierBinding) (table.getValue ()) .getWrappedData ((CollectionModel));
    DCIteratorBinding iter = tableBinding.getIteratorBinding ();

    int count = iter.getEstimatedRowCount ();

    You can do the same thing in EL

    #{bindings.iteratorName.estimatedRowCount > 0}--> true if given

    Frank

  • Check the tables in EBS

    Hello

    I use Oracle R12.

    Is oracle's hold no audit tables to track every transaction through EBS. For example, if I delete a folder of contacts using the Oracle table seeds API and validation, then it is not only the data but also the details of the transaction is completely lost.

    My requirement is that I need to check the changes that happened in some paintings, whether create, update or delete transactions.

    Is this possible? Is Oracle any method to achieve this?

    Thank you

    Anoop

    The audit is closed as default. You can open it to a user or users, or any database, but you should consider the number of rows will be inserted by the audit of the process. You may have too many lines according to your amount of the transaction.

    http://www.Oracle-base.com/articles/10G/auditing-10gR2.php

    Concerning

  • How to not display the column heading in the table view?

    I don't want to display the column header in the table display, how I can make?

    If you use JavaFX 8, you can use the following text in an external style sheet:

    .table-view .column-header-background {
      -fx-pref-height : 0 ;
    }
    

    If you use JavaFX 2.2, the - fx-pref-height attribute is not available in css, so I think that you must resort to a search:

    final Region tableHeader = (Region)table.lookup(".column-header-background");
        tableHeader.setPrefHeight(0);
    

    As always, I am obliged to point out that I don't really like the research. Sometimes, they seem to be the only way, however.

  • To access the tables/views outside of the APEX

    According to the request of Andrew as a separate and somewhat more extensive thread here:

    We have several tables/views created under some schemes; all equipped with grants and public synonyms.

    These tables is visible and accessible by all users-ORACLE (via forms and States - as it has recently used)

    Now, I started with APEX a few days ago - OK, seems to work - but with objects such only created inside of this APEX workspace.

    This kind of things outside OF THE SUMMIT is not visible.

    Why? What is missing? It was one of my questions 1.

    How do these objects visible in the APEX? Of course, we do not want all that stuff again, and existing in bulk.

    I guess that as a very common problem.

    (One solution I found already: creating views inside the APEX to access objects outside.) "It is not comfortable).

    Thank you

    Wolfgang

    Object browser is rudimentary, but behaves in the same way that developer SQL will report on these objects.

    Notice the 'Plan' selection list at the top right.

    If you have tried ' select * from abcxyz "SQL commands, you should have success - in the same way, you should have success in the creation of form/report on abcxyz via the synonym.

    Scott

    .

  • 'Extensible groups' in the table view?

    Hello

    Is it possible to allow groups of repetition in table view in 10 g? My requirement is to display a report tabular repetition of detail for each school. I can't do this in the PivotTable as another criterion is to activate the dynamic end-user sorting (which is not possible in the crosstabs Dynamics 10g).

    Any ideas?

    Thank you

    I understand now, thanks.

    If it's a pivot table, you may simply drag the column of the school in the area of "sections" to make the page layout to change the way you want. Indeed in OBIEE 11 g you can also do this with a regular table view. However in the 10g version you don't get that kind of control over the layout of a standard table view. Not the answer you wanted to hear that I suppose.

    Paul

  • How to check the table of organization

    Hi all

    How can we check the Organization of a table and more knowing that at the time of the creation of the TABLE, as we do for the external ORGANIZATION EXTERNAL tables.

    Thank you

    user13332773 wrote:
    Hi all

    How can we check the Organization of a table and more knowing that at the time of the creation of the TABLE, as we do for the external ORGANIZATION EXTERNAL tables.

    Thank you

    select * from dba_tables
    where iot_type = 'IOT' 
    
  • Change the name of the table/view to RPD.

    Hello

    I have a domain which has two points of view in it. The joints are given and have the subject area in the presentation layer. I created a few reports and they work fine. Now, we want to change the name of the views and do not want in the database. I changed the names in the presentation layer. I ran the created reports and they work fine. I have approach the right way? Did I modify them elsewhere? I don't want my reports to be affected in any way with the change of the view names. Please advice.

    Hello
    When you change the name of table or a view in the presentation layer of the RPD, it will create aliases for that name .you may notice to double-click on the name of the table, alias tab

    If you remove that alias name the report will be the effect on best practice is that do not delete aliases for name reports was changed from RPD table

    the same scenario will apply for object zone rename also

    Thank you
    Saichand.v

  • checking the tables...

    Hi Experts,

    Could someone help me with the following problem.
    We strive to implement the function of 'check' on a table. What is the best way to do audits? (keep track of any changes in the table)
    That's what we do...
      Main_table
      id
      first_name
      last_name
       dob
      hire_date
      created_date
      created_by
      updated_date
      updated_by
    
    
      audit_table
      ad_action (whether it is insert,update or delete)
      ad_time (time)
      ad_user (whos is the user)
      id 
      first_name
      last_name
       dob
      hire_date
      created_date
      created_by
      updated_date
      updated_by
    
    and i have a trigger on the "main_table" like this
    
    
      CREATE OR REPLACE TRIGGER Main_table_AIUD after
    insert or update or delete on Main_table for each row
    begin
       declare
          ljn_action varchar2(3);
       begin
          if inserting then
             ljn_action := 'INS';
          elsif updating then
             ljn_action := 'UPD';
          else
             ljn_action := 'DEL';
          end if;
          --
          if inserting  then
             insert into audit_table
             (
              ad_action,
              ad_time,
              ad_user, 
              id 
              first_name
             last_name
             dob
             hire_date
             created_date
             created_by
             updated_date
             updated_by
             )
             values
             (
              ljn_action
             ,sysdate
             ,nvl(v('APP_USER') ,USER)
             :new.id,
            :new.first_name,
             :new.last_name,
              :new.dob,
             :new.hire_date,
             :new.created_date,
             :new.created_by,
             :new.updated_date,
              :new.updated_by
             );
          elsif updating then
            insert into audit_table
             (
              ad_action,
              ad_time,
              ad_user, 
              id 
              first_name
             last_name
             dob
             hire_date
             created_date
             created_by
             updated_date
             updated_by
             )
             values
             (
              ljn_action
             ,sysdate
             ,nvl(v('APP_USER') ,USER)
             :old.id,
            :old.first_name,
             :old.last_name,
              :old.dob,
             :old.hire_date,
             :old.created_date,
             :old.created_by,
             :old.updated_date,
              :new.updated_by
             );
          else
             insert into audit_table
             (
              ad_action,
              ad_time,
              ad_user, 
              id 
              first_name
             last_name
             dob
             hire_date
             created_date
             created_by
             updated_date
             updated_by
             )
             values
             (
              ljn_action
             ,sysdate
             ,nvl(v('APP_USER') ,USER)
             :old.id,
            :old.first_name,
             :old.last_name,
              :old.dob,
             :old.hire_date,
             :old.created_date,
             :old.created_by,
             :old.updated_date,
              :new.updated_by
             );
          end if;
       end;
    end;
    /
    For "Insert" and "Delete" as I need to enter all parts of my code would be ok.

    But for "update" How can I capture only the columns that have changed? and put it in the audit table
    so next time if I go to the audit table, I see clearly that these elements had changes.

    Is there a better way to do it?

    Please let me know

    Thank you

    Marella Phani wrote:
    (3) if it is an action "update" on a table. How do we know the data of 'old' and 'new data' in the audit tables?

    It is value according to the audit. And like many, I know, unfortunately, the only way to do so far is triggers.

  • How to check the table reused in oracle 10g space?

    Hello..

    Of my system, I see table size keep growing event the deletion request is running. Because of this, I would like to check either the allowed oracle to reuse space table or not? If not then how can I enable it?


    Please help me...


    Thank you
    Balleur

    You can use dbms_space.space_usage to check for free space.

    Reuse of the space will depend on whether you use MSSM or SAMS, PCT_FREE, PCT_USED and the way in which new data is inserted?

    You can reduce or move the table and rebuild the index to reclaim space.

Maybe you are looking for

  • Watch ESPN does not open

    Hello: Just installed an cool new Apple TV4. Netflix works very well when you click on the 'Watch ESPN' app, however, crashes just by clicking on the app - it never opens. Nothing happens. Is this a problem Xfinity? Any advice as to what I'm doing wr

  • Firefox 9 looks identical to Firefox 8?

    So, I was very happy to upgrade to v9, however none of the features mentioned in the comments & reassessments are visible, even in the menus. For example, there is no big button Menu orange. It is identical to the previous one, despite saying 9.0.1 i

  • hp scanjet 4670: hp scanjet 4670 image - scanned split

    The picture says it all - that someone knows what's the problem and how to fix it - product hpscanjet4670 - was a brilliant scan until yesterday (think it might be the cable)

  • OPC materials - end user adding a new devices

    I need to create an application that connects to a compatible device OPC and read labels (variable) in my program.  I can do this by creating a shared variable.  What I have to do is to add other devices.  It seems obvious that all devices have the s

  • What is a domain and a workgroup

    How to know what domain or workgroup, I should change for a domain and a workgroup