Create Script SQL

How To Access

  • Main Menu | Tools | Generate Scripts | SQL Script for Creating Table

This dialog, which is very similar to Convert Dat to Table and Create Intermediate File, is used to generate SQL scripts which can then be run on deployed systems where using the Flex2SQL Classic Migration Utility is inconvient or impossible.

Note

This tool should ONLY be used with tables that have been migrated. If you try and use it on a DataFlex file that has not been migrated, you will some variation of the error “File Not Found”.

GenerateScriptFile.png

Tabs

The tabs allow customization of the script generated:

  • Migration Options Tab: These are table related options universal for all servers.

  • Fields Tab: These are field specfic options universal for all servers.

  • Indexes Tab: These are index options universal for all servers.

  • MS SQL Server Tab: This tab allows you to select the database and set migration options that are unique to MS SQL Server databases. If not connected to an MSSQL server, all the controls on this tab page will be disabled.

  • Oracle Tab: This tab allows you to select the data and index tablespace, as well as set the table storage options that are unique to Oracle databases. If not connected to an Oracle server, all the controls on this tab page will be disabled.

  • MySQL Tab: This tab allows you to select the data and index tablespace and set migration options that are unique to MySQL & MariaDB databases. If not connected to an MySQL or a MariaDB server, all the controls on this tab page will be disabled.

  • PostgreSQL Tab: This tab allows you to select the data and the index tablespace and set migration options that are unique to PostgreSQL databases. If not connected to a PostgreSQL server, all the controls on this tab page will be disabled.

Bottom Controls

The controls at the bottom of the dialog remain the same regardless of the tab selected.

What to do radio buttons

There are 3 options:

  • Create Table and index: This will generate a script that can be used to create the tables and the indexes from the selected .Dat file(s) onto the selected backend.

  • Create Table Only: This will generate a script that can be used to generate the create the table(s) from the selected .Dat file(s) onto the selected backend.

  • Create Indexes Only: This will generate a script that can be used to create the indexes from the selected .Dat file(s) on the seleted backend.

The Buttons

  • Preferences: Shows the Preferences dialog.

  • SaveSet: Shows the Save the files to save as a set dialog.

  • Generate All: Generates the scripts for all the tables selected in Filelist dialog based on the radio button selected in What to do radio buttons.

  • Convert: Generates script for the only the table in the Table Name form based on the radio button selected in What to do radio buttons.

  • Help: Shows the help page of the selected tab.

  • Cancel: Closes the dialog.