Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

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... Expand / Collapse
Author
Message
Posted Thursday, August 20, 2009 1:18 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, September 1, 2010 7:44 AM
Points: 176, 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.
Post #774531
Posted Thursday, August 20, 2009 1:26 PM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Yesterday @ 5:09 PM
Points: 20,896, Visits: 32,929
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.



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)
Post #774535
Posted Thursday, August 20, 2009 1:36 PM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Tuesday, December 23, 2014 9:04 AM
Points: 1,207, Visits: 1,279
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.
Post #774542
Posted Thursday, August 20, 2009 2:05 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, September 1, 2010 7:44 AM
Points: 176, Visits: 290
Thanks, but there is any other script to get only particular index dependence
Post #774565
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse