Friday, March 23, 2012

Index problem...

I'm trying to delete rows from a database, ad I get an error that says "Specified index does not exist. [name of my UQ__foo__0x000BF unique index). What happend was I used to have a colum that was ment to be unique, then I made it un-unique and tried to delete the rows from the table. Something strange happend where the table is looking for a unique key that no longer exists but I can remake the unique key because it says "duplicate key" does not exist. I looked in all the system tables for references to UQ__foo__blah but didnt see anything.

Am I hosed? Do I need to drop the whole table?

Quote:

Originally Posted by RedSon

I'm trying to delete rows from a database, ad I get an error that says "Specified index does not exist. [name of my UQ__foo__0x000BF unique index). What happend was I used to have a colum that was ment to be unique, then I made it un-unique and tried to delete the rows from the table. Something strange happend where the table is looking for a unique key that no longer exists but I can remake the unique key because it says "duplicate key" does not exist. I looked in all the system tables for references to UQ__foo__blah but didnt see anything.

Am I hosed? Do I need to drop the whole table?




Had that one time...try reindexing the table see if it clears or puts it back then go for DROP INDEX of the specific index after rebuilding

This example rebuilds all indexes on the authors table using a fillfactor value
of 70.

DBCC DBREINDEX (authors, '', 70)

No comments:

Post a Comment