This forum is currently locked. You can't register or post questions at this time. (read more)

How to kill a RAC session when it is configurely wrongly

All posts relating to Oracle database administration.

Moderator: Tim...

kytemaniac
Senior Member
Posts: 234
Joined: Tue May 19, 2009 12:59 am

How to kill a RAC session when it is configurely wrongly

Postby kytemaniac » Wed Mar 27, 2013 4:01 pm

Hi,

realize that I've connected to RAC node2 through the physical IP, which should not be the case, as a result the sys_context("userenv','sid') from dual is also wrong.

understand from http://www.oracle-base.com/articles/mis ... ssions.php how to kill a session, but if in the first place the session id obtained is wrong, how should I kill the session?

thanks

thanks

Tim...
Site Admin
Posts: 18437
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK
Contact:

Re: How to kill a RAC session when it is configurely wrongly

Postby Tim... » Wed Mar 27, 2013 4:56 pm

Hi.

Sorry. Does not compute. :)

You can identify sessions running on the database using the gv$session and gv$process views. This session is the actually session running, not matter how you made the intial connection. If you can identify the session, it can be killed, regardless of how the connect was made. I don't understand your problem.

Cheers

Tim...
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog

kytemaniac
Senior Member
Posts: 234
Joined: Tue May 19, 2009 12:59 am

Re: How to kill a RAC session when it is configurely wrongly

Postby kytemaniac » Wed Mar 27, 2013 8:22 pm

well this is the long running ops information
(connect using physical ip)

Code: Select all

SYS_CONTEXT('USERENV','SID')
---------------------------------------------------------------------

596

Elapsed: 00:00:00.12
excel@shielo>
excel@shielo>exec excel.UTILITIES.prc_RefreshData





this is what appears in the sys connect using vip

Code: Select all


WORKGROUP\USER-PC                                                SYS                               
oracle@sllin2pb.localdomain (PZ99)                                                                 

SYS@shielo>alter system kill session '596,40685,@1';

alter system kill session '596,40685,@1'
*
ERROR at line 1:
ORA-00030: User session ID does not exist.


there's no other session with sid =596, if it cannot be killed then obviously I'm retrieving the wrong information initially.
i'm using http://www.oracle-base.com/articles/mis ... ssions.php

Tim...
Site Admin
Posts: 18437
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK
Contact:

Re: How to kill a RAC session when it is configurely wrongly

Postby Tim... » Wed Mar 27, 2013 9:07 pm

Hi.

This confuses a lot of people. The SYS_CONTEXT('USERENV','SID') function returns the AUDSID value for the current session, not the SID. If you query the GV$SESSION view using this value you will get the real session. For example,

Code: Select all

SELECT inst_id, sid, serial#
FROM gv$session
WHERE audsid =  596;


Where 596 is the value you got from the SYS_CONTEXT('USERENV','SID') call.

Cheers

Tim...
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog


Return to “Oracle Database Administration”

Who is online

Users browsing this forum: No registered users and 8 guests

cron