zoukankan      html  css  js  c++  java
  • [Oracle工程师手记]如何找到 RMAN 的所有 session

    有时候,为了监控了解 RMAN 的运行状况,我们需要所有的 RMAN 的 session 信息,如何找到这些 session 呢,可以利用 v$process 以及 v$session 中的一些如 client_info 、module_name、program 之类,来进行查找。

    set linesize 300
    col spid format 99999
    col serial# format 99999
    col spid format a10
    col event format a20
    col p1 format 999999999999
    col p2 format 9999999
    col p3 format 9999999
    col blocker format 9999999
    col client format a12
    
    SELECT s.sid, s.serial#,spid, s.event, s.p1,s.p2,s.p3, s.blocking_session as blocker,client_info as client
     FROM v$process p, v$session s
     WHERE p.addr = s.paddr
     AND client_info LIKE '%rman%';
    

     
    结果的例子:

          SID SERIAL# SPID       EVENT                           P1       P2       P3  BLOCKER CLIENT
    ---------- ------- ---------- -------------------- ------------- -------- -------- -------- ------------
           33    2807 16514      SQL*Net message from    1650815232        1        0          rman channel
                                  client                                                       =ORA_DISK_1
    

    结果里可能会有很多条记录,代表了执行 rman 的有复数个 session 。

    上面的查询,我利用了 clinet_info,在不同版本的数据库中,rman session 的 v$process 、v$session 的信息也不完全一样。为了稳妥起见,也要查一下 program like '%rman%'  、module_name like '%rman%' 之类的session。

  • 相关阅读:
    jQuery源码 support
    jQuery 源码: 延迟对象补充。
    web FG interview all
    Img load
    浅谈js中this指向问题
    浅谈ES6原生Promise
    BootStrap的两种模态框方式
    让div盒子相对父盒子垂直居中的几种方法
    normalize与reset
    JS实现继承的方式
  • 原文地址:https://www.cnblogs.com/gaojian/p/14631578.html
Copyright © 2011-2022 走看看