Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't drop index - PRIMARY KEY constraint

Status
Not open for further replies.

DawnJ

Programmer
Nov 22, 2000
5
0
0
US
I'm getting the following message when I try to drop a clustered index:

An explicit DROP INDEX is not allowed on index 'WS10702.PKWS10702'. It is being used for PRIMARY KEY constraint enforcement.

This table is a 'work' table and really doesn't need a clustered index. It has several non-clustered indexes that I would like to keep.

My problem is I can't find out where the constraint is used. I tried sp_fkeys, but I'm getting no results. I've tried looking in the sysobjects table, but found only 1 'F' object in the whole database for a totally unrelated table. There are at least 200 tables in this database, so I'd prefer not to look at each table's design properties in EM. Can anyone tell me where else to look or how to get sp_fkeys to work?
Thanks
 
I guess I just needed to take a lunch
break - it finally came to me that the primary key was not just an index, but also a constraint that had to be removed. The following syntax did the trick.


alter table WS10702
drop constraint PKWS10702
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top