![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I am trying to copy data from one SQL server to another (hopefully on a schedule soon). Anyhow when I run it, I get the following error: Error at Destination for Row number 246271. Errors encountered so far in this task: 1. The statement has been terminated. Violation of PRIMARY KEY constraint 'PK_CART'. Cannot insert duplicate key in object 'Cart'. Ok, I understand what the error means. Essentially there is a duplicate (autoincremented) primary key, which, in itself, seems like it should not be possible. But lets just say, it is (well yea it is). How do I correct this? The issue here is 2 fold.. 1. If I do have a primary key violation in a table, how do I fix it? I get no indication of what row the violation is in. In addition, how could this happen anyhow? 2. Why do I get this error from DTS? I thought DTS would copy virtually the entire table, structure and all. If the source DB is in one state (errors or not) why would the DTS be unable to duplicate it? And finally, how do I avoid having DTS dump when it hits an error like this? I'd rather just omit the problematic erros rather than have a totally bad copy of the database. THANKS FOR THE HELP!! This is very appreciated! Jon |
#3
| |||
| |||
|
|
I am trying to copy data from one SQL server to another (hopefully on a schedule soon). Anyhow when I run it, I get the following error: Error at Destination for Row number 246271. Errors encountered so far in this task: 1. The statement has been terminated. Violation of PRIMARY KEY constraint 'PK_CART'. Cannot insert duplicate key in object 'Cart'. Ok, I understand what the error means. Essentially there is a duplicate (autoincremented) primary key, which, in itself, seems like it should not be possible. But lets just say, it is (well yea it is). How do I correct this? The issue here is 2 fold.. 1. If I do have a primary key violation in a table, how do I fix it? I get no indication of what row the violation is in. In addition, how could this happen anyhow? 2. Why do I get this error from DTS? I thought DTS would copy virtually the entire table, structure and all. If the source DB is in one state (errors or not) why would the DTS be unable to duplicate it? And finally, how do I avoid having DTS dump when it hits an error like this? I'd rather just omit the problematic erros rather than have a totally bad copy of the database. THANKS FOR THE HELP!! This is very appreciated! Jon |
![]() |
| Thread Tools | |
| Display Modes | |
| |