Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 E-mail Us
 Oracle Articles
New Oracle Articles

 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog

 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Oracle Support

 SQL Tuning

 Oracle UNIX
 Oracle Linux
 Remote s
 Remote plans
 Application Server

 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S


 Consulting Staff
 Consulting Prices
 Help Wanted!


 Oracle Posters
 Oracle Books

 Oracle Scripts

Don Burleson Blog 








Terminating Oracle connections with connect_time, idle_time, expire_time and inbound_connect_timeout

Oracle Database Tips by Donald Burleson

January 29, 2015 - Updated September 10, 2015

Oracle has several ways to disconnect idle sessions, both from within SQL*Plus via resources profiles (connect_time, idle_time), and with the SQL*net expire time parameter.

Using the connect_time parameter

The connect_time parameter will disconnect a session whose connect time exceed the value for connect_time.  The connect_time is expressed in minutes.

IMPORTANT NOTE:  You must set resource_limit=TRUE to automatically terminate Oracle connections.

alter system set resource_limit=true scope=both;

You can use profiles to set the connect time and idle time with "alter profile" statements.  Here we set the connect_time to fire in 90 minutes:

alter profile senior_claim_analyst limit
   connect_time 90
   sessions_per_user 2
   ldle_time 30;

Profiles comprise a named set of resource limits.

Also see these notes on the idle_time  parameter.

By default, when you create users, they are given the default profile, which provides unlimited use of all resources.

The syntax to create a profile follows:

 CREATE PROFILE profile LIMIT resource_parameters|password_parameters;
 [IDLE_TIME                 n|UNLIMITED|DEFAULT]

By setting resource limits, you can prevent users from performing operations that will tie up the system, and prevent other users from performing operations. You can use resource limits for security, to ensure that users log off the system, so as not to leave the session connected for long periods of time.

The system resource limits can be enforced at the session level, the call level, or both. The session level is calculated from the time the user logs in to the database until the user exits. The call level applies to each SQL command issued. Session-level limits are enforced for each connection. When a session level limit is exceeded, only the last SQL command issued is rolled back; no further work can be performed until a commit, rollback, or exit is performed.

Using sqlnet.expire_time

The sqlnet.expire_time parameter is used to set a time interval, in minutes, to determine how often a probe should be sent verifying that client/server connections are active. If you need to ensure that connections are not left open indefinitely (or up to the time set by operating system-specific parameters), you should set a value that is greater than 0. This protects the system from connections left open due to an abnormal client termination.

When the probe detects a terminated connection or a connection no longer in use, it signals an error, causing the server process to exit. This setting is intended for use on the database server side of the connection, which usually handles multiple connections at any one time. Limitations on using this terminated (dead) connection detection feature are:

  • sqlnet.expire_time cannot be used on bequeathed connections.

  • The SQL*Net expire_time probe packet will generate additional network traffic that may downgrade the network's performance, depending on the number of connections.

  • Depending on the operating system that is in use, additional server processing may need to be performed to distinguish the connection probe from other events that occur. This overhead for detection of probe events can result in downgraded network performance.

Turning-on expire_time

To set up these advanced features, simply edit your sqlnet.ora file.  If you are a beginner, follow this procedure:

  1. Start the Oracle Network Manager GUI.

  2. In the GUI navigator pane, expand the icons Local > Profile.

  3. From the list on the right hand pane, select General.

  4. Click on the Advanced tab.

  5. Next, enter the values for the fields or options you want to set.

  6. When you are finished, choose File > Save Network Configuration to write your changes to the sqlnet.ora file.

The sqlnet.ora inbound_connect_timeout parameter

The sqlnet.ora inbound_connect_timeout parameter is used to limit the time, set in seconds, for a client to connect with the database server and provide the required authentication information.

Also see sqlnet.inbound_connect_timeout tips.

To limit consumption of Oracle resources by unauthorized users and enable an audit trail, you should set time-limit values for the sqlnet.inbound_connect_timeout parameter in wall-clock seconds. (This parameter does not have default values.)  Failure resulting from sqlnet.inbound_connect_timeout will throw a ORA-03136 inbound connection timed out error.

If you like Oracle tuning, see the book "Oracle Tuning: The Definitive Reference", with 950 pages of tuning tips and scripts. 

You can buy it direct from the publisher for 30%-off and get instant access to the code depot of Oracle tuning scripts.



Oracle Training at Sea
oracle dba poster

Follow us on Twitter 
Oracle performance tuning software 
Oracle Linux poster


Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


Copyright © 1996 -  2020

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.