【翻译自mos文章】在RAC database中怎么独立于instance来kill session?

来源于:

How to Kill a Session on RAC Database In Instance Independent Fashion. (文档 ID 869777.1)

适用于:

Oracle Database - Enterprise Edition - Version 11.1.0.6 and later

Information in this document applies to any platform.

目标:

你可以在RAC database中来kill session,而不用考虑该session是从哪个intance上产生的。这是11g的新特性。

解决方案:

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

sql> conn / as sysdba

sql> alter system kill session 'sid, serial#, @inst_id';

For Example :

[email protected]> select inst_id,sid,serial#,username from gv$session where username is not null and username not like 'SYS%'; 

INST_ID SID SERIAL# USERNAME
---------- ---------- ---------- ------------------------------
1                123        76       DBSNMP 

1 rows selected. 

[email protected]> conn scott/tiger
Connected. 

[email protected]> select inst_id,sid,serial#,username from gv$session where username is not null and username not like 'SYS%'; 

INST_ID SID SERIAL# USERNAME
---------- ---------- ---------- ------------------------------
2                115    17816        SCOTT
1                123         76         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 is not null and username not like 'SYS%'; 

INST_ID SID SERIAL# USERNAME
---------- ---------- ---------- ------------------------------
1                110      45316         SCOTT
1                123            76         DBSNMP 

2 rows selected. 

sql> alter system kill session '110,45316,@1';
System altered.
时间: 2024-10-11 16:08:40

【翻译自mos文章】在RAC database中怎么独立于instance来kill session?的相关文章

【翻译自mos文章】rac数据库中,HC_<SID>.dat文件被其他Oracle_Home下的实例所使用。

rac数据库中,HC_<SID>.dat文件被其他Oracle_Home下的实例所使用. 参考原文: RAC database HC_<SID>.dat is used by instance of different Oracle_Home (Doc ID 1618161.1) 适用于: Oracle Database - Enterprise Edition - Version 11.2.0.0 and later Information in this document ap

【翻译自mos文章】oracle db 中的用户账户被锁--查看oracle用户的尝试次数

参考原文: Users Accounts Getting Locked. (Doc ID 791037.1) 其实这个文章是为oracle 别的软件产品写的,不过涉及到user 锁定问题,那还是跟db有关系. 该文章我就不全部翻译了,只翻译最有用的一点: ---lcount列是记录oracle用户用错误的密码登陆db的登陆的次数. Select lcount from SYS.USER$ where name ='<USERNAME>' [翻译自mos文章]oracle db 中的用户账户被锁

【翻译自mos文章】oracle数据库中 基本的表压缩和高级压缩之间的区别

基本的表压缩和高级压缩之间的区别, 摘录自mos文章Difference Between Basic Table Compression And Advanced Compression (Doc ID 1548187.1) 适用于: Oracle Database - Enterprise Edition - Version 10.2.0.5 and later Information in this document applies to any platform. 目标: What is

【 翻译自mos文章】Alter Database Add Supplemental Log Data 命令挂起

Alter Database Add Supplemental Log Data 命令挂起 来源于: Alter Database Add Supplemental Log Data Hangs (文档 ID 406498.1) 适用于: Oracle Database - Enterprise Edition - Version 10.2.0.1 and later Information in this document applies to any platform. 症状: 作为流复制配

【翻译自mos文章】在10g中,当发生ORA-00020时,sqlplus登陆会报“connected to an idle instance”

在10g中.当发生ORA-00020时,sqlplus登陆会报"connected to an idle instance" 来源于: Sqlplus Logon Reports 'connected to an idle instance' when ORA-20 happens in 10g (文档 ID 1370000.1) 说的比較经典, 不做翻译,直接转帖: APPLIES TO: Oracle Server - Enterprise Edition - Version: 1

【翻译自mos文章】从tablespace中 删除空的datafile时报ora-03262

参考自: Cannot Drop Empty Datafile From Tablespace ORA-03262 (文档 ID 1353029.1) 适用于: Oracle Server - Enterprise Edition - Version: 11.2.0.2 and later   [Release: 11.2 and later ] Information in this document applies to any platform. 症状: ALTER TABLESPACE

【翻译自mos文章】Oracle Database In-Memory Advisor

Oracle Database In-Memory 顾问 来源于: Oracle Database In-Memory Advisor (文档 ID 1965343.1) 适用于: Enterprise Manager for Oracle Database - Version 12.1.0.2.0 and later Oracle Database - Enterprise Edition - Version 12.1.0.2 and later Information in this doc

【翻译自mos文章】多租户中的service管理

来源于: Service Management For Multitenant (文档 ID 2009500.1) APPLIES TO: Oracle Database - Enterprise Edition - Version 12.1.0.1 and later Information in this document applies to any platform. GOAL This Note is intended to cover the most important point

【翻译自mos文章】V$BACKUP_DATAFILE 中显示file#=0 有损坏

来源于: V$BACKUP_DATAFILE Shows Corruptions for File #0 (文档 ID 399113.1) 适用于: Oracle Database - Enterprise Edition - Version 9.2.0.1 to 11.1.0.6 [Release 9.2 to 11.1] Information in this document applies to any platform. 症状: 当查询v$backup_datafile时,发现对于fi