Ispirer Website
Ispirer Toolkit Overview
Free Trial
As part of the improved functionality of the data migration tool, two optional options have been added that will allow you to manage the data import process more flexibly by automating pre- and post-import operations. They allow you to specify SQL scripts to be executed before and after data import. This article describes the new options and the process of their configuration in detail.
To use the new options, you must add the appropriate SQL script paths to the configuration file (sqlways_db.ini). Configuration examples:
[COMMON] BEFORE_IMPORT_SCRIPT = C:\doc\before_sql_file.sql AFTER_IMPORT_SCRIPT = C:\doc\after_sql_file.sql
If the BEFORE_IMPORT_SCRIPT and/or AFTER_IMPORT_SCRIPT settings are present, the tool will create the appropriate bat files:
The bat files will execute the SQL scripts specified in the settings. To execute the scripts correctly, the bat files will support paths with spaces and any custom encodings.
Examples of bat files content: before_import_script.bat:
@echo off sqlcmd -S <ServerName> -d <DatabaseName> -i "C:\doc\before_sql_file.sql"
@echo off sqlcmd -S <ServerName> -d <DatabaseName> -i "C:\doc\after_sql_file.sql"
If errors occur during script execution, they will be displayed in the import log in the same way as for any other objects. This makes it easy to track and diagnose problems that may occur during script execution.
Note that if BEFORE_IMPORT_SCRIPT or AFTER_IMPORT_SCRIPT options are absent or their values are empty, the corresponding bat-files will not be created.
The options are also independent of each other: if one of the options is missing, no bat-file will be created for it, but a bat-file will be created for the present option.
How to Run Ispirer SQLWays in Parallel Mode
If you have any questions or face any difficulties, please contact our support team at support@ispirer.com