温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

RAC下,alter system kill session报错ORA-00030: User session ID does not exist

发布时间:2020-08-06 18:39:07 来源:ITPUB博客 阅读:344 作者:bob_oracle 栏目:关系型数据库
在RAC环境下,KILL SESSION时报错ORA-00030 User session ID does not exist.

问题再现:

NODE2:

[oracle@node2 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Sun Feb 11 21:27:08 2018
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL> conn sh/sh
Connected.
SQL> show parameter instance_number
NAME     TYPE VALUE
------------------------------------ ----------- ------------------------------
instance_number     integer 2
SQL> select sid ,serial# from v$session where sid=userenv('sid');
       SID    SERIAL#
---------- ----------
       136    5
SQL> create table test as select a.* from all_objects a,all_objects b,all_objects c;

NODE1:

[oracle@node1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Sun Feb 11 21:25:53 2018
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL> show parameter instance_number;   
NAME     TYPE VALUE
------------------------------------ ----------- ------------------------------
instance_number     integer 1
SQL> alter system kill session '136,5';
alter system kill session '136,5'
*
ERROR at line 1:
ORA-00030: User session ID does not exist.

node2:

SQL> alter system kill session '136,5,@2';
System altered.
node1:

SQL> create table test as select a.* from all_objects a,all_objects b,all_objects c;
create table test as select a.* from all_objects a,all_objects b,all_objects c
                                     *
ERROR at line 1:
ORA-00028: your session has been killed
ORA-00028: your session has been killed

小结:对于RAC环境下的跨实例杀会话,alter system kill session 需要增加 @instance_number。其中,instance_number可通过show parameter instance_number来获取。




向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI