redo_log_switch_date

531968912發表於2015-12-24
<br /> <br /> select sequence#,<br /> &nbsp; &nbsp; &nbsp; &nbsp;to_char(first_time, 'yyyy-mm-dd hh24:mi') || ' ' ||<br /> &nbsp; &nbsp; &nbsp; &nbsp;to_char(nexttime, 'hh24:mi'),<br /> &nbsp; &nbsp; &nbsp; &nbsp;round(((first_time - nexttime) * 24) * 60, 2) diff<br /> &nbsp; from (select sequence#,<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;first_time,<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lag(first_time) over(order by sequence#) nexttime<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; from v$log_history<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;where thread# = 1<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;and trunc(first_time) &gt;= sysdate - 8)<br /> where round(((first_time - nexttime) * 24) * 60, 2) &gt; 0<br /> order by sequence# desc;<br />

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/25462274/viewspace-1936814/,如需轉載,請註明出處,否則將追究法律責任。