Provides the capability to unload an UltraLiteJ database—either the data, the schema, or both—to an XML file.
SyntaxULjUnload -c filename -p password [ options ] outputfile
| Options | Description |
|---|---|
| -b max-blob-size | Maximum size (in bytes) of blob/char data output to XML. |
| -c filename | Required. Name of database file to unload. |
| -d | Unload only data; do not output schema information. |
| -e table, ... | Exclude data for tables named in list. |
| -f directory | Directory to store data for columns larger than max blob size specified with -b option. |
| -n | Unload schema information only; do not output data. |
| -p password | Password to connect to database. The default is dba. |
| -q | Run in quiet mode—do not display messages. |
| -t table, ... | Only output data for tables named in list. |
| -v | Display verbose messages. |
| -y | Overwrite output file if it already exists. |
| -? | Display option usage/help information. |
| outputfile | Output file name (this file contains xml statements that describe the database contents). |
Example for unloading blobfile typesApply the following sample SQL statement to your database to unload a blobfile type:
CREATE TABLE blobfile_example
file_name CHAR(size) DEFAULT AUTOFILENAME( prefix, extension ),
file_contents LONG BINARY STORE AS FILE( file_name ) [ CASCADE DELETE ] |
When applying this example and using this utility, ULjUnload exports the file_name column as a regular CHAR but with an additional attribute, default_autofilename, which stores the prefix and extension strings in the form 'prefix', 'extension'. The file_contents column is exported as a LONG BINARY but with an additional attribute, filename_col, which stores the name of the referenced file_name column. In the row containing the blobfile columns, the content of the file_name column is unchanged. The file_contents column behaves like an externally-stored blob column and has the following form:
file_contents.File="tablename-columname-rownumber.bin" |
The contents of the file_contents column are saved as bin files to the location specified by the -f option.
For more information about loading a blobfile type from the created XML file, see UltraLiteJ Database Load utility (ULjLoad).
Example XML file contents<?xml version="1.0" encoding="utf-8" standalone="no"?>
<ul:ulschema xmlns:ul="urn:ultralite">
<collation name="1252LATIN1" case_sensitive="no"/>
<options>
<option name="dateformat" value="YYYY-MM-DD"/>
<option name="dateorder" value="YMD"/>
<option name="nearestcentury" value="50"/>
<option name="precision" value="30"/>
<option name="scale" value="6"/>
<option name="timeformat" value="HH:NN:SS.SSS"/>
<option name="timestampformat" value="YYYY-MM-DD HH:NN:SS.SSS"/>
<option name="timestampincrement" value="1"/>
</options>
<tables>
<table name="ULCustomer" sync="changes">
<columns>
<column name="cust_id" type="integer" null="no"/>
<column name="cust_name" type="char(30)" null="yes"/>
</columns>
<primarykey>
<primarycolumn name="cust_id" direction="asc"/>
</primarykey>
<indexes/>
</table>
</tables>
<uldata>
<table name="ULCustomer">
<row cust_id="2000" cust_name="Apple St. Builders"/>
<row cust_id="2001" cust_name="Art's Renovations"/>
<row cust_id="2002" cust_name="Awnings R Us"/>
<row cust_id="2003" cust_name="Al's Interior Design"/>
<row cust_id="2004" cust_name="Alpha Hardware"/>
<row cust_id="2005" cust_name="Ace Properties"/>
<row cust_id="2006" cust_name="A1 Contracting"/>
<row cust_id="2007" cust_name="Archibald Inc."/>
<row cust_id="2008" cust_name="Acme Construction"/>
<row cust_id="2009" cust_name="ABCXYZ Inc."/>
<row cust_id="2010" cust_name="Buy It Co."/>
<row cust_id="2011" cust_name="Bill's Cages"/>
<row cust_id="2012" cust_name="Build-It Co."/>
<row cust_id="2013" cust_name="Bass Interiors"/>
<row cust_id="2014" cust_name="Burger Franchise"/>
<row cust_id="2015" cust_name="Big City Builders"/>
<row cust_id="2016" cust_name="Bob's Renovations"/>
<row cust_id="2017" cust_name="Basements R Us"/>
<row cust_id="2018" cust_name="BB Interior Design"/>
<row cust_id="2019" cust_name="Bond Hardware"/>
<row cust_id="2020" cust_name="Cat Properties"/>
<row cust_id="2021" cust_name="C & C Contracting"/>
<row cust_id="2022" cust_name="Classy Inc."/>
<row cust_id="2023" cust_name="Cooper Construction"/>
<row cust_id="2024" cust_name="City Schools"/>
<row cust_id="2025" cust_name="Can Do It Co."/>
<row cust_id="2026" cust_name="City Corrections"/>
<row cust_id="2027" cust_name="City Sports Arenas"/>
<row cust_id="2028" cust_name="Cantaloupe Interiors"/>
<row cust_id="2029" cust_name="Chicken Franchise"/>
</table>
</uldata>
</ul:ulschema> |
![]() |
Discuss this page in DocCommentXchange.
|
Copyright © 2010, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.0 |
