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. See Configuration files. |
-a OR --append |
Add data and schema definitions into an existing database. |
-c "keyword=value;..." OR --connect "keyword=value;..." |
Supply the database connection parameters. |
-d OR --dataonly |
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 OR --fips= value |
Specify on or off, 1 or 0, and so on. This option controls AES FIPS-certified encryption, by using a Certicom certified cryptographic algorithm. See UltraLite database security and UltraLite fips creation parameter. |
-E behavior OR --onerror=behavior |
Control what happens if an error is encountered while reading data from the XML file. Specify one of the following supported behavior values:
|
-f directory OR --filedir=directory |
Set the directory that contains files with additional data to load. See UltraLite Database Unload utility (ulunload). |
-g ID OR --databaseid=ID |
Set the initial 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. See UltraLite global_database_id option. |
-i OR --insertforsync |
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 identity. See identity. |
--identity-password = password | Specify the password for the client TLS identity. See identity_password. |
-l filename OR --log=filename |
Log operations to the specified file. |
-n OR --schemaonly |
Load schema metadata only, ignoring any data in the XML input file. |
-o value OR --obfuscate=value |
On or off, 1 or 0, and so on. Controls whether data in the database is obfuscated. Obfuscation is a form of simple encryption. See UltraLite database security and UltraLite obfuscate creation parameter. |
-p page-size OR --page_size=page-size |
Defines the database page size. See UltraLite page_size creation parameter. |
-q OR --quiet |
Set the utility to run in quiet mode. Suppress informational banners, version numbers, and status messages. Error messages are still displayed, however. |
-s file OR --sql=file |
Log the SQL statements used to load the database into the specified file. |
-t file OR --rootcert=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 format, 8-bit multibyte encoding for Unicode. See UltraLite character sets and UltraLite utf8_encoding creation parameter. |
-v OR --verbose |
Print verbose messages. |
-y OR --overwrite |
Overwrite the database file without confirmation. This only applies when you use ulload to create a new database. |
-? OR --help |
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 |
Discuss this page in DocCommentXchange.
|
Copyright © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1 |