Dead Connection Detection

Dead connection detection (DCD) is a Oracle net feature which is primarily intended for environments where clients power down their systems or client machine crashes unexpectedly without gracefully closing the connections from the Oracle database.

In cases where client machine abruptly crashes with properly disconnection the sessions from Oracle databases the resources locked by such sessions continue to be locked thereby causing performance issues in the environment. Since this scenario can occur in any environment Oracle net service came up with the feature of DCD to detect such scenarios in early stage which enables speedy recovery of the locked resources.

To resolve this situation and to detect the dead connections Oracle introduced a new concept at the network session (tcp in 12c) layer. Server process sends SQL*Net Probe packets to the client to check if the connection is still usable in every fixed interval of time which is specified by sqlnet.expire_time parameter. If this communication via probe packets is failed an error is returned which causes the server process to exit.

How to enable DCD

To enable DCD in your env. set the SQLNET.EXPIRE_TIME parameter in the sqlnet.ora file followed by a listener restart or listener reload.


where n is the time interval in minutes, after which the probe packets for DCD are sent.

Default Value: 0
Recommended Value: 10

The only downside of setting this parameter is that even though the probe packets are 10 bytes in size, enabling DCD generates additional traffic on the network and depending on the network configuration of your env. can degrade network performance.

Hope this article helps you in understanding and enabling DCD, there are dependent parameters that give you more control over the frequency of sending probe packets and the retries etc via tcp_retries1, tcp_retries2, tcp_keepidle, tcp_keepcnt, tcp_keepintvl. Please comment below if you are interested to know further about these parameters, its usage and how to configure them.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.