• serejka058 (10/10/2011)


    I recently had this problem on SQL Server 2005 SP2 and SP3, and in my case the reason was that there were two identical indexes on a table:

    -1st was a clustered unique index with column1, column2

    -2nd was an index for primary key constraint also with column1, column2

    The server raised the error about foreign key reference when I tried to Drop the 1st index. So the only way I found to trick it was to delete foreign key references and then recreate them...

    Good to know. The script I attached reproduced the issue on 2005 but not 2008, perhaps there is some other way for this issue to happen.

    Jimmy

    "I'm still learning the things i thought i knew!"