Find tables that added or remove column

I use Oracle 11.2.0.2

I want to write a query that lists of paintings who added or dropped columns in a special day say today?

Your help is appreciated.

I need this list of tables because the materialized view build base on these tables becomes invalid when the source tables is changed. In my environment where there are several tables in the source that is constantly changing, it is a hassle to recreate materialized view. Is there an easier way to keep materializing views which source schema changes?

Published by: spur230 on May 10, 2012 16:08

>
Is there an easier way to keep materializing views which source schema changes?
>
It depends on the type of schema change AND the type of materialized view.

There is no other choice but to invalidate the application of MV if a column is deleted which is used in a MV.

You should always have access to the data in the MV - do you? You just won't be able to refresh the MV because the underlying query uses a column that no longer exists.

If a column is added, or a deleted column is not used in the MV, then most MVs should not affect. New columns not could possibly have served in the underlying query of the MV and drop columns that were not in the query of MV will not affect the query either.

As Justin says the AUDITING feature may be your best option to detect these changes.

Which still prevent the improved varieties to be invalidated and if you have a fast ON COMMIT refresh MV it will fail as soon as the DDL change is made if the table is checked or not.

Tags: Database

Similar Questions

  • way to find vm that are not removed from disk

    Is it possible that I can find, vm that are not removed from disk

    That is to say that "take inventory" but I forgot to remove the disc.

    Thank you

    If you only need a report, you can do it like this (I've made a few changes to your script).

    $unregistered = @)

    foreach ($Datastore in (Get-Datastorecluster xxxx |)) Get - Datastore)) {}

    # Collect .vmx paths of virtual machines stored on the data store

    $registered = @ {}

    Get - VM - Datastore $Datastore | %{

    $_. Extensiondata.LayoutEx.File | where {$_.} Name - like "*.vmx"} | % {$registered. Add ($_.) Name, $true)}}

    # Set up the search. VMX files in the data store

    New-PSDrive-name TgtDS-site $Datastore - PSProvider VimDatastore-Root '-' | Out-Null

    $unregistered += (@(get-ChildItem-Path TgtDS:-Recurse |)

    where {$_.} FolderPath - notmatch ".snapshot" - and $_. Name - like "*.vmx" - and! $registered. ContainsKey ($_.) DatastoreFullPath)} |

    Select DatastoreFullPath))

    Remove-PSDrive-name TgtDS

    }

    $unregistered | Export Csv c:\temp\vm-unregister.csv - NoTypeInformation - UseCulture

  • find tables that have no data

    Hi guys,.

    I have the schema name but who want to find the names of all tables which do not have all the data, perhaps no records = 0.

    I also want to find then of these tables that have names of data columns and then I want a search on that columns with column name

    Need help. Your help would be really appreciated.

    Thank you

    If the statistics are correctly collected in the schema, then:

    select * from user_tables where num_rows=0 ----->  (you may user all_tables/dba_tables);
    

    And I do not understand your second question.

    I also want to find then of these tables that have names of data columns and then I want a search on that columns with column name

    Not sure if this is what you need...

    SELECT *
      FROM user_tab_cols
     WHERE table_name IN (SELECT table_name
                            FROM user_tables
                           WHERE num_rows <> 0);
    

    See you soon,.

    Manik.

  • cfquery MVS DB2 table that contains the BLOB column

    Using ColdFusion MX 7. Capable of converting the BLOB in a string when the data source is in UDB (our database development) However, when the data source change to MVS DB2 (database Production and staging) model renders are more data on the screen.

    model code snippet:
    ...
    < cfoutput >
    < name cfquery = "acct_selector" datasource = "#request.ds #" >
    SELECT DISTINCT * from dbo. Account
    where cf_token = ' #cftoken # ' and cf_pid = ' #cfid # ' and account_system! = « I »
    order of account_num
    < / cfquery >
    < cfset acctname = arraynew (1) >
    < cfset acctnumb = arraynew (1) >
    < cfset i = 1 >
    < cfloop query = "acct_selector" >
    < cfset = account_name acctname >
    < cfset acctnumb
    = account_num >
    < cfset i = i + 1 >
    < / cfloop >
    < cfset rpdt1 = dateformat(sDate,"yyyy-mm-dd") & "-00.00.00.000000" >
    < cfset rpdt2 = dateformat(sDate,"yyyy-mm-dd") & "-23.59.59.999999" >
    < name cfquery = "reflexReport" datasource = "#request.db2 #" >
    Select reflex_rpt_id, account_num, report_tmstp, sequence_num, fk_report_typ, report_txt
    of #request.db2qlfr # .gzb005_reflex_rpt
    where (< cfloop query = "acct_selector" > account_num = "#account_num #" or < / cfloop > account_num = '0' ")
    and report_tmstp > = "#rpdt1 #" and report_tmstp < = "#rpdt2 #
    < / cfquery >
    < / cfoutput >

    < cfif reflexReport.recordcount gt 0 >
    ... (constructed here report headings)...
    < cfoutput query = "reflexReport" >
    < cfset rpdata = tostring (report_txt) >
    ....

    I know that there are lines that are selected in the cursor, because headers are displayed on the browser page. If no row is selected the process appears a user informed alert window there is no data to report for the selected date.

    I had a misunderstanding of what version of DB2 my request was connect on Z/OS. It turns out that it's the best before DATE of DB2 for Z/OS 7.1.0 which does not support BLOB of CFMX 7. We ended up writing a call to a J2EE servlet that calls existing methods within a service.

  • How to find the names of tables that have more than 100 columns

    Hi gurus,

    Please help me find the names of the tables that have more than 100 columns in the database.

    Below will be useful for you.

    SELECT atc.OWNER,atc.TABLE_NAME,count(*)
    FROM all_tab_columns atc
    GROUP BY  atc.OWNER,atc.TABLE_NAME
    HAVING count(atc.COLUMN_NAME) > 100
    

    Adding another point, you can use user_tab_columns, all_tab_columns, dba_tab_columns, based on your needs/access.

    Thank you
    Suri

    Published by: Suri on February 23, 2012 11:30

  • Find all tables that have not at least a DATE column

    DB version: 10 gr 2

    View user_tab_cols using, how can I find the tables that have not at least a column of DATE(user_tab_cols.data_Type='DATE')?
    SELECT table_name
      FROM user_tables
    WHERE table_name NOT IN  ( SELECT DISTINCT
                                      table_name
                                 FROM user_tab_cols
                                WHERE DATA_TYPE  = 'DATE'
                             );
    

    Concerning
    Arun

  • Try to find all THE objects that point to a column...

    Oracle Database 11 g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE Production 11.2.0.3.0
    AMT for Solaris: 11.2.0.3.0 - Production Version
    NLSRTL Version 11.2.0.3.0 - Production



    I have several patterns, all that have tons of objects that point to a column in a table.
    I tried looking at v$ sqltext and v$ sqlarea, but it does not appear as expected.

    There is a view that I can watch that will show me all the objects that relate to a single column?

    my situation. Had to change the structure of data in this one column. Changed the default value of a Y a l I have packages, functions, triggers, etc... dealing with this single column. I make sure I have go through EACH of them and modify them to reflect the change in the column of the table. And still, it extends over several patterns that point to it.

    I can't forget all the objects. Is there any one place to find it?

    Thank you.

    Use the mode - DBA_DEPENDENCIES

    select * from dba_dependencies
    where type= 'TABLE'
    and name = '';
    

    Another gross way...

    select * from all_source
    where lower(text) like lower('%%')
    group by owner,name,type;
    

    But, this will not search in the views & MView queries.

    HTH
    Vanessa B.

    Published by: Vanessa B on October 15, 2012 23:09
    -added

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    
  • I have about 14 000 songs in my library, about 4 copies of each of them. Try to remove duplicates, but can only do one at a time. I spent many hours, check all the files I want to delete only to find out that I can't delete them both?

    I have about 14 000 songs in my iTunes library, but really there are only about a quarter as much because there are so many duplicates. I don't know how they got there in the first place, and try to remove them is infuriating! I have already spent several hours going by checking all the files I want to remove (thinking that I would delete then all files at once) - only to find out that I still have to delete them one at a time. There must be a better way! Help, please.

    If you don't know that you want to delete all checked the songs in your library:

    • Create a new smart playlist with the following rules:

      This will show then checked all the songs in your library.
    • Select all the items in this playlist (Ctrl-A)
    • Hold the SHIFT key and press DELETE - follow the prompts to remove songs from your library and (if necessary) your PC media files

    In case of problem, you must back up your library before you do just in case the results are not what you expect - see tips to the user of turingtest2 on your iTunes for Windows with SyncToy to backup library for a suitable and recommended method.

    There is no 'simple' way to reliably remove duplicates from a library, but see the intelligence in this threadon the use of a scripted for removal of duplicates (for example).

    Long-term, try and avoid adding anything in your iTunes library that already exists in it - that's how arise the duplicates (unlike an opinion apparently dispersed, iTunes not of is duplicate anything in normal operation).  I've seen several comments suggesting here a few users to correctly copy their library from an old computer to a new one and then add the content of its media files - guaranteed way to finish with a copy of database entries or media files.

  • How to remove columns from the table on the master 1-0?

    I have an array of 96 columns with strings. I also have the array of int 96-elemets (mask) with 1 and 0.

    What I want to do is to is to remove (or hide - but I read that it is not possible) all the columns with index corresponding to 0 in the mask table.

    example:

    columns in the table

    1 2 3 4 5

    mask

    0 1 0 0 1

    I want to remove the columns 1, 3 and 4 and leave only 2 and 5 in my table.

    How can I do?

    If I create loop for with i as the index of the column, when I do DeleteTableColumns() columns number decreases, and I get an error of range out of

    Or do I have an option to hide the unnecessary columns (not set their width to 1, it's very ugly-looking)?

    Please help me (())

    Hello rovnyart!

    1. removal of columns in the table:

    I suspect that the reason why you get the out-of-range error is due to fact that in your loop, you delete the columns in the table, you'll eventually end up by referring to a column that no longer exists, because the other columns before it have been deleted. While you remove each column of your table in the loop for example, the column index number will move, because you deleted the other columns in front of her.

    To resolve this, even if you delete a column in your loop, make sure that you take also into account that the index of the column is moved because of the removed columns.

    2 hide columns in table:

    You can use the ATTR_COLUMN_VISIBLE attribute to hide columns in the table:

    http://forums.NI.com/T5/LabWindows-CVI-idea-exchange/add-attr-column-visible-attribute-for-table-Col...

    http://zone.NI.com/reference/en-XX/help/370051Y-01/CVI/uiref/cviattrcolumnvisible_column/

    3 alternatives:

    Note that another alternative would also use a tree instead, control as the tree control also supports the hidable columns:

    http://forums.NI.com/T5/LabWindows-CVI/table-hide-column/TD-p/569773

    Best regards!

    -Johannes

  • Haw to find the element in the table that appears only once

    I have a table like this 2d:

    1 2 3 4 5 0

    5 6 2 4 7 2

    8 3 6 0 9 4

    5 6 7 7 3 2

    And I need to find items that appear only once in this table

    In this case, 8 and 9

    I also need this elements (row and column) position

    Are integers

    I tried to remodel the table and use the find but no result.

    Your best bet is to remodel a table 1 d do your seaching and use 'Quotient & rest' to convert location (index) in the table 1 d back to the index in table 2D. Use "Array Size" to get the number of rows and columns of the table 2D.

    The histogram only works on 1 d arrays.

    Or reshape a 1 d table. For each digit (0-9), use 'Search 1 D Array' twice. If the first 'search' finds a match (does not =-1), use the offset to start the 2nd search beyond the 1st index discovery. If 2nd 'search' returns-1, then one and the SAME time happens

    The index of the first 'search' to calculate the index (Quotient & rest") line and collar of the 2D array.

  • adding table to the report: different column width

    Hello

    Is there a way to set different column width when the table is added to the report VI? As I understand it, the width is distributed in evently for the Table to add to the report VI.

    I have a table with 5 colunms and to set the width of each column differently for printing of the report.

    Thanks for your help

    H. Pham

    Dig into the Table to add to the report VI as a result of the entry of the column width, you will find the Table add to the report > add text table of report VI > tables.vi > Set Table column width VI. You will find a node invoke named SetColumnWidth. Simply enter the column number and the respective width for each column.

  • How to create the default user interface is newly added to the columns in the table

    I added the new columns to the database table existed who got the default values for the user interface to the columns existed.

    How to create the default UI for the new columns.

    I couldn't see the newly added columns change the default UI (object browser-> database-> default UI - Edit-> Table).

    Using APEX 5.0.3

    Can you please help.

    Thank you.

    Find the option "Synchronize with database" under tasks on the interface's default user - Edit

  • I just started using my new iMac 27 "and in Mail, I can't find the setting to display a column that shows the number of emails in each folder.  Mavericks, I had this column.  I have checked all the menus and preferences and search online.

    I just started using my new iMac 27 "and in Mail, I can't find the setting to display a column that shows the number of emails in each folder.  Mavericks, I had this column.  I have checked all the menus and preferences and search online.

    Click the triangle next to the Inbox to view the Inbox for each account. Then select the desired mailbox and the information will be displayed in the upper part.

    You are entitled to 90 days telephone support from Apple. Try to contact them.

    Apple Support contact

    Apple Support by email or chat

    Contact Apple Support - phone

  • How can I find dbx file so that I can remove it. I am unable to open Outlook Express

    How can I find dbx file so that I can remove it.  I'm unable to open outlook express

    Original title: dbx file

    You try to remove Folders.dbx?
     
     
    In Windows XP, the files of user OE (DBX and WAB) are by default marked as hidden. To view these files in Windows Explorer, you must enable Show hidden files and folders under start | Control Panel | Folder Options icon | Opinion, or in Windows Explorer. Tools | Folder options | View.
     
    The path to the message will be very similar to this:
     
    C:\Documents and Settings\Your User of utilisateur\Local Settings\Application Data\Identities\ {long string of letters & numbers} \Microsoft\Outlook Express
     
    With OE closed, find the Folders.dbx file and delete it.  Another will be created automatically when you open OE.
     
    Note these possible side effects:
     
    When you re - start OE, it will build a new index of all *.dbx files it can read and create a new Folders.dbx. However, understand that you will lose the mail directory structure and message rules will probably have to be edited.
  • Querying the oracle table that has a column with the name of "FILE".

    Hi all

    I need to have an oracle table that has the column with the name "FILE".

    I can query all columns with the query "select * from table".

    But I'm not able to use the query "select the table file.

    This table is converted from ms access to oracle and I need to have this column with the name "FILE".

    Any suggestions?

    Thank you

    Abdellaoui

    Hello

    FILE is a keyword from Oracle, so it's not a good name,

    Use FILEDATE, or DATE_FILED, or something else that is not in V$ RESERVED_WORDS. KEYWORD as the name column.

    If you need to use the FILE, then you must use quotation marks.

Maybe you are looking for

  • Need driver PCI Device for Windows 7

    My laptop is HP Pavilion 17 17-e075sr. Hardware ID are: PCI\VEN_10EC & DEV_5229 & SUBSYS_1971103C & REV_01PCI\VEN_10EC & DEV_5229 & SUBSYS_1971103CPCI\VEN_10EC & DEV_5229 & CC_FF0000PCI\VEN_10EC & DEV_5229 & CC_FF00

  • TouchEvent only will not work properly with two mobile fingers

    Hello I'm not quite sure what the problem. My code running, sometimes, this mobile finger 1 causes actions that could only be triggered by moving the finger 2. When mobile fingers 2, then, further actions are triggered, which could be invoked by the

  • Issue with weblogic server startup

    Gurus, can help body on the issue below: installed Obiee 11 g and stopped and you try to start the services on linux. -check, specify - Dweblogic.security.allowCryptoJDefaultJCEVerification = true > password to boot WebLogic server: < s ubsystem Serv

  • replacing the fan for dv7-4285dx

    I just bought a new HP fan, but I'm unable to find exactly how to get to the fan. Are there instructions on how to get to the fan

  • Problem nvidia k2 grid configuration

    HelloWe are establishing a system with vDGA using nvidia grid k2, but have some problems.We have a single host (Fujitsu ground RX2540 M1) with this card and esxi host ir unning the next versionView 6.0.1 build-2088845This information is displayed in