locked
error in copying data from sql 2000 to 2008 RRS feed

  • Question

  • Hi,

    I am getting error when  trying to copy only data from sql 2000 to 2008.

    2008 already has the data I am just overwriting existing data.

    my error

    Msg 2714, Level 16, State 6, Line 1

    There is already an object named 'ZCONF_COLORS' in the database.

    Msg 2627, Level 14, State 1, Line 1

    Violation of PRIMARY KEY constraint 'PK__COLORS'. Cannot insert duplicate key in object 'dbo.ZCONF_COLORS'.

    The statement has been terminated.

    Msg 2627, Level 14, State 1, Line 2

    Violation of PRIMARY KEY constraint 'PK__COLORS'. Cannot insert duplicate key in object 'dbo.ZCONF_COLORS'.

    The statement has been terminated.

    Msg 2627, Level 14, State 1, Line 3

    Violation of PRIMARY KEY constraint 'PK__COLORS'. Cannot insert duplicate key in object 'dbo.ZCONF_COLORS'.

    The statement has been terminated.

    Msg 2627, Level 14, State 1, Line 4

    Violation of PRIMARY KEY constraint 'PK__COLORS'. Cannot insert duplicate key in object 'dbo.ZCONF_COLORS'.

    The statement has been terminated.

    Msg 2627, Level 14, State 1, Line 5

    Violation of PRIMARY KEY constraint 'PK__COLORS'. Cannot insert duplicate key in object 'dbo.ZCONF_COLORS'.

    The statement has been terminated.

    Msg 2627, Level 14, State 1, Line 6

    Violation of PRIMARY KEY constraint 'PK__COLORS'. Cannot insert duplicate key in object 'dbo.ZCONF_COLORS'.

    The statement has been terminated.

    Msg 2627, Level 14, State 1, Line 7

    Violation of PRIMARY KEY constraint 'PK__COLORS'. Cannot insert duplicate key in object 'dbo.ZCONF_COLORS'.

    The statement has been terminated.

    Msg 2627, Level 14, State 1, Line 8

    Violation of PRIMARY KEY constraint 'PK__COLORS'. Cannot insert duplicate key in object 'dbo.ZCONF_COLORS'.

    The statement has been terminated.

    Please suggest me is there any other way?

    Thanks,

    Goutham.


    gouthamraj
    Thursday, July 14, 2011 4:37 PM

Answers

  • Hello gouthamraj,

    By the error messages I guess you don't "overwrite" (update) the data, you insert them and because the primary keys already exists you get that errors.

    How do your statement look like?


    Olaf Helper
    * cogito ergo sum * errare humanum est * quote erat demonstrandum *
    Wenn ich denke, ist das ein Fehler und das beweise ich täglich
    Blog Xing
    • Proposed as answer by Siva1983 Thursday, July 14, 2011 5:32 PM
    • Marked as answer by Alex Feng (SQL) Friday, July 22, 2011 10:03 AM
    Thursday, July 14, 2011 4:49 PM

All replies

  • Hello gouthamraj,

    By the error messages I guess you don't "overwrite" (update) the data, you insert them and because the primary keys already exists you get that errors.

    How do your statement look like?


    Olaf Helper
    * cogito ergo sum * errare humanum est * quote erat demonstrandum *
    Wenn ich denke, ist das ein Fehler und das beweise ich täglich
    Blog Xing
    • Proposed as answer by Siva1983 Thursday, July 14, 2011 5:32 PM
    • Marked as answer by Alex Feng (SQL) Friday, July 22, 2011 10:03 AM
    Thursday, July 14, 2011 4:49 PM
  • Hi Goutham,

    Can you drop objects in Destination and rerun your import ..

     


    Sivaprasad.L Together We can Achieve
    Thursday, July 14, 2011 5:32 PM