FDExecutor

From RAD Studio
Jump to: navigation, search

Go Up to Utilities (FireDAC)


This topic describes the FireDAC SQL Script execution utility.

General

FireDAC Executor is a major SQL script console execution tool, supporting many SQL scripting dialects. FDExecutor supports:

  • Standard SQL commands, such as INSERT or SELECT.
  • Stored procedure language commands, such as CREATE PROCEDURE.
  • Script execution control commands, such as SPOOL, SET ECHO, and so on, coming from Oracle SQL*Plus, Microsoft ISQL, and other script execution utilities, supplied by DBMS vendors.

FireDAC itself uses FDExecutor to build demo databases. You can use FDExecutor as a ready-to-use tool to deploy database objects.

CreateOracleFD.png

Command-Line Parameters

Run the Executor utility with the -? argument. It outputs the following reference text:

 FireDAC Executor v 3.0.1 (Build 1337)
 (c) Embarcadero Technologies 2004-2013 
 http://www.embarcadero.com/products/rad-studio/firedac
 Use: FDExecutor [-d <name>] [-n <file name>] [-u <user>] [-w <pwd>] [-l] [-e]
              [-i] [-s] [-p <path>] [-t <path>] [{<scripts>}] [-a {<arguments>}]
 -d        - connection definition name
 -n        - connection definitions file name
 -u        - user name
 -w        - password
 -l        - login prompt
 -p        - path to SQL script files
 -t        - path to data files
 -e        - stop script execution only after a "drop non-existing object" error
 -i        - stop script execution after first error
 -s        - do not show messages during SQL script execution (silent)
 -a        - a list of script arguments
 -? or -h  - show help

Note: If the scripts are not specified, FDExecutor reads the standard input.

Examples:

  • Executes the s1.sql and s2.sql scripts from the directory x:\MyScripts by using the Oracle_Demo connection definition; does not stop on errors.
 FDExecutor -d Oracle_Demo -i -p x:\MyScripts s1.sql s2.sql
  • Executes the command captured from the standard input.
 echo drop table mytab | FDExecutor -d MySQL_Demo

See Also