Unloads any of the following, depending on the options used:
An entire UltraLite database to XML.
All or part of UltraLite data only to XML.
An UltraLite schema only to XML.
An UltraLite schema only as SQL statements.
ulunload -c "connection-string" [ options ] output-file
Set the maximum size of column data to be stored in the XML file. The default is 10 K. To store all data in the XML file (that is, to have no maximum size), use -b -1.
Required. Connect to the database as identified in the DBF or file_name parameter of your connection-string. If you do not specify both a user ID and a password, the default UID of DBA and PWD of sql are assumed.
Unload data only, ignoring any schema information in the database.
Do not use this option if you intend to reload the XML file into a new database using the ulload utility.
Exclude data in the named table. You can name multiple tables in a comma-separated list. For example:
Set the directory to store data larger than the maximum size specified by -b. The default is the same directory as the XML file.
Unload schema only, ignoring any data in the database.
Open the database in read-only mode. UltraLite makes a copy of the original file, which you can then use to test your scripts without altering the database. Changes to the copied file are discarded upon completion.
If you are connecting directly from the desktop to a database already deployed to a CE device, the parameter is not supported.
Run in quiet mode. Do not print messages.
Unload schema only as SQL Anywhere-compatible SQL statements; ignore any data in the database.
Unload data in the named table only. You can name multiple tables in a comma separated list. For example:
Print verbose messages.
Output tables so they are owned by a specific user ID. You can use this option with the -s option.
Overwrite output-file without confirmation.
Required. Set the name of the file that the database is unloaded into. If you use the -s option, database is unloaded as SQL statements. Otherwise, the database is unloaded as XML.
By default, ulunload outputs XML that describes the schema and data in the database. You can use the output for archival purposes, or to keep the UltraLite database portable across all releases.
Preservation Unloading a database does not preserve:
Synchronization state, stored synchronization counts, and row deletions. Ensure you synchronize the database before unloading it.
UltraLite user entries.
To confirm what database options or properties have been preserved, run ulinfo after you have reloaded your database with the ulload utility.
Column data overflows If column data exceeds the maximum size you specified with -b, the overflow is saved to a *.bin file in either the same directory as the XML file, or in the directory specified by -f. The file follows this naming convention:
Assigning table ownership The -x option allows you to assign ownership to UltraLite tables. You only need to assign an owner to a table if you intend to use the resulting SQL statements for creating or modifying a SQL Anywhere database. Do not use this option if you are using the resulting SQL to create or modify an UltraLite database.
Errors This utility returns error codes. Any value other than 0 means that the operation failed.
Unload the sample.udb database into the sample.xml file.
ulunload -c DBF=sample.udb sample.xml
Unload the data from the sample.udb database into the sample.xml file. Overwrite the database if it exists.
ulunload -c DBF=sample.udb -d -y sample.xml