SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


when I try to drop the index I am getting error "An explicit DROP INDEX is not allowed on index...


when I try to drop the index I am getting error "An explicit DROP INDEX is not allowed on index 'dbo.crdtr.crdtr_ak1'.It is being used for FOREIGN KEY...

Author
Message
MAK-1128556
MAK-1128556
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1064 Visits: 290
when I try to drop the index I am getting error "An explicit DROP INDEX is not allowed on index 'dbo.crdtr.crdtr_ak1'. It is being used for FOREIGN KEY constraint enforcement."

even no one using the db.

Do you know how to fix it or what can I do, This index is defrag and I want to drop it and recreate this index.
Lynn Pettis
Lynn Pettis
SSC Guru
SSC Guru (96K reputation)SSC Guru (96K reputation)SSC Guru (96K reputation)SSC Guru (96K reputation)SSC Guru (96K reputation)SSC Guru (96K reputation)SSC Guru (96K reputation)SSC Guru (96K reputation)

Group: General Forum Members
Points: 96425 Visits: 38981
MAK (8/20/2009)
when I try to drop the index I am getting error "An explicit DROP INDEX is not allowed on index 'dbo.crdtr.crdtr_ak1'. It is being used for FOREIGN KEY constraint enforcement."

even no one using the db.

Do you know how to fix it or what can I do, This index is defrag and I want to drop it and recreate this index.


You will need to find the foreign key that is using this index, drop it first, then you can drop and recreate the index. After doing that, be sure to recreate the foreign key constraint as well.

Cool
Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
matt6288
matt6288
SSCommitted
SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)

Group: General Forum Members
Points: 1815 Visits: 1370
You can use the sp_helpconstraint proc to help you out. The bottom section of the output will be the foreign keys that reference the table.
MAK-1128556
MAK-1128556
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1064 Visits: 290
Thanks, but there is any other script to get only particular index dependence
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search