Oracle® Database Lite Tools and Utilities Guide
10g (10.0.0) Part No. B12263-01 |
|
![]() Previous |
![]() Next |
This document describes the Oracle Database Lite Load utility. Topics include:
The Oracle Database Lite Load Utility is a command line tool which enables you to load data a from an external file into a table in Oracle Database Lite or to unload (dump) data from a table in Oracle Database Lite to an external file. Unlike SQL*Loader, OLLOAD does not use a control file in which you supply all data parameters and format information on the Command line.
When loading data, OLLOAD takes an input file that contains one record per line with a separator character between fields. The default field separator is a comma (,). These records can also include fields with values that are quoted strings. The default value is single quote ('). For more information on data parsing, see Section 4.3.1.1, "Comments".
Loading a Datafile
To load a datafile, use the following syntax.
olload [options] -load dbpath tbl [col1 col2 ...] [<datafile]
Unloading (dump) to an Outfile
olload [options] -dump dbpath tbl [col1 col2 ...] [>outfile]
This section describes keywords and parameters that are available for the OLLOAD utility.
[options]
For a list of Options, see Section 4.3.1, "Options".
-load
To use the load utility.
-dump
To use the unload (dump) utility.
dbpath
The path to the Oracle Database Lite (.odb
) file.
tbl
The table name. OLLOAD first attempts to find a table name in the user-specified case. If this fails, it searches for the upper-case of the user-specified name.
Note: The default user is "SYSTEM". To specify an OLLOAD operation for another user name's tables, prefix thetbl parameter with the user name and a dot (.).
|
col1 col2
The column names. OLLOAD first attempts to find a column name in the user-specified case. If this fails, it searches for the upper-case of the user-specified name.
[datafile] [outfile]
The source or destination file for the load or unload operations. If you do not specify a datafile or outfile, OLLOAD displays the output on the screen.
This section describes keyword and parameter options that are available for the OLLOAD utility.
-sep character
The field separator. If you do not specify this option, OLLOAD assumes that the separator character is a comma (,).
-quote character
The quote character. If you do not specify this option, OLLOAD assumes that the quote character is a single quote (').
-file filename
Use this option when loading and unloading data to specify the source or destination file name. When loading data, filename specifies the source file to load into Oracle Database Lite. When unloading (dumping) data, it is the destination file for the unloaded data.
Note: To unload data from Oracle Database Lite and load (or pipe) it to another Oracle Database Lite, do not specify a file name for this option. For a description of sample syntax, see Section 4.3.1.1, "Examples". |
-log logfile
Specify this option if you want to produce a log file listing rows that OLLOAD could not insert during load. If you do not specify a log file, loading stops at the first error.
-passwd passwd
The connection password for an encrypted database. You need to supply this password so that loading and unloading can occur.
-nosingle
Specify this option when you do not want to use single user mode. This degrades performance but allows other connections to the database.
-readonly
Specify this option when unloading data from a read-only Oracle Database Lite, for example, one located on a CD-ROM.
-commit count
Use this option if you want OLLOAD to commit after processing a specified number of rows. The default is 10000. OLLOAD prints an asterisk (*) to the screen each time it commits the specified number of rows. To disable the commit operation specify 0.
-mark count
Use this option if you want OLLOAD to print a dot on the screen after processing the specified number of records. The default is 1000. To disable this feature specify 0.
Data Parsing
Table 4-1 lists examples for OLLOAD data parsing.
Table 4-1 Data Parsing Examples
Input | Data | Explanation |
---|---|---|
'Redwood Shores, CA' | Redwood Shores CA | Enclosing the input string in quotes preserves spaces and punctuations within a string. |
'O"Brien' | O'Brien | Represent a single quote with its escape sequence, two single quotes. |
fire fly | firefly | Spaces in data that is not quoted is ignored. |
, | NULL,NULL | Empty fields are NULL. |
1,,3 | 1,NULL,3,NULL | Empty fields are NULL. |
|
[no row inserted] | Completely empty lines are ignored. |
If there are more values than database columns, extra values are ignored. Any missing values at the end of the line are set to NULL.
OLLOAD Utility Restrictions
OLLOAD does not support tab-delimited input files and LONG datatypes.
Examples
olload -quote \" -file p_kakaku.csv -load c:\orant\oldb40\polite.odb skkm01
olload -dump c:\orant\oldb40\polite.odb emp empno ename | olload -load myfile.odb myemp