Error 603

Severity Level 19

Message Text

There are not enough system session descriptors available to run this query. The maximum number available to a process is %d. Split query and rerun.

Explanation

This error occurs when the number of table descriptors available to a single query is limited. Complex queries can occasionally exceed this limit, especially if they are inside of a transaction.

Action

Split the query or stored procedure up into smaller parts, or increase the number of open objects with the sp_configure system stored procedure.

Occasionally, this error can be a sign that the overall system is running out of table descriptors. This limit is set by the open objects parameter to sp_configure and should be increased as appropriate.

At server startup, SQL Server builds a pool of descriptor data structures in memory that will be used to describe database objects as they are referenced. The number of descriptors built is equal to sp_configure 'open objects'. Each time a database object is referenced for the first time, SQL Server takes one of the descriptors from this free pool and allocates it to the specific object.

If multiple tasks reference the same object at the same time, it is still considered on open object. For example, if two tasks issue the following command at the same time only one descriptor is allocated to table_a, and this is considered one open object:

UPDATE table_a set cola = @variable

If, however, table_a had an update trigger, a second descriptor would be allocated to the trigger, which would count as a second open object.

Each allocated descriptor has a use counter that indicates how many concurrent queries are referencing the object it defines. The use count is increased by 1 at the start of a query, and decreased by 1 at the end of the query. In the example above, the table_a descriptor would have a use count of 2 until the two queries finished; it would then be decreased to 0.

Once the free pool of descriptors has been used up, SQL Server starts reusing inactive descriptors when it needs to allocate a new descriptor. An inactive descriptor is one with a use count of 0. The first time SQL Server has to reuse a descriptor, it will issue the following message in the error log:

Warning: OPEN OBJECTS parameter may be too low; attempt was made to free up descriptors in localsdes().
Run sp_configure to increase parameter value.

SQL Server repeats this message after each 1000 times it reuses a descriptor. If you notice these messages being issued frequently in the error log, increase the sp_configure system stored procedure's open objects parameter.

If this error is associated with other errors or is not resolved by increasing the number of "open objects, " contact your primary support provider. Be sure to have the SQL Server error log and the output from sp_configure available for review.