I have a non clustered index I would like to drop (it is a duplicate of the clustered index). However, it is being used by a foreign key constraint. I would like to be able to identify which constraint is using the index, so I can update it to use the primary key index.

When I try to drop it:

```
DROP INDEX [idx_duplicate] ON [dbo].[MyTable]

```

I get an error:

> 
> An explicit DROP INDEX is not allowed on index 'dbo.MyTable.idx\_duplicate'. It is being used for FOREIGN KEY constraint enforcement.
> 
> 
> 

I tried to find the culprit with the following query but no luck:

```
SELECT name
FROM sys.foreign_keys
WHERE OBJECT_NAME (referenced_object_id) = 'idx_duplicate'

```