CL2SQL - Command Line Tool for Unattended Migration

Mertech provides a command line tool to allow migration of data using Flex2SQL features without the GUI interface. The tool, called CL2SQL, is located in the Mertechbin directory, and supports all the options of Flex2SQL through command line parameters.

Cl2SQL can be used along with the f2s_convert_dat_structure or f2s_convert_dat_full to develop an unattended migration process.

Double-click cl2sql.exe to see full description of the application. The application starts and an information window displays listing the syntax, command line options, and providing examples. The command line options are also listed below:

-?,-h,-help

This information screen.

-d <drv>,

-driver <drv>

Use driver <drv> where drv is one of our supported drivers: ORA_DRV, SQL_DRV, MDSMYSQL and MDSPGSQL

-f <fs>,

-fileset <fs>

The fileset passed as a parameter in <fs> on which you want to operate. The fileset is created from inside the Convert dialog in Flex2SQL.

-file <n>

The filenumber passed as a parameter in <n> on which you want to operate. You can only use this option with a fileset. This allows you to override the set of files on which you want to operate with another file.

-prefix <ABC>,

-postfix <ABC>,

The prefix <ABC> and postfix <ABC> options are to be used for the tablename prefix or postfix as an override on what is defined in the fileset. You can only use this option along with a fileset.

-s <server>,

-server <server>

Database <server> to connect to, where <server> can be either the server name or IP used.

-database <db>

If you want to use another database as is specified in the configuration file, then you can override the setting with the value in <db>.

-u <user>, -user <user>

User id to login with. If you do not use this parameter the driver will connect using a trusted connection.

-p <pass>,

-password <pass>

Password to use for logging in.

-port <n>

Use an alternative port to connect to on the database server.

-c <cfg>,

-config <cfg>

Use the Flex2SQL configuration provided in <cfg> file

-l,

-login

Automatically log in using the last used/saved parameters. This is the default behavior if no login details are passed.

-r <rpt>,

-report <rpt>

Write a migration report to file <rpt>.

-rc,

-rptclear

Erase migration report file <rpt> before the new migration report is written.