|GemFire XD Reference / gfxd Launcher Commands|
Connects to a GemFire XD distributed system and executes the contents of a SQL command file. All commands in the specified file must be compatible with the interactive gfxd shell.
gfxd run -file=<path or URL> [-auth-provider=<name>] [-bind-address=<address>] [-client-bind-address=<address>] [-client-port=<port>] [-encoding=<charset>] [-extra-conn-props=<properties>] [-help] [-ignore-errors] [-J-D<property=value>] [-locators=<adresses>] [-mcast-address=<address>] [-mcast-port=<port>] [-password[=<password>]] [-path=<path>] [-user=<username>]
This table describes options for the gfxd run command. Default values are used if you do not specify an option.
The local path of a SQL command file to execute, or a URL that links to the SQL command file. All commands in the specified file must be compatible with the interactive gfxd shell.
This argument is required.
|-auth-provider||Sets the authentication provider to use for peer-to-peer connections as well as client-server connections. Valid values are BUILTIN and LDAP. All other members of the GemFire XD distributed system must use the same authentication provider and user definitions. If you omit this option, the connection uses no authentication mechanism. See Configuring Security.|
|-bind-address||The address to which this peer binds for receiving peer-to-peer messages. By default gfxd uses the hostname, or localhost if the hostname points to a local loopback address.|
The hostname or IP address on which a GemFire XD locator listens for client connections. The default is "localhost."
Use this option with -client-port to attach to a GemFire XD cluster as a thin client and perform the command.
The port on which a GemFire XD locator listens for client connections. The default is 1527.
Use this option with -client-bind-address to attach to a GemFire XD cluster as a thin client and perform the command.
|-encoding||The character set encoding of the SQL script file (-file argument). The default is UTF-8. Other possible values are: US-ASCII, ISO-8859-1, UTF-8, UTF-16BE, UTF-16LE, UTF-16. See the java.nio.charset.Charset reference for more information.|
A semicolon-separated list of properties to use when connecting to the GemFire XD distributed system.
Display the help message for this gfxd command.
|-ignore-errors||Include this option to ignore any errors that may occur while executing statements in the file, and continue executing the remaining statements. If you omit this option, then gfxd immediately terminates the script's execution if an exception occurs.|
|-J-D<property=value>||Sets Java system property to the specified value.|
The list of locators as comma-separated host[port] values, used to discover other members of the distributed system.
Using -locators creates a peer client member to execute the gfxd command.
The multicast address used to discover other members of the distributed system. This value is used only when the -locators option is not specified. The default multicast address is 184.108.40.206.
Use this option with -mcast-port to attach to a GemFire XD cluster as a peer client and perform the command.
The multicast port used to communicate with other members of the distributed system. If zero, multicast is not used for member discovery (specify -locators instead). This value is used only if the -locators option is not specified.
Valid values are in the range 0–65535, with a default value of 10334.
Use this option with -mcast-address to attach to a GemFire XD cluster as a peer client and perform the command.
If the servers or locators have been configured to use authentication, this option specifies the password for the user (specified with the -user option) to use for booting the server and joining the distributed system.
The password value is optional. If you omit the password, gfxd prompts you to enter a password from the console.
|-path||Configures the working directory for any other SQL command files executed from within the script. The -path entry is prepended to any SQL script file name executed that the script executes in a run command.|
|-user||If the servers or locators have been configured to use authentication, this option specifies the user name to use for booting the server and joining the distributed system.|
The -file argument specifies the location of the SQL script file to execute. If the script file itself calls other script files using run 'filename', also consider using the -path option to specify the location of the embedded script files. If an exception occurs while executing the script, GFXD immediately stops executing script commands, unless you include the -ignore-errors option.
gfxd run -file=c:\gemfirexd\quickstart\ToursDB_schema.sql -client-bind-address=myserver -client-port=1234
gfxd run -file=c:\gemfirexd\quickstart\loadTables.sql -path=c:\gemfirexd\quickstart -client-bind-address=myserver -client-port=1234