How to check when a table is last updated in Oracle :

when a table is last updated in oracle
As a DBA, we might often get complaints from the Application Team. For this, sometimes we may need to check when a table is last updated in Oracle. Today we will go through this :

For each row, ORA_ROWSCN returns the SCN of the most recent change in the row. Hence, issue the below command to find the exact timestamp when a table is last updated in the Oracle database :

Syntax :
SQL> SELECT SCN_TO_TIMESTAMP(MAX(ora_rowscn)) from <schema_name>.<table_name>;

Example :

SQL> SELECT SCN_TO_TIMESTAMP(MAX(ora_rowscn)) from HR.TEST;

Output :

SCN_TO_TIMESTAMP(MAX(ORA_ROWSCN))
---------------------------------------------------------------------------
22-JUL-15 06.49.27.000000000 AM

Hope this helps!! Also, you can get more information from the Oracle discussion forum as well too.

Related Oracle Articles :

Leave a Reply