1.0

Table Of Contents
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
Note: See also Export, Alter, and Import a Database Schema Using SQLF on page 90 for a full example
of migrating a third-party database to vFabric SQLFire.
This command connects to a SQLFire network server running on localhost:1527, and inserts the data from
data.xml:
sqlf write-data-to-db -files=data.xml -schema-files=db-schema.xml
This command connects to a SQLFire network server running on myserver:1234, and inserts data from the
data1.xml and data2.xml les:
sqlf write-data-to-db -files=data1.xml,data2.xml -schema-files=db-schema.xml
-client-bind-address=myserver -client-port=1234
This command connects as a peer client to a SQLFire system running on multicast port 1234, and inserts the
data from data.xml:
sqlf write-data-to-db -files=data.xml -schema-files=db-schema.xml
-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
inserts data from data.xml into the test database:
sqlf write-data-to-db -files=data.xml -schema-files=db-schema.xml
-url=jdbc:mysql://myserver/test -driver-class=com.mysql.jdbc.Driver
sqlf write-data-to-xml
Writes the data of all of the tables in a database to an XML le. (You can use the sqlf write-data-dtd-to-le
command to create a Document Type Denition (DTD) le that describes the layout of data in the XML le.)
The resulting XML le can be used to re-load the data into the tables, either in SQLFire or in another database
management system. This command is generally used with a SQLFire cluster to export table data, but it can also
be used with other JDBC datasources.
page 508
Description on page 508
Examples on page 396
Syntax
To write all table data from a database to an XML le, use the syntax:
sqlf write-data-to-xml -file=<path>
[-bind-address=<address>]
[-catalog-pattern=<pattern>]
[-client-bind-address=<address>]
[-client-port=<port>]
vFabric SQLFire User's Guide380
vFabric SQLFire Reference