Multiple RMAN sessions are connected to the database instance.
Examine the following output when backup commands are running in server sessions:
What could have helped you to correlate server sessions with channels?
A. Implement RMAN multiplexing
B. Set the DEBUG ON in the RMAN script
C. Specify the command ID in the RMAN script
D. Use a tag with the RMAN BACKUP command
在 RUN 块中使用 set command id 可以使得该信息出现在 v$session.client_info 中,这样就能帮助关联
会话和通道。
例如:
RUN
{
ALLOCATE CHANNEL c1 TYPE disk;
SET COMMAND ID TO 'sess1';
BACKUP DATABASE;
}
在另一个会话
RUN
{
ALLOCATE CHANNEL c1 TYPE disk;
SET COMMAND ID TO 'sess2';
BACKUP DATABASE;
}
同时运行后,查询:
COLUMN CLIENT_INFO FORMAT a30
COLUMN SID FORMAT 999
COLUMN SPID FORMAT 9999
SELECT SID, SPID, CLIENT_INFO
FROM V$PROCESS p, V$SESSION s
WHERE p.ADDR = s.PADDR
AND CLIENT_INFO LIKE '%id=sess%';
包含 rman channel 的行是执行备份的通道会话,其他的行是连接目标数据库的会话