Thursday, July 23, 2009

Games Tech Deck Live .com

HOWTO: kill Oracle sessions

This is the select that allows us to see the active sessions:

SELECT s.osuser,
s.username,
s.sid,
s.process,
s.serial #
s.program
FROM v $ session s;

a session we need to kill the couple's SID and SERIAL #.

Once you have these values \u200b\u200bwill be enough to put them in the following statement:

ALTER SYSTEM KILL SESSION
'sid, serial #'

Oracle.exe In some cases not be able to kill the session immediately , so these sessions are marked with "marked for kill" (MARKED) and will kill the first possible

ALTER SYSTEM KILL SESSION command is the only way to kill sessions without any kind problem. If the "MARKED" persist in some cases you have to kill the process to the operating system level, but this is not recommended because it can cause damage to the instance Oracle

E 'can force the kill by adding the IMMEDIATE keyword:

ALTER SYSTEM KILL SESSION
'sid, serial #' IMMEDIATE

0 comments:

Post a Comment