Why is sid required in "KILL SESSION" (Oracle SQL)?

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.

I do not understand why it sidis mandatory for the team KILL SESSION. I think it can be used only session#.

Thank.

+5
source share
3 answers

! serial# . , int, 32k, short. , serial# - .
sid . , sid,serial# .
serial# sid , .

!

+2

SID SERIAL #. , :

SID

SERIAL # . . , ,

, SID , . , SERIAL # , , SID , ( , ).

:

, , : SID , SERIAL # SID - . , :

  • [1,1] JOE SID 1, SERIAL # 1
  • JOE
  • [1,2] TOM SID 1 ( ), SERIAL # 2
  • [2,1] SUSAN SID 2, SERIAL # 1

? , ? ? ( SID)? .

+4

, , , .

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).

+2

All Articles