94.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
Answer: C
答案解析:
参考:监控和优化RMAN:http://blog.csdn.net/rlhua/article/details/12510975
Matching Server Sessions with Channels in Multiple RMAN Sessions
If more than one RMAN session is active, then it is possible for theV$SESSION.CLIENT_INFO
column to yield the same information for a channel in each session. For example:
In this case, you have the following methods for determining which channel corresponds to whichSID
value.
Obtaining the Channel ID from the RMAN Output
In this method, you must first obtain the sid
values from the RMAN output and then use these values in your SQL query.
To correlate a process with a channel during a backup:
-
In an active session, run the RMAN job as usual and examine the output to get the
sid
for the channel. For example, the output may show:Starting backup at 21-AUG-01allocated channel: ORA_SBT_TAPE_1channel ORA_SBT_TAPE_1: sid=14 devtype=SBT_TAPE -
Start a SQL*Plus session and then query the joined
V$SESSION
andV$PROCESS
views while the RMAN job is executing. For example, enter:COLUMN CLIENT_INFO FORMAT a30COLUMN SID FORMAT 999COLUMN SPID FORMAT 9999SELECT s.SID, p.SPID, s.CLIENT_INFOFROM V$PROCESS p, V$SESSION sWHERE p.ADDR = s.PADDRAND CLIENT_INFO LIKE 'rman%'/Use the
sid
value obtained from the first step to determine which channel corresponds to which server session:SID SPID CLIENT_INFO---------- ------------ ------------------------------14 2036 rman channel=ORA_SBT_TAPE_112 2066 rman channel=ORA_SBT_TAPE_1
In this method, you specify a command ID string in the RMAN backup script. You can then queryV$SESSION.CLIENT_INFO
for this string.
To correlate a process with a channel during a backup:
-
In each session, set the
COMMAND
ID
to a different value after allocating the channels and then back up the desired object. For example, enter the following in session 1:RUN{ALLOCATE CHANNEL c1 TYPE disk;SET COMMAND ID TO 'sess1';BACKUP DATABASE;}Set the command ID to a string such as
sess2
in the job running in session 2:RUN{ALLOCATE CHANNEL c1 TYPE sbt;SET COMMAND ID TO 'sess2';BACKUP DATABASE;} -
Start a SQL*Plus session and then query the joined
V$SESSION
andV$PROCESS
views while the RMAN job is executing. For example, enter:SELECT SID, SPID, CLIENT_INFOFROM V$PROCESS p, V$SESSION sWHERE p.ADDR = s.PADDRAND CLIENT_INFO LIKE '%id=sess%';If you run the
SET
COMMAND
ID
command in the RMAN job, then theCLIENT_INFO
column displays in the following format:id=command_id,rman channel=channel_idFor example, the following shows sample output:
SID SPID CLIENT_INFO---- ------------ ------------------------------11 8358 id=sess115 8638 id=sess214 8374 id=sess1,rman channel=c19 8642 id=sess2,rman channel=c1The rows that contain the string
rman channel
show the channel performing the backup. The remaining rows are for the connections to the target database.
官方参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmtroub.htm#sthref1769