DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: Query to check when the table was updated

  1. #1
    Join Date
    Apr 2006
    Posts
    2

    Query to check when the table was updated

    Hello All,

    Is there a query that I can run against a table to see when it was updated last? Updation is either adding a new row or column or updating a row.

    Thanks,
    Kiran

  2. #2
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    no, not unless you store it yourself

  3. #3
    Join Date
    Apr 2006
    Posts
    2

    there's one

    FYI:

    In Oracle 10gr2, you can do this

    SELECT max(SCN_TO_TIMESTAMP(ORA_ROWSCN))
    FROM my_table;

    I haven't tried that myself.

    Thanks,
    Kiran

  4. #4
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    Quote Originally Posted by kkkumar
    FYI:

    In Oracle 10gr2, you can do this

    SELECT max(SCN_TO_TIMESTAMP(ORA_ROWSCN))
    FROM my_table;

    I haven't tried that myself.
    For this to work (i.e. to help the original poster to find out the latest modified row), the table should be created with row-level dependency tracking, that is with ROWDEPENDENCIES parameter specified when the table is *created*. Otherwise, the above query will only help you detect which *block* (not row!) was changed during the last transaction.
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width