统计日志切换信息
select b.recid,
to_char(b.first_time ,'yyyy-mm-dd hh24:mi:ss') start_time ,a.recid,
to_char(a.first_time ,'yyyy-mm-dd hh24:mi:ss') end_time,
round(((a.first_time-b.first_time)*25)*60,2) minutes
from v$log_history a ,v$log_history b
where a.recid = b.recid+1
order by a.first_time asc
;
to_char(b.first_time ,'yyyy-mm-dd hh24:mi:ss') start_time ,a.recid,
to_char(a.first_time ,'yyyy-mm-dd hh24:mi:ss') end_time,
round(((a.first_time-b.first_time)*25)*60,2) minutes
from v$log_history a ,v$log_history b
where a.recid = b.recid+1
order by a.first_time asc
;
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7419833/viewspace-557679/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/7419833/viewspace-557679/