Microsoft KB Archive/302675

= FIX: Delete on Nonindexed Column Fails with Error 1203 =

Article ID: 302675

Article Last Modified on 10/16/2003

-

APPLIES TO


 * Microsoft SQL Server 2000 Standard Edition

-



This article was previously published under Q302675



BUG #: 354645 (SHILOH_BUGS)



SYMPTOMS
If a table contains no clustered index, but contains one or more nonclustered indexes, and the database is in single user mode, a modification operation may cause error 1203:

Error 1203: Attempting to unlock an Unowned resource Connection Broken.



RESOLUTION
To resolve this problem, obtain the latest service pack for Microsoft SQL Server 2000. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

290211 INF: How to Obtain the Latest SQL Server 2000 Service Pack

Hotfix
NOTE: The following hotfix was created prior to Microsoft SQL Server 2000 Service Pack 2.

The English version of this fix should have the following file attributes or later:   File name      Version     Platform s80426i.exe   8.00.0426   x86 NOTE: Due to file dependencies, the most recent hotfix or feature that contains the above files may also contain additional files.



WORKAROUND
To work around this problem, do any of the following:  Build a clustered index on the composite primary key. -or-

  Execute the delete on the nonindexed column with a NOLOCK hint, as follows: delete asn_exp_qty from asn_exp_qty(NOLOCK) where storerkey = 'Common' and sku = '1234' and exp_qty = 17 -or-

  Use an INDEX optimizer hint to force the use of the indexed column, as follows: delete from asn_exp_qty (2)  where storerkey = 'Common' and sku = '1234' and exp_qty = 18 



STATUS
Microsoft has confirmed this to be a problem in SQL Server 2000. This problem was first corrected in Microsoft SQL Server 2000 Service Pack 2.



MORE INFORMATION
To reproduce the problem, use the following script: Use Northwind go

CREATE TABLE asn_exp_qty (storerkey char(15) COLLATE SQL_Latin1_General_CP1_CI_AI not null, sku char(20) not null, exp_qty int) go ALTER TABLE asn_exp_qty ADD CONSTRAINT PKasn_exp_qty PRIMARY KEY NONCLUSTERED (storerkey, sku) go

Use master go exec sp_dboption 'Northwind','Single User', 'True' go

Use Northwind go insert into asn_exp_qty values ('Common', '1234',18) go

delete from asn_exp_qty   where storerkey = 'Common' and sku = '1234' and exp_qty = 18

Additional query words: Delete non indexed column error 1203

Keywords: kbbug kbfix kbsqlserv2000presp2fix KB302675

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.