Get Timestamp from SCN in Oracle 10g 11g? Convert SCN to Timestamp Using scn_to_timestamp and timestamp_to_scn

There are 2 functions to perform these operations.
For converting SCN to Time Stamp you can use scn_to_timestamp function and for converting time stamp to SCN use timestamp_to_scn.
e.g:
SQL>  select scn_to_timestamp(11626841778000) from dual;

SCN_TO_TIMESTAMP(11626841778000)
---------------------------------------------------------------------------
29-AUG-11 08.42.54.000000000 PM

SQL> select timestamp_to_scn('29-AUG-11 08.42.54.000000000 PM') SCN from dual;

              SCN
-----------------
   11626841778000
DBA Tips Data Pump Reference

0 comments:

Post a Comment

 

dba topics. Copyright 2011-16 All Rights Reserved | Site Map | Contact | Disclaimer | Google