I created a DTS package that copies a table from one database to another. It copies all the rows when I run it manually. If I run it as a scheduled job in MS SQL Server 2000, it does not copy all the rows. I created a exception file to trap the exception and it says
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ErrorRow: 10211
"Error Source: Microsoft OLE DB Provider for SQL Server
Error Description:Cannot insert duplicate key row in object 'TableName' with unique index 'IndexName'.
Error Help File:
Error Help Context ID:0
@@SourceRow: Not Available
@@DestRow: Not Available
@@ExecutionCompleted
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I cannot find a duplicate entry in that table for the colum with the unique index constraint. And oddly enough, I get this error only when I run it as a scheduled job.
I have digged a lot but I still do not understand this peculiar behaviour.
Any ideas??
TIA
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ErrorRow: 10211
"Error Source: Microsoft OLE DB Provider for SQL Server
Error Description:Cannot insert duplicate key row in object 'TableName' with unique index 'IndexName'.
Error Help File:
Error Help Context ID:0
@@SourceRow: Not Available
@@DestRow: Not Available
@@ExecutionCompleted
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I cannot find a duplicate entry in that table for the colum with the unique index constraint. And oddly enough, I get this error only when I run it as a scheduled job.
I have digged a lot but I still do not understand this peculiar behaviour.
Any ideas??
TIA