Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2004
    Posts
    5

    Unanswered: finding out last time a table was accessed...

    Hi,

    I am wanting to find out the last time anyone performed a select that extracted records from a particular table.

    I have tried doing

    select to_char(last_ddl_time,'DD-MON-YY HH24:MIS')
    from user_objects
    where object_name = 'my-table-name';

    but this gets the time that the table structure was modified - not the last time the table was accessed... is there a way that this info can be obtained?

    I am using

    Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.4.0 - Production

    thanks 8-)

    David.

  2. #2
    Join Date
    Jan 2004
    Location
    India
    Posts
    191
    U can write a row level trigger on that table
    Pagnint
    (No need to search web before posting new question)

  3. #3
    Join Date
    Jan 2004
    Posts
    370
    You could use the audit command:

    audit select on <schema>.<table>;

    You will also need to set the audit_trail parameter, which is not dynamic.

    The database will then insert a record into sys.aud$ every time a select is done on the table.

  4. #4
    Join Date
    Feb 2004
    Posts
    5
    >You could use the audit command:
    >
    >audit select on <schema>.<table>;
    >
    >You will also need to set the audit_trail parameter, which is >not dynamic.
    >
    >The database will then insert a record into sys.aud$ every >time a select is done on the table.


    thanks - I'll give this a shot. 8-)

Posting Permissions

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