Results 1 to 3 of 3

Thread: Missing or invalid key in index

  1. #1
    Join Date
    Jan 2005
    Posts
    4

    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

  2. #2
    Join Date
    Feb 2003
    Location
    Aussie Land
    Posts
    114
    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.

  3. #3
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    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
  •