-
Missing or invalid key in index
Hi,
I run a nightly dbcc checktable on order_header and today I see this error occurs.
Table error: Table 'ORDER_HEADER' (ID 203147769). Missing or invalid key in index 'PK_ORDER_HEADER' (ID 4) for the row:
Server: Msg 8955, Level 16, State 1, Line 1
1. I have no idea what caused it?
2. How do I fixed this online as the application is 24/7?
3. I did try to dbcc reindex but it failed reporting that can't create index because of duplicate in primary index key????
Please show me a way to fix this.
Thanks
Dave
-
Have you tried dropping and recreate the constraint?
You might experience some blocking issues during the re-create (severity depending on size of the table and DB activity), so maybe schedule this during a slow period.
-
Query the table to see if you actually have a duplicate key in the table. You may have to recreate the constraint with NOCHECK option if that is the case.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|