| In various critical situations Oracle DBA has to decide | | | | session from gv$session we need command "alter |
| to kill existing session or kill the background process of | | | | system kill session" with session identifier (sid), serial |
| Oracle RAC database. At this moment remote Oracle | | | | number (serial#) and instance number of Oracle RAC |
| DBA should need to terminate session/process called | | | | (instance_no). Here is example to kill or terminate |
| as murder of session of any instance. | | | | active session from Oracle RAC database or |
| Some basic syntax is changed for killing session in | | | | instance. |
| Oracle RAC instance. Oracle RAC database contains | | | | |
| one or more instances. First oracle RAC DBA should | | | | |
| need to identify which session has be killed and in | | | | SQL>select sid,serial#,inst_id from gv$session where |
| which instance contains said target session. | | | | machine='GPTWORKGROUP'; |
| | | | | SID SERIAL# INST_ID |
| | | | | 9 171 1 |
| It is very simple way to kill session using command line | | | | 1 row selected |
| of Oracle RAC instance: | | | | SQL> alter system kill session '9,171,@1'; |
| | | | | System altered. |
| | | | | |
| Using SQL*Plus (kill session with alter system | | | | OR |
| command): | | | | SQL>alter system kill session '9,171,@1' immediate; |
| | | | | System altered. |
| We use v$session for indetifying target session to kill in | | | | And terminated user session will get message in |
| non-rac database.Here in Oracle RAC instance we | | | | sqlplus that "your session has been killed" in Oracle |
| should need to check and identify session using | | | | RAC instance. We can get output of status as "killed" |
| gv$session. Because only gv$session contains rac | | | | from gv$session for terminated session. |
| instance identifier column. After identifying target | | | | |