Disclaimer

Wednesday, 25 November 2020

How to use the TIMESTAMP_TO_SCN function

How to use the TIMESTAMP_TO_SCN function


 

13:38:13 SQL> select timestamp_to_scn(to_timestamp('2020-11-25 13:38:13', 'YYYY-MM-DD HH24:MI:SS'))                    "scn" from dual;
 
       scn
----------
    995177

 
1 row selected.

 

 


Reversed:

13:39:42 SQL> select scn_to_timestamp(995177) "timestamp" from dual;


 timestamp
--------------------------------------------------------------------

25-NOV-20 01.38.11.000000000 PM

 

1 row selected.

 



No comments:

Post a Comment

Index rebuild online in Oracle - shell script

  [oracle@rac10p reorg]$ cat index_rebuild_EMP.sh #!/bin/ksh export ORACLE_HOME=/oracle/K12/19 export ORACLE_SID=K12 export PATH=$PATH:/$ORA...