You can identify the Oracle session ID for an RMAN channel by looking in the RMAN log for messages with the format shown in the following example:
channel ch1: sid=15 devtype=SBT_TAPE
The sid
and devtype
are displayed for each allocated channel. Note that the Oracle sid
is different from the operating system process ID. You can kill the session by specifying the sid
in a SQL statement, but the commands are not the same as the operating system process kill
commands.
You can specify the sid
in the SQL statement ALTER
SYSTEM
KILL
SESSION
command. It takes two arguments (the sid
printed in the RMAN message and a serial number), both of which can be obtained by querying V$SESSION
. For example, run the following statement, where sid_in_rman_output
is the number from the RMAN message:
SELECT SERIAL# FROM V$SESSION WHERE SID=sid_in_rman_output
;
Then, run the following statement, substituting the sid_in_rman_output
and serial number obtained from the query:
ALTER SYSTEM KILL SESSION 'sid_in_rman_output
,serial#
';
Note that this is no more effective than killing at the operating system level if the process is hung in the media manager.