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

_____________________________________________________________________________________________________________________

The Eucharistic Miracles of the World
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

_____________________________________________________________________________________________________________________

Website Stats

0 comments:

Post a Comment

Labels

Oracle (580) General (60) Unix (47) Script (41) Blog (23) OCI (3) SQL* Loader (3) Datapump (2) Software (1)
DBA Tips
 

acehints.com Copyright 2011-21 All Rights Reserved | Site Map | Contact | Disclaimer