<?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>article Qlik Replicate and Qlik Talend Cloud: How to get LSN for DB2 LUW source in Official Support Articles</title>
    <link>https://community.qlik.com/t5/Official-Support-Articles/Qlik-Replicate-and-Qlik-Talend-Cloud-How-to-get-LSN-for-DB2-LUW/ta-p/2545832</link>
    <description>&lt;P&gt;To start replication from a specific point in time on a DB2 LUW source, you will need to identify the &lt;STRONG&gt;LSN&lt;/STRONG&gt; (&lt;STRONG&gt;Log Sequence Number&lt;/STRONG&gt;) corresponding to your target timestamp and configure it in your Qlik Replicate task.&lt;/P&gt;
&lt;P&gt;There are several ways to obtain the LSN depending on your environment and access level.&lt;/P&gt;
&lt;H3&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;&lt;SPAN&gt;Prerequisite&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H3&gt;
&lt;P&gt;Ensure the DB2 archive logs covering your target LSN range are still retained and accessible on the server. If those logs have been pruned or moved off the system, Qlik Replicate will not be able to read from that position, and the task will error out.&lt;/P&gt;
&lt;H3&gt;&lt;FONT color="#339966"&gt;&lt;SPAN&gt;&lt;STRONG&gt;How to obtain the LSN&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/H3&gt;
&lt;H4&gt;&lt;FONT color="#339966"&gt;&lt;SPAN&gt;&lt;STRONG&gt;Option One: db2pd (Recommended)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;P&gt;Run the following on the DB2 server to list active log files with their LSN ranges and timestamps:&lt;/P&gt;
&lt;PRE&gt;db2pd -db &amp;lt;DBNAME&amp;gt; -logs&lt;/PRE&gt;
&lt;P&gt;Sample output:&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px" style="padding-left: 40px;"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;Log File &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; First LSN &amp;nbsp; &amp;nbsp; &amp;nbsp; Last LSN &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Timestamp&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;S0001234.LOG &amp;nbsp; &amp;nbsp; 0x000123456789 &amp;nbsp;0x000123ABCDEF &amp;nbsp;2026-03-10-11.30.00&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Locate the log file whose timestamp range covers your desired start time and note the First LSN for that file. Convert the hex value to decimal before entering it into Replicate (e.g., 0x000123456789 = 1251004137353).&lt;/P&gt;
&lt;H4&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;&lt;SPAN&gt;Option Two: db2flsn Utility&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;P&gt;If you know the specific log file number and offset, you can translate it to an LSN using the &lt;STRONG&gt;db2flsn command-line&lt;/STRONG&gt; utility:&lt;/P&gt;
&lt;PRE&gt;db2flsn -db &amp;lt;DBNAME&amp;gt; -lsn &amp;lt;log_file_number&amp;gt;/&amp;lt;offset&amp;gt;&lt;/PRE&gt;
&lt;P&gt;This is useful when you already know which log file corresponds to your target time. Convert the resulting hex LSN to decimal before entering it into Replicate.&lt;/P&gt;
&lt;H4&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;&lt;SPAN&gt;Option Three: SQL Query (Current LSN)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;P&gt;To retrieve the current active LSN directly from the database:&lt;/P&gt;
&lt;PRE&gt;SELECT CURRENT_LSN FROM SYSIBMADM.SNAPDB;&lt;/PRE&gt;
&lt;P&gt;This returns the LSN at the moment the query is executed. Use this if you want to start replication from approximately "now" with a precise LSN anchor rather than relying on the task default. Convert the hex value to decimal before use.&lt;/P&gt;
&lt;H4&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;&lt;SPAN&gt;Option Four: Let Qlik Replicate log it for you&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;P&gt;By design, Qlik Replicate does not support starting CDC from a specific timestamp for a DB2 LUW source endpoint. This is a documented limitation in the Qlik Replicate User Guide.&lt;/P&gt;
&lt;P&gt;However, when a DB2 LUW CDC task is first created and started, Replicate internally generates a file named &lt;STRONG&gt;DB2LUW_TIMESTAMP_MAP&lt;/STRONG&gt; (a SQLite database) in the task's data folder. This file continuously maps processed LSN values to their corresponding timestamps each time the task runs. As a result, it provides a workaround to approximate a timestamp-based start position — by identifying the LSN that corresponds to the desired point in time and using that LSN to resume the task.&lt;/P&gt;
&lt;P&gt;The only prerequisite for this approach is that the DB2 transaction logs covering the target time period must still be available and accessible on the source server.&lt;/P&gt;
&lt;H3&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;&lt;SPAN&gt;Configuring the LSN in Qlik Replicate&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H3&gt;
&lt;P&gt;Once you have your LSN value:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Open your &lt;STRONG&gt;task&lt;/STRONG&gt; and click the &lt;STRONG&gt;Run&lt;/STRONG&gt; drop-down &amp;gt; &lt;STRONG&gt;Advanced Run Options&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;Under &lt;STRONG&gt;Tables are already loaded. Start processing changes from:&lt;/STRONG&gt;, select &lt;STRONG&gt;Source change position&lt;/STRONG&gt; (e.g. SCN or LSN):&lt;/LI&gt;
&lt;LI&gt;Enter the LSN in decimal format (e.g., 1251004137353)&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;DB2 tools typically display LSN values in hexadecimal. Please ensure you convert to decimal before entering the value in Qlik Replicate; the task will start from an incorrect log position.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;&lt;SPAN&gt;Environment&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;UL class="lia-list-style-type-circle"&gt;
&lt;LI&gt;Qlik Replicate&lt;/LI&gt;
&lt;LI&gt;Qlik Talend Cloud&lt;/LI&gt;
&lt;/UL&gt;</description>
    <pubDate>Tue, 07 Apr 2026 07:10:24 GMT</pubDate>
    <dc:creator>shashi_holla</dc:creator>
    <dc:date>2026-04-07T07:10:24Z</dc:date>
    <item>
      <title>Qlik Replicate and Qlik Talend Cloud: How to get LSN for DB2 LUW source</title>
      <link>https://community.qlik.com/t5/Official-Support-Articles/Qlik-Replicate-and-Qlik-Talend-Cloud-How-to-get-LSN-for-DB2-LUW/ta-p/2545832</link>
      <description>&lt;P&gt;To start replication from a specific point in time on a DB2 LUW source, you will need to identify the &lt;STRONG&gt;LSN&lt;/STRONG&gt; (&lt;STRONG&gt;Log Sequence Number&lt;/STRONG&gt;) corresponding to your target timestamp and configure it in your Qlik Replicate task.&lt;/P&gt;
&lt;P&gt;There are several ways to obtain the LSN depending on your environment and access level.&lt;/P&gt;
&lt;H3&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;&lt;SPAN&gt;Prerequisite&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H3&gt;
&lt;P&gt;Ensure the DB2 archive logs covering your target LSN range are still retained and accessible on the server. If those logs have been pruned or moved off the system, Qlik Replicate will not be able to read from that position, and the task will error out.&lt;/P&gt;
&lt;H3&gt;&lt;FONT color="#339966"&gt;&lt;SPAN&gt;&lt;STRONG&gt;How to obtain the LSN&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/H3&gt;
&lt;H4&gt;&lt;FONT color="#339966"&gt;&lt;SPAN&gt;&lt;STRONG&gt;Option One: db2pd (Recommended)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;P&gt;Run the following on the DB2 server to list active log files with their LSN ranges and timestamps:&lt;/P&gt;
&lt;PRE&gt;db2pd -db &amp;lt;DBNAME&amp;gt; -logs&lt;/PRE&gt;
&lt;P&gt;Sample output:&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px" style="padding-left: 40px;"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;Log File &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; First LSN &amp;nbsp; &amp;nbsp; &amp;nbsp; Last LSN &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Timestamp&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;S0001234.LOG &amp;nbsp; &amp;nbsp; 0x000123456789 &amp;nbsp;0x000123ABCDEF &amp;nbsp;2026-03-10-11.30.00&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Locate the log file whose timestamp range covers your desired start time and note the First LSN for that file. Convert the hex value to decimal before entering it into Replicate (e.g., 0x000123456789 = 1251004137353).&lt;/P&gt;
&lt;H4&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;&lt;SPAN&gt;Option Two: db2flsn Utility&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;P&gt;If you know the specific log file number and offset, you can translate it to an LSN using the &lt;STRONG&gt;db2flsn command-line&lt;/STRONG&gt; utility:&lt;/P&gt;
&lt;PRE&gt;db2flsn -db &amp;lt;DBNAME&amp;gt; -lsn &amp;lt;log_file_number&amp;gt;/&amp;lt;offset&amp;gt;&lt;/PRE&gt;
&lt;P&gt;This is useful when you already know which log file corresponds to your target time. Convert the resulting hex LSN to decimal before entering it into Replicate.&lt;/P&gt;
&lt;H4&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;&lt;SPAN&gt;Option Three: SQL Query (Current LSN)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;P&gt;To retrieve the current active LSN directly from the database:&lt;/P&gt;
&lt;PRE&gt;SELECT CURRENT_LSN FROM SYSIBMADM.SNAPDB;&lt;/PRE&gt;
&lt;P&gt;This returns the LSN at the moment the query is executed. Use this if you want to start replication from approximately "now" with a precise LSN anchor rather than relying on the task default. Convert the hex value to decimal before use.&lt;/P&gt;
&lt;H4&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;&lt;SPAN&gt;Option Four: Let Qlik Replicate log it for you&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;P&gt;By design, Qlik Replicate does not support starting CDC from a specific timestamp for a DB2 LUW source endpoint. This is a documented limitation in the Qlik Replicate User Guide.&lt;/P&gt;
&lt;P&gt;However, when a DB2 LUW CDC task is first created and started, Replicate internally generates a file named &lt;STRONG&gt;DB2LUW_TIMESTAMP_MAP&lt;/STRONG&gt; (a SQLite database) in the task's data folder. This file continuously maps processed LSN values to their corresponding timestamps each time the task runs. As a result, it provides a workaround to approximate a timestamp-based start position — by identifying the LSN that corresponds to the desired point in time and using that LSN to resume the task.&lt;/P&gt;
&lt;P&gt;The only prerequisite for this approach is that the DB2 transaction logs covering the target time period must still be available and accessible on the source server.&lt;/P&gt;
&lt;H3&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;&lt;SPAN&gt;Configuring the LSN in Qlik Replicate&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H3&gt;
&lt;P&gt;Once you have your LSN value:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Open your &lt;STRONG&gt;task&lt;/STRONG&gt; and click the &lt;STRONG&gt;Run&lt;/STRONG&gt; drop-down &amp;gt; &lt;STRONG&gt;Advanced Run Options&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;Under &lt;STRONG&gt;Tables are already loaded. Start processing changes from:&lt;/STRONG&gt;, select &lt;STRONG&gt;Source change position&lt;/STRONG&gt; (e.g. SCN or LSN):&lt;/LI&gt;
&lt;LI&gt;Enter the LSN in decimal format (e.g., 1251004137353)&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;DB2 tools typically display LSN values in hexadecimal. Please ensure you convert to decimal before entering the value in Qlik Replicate; the task will start from an incorrect log position.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;&lt;SPAN&gt;Environment&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;UL class="lia-list-style-type-circle"&gt;
&lt;LI&gt;Qlik Replicate&lt;/LI&gt;
&lt;LI&gt;Qlik Talend Cloud&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Tue, 07 Apr 2026 07:10:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Official-Support-Articles/Qlik-Replicate-and-Qlik-Talend-Cloud-How-to-get-LSN-for-DB2-LUW/ta-p/2545832</guid>
      <dc:creator>shashi_holla</dc:creator>
      <dc:date>2026-04-07T07:10:24Z</dc:date>
    </item>
  </channel>
</rss>

