Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 17 » UltraLite - Database Management and Developer Guide » UltraLite database reference » UltraLite utilities

UltraLite Load XML to Database utility (ulload)

Loads data from an XML file into a new or existing database.

ulload  -c "connection-string" [ options ] xml-file
Option Description
@ data Use this to read in options from the specified environment variable or configuration file. If both exist with the same name, the environment variable is used.




Add data and schema definitions into an existing database.

-c "connection-string"



Supply the database connection parameters.




Load data only, ignoring any schema metadata in the XML file input.

-d or --dataonly switches can only be used when -a is specified (because it is loading data only, the UDB it is loading the data into must exist with a schema that supports the data being loaded into it).

-e value


--fips= value

Specify on or off, 1 or 0, and so on. This option controls the use of FIPS-certified AES encryption.

-E behavior



Control what happens if an error is encountered while reading data from the XML file. Specify one of the following supported behavior values:

  • continue

    ulload ignores the error and continues to load XML.

  • prompt

    ulload prompts you to continue.

  • quit

    ulload stops loading the XML and terminates with an error. This behavior is the default behavior if none is specified.

  • exit

    ulload exits.

-f directory



Set the directory that contains files with additional data to load.

-g ID



Set the initial global database ID to the INTEGER value you assign. This initial value is used with a partition size for new rows that have global autoincrement columns. When deploying an application, you must assign a different range of identification numbers to each database for synchronization with the MobiLink server.




Include inserted rows in the next upload synchronization. By default, rows inserted by this utility are not uploaded during synchronization.
--identity-file = file Specify the file containing the client TLS, PEM, or PKCS12 identity.
--identity-password = password Specify the password for the client TLS identity.

-l filename



Log operations to the specified file.




Load schema metadata only, ignoring any data in the XML input file.

-o value



On or off, 1 or 0, and so on. Controls whether data in the database is obfuscated. Obfuscation is not secure against skilled and determined attempts to gain access to the data.

-p page-size



Defines the database page size.




Set the utility to run in quiet mode. Suppress informational banners, version numbers, and status messages. Error messages are still displayed, however.

-s file



Log the SQL statements used to load the database into the specified file.

-t file



Specify the file containing the trusted root certificate. This certificate is required for server authentication.
--utf8_encoding=value On or off, 1 or 0, and so on. Encodes data using the UTF-8 character set format, 8-bit multibyte encoding for Unicode.




Print verbose messages.




Overwrite the database file without confirmation. This only applies when you use ulload to create a new database.




Display the utility usage and exit.

The ulload utility takes an input XML file generated by ulunload, ulunloadold (provided with SQL Anywhere 10), or ulxml (in UltraLite versions 8 and 9). When used along with ulunload this utility provides you with the ability to rebuild a database. An alternative method to rebuild a database is using ulunload to generate SQL statements and then use DBISQL to read them into a new database.

The XML file can contain metadata for the schema and/or metadata for the database data. -d ignores the schema metadata, only adding data to the .udb file. -n ignores the data and the metadata, only adding the schema to the .udb file.

Setting an option or specifying a certificate on the command line overrides any settings in the xml-file that is processed by ulload.

The ulload utility restores any synchronization profiles to the database when reading the XML.

This utility returns error codes. Any value other than 0 means that the operation failed.


Create a new UltraLite database file, sample.udb, and load it with data in sample.xml:

ulload -c DBF=sample.udb sample.xml

Load the data from sample.xml into the existing database sample.udb, and if an error occurs, prompt for action:

ulload -d -c DBF=sample.udb --onerror=prompt sample.xml

Create the schema and data stored in test_data.xml in the sample.udb database. Since the -a switch is specified, sample.udb must exist prior to running this command. Moreover, any schema or data that conflicts with what is already in sample.udb will mean the ULLOAD command will fail.

ulload -c DBF=sample.udb -a test_data.xml