<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: dbSlice by Thinwork</title>
    <description>The latest articles on DEV Community by dbSlice by Thinwork (@dbslice).</description>
    <link>https://dev.to/dbslice</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4217817%2F9b07309e-bdee-41c7-8995-3f80dd7bf155.jpg</url>
      <title>DEV Community: dbSlice by Thinwork</title>
      <link>https://dev.to/dbslice</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dbslice"/>
    <language>en</language>
    <item>
      <title>Copy only the missing rows from SQL Server to PostgreSQL from the command line</title>
      <dc:creator>dbSlice by Thinwork</dc:creator>
      <pubDate>Wed, 18 Nov 2026 09:27:05 +0000</pubDate>
      <link>https://dev.to/dbslice/copy-only-the-missing-rows-from-sql-server-to-postgresql-from-the-command-line-1k3j</link>
      <guid>https://dev.to/dbslice/copy-only-the-missing-rows-from-sql-server-to-postgresql-from-the-command-line-1k3j</guid>
      <description>&lt;p&gt;A legacy system keeps its support tickets in SQL Server. A reporting copy lives in PostgreSQL. The nightly load stopped two days ago, and it had already dropped a few rows before that. The copy has holes.&lt;/p&gt;

&lt;p&gt;You don't want to reload the whole table. You want to look at the last week, find what PostgreSQL is missing, and insert only that, from a script that can run on a schedule.&lt;/p&gt;

&lt;p&gt;This post shows how with &lt;a href="https://apps.microsoft.com/detail/9PMS69X1T53Z" rel="noopener noreferrer"&gt;dbSlice by Thinwork&lt;/a&gt;, on Linux and on Windows. The same two job files run on both. Every command below was run in our lab, and every output is copied from that run.&lt;/p&gt;

&lt;h2&gt;
  
  
  The sample data
&lt;/h2&gt;

&lt;p&gt;One generic table, &lt;code&gt;support_tickets&lt;/code&gt;, with 20,000 made-up tickets (one every 259 seconds). Every value is computed from &lt;code&gt;ticket_id&lt;/code&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;SQL Server (source): all 20,000 rows. Script: &lt;code&gt;01-sqlserver-source.sql&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;PostgreSQL (target): about 19,160 rows. The last two days are missing, and earlier in the week some tickets (ids ending in 3) were lost. Script: &lt;code&gt;02-postgres-target.sql&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All scripts and job files: &lt;a href="https://dbslice.net/download/examples/copy-missing-rows-sqlserver-postgresql.zip" rel="noopener noreferrer"&gt;example files (zip)&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The two job files
&lt;/h2&gt;

&lt;p&gt;A job is a small JSON file: source, target, key and what to do. It never holds a password. It points to connection profiles you saved in dbSlice (&lt;code&gt;MASTER&lt;/code&gt; and &lt;code&gt;Server-dbPostg&lt;/code&gt; here; use your own names).&lt;/p&gt;

&lt;p&gt;&lt;code&gt;support-tickets-check.json&lt;/code&gt; compares and only reads:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"nome"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"support-tickets-check"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"tipo"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"status"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"origem"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;"environment"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"article"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"db"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"MASTER"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"TABLE"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"object"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"support_tickets"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"key"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"ticket_id"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"where"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"opened_at &amp;gt;= DATEADD(day, -7, CAST(GETDATE() AS date))"&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"destino"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;"environment"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"article"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"db"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Server-dbPostg"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"TABLE"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"object"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"support_tickets"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"key"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"ticket_id"&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"pageSize"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;10000&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;support-tickets-load.json&lt;/code&gt; is the same file with &lt;code&gt;"tipo": "insert"&lt;/code&gt; and the name &lt;code&gt;support-tickets-load&lt;/code&gt;. It inserts the rows whose key is missing in the target. It never updates or deletes.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;where&lt;/code&gt; limits what is read from the source to the last 7 days, and it is written in the source's SQL (SQL Server here).&lt;/p&gt;

&lt;p&gt;You can also build both jobs on screen and save them. The screen, the command line and the API run the same file.&lt;/p&gt;

&lt;h2&gt;
  
  
  Run it in three steps
&lt;/h2&gt;

&lt;p&gt;On Linux, dbSlice runs as a Docker container. Put the two job files in the &lt;code&gt;jobs/&lt;/code&gt; folder of its data volume. Save the two profiles in dbSlice on Windows.&lt;/p&gt;

&lt;p&gt;Each step shows three ways to run it. Use the &lt;strong&gt;jobs API&lt;/strong&gt; for remote pipelines (CI, n8n, another server): it needs a token (API tab, scopes &lt;code&gt;jobs:run&lt;/code&gt; and &lt;code&gt;runs:read&lt;/code&gt;) and answers with a &lt;code&gt;runId&lt;/code&gt;. Use &lt;strong&gt;&lt;code&gt;docker run&lt;/code&gt;&lt;/strong&gt; for cron on the Docker host: it needs no token, waits, prints the log and ends with an exit code. On &lt;strong&gt;Windows&lt;/strong&gt;, use the CLI, and Task Scheduler to schedule it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1. Compare (read only)
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Linux — jobs API (curl)
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;URL&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;http://127.0.0.1:8098
&lt;span class="nv"&gt;TOKEN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"$(cat ./token)"&lt;/span&gt;   &lt;span class="c"&gt;# dbs_xxxxxxxx_...&lt;/span&gt;
curl -sS -X POST &lt;span class="s2"&gt;"$URL/api/v1/jobs/support-tickets-check/run"&lt;/span&gt; \
  -H &lt;span class="s2"&gt;"Authorization: Bearer $TOKEN"&lt;/span&gt; -H &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; \
  -d &lt;span class="s1"&gt;'{"runLabel":"last-week"}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The answer is &lt;code&gt;202&lt;/code&gt; with a &lt;code&gt;runId&lt;/code&gt;. Ask for the run until &lt;code&gt;status&lt;/code&gt; is no longer &lt;code&gt;queued&lt;/code&gt; or &lt;code&gt;running&lt;/code&gt;, then read the log:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -sS -H &lt;span class="s2"&gt;"Authorization: Bearer $TOKEN"&lt;/span&gt; &lt;span class="s2"&gt;"$URL/api/v1/runs/&amp;lt;runId&amp;gt;"&lt;/span&gt;
curl -sS -H &lt;span class="s2"&gt;"Authorization: Bearer $TOKEN"&lt;/span&gt; &lt;span class="s2"&gt;"$URL/api/v1/runs/&amp;lt;runId&amp;gt;/log"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The token is read from a file so it never shows up in the shell history. &lt;code&gt;run-linux.sh&lt;/code&gt;, next to this article, does the full loop.&lt;/p&gt;

&lt;h4&gt;
  
  
  Linux — docker run
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker run --rm --network dbslice-web_default \
  -v /docker/data/dbslice-web:/data -v /docker/data/dbslice-web-logs:/logs \
  dbslice-web --run support-tickets-check
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;--network&lt;/code&gt; is only needed when the databases are reached by container name. If the container is already up, this is shorter:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker &lt;span class="nb"&gt;exec&lt;/span&gt; dbslice-web dotnet DBSlice.UiWeb.dll --run support-tickets-check
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Both run the job exactly as the screen and the API do. Each run also writes its log to &lt;code&gt;/logs&lt;/code&gt;. You can run them while the web container is up.&lt;/p&gt;

&lt;h4&gt;
  
  
  Windows — dbSlice.exe
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;dbSlice&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;exe&lt;/span&gt; &lt;span class="n"&gt;support&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;tickets&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;check&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;json&lt;/span&gt; &lt;span class="n"&gt;check&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;log&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The CLI prints the result and writes the log to the file you name. It exits with &lt;code&gt;0&lt;/code&gt; on success and non-zero otherwise.&lt;/p&gt;

&lt;p&gt;Linux output (&lt;code&gt;docker exec … --run support-tickets-check&lt;/code&gt;):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[05:29:45] INFO  impact: read-only, nothing is written to a database
[05:29:46] INFO  OK  Comparison completed in 1.3s: 1,570 matched, 842 missing in destination, 17,588 missing in source. 0 with different column values.
[05:29:46] OK    Status OK | MASTER -&amp;gt; Server-dbPostg | 2,412 Rows | 1.4s
log: /logs/20261118-052945-job-support-tickets-check-f87239f8.log
exit code: 3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Exit code &lt;code&gt;3&lt;/code&gt;: rows are missing.&lt;/p&gt;

&lt;p&gt;The exit code tells cron what happened:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Code&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;0&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;OK. For a compare: nothing missing, nothing different&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;1&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The job failed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;2&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Wrong arguments, unknown job, or blocked by the license&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;3&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The compare found missing or different rows&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Step 2. Insert only the missing rows
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Linux — jobs API (curl)
&lt;/h4&gt;

&lt;p&gt;Call the same endpoint with &lt;code&gt;support-tickets-load&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -sS -X POST &lt;span class="s2"&gt;"$URL/api/v1/jobs/support-tickets-load/run"&lt;/span&gt; \
  -H &lt;span class="s2"&gt;"Authorization: Bearer $TOKEN"&lt;/span&gt; -H &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; \
  -d &lt;span class="s1"&gt;'{"runLabel":"last-week"}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Linux — docker run
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker run --rm --network dbslice-web_default \
  -v /docker/data/dbslice-web:/data -v /docker/data/dbslice-web-logs:/logs \
  dbslice-web --run support-tickets-load
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Windows — dbSlice.exe
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;dbSlice&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;exe&lt;/span&gt; &lt;span class="n"&gt;support&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;tickets&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;load&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;json&lt;/span&gt; &lt;span class="n"&gt;load&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;log&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Linux output (&lt;code&gt;docker run … --run support-tickets-load&lt;/code&gt;):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[05:29:47] INFO  impact: writes to the target (INSERT only)
[05:29:49] INFO  OK  Done: 2,412 read, 842 inserted, 0 upsert/update in 1.5s  ·  read 0.1s / transform 0.1s / write 0.4s
exit code: 0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 3. Compare again
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Linux — jobs API (curl)
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -sS -X POST &lt;span class="s2"&gt;"$URL/api/v1/jobs/support-tickets-check/run"&lt;/span&gt; \
  -H &lt;span class="s2"&gt;"Authorization: Bearer $TOKEN"&lt;/span&gt; -H &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; \
  -d &lt;span class="s1"&gt;'{"runLabel":"last-week"}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Linux — docker run
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker run --rm --network dbslice-web_default \
  -v /docker/data/dbslice-web:/data -v /docker/data/dbslice-web-logs:/logs \
  dbslice-web --run support-tickets-check
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Windows — dbSlice.exe
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;dbSlice&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;exe&lt;/span&gt; &lt;span class="n"&gt;support&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;tickets&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;check&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;json&lt;/span&gt; &lt;span class="n"&gt;check&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;log&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Linux output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[05:29:52] INFO  OK  Comparison completed in 1.3s: 2,412 matched, 0 missing in destination, 17,588 missing in source. 0 with different column values.
exit code: 0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Windows output, compare and insert:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;OK  Comparison completed in 5.4s: 1,561 matched, 841 missing in destination, 17,598 missing in source. 0 with different column values.
OK  Done: 2,402 read, 841 inserted, 0 upsert/update in 0.7s
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Windows found 841 and Linux 842 because the runs happened at different times of day, and the 7-day window moves with the clock.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why "missing in source" is so large
&lt;/h2&gt;

&lt;p&gt;About 17,600 keys show up as "missing in source". That is expected. The &lt;code&gt;where&lt;/code&gt; only filters the source, so the source side holds just the last 7 days, while PostgreSQL also holds the older history. The number to watch is &lt;strong&gt;missing in destination&lt;/strong&gt;. The exit code follows the same rule: when the job has a &lt;code&gt;where&lt;/code&gt;, rows that exist only in the target don't count as a difference.&lt;/p&gt;

&lt;h2&gt;
  
  
  Safe to run again
&lt;/h2&gt;

&lt;p&gt;After the insert, a second run of each job found 0 missing and inserted 0 rows. PostgreSQL reached 20,000 rows, the same as the source. A run that has nothing to do moves nothing, so you can schedule the insert without creating duplicates. On this data, each run took under 6 seconds.&lt;/p&gt;

&lt;h2&gt;
  
  
  Schedule it
&lt;/h2&gt;

&lt;p&gt;Linux (cron on the Docker host), every night at 02:00. No wrapper script is needed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;0 2 * * * docker run --rm --network dbslice-web_default -v /docker/data/dbslice-web:/data -v /docker/data/dbslice-web-logs:/logs dbslice-web --run support-tickets-load &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; /var/log/support-tickets.log 2&lt;span class="o"&gt;&amp;gt;&amp;amp;&lt;/span&gt;1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To be told about missing rows instead of fixing them, schedule &lt;code&gt;support-tickets-check&lt;/code&gt; and alert on exit code &lt;code&gt;3&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Windows (Task Scheduler): create a task that runs &lt;code&gt;dbSlice.exe support-tickets-load.json load.log&lt;/code&gt;. A failed run shows up as a failed task.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrap up
&lt;/h2&gt;

&lt;p&gt;Two small JSON files, one compare and one insert, handle "copy only what is missing". On Linux, run them through the API from anywhere, or with &lt;code&gt;docker run&lt;/code&gt; from cron. On Windows, run them with &lt;code&gt;dbSlice.exe&lt;/code&gt;. The job never carries a password.&lt;/p&gt;

&lt;p&gt;dbSlice is our own product, so weigh this post with that in mind. Try it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Windows:&lt;/strong&gt; &lt;a href="https://apps.microsoft.com/detail/9PMS69X1T53Z" rel="noopener noreferrer"&gt;dbSlice on the Microsoft Store&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Linux / Docker edition:&lt;/strong&gt; a corporate edition, available by contact. Write to &lt;a href="mailto:contact@dbslice.net"&gt;contact@dbslice.net&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://dbslice.net/blog/copy-missing-rows-sqlserver-postgresql" rel="noopener noreferrer"&gt;dbslice.net&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>sqlserver</category>
      <category>postgres</category>
      <category>database</category>
      <category>cli</category>
    </item>
    <item>
      <title>Best Data Migration Tool for Teams That Work Across Databases</title>
      <dc:creator>dbSlice by Thinwork</dc:creator>
      <pubDate>Tue, 17 Nov 2026 12:58:40 +0000</pubDate>
      <link>https://dev.to/dbslice/best-data-migration-tool-for-teams-that-work-across-databases-26km</link>
      <guid>https://dev.to/dbslice/best-data-migration-tool-for-teams-that-work-across-databases-26km</guid>
      <description>&lt;p&gt;The best data migration tool is the one that covers &lt;strong&gt;your&lt;/strong&gt; database pairs, keeps working after the first load and&lt;br&gt;
proves the target matches the source before anyone switches over. Speed matters, but most migrations fail on a type&lt;br&gt;
nobody checked, a row that went missing or a refresh that only one person knew how to run.&lt;/p&gt;

&lt;p&gt;If your team moves data between SQL Server, PostgreSQL, Oracle, MySQL, MariaDB, Firebird, SQLite or InterSystems&lt;br&gt;
Caché and IRIS, five criteria separate the tools. Here is each one, and what dbSlice shows you on screen for it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/img%2Fbest-data-migration-tool-criteria.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/img%2Fbest-data-migration-tool-criteria.png" alt="Five criteria for choosing a data migration tool: coverage under one license, life after the initial load, proof before and after writing, safety on production and unattended operation, plus when another tool is the better choice." width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Coverage of your database pairs, under one license
&lt;/h2&gt;

&lt;p&gt;Write down the pairs you actually use this year and next: SQL Server to PostgreSQL, Oracle to SQL Server, a&lt;br&gt;
Firebird or Caché system that has to be retired. Then check what each tool charges to cover &lt;strong&gt;all&lt;/strong&gt; of them.&lt;/p&gt;

&lt;p&gt;Many tools are sold per pair or per edition, so a second project means a second purchase. dbSlice is one app with one&lt;br&gt;
license for all the leading databases it supports, each one as source or target, and new databases arrive as&lt;br&gt;
regular updates.&lt;br&gt;
The comparisons with &lt;a href="https://dbslice.net/compare/dbconvert-alternative" rel="noopener noreferrer"&gt;DBConvert&lt;/a&gt;, &lt;a href="https://dbslice.net/compare/full-convert-alternative" rel="noopener noreferrer"&gt;Full Convert&lt;/a&gt;,&lt;br&gt;
&lt;a href="https://dbslice.net/compare/sqlines-alternative" rel="noopener noreferrer"&gt;SQLines&lt;/a&gt; and &lt;a href="https://dbslice.net/compare/ems-data-pump-alternative" rel="noopener noreferrer"&gt;EMS Data Pump&lt;/a&gt; go through the&lt;br&gt;
details.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Life after the initial load
&lt;/h2&gt;

&lt;p&gt;The first copy is rarely the last. The old system keeps taking orders while the new one is tested, and a reporting or&lt;br&gt;
integration database needs a refresh every night.&lt;/p&gt;

&lt;p&gt;Check whether the tool keeps the target current without a full reload. dbSlice runs &lt;em&gt;Initial load&lt;/em&gt; once, then&lt;br&gt;
&lt;em&gt;Upsert&lt;/em&gt;, &lt;em&gt;New rows only&lt;/em&gt;, &lt;em&gt;Update existing only&lt;/em&gt; or &lt;em&gt;incremental by column&lt;/em&gt; (an &lt;code&gt;updated_at&lt;/code&gt; or a sequence id, with a re-read&lt;br&gt;
window for late commits), on demand or on a schedule. The &lt;a href="https://dbslice.net/use-cases/data-coexistence" rel="noopener noreferrer"&gt;data coexistence guide&lt;/a&gt; shows&lt;br&gt;
the pattern for a system replacement that takes months.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Proof before and after writing
&lt;/h2&gt;

&lt;p&gt;"The job finished" is not evidence. Two tables with the same row count can still hold different records.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Before writing,&lt;/strong&gt; Record Diff shows which rows would be inserted or updated.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;After writing,&lt;/strong&gt; Compare checks source and target key by key and saves the &lt;strong&gt;full list of divergent keys&lt;/strong&gt; to a file, so you re-sync only those rows. See &lt;a href="https://dbslice.net/blog/compare-source-and-target" rel="noopener noreferrer"&gt;compare source and target by key&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Ask every vendor on your list for the same thing: a list of the keys that differ, not a percentage.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Safe on production databases
&lt;/h2&gt;

&lt;p&gt;A migration tool reads from the system that pays the bills. Check what it does there.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;By default, dbSlice creates nothing in your databases:&lt;/strong&gt; no triggers, no tables, no agents. The source is read by key in small batches.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Your data does not go to Thinwork.&lt;/strong&gt; dbSlice runs on your Windows machine or server, or in your own Docker environment.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test copies can be masked in flight,&lt;/strong&gt; with sensitive fields obfuscated and keys and foreign keys preserved. See &lt;a href="https://dbslice.net/use-cases/masked-staging-copy" rel="noopener noreferrer"&gt;masked staging copies&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  5. Operable without a developer on call
&lt;/h2&gt;

&lt;p&gt;After cutover, the person who runs the refresh is often a DBA or an SRE, not the person who built it.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Every screen run can be saved as a job and run from the &lt;a href="https://dbslice.net/automation/database-sync-cli" rel="noopener noreferrer"&gt;command line and a scheduler&lt;/a&gt;, with logs, exit codes and &lt;a href="https://dbslice.net/blog/job-notifications-email-webhook" rel="noopener noreferrer"&gt;e-mail or webhook alerts&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;Linux edition&lt;/strong&gt; runs in Docker with a web interface, a built-in scheduler and a job API for CI/CD.&lt;/li&gt;
&lt;li&gt;When the target is not a database, the same app &lt;a href="https://dbslice.net/blog/send-data-rest-kafka" rel="noopener noreferrer"&gt;sends rows to a REST API, Kafka or RabbitMQ&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  When another tool is the better choice
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;You need&lt;/th&gt;
&lt;th&gt;Look at&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Changes on the target within seconds&lt;/td&gt;
&lt;td&gt;Log-based CDC (for example Debezium) or the database's native replication&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Stored procedures, triggers and views converted&lt;/td&gt;
&lt;td&gt;A code conversion tool or workstream; dbSlice moves data, not code&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A one-time load into PostgreSQL, scripted by your team&lt;/td&gt;
&lt;td&gt;pgloader, which is free&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Heavy business transformations and an analytical model&lt;/td&gt;
&lt;td&gt;An ETL/ELT platform; dbSlice can handle the movement stage&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;dbSlice runs batch jobs. Incremental runs do not see rows deleted at the source; run Compare or a reload before the&lt;br&gt;
switch.&lt;/p&gt;

&lt;h2&gt;
  
  
  About speed numbers
&lt;/h2&gt;

&lt;p&gt;Thinwork has published one large run: &lt;strong&gt;12.96 billion rows in about 41 hours (≈ 88,500 rows/s)&lt;/strong&gt;, a live production&lt;br&gt;
table with 40 columns and 9 indexes, with the network and both databases tuned for the load. It is our own&lt;br&gt;
measurement, not an independent benchmark. Your result depends on your row width, indexes, network and target, so&lt;br&gt;
read &lt;a href="https://dbslice.net/blog/reading-sync-speed-numbers" rel="noopener noreferrer"&gt;how to read a sync speed number&lt;/a&gt; and measure on your own tables. The&lt;br&gt;
conditions are on the &lt;a href="https://dbslice.net/performance" rel="noopener noreferrer"&gt;performance page&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  A proof of concept in one afternoon
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Pick one representative table with long text, nulls, dates and decimals.&lt;/li&gt;
&lt;li&gt;Run &lt;em&gt;Initial load&lt;/em&gt;, then change a few source rows and run &lt;em&gt;Upsert&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;Run Compare and open the list of divergent keys. It should be empty.&lt;/li&gt;
&lt;li&gt;Save the run as a job and start it from the command line.&lt;/li&gt;
&lt;li&gt;Note the hours your team spent, including checking the result.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Is dbSlice the best tool for every migration?&lt;/em&gt; No. It fits teams that move and keep data in sync across the leading databases. For low-latency CDC or code conversion, use a tool built for that.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Can I try it before buying?&lt;/em&gt; Yes. The free version on the Microsoft Store connects, browses, compares and exports to CSV. Writing to a target needs a Desktop or Server license, which comes with a 14-day money-back guarantee.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;What does it cost?&lt;/em&gt; See &lt;a href="https://dbslice.net/blog/data-migration-tool-cost" rel="noopener noreferrer"&gt;data migration tool pricing&lt;/a&gt; and the &lt;a href="https://dbslice.net/#pricing" rel="noopener noreferrer"&gt;pricing table&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Planning a system replacement and need help designing the coexistence? Thinwork can run the project with you.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://apps.microsoft.com/detail/9PMS69X1T53Z" rel="noopener noreferrer"&gt;Get the free version&lt;/a&gt; · &lt;a href="https://dbslice.net/#pricing" rel="noopener noreferrer"&gt;See pricing&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published on the &lt;a href="https://dbslice.net/blog/best-data-migration-tool" rel="noopener noreferrer"&gt;dbSlice blog&lt;/a&gt;. dbSlice is a Windows app for data migration, replication and sync between the leading databases.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>database</category>
      <category>dataengineering</category>
      <category>sql</category>
      <category>postgres</category>
    </item>
    <item>
      <title>SQL Server to PostgreSQL: five details that break a data migration (and how to check them)</title>
      <dc:creator>dbSlice by Thinwork</dc:creator>
      <pubDate>Mon, 16 Nov 2026 20:03:40 +0000</pubDate>
      <link>https://dev.to/dbslice/sql-server-to-postgresql-five-details-that-break-a-data-migration-and-how-to-check-them-5cp9</link>
      <guid>https://dev.to/dbslice/sql-server-to-postgresql-five-details-that-break-a-data-migration-and-how-to-check-them-5cp9</guid>
      <description>&lt;p&gt;Disclosure: I'm the author of dbSlice, a Windows tool, and I use it in the example. The five details below apply to any tool, and to a hand-written script too.&lt;/p&gt;

&lt;p&gt;When an application moves from SQL Server to PostgreSQL, the schema usually gets the attention. The data is where the surprises are.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. &lt;code&gt;datetimeoffset&lt;/code&gt; loses its offset
&lt;/h2&gt;

&lt;p&gt;A common mapping is &lt;code&gt;TIMESTAMP&lt;/code&gt;, with values written in UTC. If the application needs the time zone, declare the column &lt;code&gt;TIMESTAMPTZ&lt;/code&gt; in the &lt;code&gt;CREATE TABLE&lt;/code&gt; before the load.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. &lt;code&gt;bit&lt;/code&gt; becomes &lt;code&gt;BOOLEAN&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;1 and 0 arrive as true and false. Every query that compares with &lt;code&gt;= 1&lt;/code&gt; has to change.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. &lt;code&gt;nvarchar(max)&lt;/code&gt;, &lt;code&gt;ntext&lt;/code&gt; and &lt;code&gt;xml&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Use &lt;code&gt;TEXT&lt;/code&gt;. PostgreSQL text is Unicode, so there is no &lt;code&gt;N&lt;/code&gt; prefix. Declare &lt;code&gt;XML&lt;/code&gt; yourself if you query it as XML.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. &lt;code&gt;rowversion&lt;/code&gt; / &lt;code&gt;timestamp&lt;/code&gt; is not a date
&lt;/h2&gt;

&lt;p&gt;It is binary in SQL Server (&lt;code&gt;BYTEA&lt;/code&gt; in PostgreSQL). Leave it out of the copy unless the application reads it.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Case and collation
&lt;/h2&gt;

&lt;p&gt;SQL Server usually compares text case-insensitively; PostgreSQL does not by default. Plan &lt;code&gt;ILIKE&lt;/code&gt;, &lt;code&gt;citext&lt;/code&gt; or a case-insensitive collation wherever the application relies on it.&lt;/p&gt;

&lt;h2&gt;
  
  
  How I check it
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Create the target tables from reviewed DDL.&lt;/strong&gt; dbSlice does not create anything in your database by default: if the PostgreSQL table is missing it stops and shows a &lt;code&gt;CREATE TABLE&lt;/code&gt; translated from SQL Server, for you or your DBA to review and run. That is where fixes 1 to 4 go.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Initial load&lt;/strong&gt;, then a nightly &lt;strong&gt;upsert by key&lt;/strong&gt; (use a column that only grows, like &lt;code&gt;updated_at&lt;/code&gt; or the &lt;code&gt;IDENTITY&lt;/code&gt; id) so PostgreSQL stays in step until cutover.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fix the sequences.&lt;/strong&gt; After rows are copied with their &lt;code&gt;IDENTITY&lt;/code&gt; values, the PostgreSQL sequence can be behind the highest id. The tool can move it past the max id, or show the command.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Compare key by key&lt;/strong&gt; before the switch. The compare saves the list of divergent keys to a file.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F652gwoswvz80xldcdmc4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F652gwoswvz80xldcdmc4.png" alt="Replicator copying a list of tables" width="800" height="466"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What it does not do
&lt;/h2&gt;

&lt;p&gt;It moves data, not T-SQL: stored procedures, triggers and views have to be rewritten for PostgreSQL. Incremental runs do not detect deletes at the source, so compare or reload before cutover. No CDC or SQL Server Agent is needed: it reads with ordinary queries.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;There is a free version on the Microsoft Store (connects, browses, compares, exports CSV). Writing to the target needs a license.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Guide: &lt;a href="https://dbslice.net/migrate/sql-server-to-postgresql" rel="noopener noreferrer"&gt;https://dbslice.net/migrate/sql-server-to-postgresql&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Nightly sync routine: &lt;a href="https://dbslice.net/sync/sql-server-to-postgresql" rel="noopener noreferrer"&gt;https://dbslice.net/sync/sql-server-to-postgresql&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Comparing tools (pgloader and others): &lt;a href="https://dbslice.net/compare/sql-server-to-postgresql-migration-tools" rel="noopener noreferrer"&gt;https://dbslice.net/compare/sql-server-to-postgresql-migration-tools&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Free version: &lt;a href="https://apps.microsoft.com/detail/9PMS69X1T53Z" rel="noopener noreferrer"&gt;https://apps.microsoft.com/detail/9PMS69X1T53Z&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Which of these has bitten you? I'm happy to answer questions about the type mapping.&lt;/p&gt;

</description>
      <category>postgres</category>
      <category>sqlserver</category>
      <category>database</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Recipe: moving a MySQL table to PostgreSQL in 5 steps (and proving nothing is missing)</title>
      <dc:creator>dbSlice by Thinwork</dc:creator>
      <pubDate>Mon, 16 Nov 2026 19:29:21 +0000</pubDate>
      <link>https://dev.to/dbslice/recipe-moving-a-mysql-table-to-postgresql-in-5-steps-and-proving-nothing-is-missing-3h03</link>
      <guid>https://dev.to/dbslice/recipe-moving-a-mysql-table-to-postgresql-in-5-steps-and-proving-nothing-is-missing-3h03</guid>
      <description>&lt;p&gt;Disclosure: I'm the author of dbSlice, the Windows tool used below. The routine itself works with any tool; here is how I run it when an application is rebuilt on PostgreSQL but the data still lives in MySQL, MariaDB or SQL Server.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Pick the goal
&lt;/h2&gt;

&lt;p&gt;The wizard opens with eight goals (migrate tables, keep tables up to date, compare data, send rows to an API or queue, export to a file, generate test data, clone tables, load data). Here: &lt;em&gt;Migrate tables&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fe9ydsnmqj1ze5ocdzj09.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fe9ydsnmqj1ze5ocdzj09.png" alt="dbSlice wizard, step 1: pick a goal" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Connect
&lt;/h2&gt;

&lt;p&gt;Source (MySQL, MariaDB or SQL Server) and target (PostgreSQL).&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Choose the tables
&lt;/h2&gt;

&lt;p&gt;If a table does not exist in the target, nothing is written: the tool shows the &lt;code&gt;CREATE TABLE&lt;/code&gt;, translated from the source, for you to review and run. Check what never translates on its own:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;UNSIGNED&lt;/code&gt; integers: use &lt;code&gt;BIGINT&lt;/code&gt; (or &lt;code&gt;NUMERIC(20)&lt;/code&gt; for &lt;code&gt;BIGINT UNSIGNED&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;TINYINT(1)&lt;/code&gt; flags: declare them &lt;code&gt;BOOLEAN&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;zero dates (&lt;code&gt;0000-00-00&lt;/code&gt;): PostgreSQL rejects them; turn them into &lt;code&gt;NULL&lt;/code&gt; in a SELECT used as the source&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  4. Options
&lt;/h2&gt;

&lt;p&gt;Pick a key column and a mode: initial load first, then upsert by key while the old application is still running.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Run and compare
&lt;/h2&gt;

&lt;p&gt;Run it, then compare key by key against the source. That tells you which rows are missing or different. A structure compare lists column differences:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Flm80zovun91s1yhaqapr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Flm80zovun91s1yhaqapr.png" alt="Compare structure screen" width="800" height="466"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What it does not do
&lt;/h2&gt;

&lt;p&gt;It moves data, not stored procedures, triggers or views. Incremental runs do not detect deletes at the source, so do a full compare or a reload before cutover.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;There is a free version on the Microsoft Store (connects, browses, compares, exports CSV). Copying into the target needs a license.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Guide: &lt;a href="https://dbslice.net/migrate/mysql-to-postgresql" rel="noopener noreferrer"&gt;https://dbslice.net/migrate/mysql-to-postgresql&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;SQL Server to PostgreSQL: &lt;a href="https://dbslice.net/migrate/sql-server-to-postgresql" rel="noopener noreferrer"&gt;https://dbslice.net/migrate/sql-server-to-postgresql&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Site: &lt;a href="https://dbslice.net" rel="noopener noreferrer"&gt;https://dbslice.net&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Free version: &lt;a href="https://apps.microsoft.com/detail/9PMS69X1T53Z" rel="noopener noreferrer"&gt;https://apps.microsoft.com/detail/9PMS69X1T53Z&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Questions about the type mapping or how the compare works? Ask below.&lt;/p&gt;

</description>
      <category>postgres</category>
      <category>mysql</category>
      <category>database</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Edge Read Slices: Take Read Load Off Your Central Database</title>
      <dc:creator>dbSlice by Thinwork</dc:creator>
      <pubDate>Fri, 30 Oct 2026 18:44:26 +0000</pubDate>
      <link>https://dev.to/dbslice/edge-read-slices-take-read-load-off-your-central-database-2cll</link>
      <guid>https://dev.to/dbslice/edge-read-slices-take-read-load-off-your-central-database-2cll</guid>
      <description>&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/FFmebl8Ok34" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;br&gt;
In many companies a single SQL Server or PostgreSQL database answers every read: microservices, web and&lt;br&gt;
mobile apps, branches and point-of-sale terminals. As usage grows, reads compete with writes, and the central&lt;br&gt;
database becomes the bottleneck for everyone.&lt;/p&gt;

&lt;p&gt;This video shows a practical pattern: &lt;strong&gt;keep writes on the central database and move read-only slices of&lt;br&gt;
the data to where they are used&lt;/strong&gt;, in SQLite, PostgreSQL or MariaDB, refreshed by dbSlice on a schedule.&lt;/p&gt;

&lt;h2&gt;
  
  
  Who it is for
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Architects&lt;/strong&gt; looking for a way to cut read traffic on the central database without rewriting the apps.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Teams running branches or terminals&lt;/strong&gt; that need local data, even when the link to headquarters is slow.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;DBAs&lt;/strong&gt; who want the copy to be a scheduled job with a log, not a script someone has to remember.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What the video shows
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;One synchronization per slice.&lt;/strong&gt; A WHERE filter per branch, a key column, Upsert, and an incremental
column such as &lt;code&gt;updated_at&lt;/code&gt; that brings only the rows changed since the last run.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reference tables with the Replicator.&lt;/strong&gt; Tables every branch needs in full are copied in foreign-key
order.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automation.&lt;/strong&gt; The same &lt;code&gt;job.json&lt;/code&gt; runs from the Windows command line (with Task Scheduler) or on a cron
schedule in the Linux Server Edition (Docker), with run history and webhooks on success or failure.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Checks.&lt;/strong&gt; Structure compare and key-by-key Record Diff show whether the slice matches the source.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dev and test.&lt;/strong&gt; Copies for development can have sensitive columns masked while they are written.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Honest notes
&lt;/h2&gt;

&lt;p&gt;This is not real-time replication: local data is as fresh as your schedule. The incremental column brings&lt;br&gt;
inserts and updates, not deletes, so plan a periodic full reload of each slice. And measure performance on&lt;br&gt;
your own data before you size the schedule.&lt;/p&gt;

&lt;h2&gt;
  
  
  Read more
&lt;/h2&gt;

&lt;p&gt;The written guide, with the setup step by step, is in&lt;br&gt;
&lt;a href="https://dbslice.net/articles/dbslice-sqlite-edge" rel="noopener noreferrer"&gt;SQLite at the edge&lt;/a&gt;. For scheduling jobs from the command line, see&lt;br&gt;
&lt;a href="https://dbslice.net/automation/database-sync-cli" rel="noopener noreferrer"&gt;database sync from the CLI&lt;/a&gt;. The free version is on the&lt;br&gt;
&lt;a href="https://apps.microsoft.com/detail/9PMS69X1T53Z" rel="noopener noreferrer"&gt;Microsoft Store&lt;/a&gt;.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published on the &lt;a href="https://dbslice.net/blog/edge-read-slices" rel="noopener noreferrer"&gt;dbSlice blog&lt;/a&gt;. dbSlice is a Windows app for data migration, replication and sync between the leading databases.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>sqlite</category>
      <category>postgres</category>
      <category>mariadb</category>
      <category>architecture</category>
    </item>
    <item>
      <title>dbSlice in 3 Minutes: Migrate, Replicate and Sync Data</title>
      <dc:creator>dbSlice by Thinwork</dc:creator>
      <pubDate>Fri, 30 Oct 2026 18:39:40 +0000</pubDate>
      <link>https://dev.to/dbslice/dbslice-in-3-minutes-migrate-replicate-and-sync-data-2ff5</link>
      <guid>https://dev.to/dbslice/dbslice-in-3-minutes-migrate-replicate-and-sync-data-2ff5</guid>
      <description>&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/biTS1aS7DLQ" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;br&gt;
Most teams that move data between databases end up with a toolbox: one product per engine, a script for the&lt;br&gt;
nightly copy, another for comparing the two sides, and something else to push changes to an API or a queue.&lt;br&gt;
This three-minute video shows how dbSlice puts those jobs in one Windows app and one Linux edition, under one&lt;br&gt;
license.&lt;/p&gt;

&lt;h2&gt;
  
  
  Who it is for
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;DBAs and SREs&lt;/strong&gt; who keep a copy of production up to date and need a job they can schedule, log and rerun.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Teams replacing a system&lt;/strong&gt; that must run old and new databases side by side for months.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Product owners&lt;/strong&gt; who need data moved without a developer writing a one-off script.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What the video shows
&lt;/h2&gt;

&lt;p&gt;The tour runs on real screens:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Migrate, replicate, compare and sync&lt;/strong&gt; across the leading databases: SQL Server, PostgreSQL, Oracle,
MySQL, MariaDB, Firebird, SQLite and InterSystems Caché/IRIS, with MongoDB, Cassandra, Elasticsearch,
Couchbase and Redis as NoSQL targets.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Synchronize, with five modes&lt;/strong&gt;, from a full copy to only the rows that changed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Replicator&lt;/strong&gt;, which copies a whole set of tables in foreign-key order.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Compare and Record Diff&lt;/strong&gt;, to check both sides key by key.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Selective masking&lt;/strong&gt;, so a test copy does not carry real customer data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Export, Send Data and command-line jobs&lt;/strong&gt;: files, REST APIs, message brokers, and jobs you can run from
Task Scheduler or cron.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Linux Server Edition&lt;/strong&gt;, which runs in a Docker container on your own servers, with several users and
sessions in parallel.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Why one tool matters
&lt;/h2&gt;

&lt;p&gt;When migration, sync and comparison live in different products, each one has its own connection settings,&lt;br&gt;
its own logs and its own idea of what a "key" is. In dbSlice, the Synchronize tab, the Replicator and the&lt;br&gt;
command-line jobs share the same engine. A run you test in the app behaves the same way when it runs at&lt;br&gt;
night on a schedule.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;The free version is on the&lt;br&gt;
&lt;a href="https://apps.microsoft.com/detail/9PMS69X1T53Z" rel="noopener noreferrer"&gt;Microsoft Store&lt;/a&gt;. To see how a long-running coexistence&lt;br&gt;
project works in practice, read &lt;a href="https://dbslice.net/use-cases/data-coexistence" rel="noopener noreferrer"&gt;data coexistence&lt;/a&gt;. For speed, with the&lt;br&gt;
conditions behind each number, see &lt;a href="https://dbslice.net/performance" rel="noopener noreferrer"&gt;how fast is dbSlice&lt;/a&gt;.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published on the &lt;a href="https://dbslice.net/blog/dbslice-overview" rel="noopener noreferrer"&gt;dbSlice blog&lt;/a&gt;. dbSlice is a Windows app for data migration, replication and sync between the leading databases.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>database</category>
      <category>dataengineering</category>
      <category>sqlserver</category>
      <category>postgres</category>
    </item>
    <item>
      <title>How to Read a Database Sync Speed Number</title>
      <dc:creator>dbSlice by Thinwork</dc:creator>
      <pubDate>Fri, 30 Oct 2026 18:16:53 +0000</pubDate>
      <link>https://dev.to/dbslice/how-to-read-a-database-sync-speed-number-4jem</link>
      <guid>https://dev.to/dbslice/how-to-read-a-database-sync-speed-number-4jem</guid>
      <description>&lt;p&gt;"Millions of rows per minute" appears on many product pages, including ours. Before you plan a cut-over&lt;br&gt;
weekend around a number like that, it is worth asking what was actually measured. These five questions apply&lt;br&gt;
to any tool, and they are the same ones we answer on our own &lt;a href="https://dbslice.net/performance" rel="noopener noreferrer"&gt;performance page&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Which mode?
&lt;/h2&gt;

&lt;p&gt;An initial load into an empty table is the easiest case: no lookups, no conflicts, just bulk inserts. An&lt;br&gt;
upsert has to find each key on the target and decide between insert and update. "New rows only" and&lt;br&gt;
incremental modes depend on how fast the target can tell what is missing. A number from one mode says little&lt;br&gt;
about another. In our lab, the same PostgreSQL target was 66 to 118 times faster at upsert and "new rows only"&lt;br&gt;
with one option turned on, while the initial load did not change at all.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Which engines, and where?
&lt;/h2&gt;

&lt;p&gt;SQL Server to SQL Server on the same host is not the same job as SQLite on a laptop to Azure SQL in another&lt;br&gt;
region. Ask for the source, the target and where each one ran.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. What about the network?
&lt;/h2&gt;

&lt;p&gt;Over a WAN link, the network is often the slowest side. A tool that reads and writes at the same time, as&lt;br&gt;
dbSlice does, moves at the pace of whichever side is slower, so the same job can be fast on one link and slow&lt;br&gt;
on another.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. How wide are the rows?
&lt;/h2&gt;

&lt;p&gt;A table of three integer columns and a table with long text and binary columns can differ by an order of&lt;br&gt;
magnitude in rows per second while moving similar bytes. If the benchmark does not say, assume narrow rows.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Was anything tuned?
&lt;/h2&gt;

&lt;p&gt;Indexes dropped during the load, a bigger log, a dedicated network: all legitimate, and all worth knowing.&lt;br&gt;
Our largest run, 12.96 billion rows in about 41 hours (≈88,500 rows/s on average), came from a live production&lt;br&gt;
table of purchase orders with 20 years of history, 40 columns and 9 indexes, migrated into the database of a&lt;br&gt;
new microservice that integrates with Salesforce; the network and both databases were tuned for the load. Next to it we publish a plain-setup number: 31.4 million rows into Azure SQL in&lt;br&gt;
about 30 minutes (≈17,200 rows/s), initial-load mode, SQLite source on a local disk.&lt;/p&gt;

&lt;h2&gt;
  
  
  The only number that counts
&lt;/h2&gt;

&lt;p&gt;Is the one from your own tables, on your own network. Run the job you plan to run, in the mode you plan to&lt;br&gt;
use, and time it. The free version of dbSlice is on the&lt;br&gt;
&lt;a href="https://apps.microsoft.com/detail/9PMS69X1T53Z" rel="noopener noreferrer"&gt;Microsoft Store&lt;/a&gt;; the numbers and conditions we measured are&lt;br&gt;
on &lt;a href="https://dbslice.net/performance" rel="noopener noreferrer"&gt;how fast is dbSlice&lt;/a&gt;, and the video walkthrough is in&lt;br&gt;
&lt;a href="https://dbslice.net/blog/12-billion-rows" rel="noopener noreferrer"&gt;12.96 billion rows in 41 hours&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Related: &lt;a href="https://dbslice.net/migrate/mysql-to-postgresql" rel="noopener noreferrer"&gt;MySQL to PostgreSQL migration&lt;/a&gt; · &lt;a href="https://dbslice.net/migrate/sql-server-to-mysql" rel="noopener noreferrer"&gt;SQL Server to MySQL migration&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published on the &lt;a href="https://dbslice.net/blog/reading-sync-speed-numbers" rel="noopener noreferrer"&gt;dbSlice blog&lt;/a&gt;. dbSlice is a Windows app for data migration, replication and sync between the leading databases.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>performance</category>
      <category>database</category>
      <category>dataengineering</category>
      <category>sql</category>
    </item>
  </channel>
</rss>
