Monitoring RMAN Backups
- Correlate server sessions with channels using the SET COMMAND ID command.
RMAN备份数据库中,每个server process对应一个channel,如何监控到哪个server process 对应的哪个channel?
- Query V$PROCESS and V$SESSION to determine which sessions correspond to which RMAN channels.
通过SET COMMAND ID命令,然后结合v$process和v$session两个动态性能视图,即可监控到server process与channel 之间的对应关系.
SQL> select sid,username,client_info from v$session; SID USERNAME CLIENT_INFO ---------- ------------------------------ ---------------------------------------------------------------------- 1 2 3 4 5 7 9 11 SYS id=arcerzhangtry,rman channel=d163 SID USERNAME CLIENT_INFO ---------- ------------------------------ ---------------------------------------------------------------------- 64 65 66 67 69 70 125 126 127 128 129 SID USERNAME CLIENT_INFO ---------- ------------------------------ ------------------------------ 132 SYS id=arcerzhangtry 187 188 189 190 192 SYS 193 SYS 194 197 29 rows selected. SQL> select sid,spid,client_info from v$process p,v$session s where p.addr = s.paddr and client_info like '%id=arcerzhang%'; SID SPID CLIENT_INFO ---------- ------------------------ ---------------------------------------------- 132 11354 id=arcerzhangtry 11 11408 id=arcerzhangtry,rman channel=d1