Dropping a connected user from an Oracle 10g database schema

后端 未结 7 1628
情话喂你
情话喂你 2020-12-22 18:51

Is there a better way to forcefully disconnect all users from an Oracle 10g database schema than restarting the Oracle database services?

We have several developers

7条回答
  •  不思量自难忘°
    2020-12-22 19:15

    Find existing sessions to DB using this query:

    SELECT s.inst_id,
           s.sid,
           s.serial#,
           p.spid,
           s.username,
           s.program
    FROM   gv$session s
           JOIN gv$process p ON p.addr = s.paddr AND p.inst_id = s.inst_id
    WHERE  s.type != 'BACKGROUND';
    

    you'll see something like below. Oracle Sessions

    Then, run below query with values extracted from above results.

    ALTER SYSTEM KILL SESSION ',';
    

    Ex: ALTER SYSTEM KILL SESSION '93,943';

提交回复
热议问题