I have an exam question and I can not find the answer. Why is sidrequired to execute a command KILL SESSION?Syntax KILL SESSION: ALTER SYSTEM KILL SESSION 'sid,session#[@inst_id]' [IMMEDIATE];Where sid is a unique session identifier. Unique in quotation marks, since it is unique at the moment , the Oracle server may have, for example, a session of some sid, but after this session this seed can be used for another session. sid- an analogy pidin the OS.Session # is the serial number of the session ; This is a session counter. The server clears the counter when starting the database. Thus, session # is a truly unique identifier for the session.
sid
KILL SESSION
ALTER SYSTEM KILL SESSION 'sid,session#[@inst_id]' [IMMEDIATE];
pid
I do not understand why it sidis mandatory for the team KILL SESSION. I think it can be used only session#.
session#
Thank.
! serial# . , int, 32k, short. , serial# - .sid . , sid,serial# .serial# sid , .
serial#
int
short
sid,serial#
!
SID SERIAL #. , :
SIDSERIAL # . . , ,
SID
SERIAL # . . , ,
, SID , . , SERIAL # , , SID , ( , ).
:
, , : SID , SERIAL # SID - . , :
? , ? ? ( SID)? .
, , , .
SQL> select serial#, count(*) from v$session group by serial#; SERIAL# COUNT(*) ---------- ---------- 1 15 983 1 2 1 505 1 5 2 7076 1 7 2 58 1 3 3 9 1 22160 1 11 rows selected.
29 , , 11 .
EDIT: . RAC , , ( RAC).