Home >Database >Mysql Tutorial >RMAN备份进度查询

RMAN备份进度查询

WBOY
WBOYOriginal
2016-06-07 14:50:351462browse

查看已经完成和未完成的RMAN备份进度 set line 9999 col opname for a35 col start_time for a19 SELECT SID , SERIAL# , opname , to_char(start_time , 'yyyy - mm - dd HH24:MI:SS') start_time , SOFAR , TOTALWORK , ROUND(SOFAR/TOTALWORK*100 , 2) "%

查看已经完成和未完成的RMAN备份进度

<code class=" hljs brainfuck"><span class="hljs-comment">set</span> <span class="hljs-comment">line</span> <span class="hljs-comment">9999</span>
<span class="hljs-comment">col</span> <span class="hljs-comment">opname</span> <span class="hljs-comment">for</span> <span class="hljs-comment">a35</span>
<span class="hljs-comment">col</span> <span class="hljs-comment">start_time</span> <span class="hljs-comment">for</span> <span class="hljs-comment">a19</span>
<span class="hljs-comment">SELECT</span> <span class="hljs-comment">SID</span><span class="hljs-string">,</span> <span class="hljs-comment">SERIAL#</span><span class="hljs-string">,</span><span class="hljs-comment">opname</span><span class="hljs-string">,</span> <span class="hljs-comment">to_char(start_time</span><span class="hljs-string">,</span><span class="hljs-comment">'yyyy</span><span class="hljs-literal">-</span><span class="hljs-comment">mm</span><span class="hljs-literal">-</span><span class="hljs-comment">dd</span> <span class="hljs-comment">HH24:MI:SS')</span>  <span class="hljs-comment">start_time</span><span class="hljs-string">,</span> <span class="hljs-comment">SOFAR</span><span class="hljs-string">,</span> <span class="hljs-comment">TOTALWORK</span><span class="hljs-string">,</span>
<span class="hljs-comment">ROUND(SOFAR/TOTALWORK*100</span><span class="hljs-string">,</span><span class="hljs-comment">2)</span> <span class="hljs-comment">"%COMPLETE"</span><span class="hljs-string">,</span><span class="hljs-comment">ceil(ELAPSED_SECONDS/60)</span> <span class="hljs-comment">ELAPSED_MI</span>
<span class="hljs-comment">FROM</span> <span class="hljs-comment">V$SESSION_LONGOPS</span>
<span class="hljs-comment">where</span> <span class="hljs-comment">opname</span> <span class="hljs-comment">like</span> <span class="hljs-comment">'RMAN%'</span> <span class="hljs-comment">order</span> <span class="hljs-comment">by</span> <span class="hljs-comment">start_time</span> <span class="hljs-comment">asc;</span>

       <span class="hljs-comment">SID</span>    <span class="hljs-comment">SERIAL#</span> <span class="hljs-comment">OPNAME</span>                              <span class="hljs-comment">START_TIME</span>               <span class="hljs-comment">SOFAR</span>  <span class="hljs-comment">TOTALWORK</span>  <span class="hljs-comment">%COMPLETE</span> <span class="hljs-comment">ELAPSED_MI</span>
<span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span> <span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span> <span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span> <span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span> <span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span> <span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span> <span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span> <span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span>
       <span class="hljs-comment">425</span>      <span class="hljs-comment">60361</span> <span class="hljs-comment">RMAN:</span> <span class="hljs-comment">aggregate</span> <span class="hljs-comment">input</span>               <span class="hljs-comment">2016</span><span class="hljs-literal">-</span><span class="hljs-comment">05</span><span class="hljs-literal">-</span><span class="hljs-comment">06</span> <span class="hljs-comment">23:00:00</span>   <span class="hljs-comment">56800564</span>   <span class="hljs-comment">56800564</span>        <span class="hljs-comment">100</span>              <span class="hljs-comment">10</span>
       <span class="hljs-comment">164</span>       <span class="hljs-comment">7634</span> <span class="hljs-comment">RMAN:</span> <span class="hljs-comment">incremental</span> <span class="hljs-comment">datafile</span> <span class="hljs-comment">backup</span>   <span class="hljs-comment">2016</span><span class="hljs-literal">-</span><span class="hljs-comment">05</span><span class="hljs-literal">-</span><span class="hljs-comment">06</span> <span class="hljs-comment">23:00:03</span>      <span class="hljs-comment">91877</span>      <span class="hljs-comment">91877</span>        <span class="hljs-comment">100</span>               <span class="hljs-comment">6</span>
       <span class="hljs-comment">164</span>       <span class="hljs-comment">7634</span> <span class="hljs-comment">RMAN:</span> <span class="hljs-comment">incremental</span> <span class="hljs-comment">datafile</span> <span class="hljs-comment">backup</span>   <span class="hljs-comment">2016</span><span class="hljs-literal">-</span><span class="hljs-comment">05</span><span class="hljs-literal">-</span><span class="hljs-comment">06</span> <span class="hljs-comment">23:00:03</span>   <span class="hljs-comment">22665768</span>   <span class="hljs-comment">22665768</span>        <span class="hljs-comment">100</span>               <span class="hljs-comment">6</span>
       <span class="hljs-comment">873</span>      <span class="hljs-comment">12782</span> <span class="hljs-comment">RMAN:</span> <span class="hljs-comment">aggregate</span> <span class="hljs-comment">output</span>              <span class="hljs-comment">2016</span><span class="hljs-literal">-</span><span class="hljs-comment">05</span><span class="hljs-literal">-</span><span class="hljs-comment">06</span> <span class="hljs-comment">23:02:06</span>     <span class="hljs-comment">191157</span>     <span class="hljs-comment">191157</span>        <span class="hljs-comment">100</span>               <span class="hljs-comment">5</span>
       <span class="hljs-comment">164</span>       <span class="hljs-comment">7634</span> <span class="hljs-comment">RMAN:</span> <span class="hljs-comment">archived</span> <span class="hljs-comment">log</span> <span class="hljs-comment">backup</span>           <span class="hljs-comment">2016</span><span class="hljs-literal">-</span><span class="hljs-comment">05</span><span class="hljs-literal">-</span><span class="hljs-comment">06</span> <span class="hljs-comment">23:06:47</span>    <span class="hljs-comment">6167946</span>    <span class="hljs-comment">6167946</span>        <span class="hljs-comment">100</span>               <span class="hljs-comment">3</span>
       <span class="hljs-comment">164</span>       <span class="hljs-comment">7634</span> <span class="hljs-comment">RMAN:</span> <span class="hljs-comment">archived</span> <span class="hljs-comment">log</span> <span class="hljs-comment">backup</span>           <span class="hljs-comment">2016</span><span class="hljs-literal">-</span><span class="hljs-comment">05</span><span class="hljs-literal">-</span><span class="hljs-comment">06</span> <span class="hljs-comment">23:06:47</span>    <span class="hljs-comment">6167943</span>    <span class="hljs-comment">6167943</span>        <span class="hljs-comment">100</span>               <span class="hljs-comment">3</span>
       <span class="hljs-comment">873</span>      <span class="hljs-comment">12782</span> <span class="hljs-comment">RMAN:</span> <span class="hljs-comment">aggregate</span> <span class="hljs-comment">output</span>              <span class="hljs-comment">2016</span><span class="hljs-literal">-</span><span class="hljs-comment">05</span><span class="hljs-literal">-</span><span class="hljs-comment">06</span> <span class="hljs-comment">23:08:43</span>   <span class="hljs-comment">11659959</span>   <span class="hljs-comment">11659959</span>        <span class="hljs-comment">100</span>               <span class="hljs-comment">1</span>
       <span class="hljs-comment">425</span>      <span class="hljs-comment">60361</span> <span class="hljs-comment">RMAN:</span> <span class="hljs-comment">aggregate</span> <span class="hljs-comment">output</span>              <span class="hljs-comment">2016</span><span class="hljs-literal">-</span><span class="hljs-comment">05</span><span class="hljs-literal">-</span><span class="hljs-comment">06</span> <span class="hljs-comment">23:09:10</span>   <span class="hljs-comment">11659959</span>   <span class="hljs-comment">11659959</span>        <span class="hljs-comment">100</span>               <span class="hljs-comment">0</span>
       <span class="hljs-comment">425</span>      <span class="hljs-comment">60361</span> <span class="hljs-comment">RMAN:</span> <span class="hljs-comment">aggregate</span> <span class="hljs-comment">output</span>              <span class="hljs-comment">2016</span><span class="hljs-literal">-</span><span class="hljs-comment">05</span><span class="hljs-literal">-</span><span class="hljs-comment">06</span> <span class="hljs-comment">23:09:10</span>   <span class="hljs-comment">11659959</span>   <span class="hljs-comment">11659959</span>        <span class="hljs-comment">100</span>               <span class="hljs-comment">0</span>
       <span class="hljs-comment">832</span>      <span class="hljs-comment">32639</span> <span class="hljs-comment">RMAN:</span> <span class="hljs-comment">aggregate</span> <span class="hljs-comment">input</span>               <span class="hljs-comment">2016</span><span class="hljs-literal">-</span><span class="hljs-comment">05</span><span class="hljs-literal">-</span><span class="hljs-comment">07</span> <span class="hljs-comment">23:00:00</span>   <span class="hljs-comment">47200200</span>   <span class="hljs-comment">47200200</span>        <span class="hljs-comment">100</span>               <span class="hljs-comment">8</span>
       <span class="hljs-comment">185</span>      <span class="hljs-comment">57618</span> <span class="hljs-comment">RMAN:</span> <span class="hljs-comment">incremental</span> <span class="hljs-comment">datafile</span> <span class="hljs-comment">backup</span>   <span class="hljs-comment">2016</span><span class="hljs-literal">-</span><span class="hljs-comment">05</span><span class="hljs-literal">-</span><span class="hljs-comment">07</span> <span class="hljs-comment">23:00:02</span>     <span class="hljs-comment">148787</span>     <span class="hljs-comment">148787</span>        <span class="hljs-comment">100</span>               <span class="hljs-comment">7</span>

       <span class="hljs-comment">SID</span>    <span class="hljs-comment">SERIAL#</span> <span class="hljs-comment">OPNAME</span>                              <span class="hljs-comment">START_TIME</span>               <span class="hljs-comment">SOFAR</span>  <span class="hljs-comment">TOTALWORK</span>  <span class="hljs-comment">%COMPLETE</span> <span class="hljs-comment">ELAPSED_MI</span>
<span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span> <span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span> <span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span> <span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span> <span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span> <span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span> <span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span> <span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span>
       <span class="hljs-comment">185</span>      <span class="hljs-comment">57618</span> <span class="hljs-comment">RMAN:</span> <span class="hljs-comment">incremental</span> <span class="hljs-comment">datafile</span> <span class="hljs-comment">backup</span>   <span class="hljs-comment">2016</span><span class="hljs-literal">-</span><span class="hljs-comment">05</span><span class="hljs-literal">-</span><span class="hljs-comment">07</span> <span class="hljs-comment">23:00:02</span>   <span class="hljs-comment">22664776</span>   <span class="hljs-comment">22664776</span>        <span class="hljs-comment">100</span>               <span class="hljs-comment">7</span>
       <span class="hljs-comment">185</span>      <span class="hljs-comment">57618</span> <span class="hljs-comment">RMAN:</span> <span class="hljs-comment">archived</span> <span class="hljs-comment">log</span> <span class="hljs-comment">backup</span>           <span class="hljs-comment">2016</span><span class="hljs-literal">-</span><span class="hljs-comment">05</span><span class="hljs-literal">-</span><span class="hljs-comment">07</span> <span class="hljs-comment">23:06:47</span>     <span class="hljs-comment">889538</span>     <span class="hljs-comment">889538</span>        <span class="hljs-comment">100</span>               <span class="hljs-comment">1</span>
       <span class="hljs-comment">185</span>      <span class="hljs-comment">57618</span> <span class="hljs-comment">RMAN:</span> <span class="hljs-comment">archived</span> <span class="hljs-comment">log</span> <span class="hljs-comment">backup</span>           <span class="hljs-comment">2016</span><span class="hljs-literal">-</span><span class="hljs-comment">05</span><span class="hljs-literal">-</span><span class="hljs-comment">07</span> <span class="hljs-comment">23:06:47</span>     <span class="hljs-comment">889536</span>     <span class="hljs-comment">889536</span>        <span class="hljs-comment">100</span>               <span class="hljs-comment">1</span>
       <span class="hljs-comment">832</span>      <span class="hljs-comment">32639</span> <span class="hljs-comment">RMAN:</span> <span class="hljs-comment">aggregate</span> <span class="hljs-comment">output</span>              <span class="hljs-comment">2016</span><span class="hljs-literal">-</span><span class="hljs-comment">05</span><span class="hljs-literal">-</span><span class="hljs-comment">07</span> <span class="hljs-comment">23:07:13</span>    <span class="hljs-comment">2068890</span>    <span class="hljs-comment">2068890</span>        <span class="hljs-comment">100</span>               <span class="hljs-comment">0</span>
       <span class="hljs-comment">362</span>      <span class="hljs-comment">16579</span> <span class="hljs-comment">RMAN:</span> <span class="hljs-comment">incremental</span> <span class="hljs-comment">datafile</span> <span class="hljs-comment">backup</span>   <span class="hljs-comment">2016</span><span class="hljs-literal">-</span><span class="hljs-comment">05</span><span class="hljs-literal">-</span><span class="hljs-comment">08</span> <span class="hljs-comment">22:00:02</span>   <span class="hljs-comment">11284214</span>   <span class="hljs-comment">11284214</span>        <span class="hljs-comment">100</span>             <span class="hljs-comment">167</span>
       <span class="hljs-comment">264</span>      <span class="hljs-comment">62631</span> <span class="hljs-comment">RMAN:</span> <span class="hljs-comment">incremental</span> <span class="hljs-comment">datafile</span> <span class="hljs-comment">backup</span>   <span class="hljs-comment">2016</span><span class="hljs-literal">-</span><span class="hljs-comment">05</span><span class="hljs-literal">-</span><span class="hljs-comment">08</span> <span class="hljs-comment">22:00:02</span>   <span class="hljs-comment">22664776</span>   <span class="hljs-comment">22664776</span>        <span class="hljs-comment">100</span>             <span class="hljs-comment">166</span>
       <span class="hljs-comment">387</span>      <span class="hljs-comment">54189</span> <span class="hljs-comment">RMAN:</span> <span class="hljs-comment">aggregate</span> <span class="hljs-comment">input</span>               <span class="hljs-comment">2016</span><span class="hljs-literal">-</span><span class="hljs-comment">05</span><span class="hljs-literal">-</span><span class="hljs-comment">08</span> <span class="hljs-comment">22:00:02</span>   <span class="hljs-comment">46328443</span>   <span class="hljs-comment">46328443</span>        <span class="hljs-comment">100</span>             <span class="hljs-comment">168</span>
       <span class="hljs-comment">264</span>      <span class="hljs-comment">62631</span> <span class="hljs-comment">RMAN:</span> <span class="hljs-comment">incremental</span> <span class="hljs-comment">datafile</span> <span class="hljs-comment">backup</span>   <span class="hljs-comment">2016</span><span class="hljs-literal">-</span><span class="hljs-comment">05</span><span class="hljs-literal">-</span><span class="hljs-comment">08</span> <span class="hljs-comment">22:00:02</span>   <span class="hljs-comment">11246926</span>   <span class="hljs-comment">11246926</span>        <span class="hljs-comment">100</span>             <span class="hljs-comment">166</span>
       <span class="hljs-comment">362</span>      <span class="hljs-comment">16579</span> <span class="hljs-comment">RMAN:</span> <span class="hljs-comment">incremental</span> <span class="hljs-comment">datafile</span> <span class="hljs-comment">backup</span>   <span class="hljs-comment">2016</span><span class="hljs-literal">-</span><span class="hljs-comment">05</span><span class="hljs-literal">-</span><span class="hljs-comment">08</span> <span class="hljs-comment">22:00:02</span>   <span class="hljs-comment">22665768</span>   <span class="hljs-comment">22665768</span>        <span class="hljs-comment">100</span>             <span class="hljs-comment">167</span>
       <span class="hljs-comment">362</span>      <span class="hljs-comment">16579</span> <span class="hljs-comment">RMAN:</span> <span class="hljs-comment">archived</span> <span class="hljs-comment">log</span> <span class="hljs-comment">backup</span>           <span class="hljs-comment">2016</span><span class="hljs-literal">-</span><span class="hljs-comment">05</span><span class="hljs-literal">-</span><span class="hljs-comment">09</span> <span class="hljs-comment">00:46:58</span>     <span class="hljs-comment">505982</span>     <span class="hljs-comment">505982</span>        <span class="hljs-comment">100</span>               <span class="hljs-comment">1</span>
       <span class="hljs-comment">362</span>      <span class="hljs-comment">16579</span> <span class="hljs-comment">RMAN:</span> <span class="hljs-comment">archived</span> <span class="hljs-comment">log</span> <span class="hljs-comment">backup</span>           <span class="hljs-comment">2016</span><span class="hljs-literal">-</span><span class="hljs-comment">05</span><span class="hljs-literal">-</span><span class="hljs-comment">09</span> <span class="hljs-comment">00:46:58</span>     <span class="hljs-comment">505984</span>     <span class="hljs-comment">505984</span>        <span class="hljs-comment">100</span>               <span class="hljs-comment">1</span>

       <span class="hljs-comment">SID</span>    <span class="hljs-comment">SERIAL#</span> <span class="hljs-comment">OPNAME</span>                              <span class="hljs-comment">START_TIME</span>               <span class="hljs-comment">SOFAR</span>  <span class="hljs-comment">TOTALWORK</span>  <span class="hljs-comment">%COMPLETE</span> <span class="hljs-comment">ELAPSED_MI</span>
<span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span> <span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span> <span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span> <span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span> <span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span> <span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span> <span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span> <span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-literal">-</span>
       <span class="hljs-comment">264</span>      <span class="hljs-comment">62631</span> <span class="hljs-comment">RMAN:</span> <span class="hljs-comment">archived</span> <span class="hljs-comment">log</span> <span class="hljs-comment">backup</span>           <span class="hljs-comment">2016</span><span class="hljs-literal">-</span><span class="hljs-comment">05</span><span class="hljs-literal">-</span><span class="hljs-comment">09</span> <span class="hljs-comment">00:46:58</span>     <span class="hljs-comment">490695</span>     <span class="hljs-comment">490695</span>        <span class="hljs-comment">100</span>               <span class="hljs-comment">1</span>
       <span class="hljs-comment">264</span>      <span class="hljs-comment">62631</span> <span class="hljs-comment">RMAN:</span> <span class="hljs-comment">archived</span> <span class="hljs-comment">log</span> <span class="hljs-comment">backup</span>           <span class="hljs-comment">2016</span><span class="hljs-literal">-</span><span class="hljs-comment">05</span><span class="hljs-literal">-</span><span class="hljs-comment">09</span> <span class="hljs-comment">00:46:58</span>     <span class="hljs-comment">490693</span>     <span class="hljs-comment">490693</span>        <span class="hljs-comment">100</span>               <span class="hljs-comment">1</span>
       <span class="hljs-comment">387</span>      <span class="hljs-comment">54189</span> <span class="hljs-comment">RMAN:</span> <span class="hljs-comment">aggregate</span> <span class="hljs-comment">output</span>              <span class="hljs-comment">2016</span><span class="hljs-literal">-</span><span class="hljs-comment">05</span><span class="hljs-literal">-</span><span class="hljs-comment">09</span> <span class="hljs-comment">00:47:14</span>    <span class="hljs-comment">3026566</span>    <span class="hljs-comment">3026566</span>        <span class="hljs-comment">100</span>               <span class="hljs-comment">0</span>
       <span class="hljs-comment">387</span>      <span class="hljs-comment">54189</span> <span class="hljs-comment">RMAN:</span> <span class="hljs-comment">aggregate</span> <span class="hljs-comment">output</span>              <span class="hljs-comment">2016</span><span class="hljs-literal">-</span><span class="hljs-comment">05</span><span class="hljs-literal">-</span><span class="hljs-comment">09</span> <span class="hljs-comment">00:47:17</span>    <span class="hljs-comment">3026566</span>    <span class="hljs-comment">3026566</span>        <span class="hljs-comment">100</span>               <span class="hljs-comment">0</span>

<span class="hljs-comment">26</span> <span class="hljs-comment">rows</span> <span class="hljs-comment">selected</span><span class="hljs-string">.</span>

<span class="hljs-comment">SQL</span>> </code>

查看未完成的RMAN备份进度

<code class=" hljs sql"><span class="hljs-operator"><span class="hljs-keyword">set</span> line <span class="hljs-number">9999</span>
col opname <span class="hljs-keyword">for</span> a35
col start_time <span class="hljs-keyword">for</span> a19
<span class="hljs-keyword">SELECT</span> SID, SERIAL#,opname, to_char(start_time,<span class="hljs-string">'yyyy-mm-dd HH24:MI:SS'</span>)  start_time, SOFAR, TOTALWORK,
ROUND(SOFAR/TOTALWORK*<span class="hljs-number">100</span>,<span class="hljs-number">2</span>) <span class="hljs-string">"%COMPLETE"</span>,ceil(ELAPSED_SECONDS/<span class="hljs-number">60</span>) ELAPSED_MI
<span class="hljs-keyword">FROM</span> V$SESSION_LONGOPS
<span class="hljs-keyword">where</span> opname <span class="hljs-keyword">like</span> <span class="hljs-string">'RMAN%'</span> <span class="hljs-keyword">AND</span> SOFAR <> TOTALWORK <span class="hljs-keyword">order</span> <span class="hljs-keyword">by</span> start_time <span class="hljs-keyword">asc</span>;</span></code>

这两个查询涉及到了一个动态性能视图v$session_longops,了解该视图的说明请参考我的另一篇文章:动态性能视图 V$SESSION_LONGOPS

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn