getting error while recreating constraints.

  • Hi all,

    I have a table ABC in a database which holds 10 million rows and takes so much time while accessing the table so we have decided to put the data into another table called ABCArchive and delete the data in ABC table and see the performance .i did it and saw the improvement in the performance.but before deleting the data i have dropped all the foreign key constraints and recreated them after the deletion ,when i was recreating them i got the error :

    The ALTER TABLE statement conflicted with the FOREIGN KEY constraint .The conflict occurred in database "xyz", table "abc", column 'ID'.

    where ID is the primary key column and it has no dependies.

    This error doesnot make any sense to me ,If anybody has any idea please tell me ...

  • Sounds like another table as a FK assigned against this one.


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • i am sorry i didnot notice that There is one dependent foreign key constraint to the ABC table ID column.But i have dropped that too while deleting the rows the problem comes only when i was trying to recreate the foreign key...

    so I have deleted the child records too ,and i am no longer getting the error.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply