Rohit K Gupta
IS-IT--Management
Hi,
I have 3 Databases ion Oracle, SQL Server and DB2.
Source DB: Oracle
Target DB: SQL Server / DB2
On a daily basis we have to migrate Data from Oracle to SQL Server and Oracle to DB2. In C# application we are making use of BCP.
In SQL Server, the table has an unique index with IGNORE_DUP_KEY. So if we have duplicate data then it is simply ignored and all other data is copied successfully.
However, in DB2 if there is duplicate data, then entire transaction is rolled back. Is there any SQL Server equivalent option in DB2 or something we can do via C# BCP (
I have come up with an alternative that is dump all the data from Oracle into a file and then use DB2 Import as it skips duplicate records and finished the transaction. This is ok, but not a great solution as we have to write something out of the box in the application only for DB2.
Thanks
I have 3 Databases ion Oracle, SQL Server and DB2.
Source DB: Oracle
Target DB: SQL Server / DB2
On a daily basis we have to migrate Data from Oracle to SQL Server and Oracle to DB2. In C# application we are making use of BCP.
In SQL Server, the table has an unique index with IGNORE_DUP_KEY. So if we have duplicate data then it is simply ignored and all other data is copied successfully.
However, in DB2 if there is duplicate data, then entire transaction is rolled back. Is there any SQL Server equivalent option in DB2 or something we can do via C# BCP (
I have come up with an alternative that is dump all the data from Oracle into a file and then use DB2 Import as it skips duplicate records and finished the transaction. This is ok, but not a great solution as we have to write something out of the box in the application only for DB2.
Thanks