Limiting idle time

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:

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