【翻译自mos文章】在11gR2 rac中启用Dead Connection Connection(DCD)功能

来源:互联网 发布:centos snmp 是否开启 编辑:程序博客网 时间:2024/05/22 07:47

在11gR2 rac中启用Dead Connection Connection(DCD)功能

来源于:
GRID: Dead Connection Connection or DCD and RAC 11.2 (文档 ID 1136945.1)

适用于:
Oracle Net Services - Version 11.2.0.1 and later
Information in this document applies to any platform.
***Checked for relevance on 16-OCT-2013***

目标:
对11gR2的rac 启用Dead Connection Detection (DCD)

译者注:
在10g rac 或者11gR1 rac时代,由于没有$GRID_HOME,因此,启用Dead Connection Detection (DCD)功能时,肯定知道在哪个HOME下设置参数(因为只有一个HOME)
那么到了11gR2时代,由于出现了$GRID_HOME,启用Dead Connection Detection (DCD)是在$GRID_HOME下设置参数?还是在$RDBMS_ORACLE_HOME下设置参数?本文就是用来解答这个疑问的

解决方案:
当启用DCD (SQLNET.EXPIRE_TIME)时,对于11.2 RAC 使用DCD功能时,必须在"RDBMS Oracle home"下被启用。
原因是,scan和tns listener从GRID_HOME下运行,但是bequeath connection归属于RDBMS Oracle home的操作系统用户。

这意味着RDBMS Oracle home下的SQLNET.ORA文件必须被设置,举例如下:
Grid Oracle O/S user "grid"
RDBMS Oracle home O/S user "Oracle"

TNS listeners are running as "grid" user

$ ps -ef |grep tnslsnroracle 13858 27102 0 16:22 pts/1 00:00:00 grep tnslsnrgrid 30445 1 0 12:16 ? 00:00:00 /u01/app/11.2.0/grid/bin/tnslsnr LISTENER_SCAN1 -inheritgrid 31377 1 0 12:20 ? 00:00:00 /u01/app/11.2.0/grid/bin/tnslsnr LISTENER -inherit


Make a SQL*Plus connection

Microsoft Windows XP [Version 5.1.2600](C) Copyright 1985-2001 Microsoft Corp.C:\sqlplus scott/tiger@testSQL*Plus: Release 11.2.0.1.0 Production on Mon Jun 28 16:24:30 2010Copyright (c) 1982, 2010, Oracle. All rights reserved.Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit ProductionWith the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,Data Mining and Real Application Testing optionsSQL>


得到数据库服务器上的Server Process  ID --->>>23394

SQL> select p.spid, s.serial#, s.username, s.module, s.program, s.machinefrom v$process p,v$session s where p.addr = s.paddr and s.username = 'SCOTT';SPID SERIAL# USERNAME------------------------ ---------- ------------------------------MODULE------------------------------------------------PROGRAM------------------------------------------------MACHINE----------------------------------------------------------------23394 56998 SCOTTSQL*Plussqlplus.exeUK-ORACLE\test


确认23394进程的owner是oracle

$ ps -ef |grep 23394oracle 23394 1 0 16:24 ? 00:00:00 oraclev11gr21 (LOCAL=NO)oracle 22927 19181 0 16:25 pts/4 00:00:00 grep 23394


 

0 0