How To Automate Cleanup Of Dead Connections And INACTIVE Sessions [ID 206007.1]

PURPOSE
-------

This note explains the difference between a dead connection and an
INACTIVE session in v$session. It also discusses the mechanisms
provided to automate the cleanup of each.


SCOPE & APPLICATION
-------------------

This note is intended for any DBA who wants to automate the cleanup of
dead connections and/or INACTIVE sessions.


Difference between INACTIVE sessions and Dead Connections
---------------------------------------------------------

Dead connections and INACTIVE sessions are different issues. Oracle
provides separate mechanisms to automate the cleanup of each.


(1) Dead connections:

These are previously valid connections with the database but the
connection between the client and server processes has terminated
abnormally.

Examples of a dead connection:

- A user reboots/turns-off their machine without logging off
or disconnecting from the database.
- A network problem prevents communication between the client
and the server.

In these cases, the shadow process running on the server and the
session in the database may not terminate. To automate the cleanup
of these sessions, you can use the Dead Connection Detection (DCD)
feature of Net8.

When DCD is enabled, Net8 (server-side) sends a packet to the client.
If the client is active, the packet is discarded. If the client has
terminated, the server will receive an error and Net8 (server-side)
will end that session.

Refer to Note:151972.1 : Dead Connection Detection (DCD) Explained,
for details regarding DCD.


(2) INACTIVE Sessions:

These are sessions that remain connected to the database with a
status in v$session of INACTIVE.

Example of an INACTIVE session:

- A user starts a program/session, then leaves it running and idle
for an extended period of time.

To automate cleanup of INACTIVE sessions you can create a profile
with an appropriate IDLE_TIME setting and assign that profile to
the users.

Note:159978.1 : How To Automate Disconnection of Idle Sessions,
outlines the steps to setup IDLE_TIME for this.


RELATED DOCUMENTS
-----------------
Note:151972.1 Dead Connection Detection (DCD) Explained
Note:159978.1 How To Automate Disconnection of Idle Sessions
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值