ARTICLES

Home  > Articles  >  Troubleshooting error 1203

Troubleshooting error 1203

The error 1203 occurs when SQL Server finds that a particular page it is attempting to unlock
is already unlocked.
This is the error message text: "Process ID %d attempting to unlock unowned resource %.*ls."
Because the underlying cause for this error may be related to structural problems within the
affected database, the standard action to resolve this error is executing the DBCC CHECKDB
statement against the database in which the object belongs. After executing the DBCC CHECKDB,
attempt to reestablish the connection and execute the command.

Sometimes this error may be related to other problems (not to structural problems within the
affected database). In this case, if you encountered error 1203, review this troubleshooting
checklist to find potential solutions.

1. Install the latest SQL Server 2005 service pack.

Because the problems, which cause the error 1203, can be fixed in SQL Server service packs, you
should install the latest SQL Server service pack.
You can download the latest SQL Server service packs at here:
SQL Server 7.0 Service Pack 4
http://www.microsoft.com/sql/downloads/sp4.asp
SQL Server 2000 Service Pack 4
http://www.microsoft.com/sql/downloads/2000/sp4.asp
At the time this article was wrote the latest SQL Server 2005 service pack was service pack 2.
Check this page to obtain the latest service pack for SQL Server 2005:
http://support.microsoft.com/kb/913089/

2. Update on a view-based cursor to all rows in the current fetch buffer may
    cause error 1203.

This is SQL Server 7.0 bug; SQL Server 2000 does not contain such problems. This bug was fixed
in SQL Server 7.0 service pack 2. To work around this problem, you can update the cursor against
the base table instead of view or you can use only one row in the fetch buffer. To resolve this
problem, install the latest SQL Server service pack.

3. Executing a query that uses at least 25 different tables may cause error 1203.

In this case, the current session will be terminated. This is SQL Server 7.0 bug. This bug was
fixed in SQL Server 7.0 service pack 2. To work around this problem, try to rewrite the query
to use less than 25 tables. To resolve this problem, install the latest SQL Server service pack.

4. Lock escalation with parallel query may cause error 1203.

In this case, SQL Server may be shutdown. This is SQL Server 7.0 bug; SQL Server 2000 does not
contain such problems. This bug was fixed in SQL Server 7.0 service pack 3. To work around this
problem, you should prevent a parallel query plan by using the sp_configure system stored
procedure to change the "max degree of parallelism" option to 1. To resolve this problem, install
the latest SQL Server service pack.

5. SELECT query with DISTINCT function, which includes a self nested loop join
    may cause error 1203.

This is SQL Server 2000 bug. This bug was fixed in SQL Server 2000 service pack 1. To work around
this problem, you can force hash or merge join for the self-join instead of the nested loop join.
To resolve this problem, install the latest SQL Server service pack.

6. Executing a SELECT * FROM SYSINDEXES query against a database that has been
    upgraded from SQL Server 7.0 may cause error 1203.

This problem occurs in SQL Server 2000, because the maximum length defined for the keys column
in the sysindexes table in SQL Server 2000 is 1088, while in SQL Server 7.0, it is only 816.
After upgrading SQL Server 7.0 database to SQL Server 2000, the maximum length defined for the
keys column is not updated. So, when an index exceeds 816 bytes and the index is subsequently
fetched as in a SELECT * FROM SYSINDEXES query, the error 1203 occurs. This bug was fixed in
SQL Server 2000 service pack 1. To resolve this problem, install the latest SQL Server service
pack.

7. DELETE command on nonindexed column may cause error 1203.

This problem occurs in SQL Server 2000 when a modified table contains no clustered index, but
contains one or more nonclustered indexes, and the database is in single user mode. This bug
was fixed in SQL Server 2000 service pack 2. To work around this problem, you can execute the
DELETE on the nonindexed column with a NOLOCK hint or you can create a clustered index for this
table. To resolve this problem, install the latest SQL Server service pack.

8. Executing a parallel query may fail with error message 1203.

This is SQL Server 2000 bug. This bug was fixed in SQL Server 2000 service pack 3. To work around
this problem, you can execute the query with the MAXDOP = 1 query hint to avoid a parallel query
plan or you can prevent a parallel query plan by using the sp_configure system stored procedure
to change the "max degree of parallelism" option to 1. To resolve this problem, install the latest
SQL Server service pack.

9. You can encounter that UPDATE or DELETE statement results in error 1203
    during lock escalation.

This is SQL Server 2000 bug. This bug was fixed in SQL Server 2000 service pack 4. To resolve
this problem, install the latest SQL Server service pack.

10. You may receive error 1203 when you perform a complex select query.

This problem occurs only in SQL Server 2000 build 856 or a later version. This bug was fixed
in SQL Server 2000 service pack 4. To resolve this problem, install the latest SQL Server
service pack.