Get the list of table's last Inserted/Updated date from a database

Hi All,
Good afternoon!
Please help me to find the last inserted/updated date from different tables in a database.
Consider I have a database called testDB, which contains 20 tables. Most of these tables will get data inserted/updated daily. But sometimes it may not happen due to some issues . We will not be knowing about this issue until we check  in each table
manually. Now, somebody should be daily checking for the issues in this db. So, we have decided to make an alert mail to send this informations to us.
We need to check whether any of the table's in TetsDB has got inserted/updated data in one day difference.
I have tried this..
SELECT OBJECT_NAME(OBJECT_ID) AS Object_, last_user_update,*
FROM sys.dm_db_index_usage_stats
WHERE database_id = DB_ID( 'TestDB')
Thanks,
Julie

The solution depends on the version and edition of your SQL Server.
If you use SQL Server 2000 or SQL Server 2005, please visit these links: 
How do I audit changes to SQL Server data?
Table Auditing with SQL Server 2000
If your SQL Server 2008 or above (only on the Enterprise edition), please have a look at this link:
Change Data Capture
If your SQL Server 2008 or above (all editions),
you can use Change Tracking, but Change tracking captures the fact that rows in a table were changed, but does not capture the data that was changed.
more info: 
Comparing Change Data Capture and Change Tracking
Saeid Hasani [sqldevelop]
HI,
I've read about change tracking change data capturing now. 
We need to track the data daily and we need to know whether any modification happens in those tables.
Will it make any performance issue if I enable change data capturing on multiple tables.. lets say 20+ tables.?

Similar Messages

  • How to get the list of tables?

    How can I get the list of tables in database using SQL/PLSQL?
    Thank you.

    It depends what Data Dictionary views you have access to.
    SELECT table_name
    FROM user_tables
    will tell you all the tables in your schema.
    SELECT table_name
    FROM all_tables
    WHERE owner = 'XXX'
    will tell you all the tables that you have some kind of access to. You may be able to get similar information from
    SELECT table_name
    FROM dba_tables
    WHERE owner = 'XXX'
    Leave out the WHERE clause if you're not interested in restricting by owner
    You may need to get your DBA to grant access to ALL_TABLES and DBA_TABLES.
    Define these as (parameterised) Cursors if you want to do this work in PL/SQL. Return the results into a PL/SQL table (of xxx_tables.table_name%ROWTYPE) if you want return the list as a parameter. Bulk Collect the results into the PL/SQL table if you're using Oracle 8i.

  • How to get the list of tables having index in particular tablespace

    HI
    can anyone help me with this
    i need to display the list of tables that are having indexes in a particular tablespace(let it be A)
    and the list of tables that are not having indexes in tablespace A.
    thanks in advance...

    user8884944 wrote:
    HI
    can anyone help me with this
    i need to display the list of tables that are having indexes in a particular tablespace(let it be A)
    and the list of tables that are not having indexes in tablespace A.
    thanks in advance...Use TABLESPACE_NAME, INDEX_NAME and TABLE_NAME columns of DBA_INDEXES view
    [Kamran Agayev A. |http://kamranagayev.wordpress.com] (OCP 9i/10g)
    Author of the upcoming book - *"Oracle Backup & Recovery: Expert secrets for using RMAN and Data Pump"*
    http://www.rampant-books.com/book_1002_rman_backup_recovery.htm

  • Can not insert/update data from table which is created from view

    Hi all
    I'm using Oracle database 11g
    I've created table from view as the following command:
    Create table table_new as select * from View_Old
    I can insert/update data into table_new by command line.
    But I can not Insert/update data of table_new by SI Oject Browser tool or Oracle SQL Developer tool .(read only)
    Anybody tell me, what's happend? cause?
    Thankyou
    thiensu
    Edited by: user8248216 on May 5, 2011 8:54 PM
    Edited by: user8248216 on May 5, 2011 8:55 PM

    I can insert/update data into table_new by command line.
    But I can not Insert/update data of table_new by SI Oject Browser tool or Oracle SQL Developer tool .(read only)so what is wrong with the GUI tools & why posting to DATABASE forum when that works OK?

  • How to get the list of tables having referential integrity connection

    Hi,
    I need to know the tables list of having foreign key relationship
    means
    I've table t1 and t2 and they have foreign key relation and t2 and t3 also having the same like i've almost 20 tables in connection...
    So please help me the script to find like above....
    Please let me know if i'm not clear

    Thank you for support and i'll try...
    And that is:
    create table log_table1
        (       theKey  int primary key,
                theKey1  int ,
                effDate date );
    create table log_table2
        (       theKey  int primary key,
                theKey1  references log_table1(theKey) ,
                effDate date );
    create table log_table3
        (       theKey  int primary key,
                theKey1  references log_table2(theKey) ,
                effDate date );     and tried the following query:
    select table_name
    from user_constraints
    where constraint_type='R'
    and r_constraint_name in
      (select constraint_name
      from all_constraints
      where constraint_type in ('P','U')
      and table_name='LOG_TABLE1');but getting
    TABLE_NAME
    LOG_TABLE2but i need to get the output LOG_TABLE2 & LOG_TABLE3 also

  • How do I get the iTunes store to pull and use updated info from Gracenote?

    I'm helping a music group fix their CD information, which was incorrect in the Gracenote database. Gracenote made the corrections, but the iTunes store is not reflecting the changes. I verified the changes were made by inserting the CD on a PC, and, through the iTunes client, asking it to pull the track info from Gracenote. The info is correct.
    However, if you use the iTunes client to go to the store, the info in the store does not match what was pulled when sticking the CD in the drive and querying Gracenote. Also, if you go to the CD URL via a web browser to preview or purchase a digital download, the iTunes store web site is still showing the wrong information.
    How do I get the iTunes store (that is, Apple's server, not the iTunes client) to pull and use updated (correct) CD information from Gracenote?

    Geek Girl,
    The official Content Provider relationship with the Store depends how it was set up, and may be the group or their agent or a 3rd party such as TuneCore.  They can go back through the same official channel that put the tracks in the Store in the first place.
    Or, if it is simply an error, as opposed to an official change by the Artist, you can try the Feedback page:
    http://www.apple.com/feedback/itunesapp.html

  • How to get the list of tables in a schemata

    hello. how can i get all the names of the tables in a schemata? i am using mysql. is it possible? i have written a code in jsp and it doesn't work.
    please give me an idea. thanks

    What code have you written?
    Most often java code should be written in a servlet/bean rather than in scriptlet in a JSP.
    Anyway, check out the methods in the class java.sql.DatabaseMetaData. It has a getTables() method.
    Good luck,
    evnafets

  • How to get the list of top 10 tables grown last week or last few days

    Hi All,
    Please let me know, how to get the list of top 10 tables grown last week or last few days
    Thanks

    Please let me know, how to get the list of top 10 tables grown last week or last few days1.Oracle Version and OS info please ... ALWAYS
    2.Do you have licensing options (Tuning and/or Diagnostics Pack) ?
    3.Have you ran AWR/Statspack in last week or last few days
    1.Because Oracle do not store auto tack the history of tables growth. See below link where one user has showed the possible way of manual track of table(s) growth :
    Re: oracle tables growth
    2.MOS Note for How To Get Table Growth History Information? [ID 1395195.1]
    3.If you are in 10g than EM of 10g has something called Segmnet Statistics which can show you the growth of your table.
    4.Other clue :
    SQL> select * from table (dbms_space.object_growth_trend('SCOTT','EMP','TABLE'));
    TIMEPOINT                                                                   SPACE_USAGE SPACE_ALLOC QUALITY
    17-SEP-12 11.06.20.228000 AM                                                       1593       65536 GOOD5.A good script by Mice Ault for historical growth of segments within AWR:
    http://www.dba-oracle.com/t_table_growth_reports.htm
    Regards
    Girish Sharma

  • Table to get the list all the RFCs

    Hi Experts,
    Is there any way to get the list of all the RFCs which are using a particular communication user ?
    Can you please let me know any sap table such that it can provide the list of all the RFCs which are using a particular communication user ?

    Hi,
    To my knowledge, there is no such table.
    If I want to know which RFCs are called by a particular user, I use ST03 for last month --> RFC Profile s --> RFC Server profile
    I select the USER tab, and I double click on the user I'm interested in.
    All the RFCs called by this user are now displayed. I hope that this is  the information that you need.
    Regards,
    Olivier

  • How to get the list of database Views modifying the DB tools list tables.vi

    Hi,
    I have a problem, I just started using LabVIEW and in particular the LabVIEW connectivity toolkit and I am lookig fgor suggestion regarding how to get the list of database Views modifying the DB tools list tables.vi...
    Thanks in advance,
    Michela

    Hi Michela,
    since the VI you want to modify is part of a Toolkit, I suggest you to copy the whole block diagram in a new VI and then save it in a new location.
    Place the DB List Tables.vi on a block diagram, double click on it and go to the tab "Window -> Show Block Diagram "
    Select "Edit -> Select All" to select the whole block diagram and select "Edit -> Copy"
    Open a new VI and select "Edit -> Paste"
    Save the new VI
    In this way you can modify everything you want without overwriting the Toolkits VIs.
    Hope this can help.
    Regards, 
    Andrea N.
    Systems Engineer ATE & RF - Mediterranean Region
    National Instruments Italy

  • Newbie ques : How to get the list of all tables in the database

    Hi,
    I'm very new to Oracle (using Oracle8i currently). I wanted to know if there is a way to get the list of all tables in the database. Like in mySQL you can use the command " show tables" to get the list of all the tables.
    Any help will e greatly appreciated. Please "cc" any reply to [email protected] also.
    thanks
    Deven

    Hi
    Select table_name, owner from all_tables;
    will give u all the tables in the database.
    all_tables, dba_tables, user_tables
    all_objects, dba_objects, dba_objects
    there are many, more tables. login as system and query the tab and try to describe the tables.
    Thanks
    Malar

  • Table  name in  CRM   to  get  the list  of  customers

    Hi  Gurus
    What is the  Table name  or  T  code  in  CRM  for   getting the list of  customers  with  reference to  sales   area. ie  Sales  org , Distribution channel  and  Division.
    Similar  to  the    KNVV table in   SD
    Regards
    Raj

    Hi Raj,
    There are some tables with this information. You can use CRMM_BUT_LNK0011, but you can also check for tables with prefix CRMM_BUT_LNK0* for more information.
    You have to use the partner GUID, to read this information.
    Kind regards,
    Garcia

  • How can i get the list of DB02's Table spaces-overview?

    Dear Experts,
           Could you help me about how can i get the list of DB02's Table spaces-overview? which function module can do it?
    Thanks a lot

    Hi,
    Execute this FM DB02_ORA_FILL_TD110
    U will get all the details of table spaces in the importing parameter TD110 of that FM.
    Reward if helpful
    Regards
    Vodka.

  • Table to get the list of all tables in the database

    hi,
    please let me knwo the table where i can get the list of all tables in the database

    hi,
    please let me knwo the table where i can get the list
    of all tables in the databaseHi Michael,
    Will you EVER start reading some documentation?
    I guess it's not far that many regulars won't reply to those kind of questions.
    Believe me, reading doesn't hurt (well, at least, most of the times).
    Rgds,
    Guido

  • Getting the list of  files in a directory by their last modified date

    Dear friends,
    I want to get the list of files in a directory sorted by their last modified date.
    By default the file.list() or listFiles() return files sorted by their name in ascending order.
    Please give me your suggestions.
    Thanks in advance,
    James.

    Thanks friend,
    I myself got the answer
    here is my code:
    public File[] getSortedFileList(File dir){
    File[] originalList = dir.listFiles();
    int numberOfFiles = originalList.length;
    File[] sortedList = new File[numberOfFiles];
    long[] lastModified = new long[numberOfFiles];
    for(int i = 0; i < numberOfFiles; i++){
    lastModified[i] = originalList.lastModified();
    Arrays.sort(lastModified);
    for(int i = 0; i < numberOfFiles; i++){
    for(int k = 0; k < numberOfFiles; k++){
    if(originalList[k].lastModified() == lastModified[i])
    sortedList[i] = originalList[k];
    System.out.println("The sorted file list is:" + sortedList[i]);
    return sortedList;

Maybe you are looking for

  • Help with C# Errors (Visual Studio 2013)

    Hello, I am working on a console application in Visual C#, with Visual Studio 2013. I have been experiencing two specific errors several times, but I am just beginning to learn C#, so I do not know the cause of these errors or how to fix them. I am u

  • Best Practice - Public VLAN

    Looking for a best practice document for providing a secure, public access/internet only VLAN for both wired, and wireless. Need to provide additional secure access WLAN as well.

  • Dynamic Table -  same data repeating in all rows

    Hi Satya,       I am creating the PDF form using WebDynpro java application, and the form should be stored in local disk. The user should be able to fill and save the data in the table at any time. Note : The table used in PDF form is a dynamic table

  • How do I resolve a constant rainbow wheel when running Photoshop Elements 10?

    Greetings, After running Photoshop Elements 10 successfully for over two years, for the last couple of months I am continually getting a rainbow wheel whenever I am trying to use my PSE 10 software.  It takes forever for the wheel to resolve itself. 

  • Plotting 4D data (3D scanning grid)

    Hello, I'm looking for a bit of advice on how to best proceed with my LabVIEW application. My application typically consists of an XYZ positioner that scans an area of 10x10x10 mm and measures every 0.1 mm in each of the 3 axes. In total I have 100*1