About Ispirer Systems

Ispirer Home Page Database Migration Application Conversion Downloads


Script Conversion

Using Ispirer Toolkit for Linux for script conversion will help you convert separate files containing SQL code.

The command syntax is as follows:

SQLWays 
/D=Fixed 
/SOURCE=<source DB>
/TARGET=<target DB>
/DIR=<result_directory> 
{<objects to be converted>}
/INI=<ini_file_path>
[TRACE]


<objects to be converted>:
/F = <sql_file_to_convert> (recommended)
|  /FF <files_list_file> (recommended)
|  /PRJF=<project_file_path> (for experienced users; reserved for the future needs)

Note: SQLWays command line parameters are case insensitive and their order is of no importance.

Description of parameters

Required parameters:

  • SQLWays - the name of the program performing the conversion.
  • /D - the FIXED value indicates that the script is being converted.
  • /TARGET- indicates the target database. NOTE: only PostgreSQL is currently supported as a target technology.
  • /SOURCE - indicates the source database. NOTE: only Oracle and MS SQL Server are currently supported as a source technology.
  • /DIR - indicates the location of the generated files (output directory).
  • /INI - indicates the options file. The options file is a file that stores all the options supported by Ispirer Toolkit for Linux. The options file with the default settings can be downloaded here. Make sure that the end-of-line characters (EOL) of the license file are in UNIX format (LF only). More information about the supported options can be found in the Options file description section. The options are developed to change the default conversion output. For the first time, we recommend running the conversion with the default settings. If you expect the result to be different, you may contact our technical team for details at support@ispirer.com

The method for selecting SQL files must be specified. One of the following arguments must be used:

  • or /F (recommended) - script(-s) that need to be converted. Full path with the file name or a template may be specified there, e.g.:
/* 1 file conversion */
/F=/home/bob/project1/file1.sql 

/* all SQL files by the path */
/F=/home/bob/project1/*.sql

/* all the files by the path */ 
/F=/home/bob/project1/*.* 
  • or /FF (recommended) - text file with a list of paths to script files that need to be converted, e.g.:
/home/bob/project1/file1.sql 
/home/bob/project1/file2.sql 
/home/bob/project1/file3.sql
  • or /PRJF (for advanced users) - indicates the path to the project file. This file stores information about the scripts to be converted. The project file sample can be downloaded here. Make sure that the end-of-line characters (EOL) of the license file are in UNIX format (LF only). Inside the <Script> tags you must specify the name(s) and path(s) of the scripts to be converted.

Optional parameters:

  • /TRACE - the conversion will be performed in trace mode.

More information about all supported command line options can be found in the Command Line Options section.

Command line sample:

SQLWays /D=FIXED /TARGET=PostgreSQL /SOURCE=Oracle /DIR=/home/bob/project1/Result /INI=/home/bob/project1/sqlways_app.ini /PRJF=/home/bob/project1/sqlways.xml

Once the command line with the appropriate set of parameters is prepared, we need to run it in the terminal:

The following generated files can be found in the directory specified by the /DIR parameter:

  • sqlways.log - conversion log, which stores messages about the conversion process;
  • sqlways.trc - trace file that stores detailed information about the conversion process (in case the /TRACE argument was set);
  • reports - folder with html reports;
  • sql - corresponding file(s) with converted SQL code;.

The sql files contain code ready to be executed in the target database.