Let Flex2SQL Generate Scripts for the DBA¶
Connect to the target server (File > Login).
Optionally, set global migration preferences (Tools > Preferences).
Open the DataFlex workspace or filelist (File > Open) and select the file(s) to be migrated.
Select Tools > Generate Scripts > SQL Script for Creating Table.
This creates a script, <filename>.sql that the DBA can use to create the table(s).
Select Tools > Generate .INT > .INT File from .DAT
This creates the .INT file(s), <filename>.int.
Select Database > Create Text File for server-specific Loader.
To save the data in a text file, select the Export Data & Control File option. Otherwise, only the controlling scripts and batch (.bat) file are generated. You can change the location of the text file and select whether you want a comma delimited file or a fixed format file.
Display the Loader Options tab and choose settings to be saved in the control file.
Click Generate or, if multiple files are selected, Generate All.
During the generation process, three files are created: <filename>.txt, loader.bat, <filename>.ctl. The <filename>.txt file contains the data in text format. Loader.bat is a batch file that contains the loader calls for each migrated file. The <filename>.ctl file contains control information used by the loader.
The DBA runs the script to create the new table (filename.sql) and the loader.bat file to load the text data.
Generate the script to analyze the loaded data (Tools > Post Loader Steps).
Note: Only available for PostgreSQL, MySQL, MariaDB and Oracle.
The DBA runs the post loader script.