Idle time is the number of seconds that a connection remains inactive, waiting for user input. Even though a connection is inactive, it still uses server resources, and may also be holding resources (for example, locks) that can block other active processes running on the same server.
idle_time allows you to set time limits for idle connections. If a connection is idle beyond the limit set, Adaptive Server kills the process running the connection or issues a warning.
The syntax is:
sp_add_resource_limit user, application, time_range, idle_time , kill_time, enforcement_time, action, scope
Where:
idle_time enables the limits for idle times.
kill_time is the number of seconds after which an idle connection is killed.
enforce indicates how long (in seconds) the limit is enforced. This must be preexectution or “1”.
action_severity specifies the action to take when the kill_time comes to fruition.
limit_scope is the scope of the limit, in this case the session.
For a complete description of sp_add_resource_limit, see the Commands Reference Manual.
For example, this creates a new limit for user “sa” for isql connections:
sp_add_resource_limit sa, isql, 'at all times', idle_time, 10, 2, 4, 8