I have a table A with a cluster index on the primary key
That table is linked to another table B that is linked to table C
Table C has a noncluster index on the primary key which was set to be noncluster by mistake.
Now I am having an issue with table A
When I insert a new record in A say id=33885 and this is the last one
I select top1 * from table A order by id desc
I do not get that id I get another one much smaller than this one
When I click rebuild for the index
and try it again I get the id 33885
Then after a few minutes later I get the same problem
How to check whether the index is corrupted or not and how to fix that
I want to drop and rebuild the non cluster index as cluster and drop and rebuild all the foreign keys pointing to section id
but now What shall I do with this key that I am having an issue with
i.e. If I ran Use [Your database name]
DBCC CheckDB
will it show what is wrong can I run this command while people are using my site do I need a lot of disk space to do that.
Thanks