Testing with SQL Tran
Testing is a critical final stage in the database translation process. It ensures the functional correctness of translated SQL by comparing the behavior of source and target environments. This includes validating table contents, view outputs, procedure side effects, and function return values.
SQL Tran performs this verification by executing equivalent SQL logic in both staging environments and analyzing the results side by side. It checks table contents, view outputs, procedure side effects, and function return values. This approach provides the most reliable method for confirming that translated logic behaves as expected.
To enable accurate testing, both the source and target staging databases must contain matching schemas—aligned with the current SQL Tran project—and include representative data for meaningful validation.

During project creation, SQL Tran performs initial operations such as parsing, static analysis, and translation of the source database. These are reflected in the Parsing
, Analysis
, and Translation
stages of the object lifecycle. However, the Creation
and Testing
stages are not immediately available until certain prerequisites are met.

As shown above, the following prerequisites must be fulfilled:
Creation
stage – Prerequisite: Target connection.Testing
stage – Prerequisites: Source connection & Target connection.
The labels Source connection
and Target connection
are clickable links that take you directly to the corresponding sections in the Project settings
screen where database connections can be configured. You can also access this screen using the main menu (☰
) in the bottom-left corner of the application.
Testing requires both source and target staging connections. This is essential because SQL Tran verifies the behavior of translated code by directly comparing execution outcomes between the original and the translated environments. Only by running the same SQL against both and analyzing results side by side can SQL Tran reliably confirm behavioral parity.
⚠️ Important: Never use production databases for testing purposes. The testing process executes and writes to the target staging database. Use staging environments with test data that reflects production logic safely.
In the following pages, we will explore how to configure database connections and effectively use SQL Tran’s automated and customizable testing capabilities.
Last updated