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

Cannot find index error Expand / Collapse
Author
Message
Posted Wednesday, July 21, 2010 2:27 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Tuesday, April 08, 2014 1:46 AM
Points: 268, Visits: 707
Due to large import function, I would like to disable my constraints.

The query I use is

ALTER INDEX ALL ON [table_name] Disable.

The disabling part runs successfully when I try to enable them it passes error:
Cannot find Index <index_name>

The command I use

ALTER INDEX ALL ON [table_name] Rebuild.

I even tried

ALTER INDEX <index_name> ON [table_name] Rebuild
and
ALTER INDEX <index_name> ON [schema_name].[table_name] Rebuild

But all fails.


When i query sysobjects and INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE the Fk constraint do exist there.

what is that I miss
Post #956166
Posted Wednesday, July 21, 2010 2:42 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Thursday, July 14, 2011 12:59 PM
Points: 73, Visits: 209
It would help me to understand, if u can post the list of indexes on the table as well as the error u r getting while trying to enable the indexes..
Post #956173
Posted Wednesday, July 21, 2010 6:22 PM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Tuesday, January 14, 2014 5:30 PM
Points: 1,264, Visits: 721
You may try to use "CREATE INDEX WITH DROP_EXISTING" to enable indexes: http://technet.microsoft.com/en-us/library/ms177406.aspx.
Be carefull when you disable ALL indexes, disabling a clustered index on a table prevents access to the data.
Post #956866
Posted Wednesday, July 21, 2010 10:17 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Tuesday, April 08, 2014 1:46 AM
Points: 268, Visits: 707
yes, i can use Create Index with Drop existing and it is working fine.

But I still dont understand what is wrong with the former statement.
Post #956920
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse