| How to find which Table is Last update? [message #550626] |
Wed, 11 April 2012 02:31  |
 |
7premkumar
Messages: 11 Registered: March 2012 Location: CHENNAI
|
Junior Member |
|
|
Hi,
I want to know that How to find which table got last updated and how to find last DDL and DML operation obtained in which table? here I know the table name
SQL> SELECT LAST_DDL_TIME FROM DBA_OBJECTS WHERE OBJECT_NAME='PREM';
LAST_DDL_
---------
20-MAR-12
SQL> TRUNCATE TABLE PREM;
Table truncated.
SQL> SELECT LAST_DDL_TIME FROM DBA_OBJECTS WHERE OBJECT_NAME='PREM';
LAST_DDL_
---------
10-APR-12
Note: With out enable the auditing I want to know that .
Regards
Premkumar R S
|
|
|
|
|
|
|
|
|
|
|
|
| Re: How to find which Table is Last update? [message #550668 is a reply to message #550646] |
Wed, 11 April 2012 07:07   |
 |
Barbara Boehmer
Messages: 7668 Registered: November 2002 Location: California, USA
|
Senior Member |
|
|
7premkumar wrote on Wed, 11 April 2012 03:01
I want to know that what are all the tables are updated past 30 min or 1 Hour and also want to know DML changes DDL time .
The following will get you DDL within the last hour. For DML, you will need to use other methods.
aSCOTT@orcl_11gR2> create table prem
2 (some_column number)
3 /
Table created.
SCOTT@orcl_11gR2> column object_name format a30
SCOTT@orcl_11gR2> select object_name, last_ddl_time
2 from dba_objects
3 where last_ddl_time >=
4 (select max (last_ddl_time) - (1/24)
5 from dba_objects)
6 order by last_ddl_time
7 /
OBJECT_NAME LAST_DDL_TIME
------------------------------ -----------------
RLM$EVTCLEANUP 11-apr-2012 04:30
RLM$SCHDNEGACTION 11-apr-2012 04:45
ORACLE_APEX_WS_NOTIFICATIONS 11-apr-2012 05:00
ORACLE_APEX_PURGE_SESSIONS 11-apr-2012 05:00
ORACLE_APEX_MAIL_QUEUE 11-apr-2012 05:05
PREM 11-apr-2012 05:05
6 rows selected.
[Updated on: Wed, 11 April 2012 07:07] Report message to a moderator
|
|
|
|
|
|