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


Cannot find index error


Cannot find index error

Author
Message
khushbu
khushbu
SSC-Addicted
SSC-Addicted (447 reputation)SSC-Addicted (447 reputation)SSC-Addicted (447 reputation)SSC-Addicted (447 reputation)SSC-Addicted (447 reputation)SSC-Addicted (447 reputation)SSC-Addicted (447 reputation)SSC-Addicted (447 reputation)

Group: General Forum Members
Points: 447 Visits: 752
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
sumit.agrawal
sumit.agrawal
SSC-Enthusiastic
SSC-Enthusiastic (141 reputation)SSC-Enthusiastic (141 reputation)SSC-Enthusiastic (141 reputation)SSC-Enthusiastic (141 reputation)SSC-Enthusiastic (141 reputation)SSC-Enthusiastic (141 reputation)SSC-Enthusiastic (141 reputation)SSC-Enthusiastic (141 reputation)

Group: General Forum Members
Points: 141 Visits: 220
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..
magasvs
magasvs
SSCommitted
SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)

Group: General Forum Members
Points: 1507 Visits: 753
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.
khushbu
khushbu
SSC-Addicted
SSC-Addicted (447 reputation)SSC-Addicted (447 reputation)SSC-Addicted (447 reputation)SSC-Addicted (447 reputation)SSC-Addicted (447 reputation)SSC-Addicted (447 reputation)SSC-Addicted (447 reputation)SSC-Addicted (447 reputation)

Group: General Forum Members
Points: 447 Visits: 752
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.
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