The column '[blah]' referenced by index 'PK_blah' was not found in the database.

First of all, thank you for an amazing product!

This post is to report a nagging bug. I get this error message a LOT.

aoopwdpyr3ev.png

Sometimes I am able to fix it by poking around different directories and restoring different branches. I've gone so far as to completely recreating my indexes and primary keys back to the tables one by one, but this is not an ideal solution, as I have lots of complex primary keys in my database. This issue has caused me a lot of time spent. Worst yet, days will go by with no problem, then it appears again. I then have to go through my poking and prodding process. Could someone please tell me why this error is happening?

As an aside, the error dialog pops up every 3-5 minutes as a reminder. I click [Cancel] over and over until I can't take it no more, then I report the issue to RedGate with different information each time (via the error dialog). I fear the messages are going into the bit bucket because I never get a response.

"The Google" has not helped.

RedGate, please help!
Luc
Tagged:

Answers

  • LucLuc Posts: 13 Bronze 1
    The latest way that I've worked around the issue was by following these steps:
    1. Read the error message to find the table name that is having problems.
    2. Find offending table in SSMS Object Explorer
    3. Right click on table to open the popup menu
    4. Click on Script Table As... > Drop and Create to... > New Query Editor Window
    5. Execute generated script
    6. This will throw an error...
    7. Give focus to the SQL Source Control tab (this will cause the RedGate error on another table).
    8. Repeat back at step 1 with the table referenced in the error dialog

    Once I follow the above steps all the way down to the deepest table (ie. no child record constraints), the error dialog went away and it showed my changed files.

    It wasn't pretty, but it worked. :) Would still like to hear back from RedGate with a ticket number so that I can track this issue over time.

    Thanks!
    Luc
  • Hi Luc,

    Thanks for posting. We've created a support ticket for you and will be in touch shortly.
    Kind regards

    Tianjiao Li | Redgate Software
    Have you visited our Help Center?
  • LucLuc Posts: 13 Bronze 1
    Thank you for the response. Could you please provide me with the support ticket number for my records?

    Thanks,
    Luc
  • Hi @Luc

    You will have received your ticket number in an automated mail from our ticketing system when it was created. My colleagues will be in touch via this ticket.
    Customer Support
    Redgate Software
  • mzamoramzamora Posts: 2 New member
    I am having the same issue. Does anyone know how to have this fixed?
  • LucLuc Posts: 13 Bronze 1
    edited July 12, 2019 2:14PM
    The issue is back. I'm getting it every minute or so, over and over... 🤦‍♂️

    Luckily my work around steps above still apply. However, once the Drop and Create to... works successfully on the final faulty table, all of my data is wiped. Thus, it's not an ideal solution, but it does work.
  • LucLuc Posts: 13 Bronze 1
    ATTN: RedGate Support

    Any update on this issue? It's still causing us problems from time to time and the work around is problematic as well. Thanks for any updates...
  • CristinaCristina Posts: 3 Bronze 1
    Hi!!
    I've got the same problem... any help?
  • tonywaddletonywaddle Posts: 17 Bronze 2
    Colleague of mine is also having this issue, can't seem to correct it.
  • tonywaddletonywaddle Posts: 17 Bronze 2
    Colleague of mine is also having this issue, can't seem to correct it.
    Managed to fix it by disabling the index, then apply latest changes again from Source Control.
  • LucLuc Posts: 13 Bronze 1
    The only way I've been able to fix it is by following these steps. It is not ideal, but it does work every time. :(
  • LucLuc Posts: 13 Bronze 1
    The only way I've been able to fix it is by following these steps. It is not ideal, but it does work every time. :(
  • JLMCCJLMCC Posts: 3 Bronze 1
    Still getting this error after rebuild db and  reinstalling redgate s/w. very very frustrating.  :( 
  • JLMCCJLMCC Posts: 3 Bronze 1
    Luc said:
    The only way I've been able to fix it is by following these steps. It is not ideal, but it does work every time. :(
    Have tried this. It did not work any other tips?
Sign In or Register to comment.