SQLines SQL Converter - Configuration File Reference

You can run SQLines SQL Converter tool from a command line, and this article describes the configuration file options. Additionally, you can specify options in Command Line.

You can use -cfg command line option to specify the location and file name for the configuration file. If -cfg option is not defined, the default configuration file is sqlines.cfg. The tool firstly tries to read it from the current directory, and if not found from the SQLines executable directory.

All configuration file options can be specified in the command line as well.

Note. Please see sqlines.cfg supplied with the tool to see the full list of available options.

DDL Options

Options for DDL conversion.

-object_name_case

Set upper to convert object names (tables i.e.) to upper case in DDL scripts. Set lower to convert to lower case.

-column_name_case

Set upper to convert column names to upper case in DDL scripts. Set lower to convert to lower case.

-column_name_quotes

Set characters to quote column identifiers. For example, specify ”” for double quotes (or \”\” if you use the option in command line).

-object_name_quotes

Set characters to quote object identifiers (schemas, table, views, aliases etc). For example, specify ”” for double quotes (or \”\” if you use the option in command line).

Oracle Options

Options to convert to/from Oracle.

-ora_number

Defines the mapping of Oracle NUMBER data type used without the precision and scale (i.e. floating point number) for table columns and PL/SQL variables.

By default, it is converted to DECIMAL in PostgreSQL, and DECIMAL(18,6) in MySQL and MariaDB. Check articles why it is not converted to DOUBLE by default.

See also -ora_number_int option.

-ora_number_int

Mapping of Oracle NUMBER data type without the precision and scale (i.e. floating point number) for table columns that are part of primary keys or unique constraints. By default, it is converted to INT.

PostgreSQL Options

Options to convert to/from PostgreSQL.

-pg_use_function_single_result_set

When set to Yes and a source stored procedure returns a single result set, convert it to a function with RETURNS TABLE and RETURN QUERY in PostgreSQL. Otherwise use procedure and REFCURSORs. Default is No (i.e. to use procedure and REFCURSORs).

UDF Options

Options for using user-defined functions during the conversion.

-udf_months_between

By default, SQLines converts Oracle MONTHS_BETWEEN function to user-defined function dbo.MONTHS_BETWEEN in SQL Server as DATEDIFF(MONTH, …) returns different results. For more details, see Oracle MONTHS_BETWEEN.

If No is specified for this option, SQLines will use DATEDIFF(MONTH, …) conversion. Note that MONTHS_BETWEEN and DATEDIFF have different order of parameters.