Error 1510

Severity Level 17

Message Text

Sort failed: Out of space or locks in database '%.*s'

Explanation

This error occurs when you attempt to create an index and there is not enough space in the database to complete the operation or no more locks are currently available.

Creating indexes can require 120 percent to 150 percent of the original table size when building a clustered index without the 'WITH SORTED_DATA' option (this amount is in addition to the table size¾but just during the time that CREATE INDEX is processing). This space must be available in the indicated database or in the segment on which you were attempting to create the index.

Action

When there is not enough space in the database, you may be able to select a specific segment on which to place the index. Use the sp_helpsegment system stored procedure to locate a specific segment and to check the size available on the segment. Type:

sp_helpsegment 'default'

Or use the alter database statement to increase the overall database size. Note that once you increase the size of the database, you may not be allowed to decrease the size. For information on creating and extending segments and altering or moving databases, see the Microsoft SQL Server Transact-SQL Reference.

If your database has no more locks available, use the sp_configure system stored procedure to increase the number of locks. For example:

sp_configure 'locks', #####
go
reconfigure
go

In order for the configuration option to take effect, you must stop and restart the SQL Server service. For user convenience, you may want to pause the service and allow current user activity to gracefully finish before officially stopping the service. For information on starting, pausing, and stopping the SQL Server service, see Microsoft SQL Server Setup and the online Help for SQL Enterprise Manager.