sqlf write-data-dtd-to-file

Creates a Document Type Definition (DTD) file that specifies the layout of an XML data file created using sqlf write-data-to-xml.

Syntax


To create a DTD file, use the syntax:

sqlf write-data-dtd-to-file -file=<path>
     [-bind-address=<address>]
     [-client-bind-address=<address>]
     [-client-port=<port>]
     [-driver-class=<class name>]
     [-extra-conn-props=<properties>] 
     [-help] [-locators=<adresses>]
     [-mcast-address=<address>]
     [-mcast-port=<port>]
     [-password[=<password>]]
     [-url=<url>]
     [-user=<username>]
     [-verbose=<level>]

This table describes options for the sqlf write-data-dtd-to-file command. Default values are used if you do not specify an option.

Option Description
-file

The full path of the file in which to write the DTD of the data XML. This argument is required.

-bind-address The address to which this peer binds for receiving peer-to-peer messages. By default sqlf uses the hostname, or localhost if the hostname points to a local loopback address.
-client-bind-address

The hostname or IP address on which a SQLFire locator listens for client connections. The default is "localhost."

Use this option with -client-port to attach to a SQLFire cluster as a thin client and perform the command.

-client-port

The port on which a SQLFire locator listens for client connections. The default is 1527.

Use this option with -client-bind-address to attach to a SQLFire cluster as a thin client and perform the command.

-driver-class

The JDBC driver class to use for connecting to a datasource. Use this option with -url to connect to a JDBC datasource.

-extra-conn-props

A semicolon-separated list of properties to use when connecting to the datasource.

-help, --help

Display the help message for this sqlf command.

-locators

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 sqlf command.

-mcast-address

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 239.192.81.1.

Use this option with -mcast-port to attach to a SQLFire cluster as a peer client and perform the command.

-mcast-port

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 SQLFire cluster as a peer client and perform the command.

-password

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, sqlf prompts you to enter a password from the console.

-url

The JDBC URL to use for connecting to a datasource. Use this option with -driver-class to connect to a JDBC datasource.

-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.
-verbose

Sets the DdlUtils verbosity level to one of FATAL, ERROR, WARN, INFO, or DEBUG, in increasing order of logging. The default level is INFO.

Description

Specify one of these pairs of options to connect to a data source with this command:
  • Use both -client-bind-address and -client-port to connect to a SQLFire cluster as a thin client and perform the command.
  • Use both mcast-port and -mcast-address, or use the -locators property to connect to a SQLFire cluster as a peer client and perform the command.
  • Use both -url and -driver-class to connect to a datasource using a JDBC URL and driver. You can use this option to connect to a data source other than SQLFire.

Examples

This command connects to a SQLFire network server running on localhost:1527, and writes the DTD to a file named data.dtd:
sqlf write-data-dtd-to-file -file=data.dtd
This command connects to a SQLFire network server running on myserver:1234, and writes the DTD to a file named data.dtd:
sqlf write-data-dtd-to-file -file=data.dtd -client-bind-address=myserver -client-port=1234
This command connects as a peer client to a SQLFire system running on multicast port 1234, and writes the DTD to a file named data.dtd:
sqlf write-data-dtd-to-file -file=data.dtd -mcast-port=1234
		  -extra-conn-props=host-data=false
		
This command uses MySQL Connector/J to connect to a MySQL server running on the "myserver" host, and writes the DTD for the “test�? database schema to a file name test.dtd:
sqlf write-data-dtd-to-file -file=test.dtd
		  -url=jdbc:mysql://myserver/test -driver-class=com.mysql.jdbc.Driver