Advanced Usage

Each driver has it’s own Flex2SQL Deployment Tool installation. The installer doesn’t setup the driver itself, instead it installs the deployment tool. This allows the deployment tool to be easily used for network and workstation installations. Additionally, because the tool can be used by different vendors on the same machine, installing the tool rather than the driver itself prevents problems where installations improperly remove our driver breaking unrelated software that happens to use the driver.

The deployment tool installs without adding an item to the start menu. It can be integrated into your application installer and even installed into a “tools” folder for your application as a way of white labeling the deployment tool.

Once installed, you can run one of two executables included. They both are the same process, but one is meant to work with 64-bit application stacks. The tool uses a TUI (Text User Interface) so that it can be used on headless versions of Windows Server. The text-based buttons and most of the rest of the UI can be navigated using either the mouse or the keyboard.

Because the deployment tool is meant to work with multiple future version of Flex2SQL, you need to select the edition and version of Flex2SQL along with the path at which you’d like to deploy the Flex2SQL driver. We advise that you deploy to your applications “Programs” folder, although this is not required. You’ll also need to select a license to deploy with driver. This license can be anywhere on the computer as the deployment tool will copy it to the correct location. The Deployment Tool will confirm that the license you select can work with the driver you’re deploying.

From this point you can either go ahead with the deployment or you can see how this same installation could be called in an automated fashion from the command line. If you choose to deploy the driver, don’t be worried that the application exits immediately in most cases. The deployment process takes place in the blink of an eye and you may miss it!

Automation

Developers can use a variety of means to deploy their application. ISVs tend to write installers that deploy their app while Corporate users might deploy using a shared network drive and a login script of some sort. Others that might have only a handful of customers might manually copy the files over or unzip their app and manually create a desktop shortcut. No matter what deployment model you use, the Flex2SQL Deployment Tools can be integrated into your installation flow.

Flex2SQL Deployment Tool Installer Automation

The Flex2SQL Deployment Tool installation is specific to each of our four drivers: MS SQL, Oracle, PostgreSQL, and MySQL. To automate the installer you can use command line arguments:

  • /install:

    This tells the installer that it should proceed with an installation (rather than a repair or uninstall)

  • /quiet:

    The quiet argument hides all UI and messages from the installer. This is required for headless installation.

  • INSTALLFOLDER=”[Directory]”:

    This argument takes a folder as a parameter. It changes the default location that the Deployment Tool is installed to (“%Program Files%\Flex2SQL Deployment Tool [Driver]” by default). Each driver installation will go to it’s own folder. The names for [Driver] in a default installation are:

    • MS SQL

    • Oracle

    • PostgreSQL

    • MySQL

Flex2SQL Deployment Tool Automation

After the deployment tool is installed, you’ll be able to automate a deployment of the Flex2SQL driver. The deployment tool provides both a 32-bit and a 64-bit executable. You should use the 32-bit executable if you plan on deploying a 32-bit version of the Flex2SQL driver. The 64-bit executable can only be used to deploy a 64-bit version of Flex2SQL Unicode Edition.

As part of a deployment, the tool will copy the driver DLL and dependent DLLs will be copied into the target folder. Dependent DLLs will be placed into a subfolder. If you’re deploying Flex2SQL for Oracle a version of the Oracle Instant Client will be copied into a subfolder as well. This Oracle client will be used by the driver rather than any other Oracle client installed on the system. If you are using a Service name to connect to oracle rather than a SID, you’ll need to make sure a tnsnames.ora file is placed into this subfolder (f2s_or subfolder).

The deployment tool has a number of command line parameters that can be passed to fully automate the deployment process:

  • -edition [classic|unicode]:

    Determines which edition of Flex2SQL is installed. Note that Classic Edition is only available in 32-bit.

  • -license [path]:

    The full path to a license file to deploy. Note that this license file will be copied to the target directory.

  • INSTALLFOLDER=”[path]”:

    The full path to a location to deploy Flex2SQL. We advise using the Programs Folder of a standard Dataflex application structure although other application deployment structures are supported (such as all in one folder).

To make automated deployments less error prone, you can use the TUI (Text UI) for the deployment tool to setup the edition, license path, and target path. The UI has an option to display the automated command line needed with the same options. This can be used while building your application installer to make deployment configuration easier.

Repairing Broken Installs

We often receive support requests indicating that the wrong license is being loaded or that the wrong version of the driver is being loaded. Often this is caused by copies of the license or DLL being in unexpected locations that are earlier in the search path than the intended location. With Flex2SQL v17 and the Flex2SQL Deployment Tools we have a solution that will fix these scenarios and many others.

If you come across a broken deployment that is using v17, you can run the deployment tool and re-deploy to the same folder as the application executable and whatever other files are sitting in unexpected places will be ignored. No longer will you need to go through the process of hunting down errant files.

Additionally, we find many developers have a difficult time deploying the Oracle Instant Client. This is especially the case on workstations that already have some other application using Oracle. The Flex2SQL Deployment Tool for Oracle will install an isolated version of the Oracle Instant Client into a subdirectory in your programs folder that works independent of any system-wide Oracle clients that are referenced in your path or via environment variables.