KS DB Merge Tools logo KS DB Merge Tools
Documentation
KS DB Merge Tools for MySQL logo for MySQL
and MariaDB
KS DB Merge Tools for Oracle logo
MssqlMerge logo
KS DB Merge Tools for PostgreSQL logo
KS DB Merge Tools for SQLite logo
AccdbMerge logo
KS DB Merge Tools for Cross-DBMS logo

Execute Script Dialog

Opened to review and run script for merge, replace and delete actions performed using merge to right, merge to left, replace to right, replace to left, delete left and delete right toolbar actions.

It is opened from Object list and Table structure diff tabs to review scripts for processed database objects:

for MySQL, execute script dialog

Dialog header:

Please review the merge script below and click Run to execute this script or copy it to clipboard/file for later use.
Warning: Script execution does not make any backup, please make sure that you've done it yourself if needed.
Target database: {Database display name}
Execution status: {Status}

Besides the 'no backup' warning, the header can include a few more warnings, depending on the script content and free session mode. If more than one applies, it shows a "Warnings:" heading followed by a bulleted list. Here are the remaining warnings:

- This script recreates some objects. This may cause dependent objects or settings not be preserved, if they are disabled in settings or not supported.
- Trigger order ignored and can be overwritten. Merge triggers from the table structure diff to keep their order.
- Table structure changes (deleted columns / changed types) may affect existing data.
- Execution stops when your free session expires, partial execution may occur.

The trigger order warning is shown when you merge triggers from the Triggers list of the Object list tab. This list does not show the order in which the database server runs triggers of one table, so the merged trigger can get another position among the triggers of its table. The Table structure diff tab shows and merges this order.

Dialog footer:

☐ Stop on first error (contraint violation, etc.)   [ Run ] [ Close ]

The rest of area is divided into 3 major sections:

  • Script structure - script elements are organized into tree hierarchy. Each item contains a colored bullet indicating the status of the item: blue - not started, yellow - executing, green - succeed, red - failed.
  • Script for selected item   [ Copy ] [ Save ] - SQL corresponding to selected Script structure item. If item includes sub-items, then it is combined SQL of sub-items. Text is truncated to 10k chars by default. If truncated, an appropriate notice shown:
    Script is truncated for better performance.
    For detailed analysis please review individual child items in the Script structure panel.
    To view full script, click Show all.
    with a Show all button. If first sub-item is more than 10k chars, then it is included without truncation. Even if truncated to 10k, Save will produce a file with a whole text, and Copy - with a text truncated to 1 million chars. Show all is not availabe during script execution.
  • Execution result   ☐ Update on item/row change during Run (slower)   [ Copy ] [ Save ] - execution result of selected item. If item fails, includes the error message from the database engine. If Update on item/row change during Run option is not selected, then results are available only after script execution completion.

This dialog is also shown from the Data diff and Batch data diff tabs to review scripts for data merge/delete actions:

for MySQL, execute data script dialog

For data merge/delete, this dialog contains additional elements:

  • Header includes additional row:
    Row-level changes: expected {row count}
    It is a number of single-row INSERT/UPDATE/DELETE statements based on selected rows or tables. This count does not include results of batch statements like INSERT INTO x SELECT * FROM y. After script execution, this section also includes counts of processed and failed rows. Processed row is the script item processed by the database. For example, if we have a transaction, 5 rows to process, 4th row fails, then we have expected = 5, processed = 4 and failed = 1. Failed transaction is rolled back, no actual changed in database, but we still have 4 processed rows.
  • Script structure does not include items for individual rows. It contains items corresponding to processed tables, and each table name also includes number of rows to be merged or deleted. If selected, script for selected item shows scripts for individual rows and first/previous/next/last buttons to scroll rows.

Run button tries to execute all script items one by one. In case of error:

  • If 'Stop on first error' selected - remaining items are not executed.
  • If error happens inside transaction - transaction is rolled back, remaining transaction items are not executed.

Last updated: 2026-09-22