"Translated from MoS article" How can I kill a session independently of instance in RAC database?

Source: Internet
Author: User

From:
How to Kill a Session on the RAC Database in Instance independent Fashion. (Document ID 869777.1)

Suitable for:
Oracle database-enterprise edition-version 11.1.0.6 and later
Information in this document applies to any platform.

Goal:
You can kill the session in the RAC database without considering which intance the session was generated from. This is a new feature of 11g.

Solution:

To kill a session in RAC database use the following syntax.

Sql> conn/as sysdbasql> alter system kill session ' Sid, Serial#, @inst_id ';

For Example:

[email protected]> Select Inst_id,sid,serial#,username from gv$session where username are not null and username not Like ' sys% '; inst_id SID serial# USERNAME------------------------------------------------------------1 123 7 6 DBSNMP 1 rows selected. [email protected]> Conn Scott/tiger Connected.  [email protected]> Select Inst_id,sid,serial#,username from gv$session where username are not null and username not Like ' sys% ';         inst_id SID serial# USERNAME------------------------------------------------------------2 115 17816 SCOTT 1 123 dbsnmp 2 rows selected. [email protected]> alter system kill session ' 115,17816,@2 '; System altered. [email protected]> Conn Scott/tiger Connected.  [email protected]> Select Inst_id,sid,serial#,username from gv$session where username are not null and username not Like ' sys% '; inst_id SID serial# USERNAME------------------------------------------------------------1 45316 SCOTT 1 123 DBSNMP 2 rows selected. Sql> alter system kill session ' 110,45316,@1 '; System altered.

"Translated from MoS article" How can I kill a session independently of instance in RAC database?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.