scn 和时间的对应关系


---查询当前scn
SQL> select current_scn from v$database;
 CURRENT_SCN
------------
 49733519430
 
SQL>  select dbms_flashback.get_system_change_number scn from dual;
   SCN
---------------
    49733520950
    
--- scn 转换成时间
SQL> select scn_to_timestamp(49733520950) scn from dual;
SCN
---------------------------------------------------------------------------
18-11月-14 04.44.57.000000000 下午    

---时间转化成scn
SQL> select timestamp_to_scn(to_timestamp('2014-11-10 18:19:20.123456789','YYYY-MM-DD HH24:MI:SS.FF')) scn from dual; 
   SCN
---------------
    49733322505

scn和时间的对应关系
SQL> select scn,to_char(time_dp,'yyyy-mm-dd hh24:mi:ss') time from sys.smon_scn_time where rownum<10 order by 1,2;
   SCN                   TIME
--------------- ---------------------------------------------------------
    49733225694 2014-10-30 22:05:40
    49733230790 2014-10-31 00:50:13
    49733230906 2014-10-31 00:55:25
    49733231047 2014-10-31 01:00:34
    49733231152 2014-10-31 01:05:42
    49733234525 2014-10-31 03:24:43
    49733234648 2014-10-31 03:29:52
    49733234760 2014-10-31 03:35:03
    49733234861 2014-10-31 03:40:12
9 rows selected.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值