<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Qlik Replicate Oracle table to SQL Server in Qlik Replicate</title>
    <link>https://community.qlik.com/t5/Qlik-Replicate/Qlik-Replicate-Oracle-table-to-SQL-Server/m-p/1999253#M4071</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/175443"&gt;@PapaC&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Oracle is case sensitive and SQL server is not case sensitive.&amp;nbsp; Please make sure that the Oracle table has 2 similar PK's that differentiate with case sensitivity.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Swathi&lt;/P&gt;</description>
    <pubDate>Tue, 01 Nov 2022 20:38:37 GMT</pubDate>
    <dc:creator>SwathiPulagam</dc:creator>
    <dc:date>2022-11-01T20:38:37Z</dc:date>
    <item>
      <title>Qlik Replicate Oracle table to SQL Server</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Qlik-Replicate-Oracle-table-to-SQL-Server/m-p/1999247#M4067</link>
      <description>&lt;P&gt;I have set up a task to copy from the logstream of an Oracle database to a SQL Server database.&amp;nbsp; It is throwing the following error:&lt;/P&gt;
&lt;P&gt;Failed to commit 10000 rows to target 'tablename'&lt;BR /&gt;RetCode: SQL_SUCCESS SqlState: 23000 NativeError: 2627 Message: [Microsoft][ODBC Driver 17 &lt;BR /&gt;for SQL Server][SQL Server]Violation of PRIMARY KEY constraint 'pk_constraint. &lt;BR /&gt;Cannot insert duplicate key in object 'tablename'. The duplicate key value is&lt;/P&gt;
&lt;P&gt;I checked the data&amp;nbsp; in the duplicate key value in the Oracle table for all 7 columns to see if there were actual duplicate.&amp;nbsp; It returned two rows which where identical except for the last column, which is a timestamp 6.&lt;/P&gt;
&lt;P&gt;The timestamp that it is trying to load&amp;nbsp; is different than what is in the source table for the logstream.&lt;/P&gt;
&lt;P&gt;Example:&amp;nbsp;8/26/2009 5:15:28.503000 AM is showing up in SQL Server as:&amp;nbsp;1753-01-01 00:00:00.000&lt;/P&gt;
&lt;P&gt;The Qlik task was set up to create its own tables and got the above error.&amp;nbsp; It created the timestamp column as datetime2 (6).&amp;nbsp; I dropped the table and manually created it as just datetime.&amp;nbsp; Then I changed the task settings to not drop the table, just truncate it before a full load. It returned the same error.&lt;/P&gt;
&lt;P&gt;I did something similar in another project and manually created the table first in the SQL Server database and it works, but I do not see a different in how I set up the task.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Nov 2022 20:27:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Qlik-Replicate-Oracle-table-to-SQL-Server/m-p/1999247#M4067</guid>
      <dc:creator>PapaC</dc:creator>
      <dc:date>2022-11-01T20:27:50Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Replicate Oracle table to SQL Server</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Qlik-Replicate-Oracle-table-to-SQL-Server/m-p/1999253#M4071</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/175443"&gt;@PapaC&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Oracle is case sensitive and SQL server is not case sensitive.&amp;nbsp; Please make sure that the Oracle table has 2 similar PK's that differentiate with case sensitivity.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Swathi&lt;/P&gt;</description>
      <pubDate>Tue, 01 Nov 2022 20:38:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Qlik-Replicate-Oracle-table-to-SQL-Server/m-p/1999253#M4071</guid>
      <dc:creator>SwathiPulagam</dc:creator>
      <dc:date>2022-11-01T20:38:37Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Replicate Oracle table to SQL Server</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Qlik-Replicate-Oracle-table-to-SQL-Server/m-p/1999282#M4074</link>
      <description>&lt;P&gt;Sorry, Swathi, but I'm not sure that I understand what you are telling me to check.&amp;nbsp; The PK in the Oracle database is named the same as the PK in the SQL Server database.&amp;nbsp; Both appear to be in upper case.&lt;/P&gt;
&lt;P&gt;As a sidenote, I tried loading a different table where the timestamp is not part of the primary key.&amp;nbsp; All of the data was copied from the logstream and inserted into the table in SQL Server, but the column with the date and time is wrong.&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;Example:&amp;nbsp;8/26/2009 5:15:28.503000 AM is showing up in SQL Server as:&amp;nbsp;1753-01-01 00:00:00.000&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;So I don't think that this problem is related to the primary key.&amp;nbsp; It seems to be a conversion problem from the Oracle Timestamp(6) to SQL Server.&amp;nbsp; Qlik created the table with a column datetime2(6).&amp;nbsp; It did not work.&amp;nbsp; I manually created the table with the column as datetime.&amp;nbsp; Both column types returned with the same data.&amp;nbsp; All rows returned with&amp;nbsp;&lt;SPAN&gt;1753-01-01 00:00:00.000 in the datetime column.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Nov 2022 21:46:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Qlik-Replicate-Oracle-table-to-SQL-Server/m-p/1999282#M4074</guid>
      <dc:creator>PapaC</dc:creator>
      <dc:date>2022-11-01T21:46:30Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Replicate Oracle table to SQL Server</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Qlik-Replicate-Oracle-table-to-SQL-Server/m-p/1999289#M4075</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/175443"&gt;@PapaC&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now I understand your issue. Oracle table has composite pk and DateTime column also part of the pk. The pk values are differentiated by the DateTime column in oracle(as all other columns in pk have the same values), but the Datetime column gets the value "&lt;SPAN&gt;1753-01-01 00:00:00.000&lt;/SPAN&gt;" in the SQL server causing constraint issues. If this is correct then I will create a case and work on it as it requires more troubleshooting.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Swathi&lt;/P&gt;</description>
      <pubDate>Tue, 01 Nov 2022 22:26:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Qlik-Replicate-Oracle-table-to-SQL-Server/m-p/1999289#M4075</guid>
      <dc:creator>SwathiPulagam</dc:creator>
      <dc:date>2022-11-01T22:26:44Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Replicate Oracle table to SQL Server</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Qlik-Replicate-Oracle-table-to-SQL-Server/m-p/1999295#M4076</link>
      <description>Yes, that is the situation, but I also get the weird dates in the datetime column for a table that does not include it in the primary key.&lt;BR /&gt;</description>
      <pubDate>Tue, 01 Nov 2022 22:57:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Qlik-Replicate-Oracle-table-to-SQL-Server/m-p/1999295#M4076</guid>
      <dc:creator>PapaC</dc:creator>
      <dc:date>2022-11-01T22:57:33Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Replicate Oracle table to SQL Server</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Qlik-Replicate-Oracle-table-to-SQL-Server/m-p/1999562#M4083</link>
      <description>&lt;P&gt;You have to focus on the failing source Oracle timestamp (with timezone?) to MS SQL&amp;nbsp; datetime2 conversion.&lt;/P&gt;
&lt;P&gt;You should isolate that with a simple sample table with&amp;nbsp; just a few rows and perhaps with ID, TimeStamp, and 'Comment' field. Put the timestamp value as text in the comment column to know what is expected. Make a task with just that table. Does it work? If it fails please provide the task Json export, source table create SQL + sample row load, and reptask_xx.log for the task.&lt;/P&gt;
&lt;P&gt;datetime is wrong, deprecated. You need datetime2. Google is your friend.&lt;/P&gt;
&lt;P&gt;If you google "&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;1753-01-01 00:00:00" you'll soon find it is the 'default' or zero (not null) value for an MS SQL datetime2. Therefor it seems the transformation is completely failing. Maybe there is missing information like a timezone? Are there any warning lines in the task&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;in the base note you wrote "I did something similar in another project and manually created the table first in the SQL Server database and it works, but I do not see a different in how I set up the task." This suggests something is wrong in the new task. Please reduce to the simplest possible for to show the problem and share the task json? That probably means to remove all but 1 table.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Hein.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2022 12:05:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Qlik-Replicate-Oracle-table-to-SQL-Server/m-p/1999562#M4083</guid>
      <dc:creator>Heinvandenheuvel</dc:creator>
      <dc:date>2022-11-02T12:05:30Z</dc:date>
    </item>
  </channel>
</rss>

