Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2003
    Posts
    41

    Unanswered: How find out table last update?

    Hello,
    is any possibility how may I find out datetime of table last update?

    Thanks for help,

    Ondrej

  2. #2
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    I think you can't find that out, unless you - for example - write auditing triggers that'll write data you need into a table(s) you created.
    DDL statements, however, can be "traced" - issuing this query will show you last DDL statement against the requested object:
    SELECT * FROM USER_OBJECTS WHERE OBJECT_NAME = '<your_object_name>';

  3. #3
    Join Date
    Mar 2002
    Location
    Reading, UK
    Posts
    1,137
    If the update was to the table definition then you can look at dba_objects.

    If it was dml then you really need a trigger to record last modified time either against each record or in another table (but you may get concurrency issues).

    Alan

  4. #4
    Join Date
    Aug 2004
    Location
    France
    Posts
    754
    Wouldn't enabling Oracle auditing feature do it ?

    Regards,

    RBARAER

  5. #5
    Join Date
    Jan 2003
    Posts
    41
    I need know last update in data not in table structure, so I have to write trriger.

    Quote Originally Posted by AlanP
    If the update was to the table definition then you can look at dba_objects.

    If it was dml then you really need a trigger to record last modified time either against each record or in another table (but you may get concurrency issues).

    Alan

  6. #6
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    Quote Originally Posted by ohanus
    I need know last update in data not in table structure, so I have to write trriger.
    I'd suggest you add a last_update_date column to the table for the trigger to populate, rather than storing a single value for the whole table in a separate table - otherwise your users' updates will serialize as they take turns to maintain the value!

Posting Permissions

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