查询某一时间段内的scn号脚本:
select scn,to_char(time_dp,'yyyy-mm-dd hh24:mi:ss')
from sys.smon_scn_time
where to_char(time_dp,'yyyy-mm-dd hh24:mi:ss')>'2019-01-10 00:00:00' and to_char(time_dp,'yyyy-mm-dd hh24:mi:ss')>'2019-01-11 00:09:00' order by scn ;
使用col scn format 99999999999999将科学计数法1.1335E+11,转化成具体的数字113349846100
查询当前的scn号:SQL语句:
select current_scn from v$database;
将scn号转化成时间:脚本:
select to_char(scn_to_timestamp(113349858096),'yyyy-mm-dd hh24:mi:ss') scn from dual;
将时间转化成 scn号 :脚本:
select timestamp_to_scn(to_timestamp('2019-01-11 10:30:00','YYYY-MM-DD HH24:MI:SS')) scn from dual;
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/31547066/viewspace-2375513/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/31547066/viewspace-2375513/