| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| hpl.sql | 2020-05-11 | 3.3 kB | |
| myonpload.ec | 2020-05-11 | 12.5 kB | |
| myonpload.README | 2020-05-11 | 4.8 kB | |
| Totals: 3 Items | 20.6 kB | 0 | |
Attached is the zip file that contains the script to run onpload without
GUI interface. This tool gives onpload a command line interface with no
need to create jobs. A table can be downloaded or uploaded on demand
without the need to do any setup.
Disclaimer
----------
This tool has been developed based on scripts taken
from IIUG. Informix does not officially support this tool. You are running it
at your own risk.
Tool tested against
-------------------
Server: 9.21UC1
9.21UC4
7.30UC8
7.31
Pre-requisite
-------------
1. ESQL compiler ver 7.0 and above.
2. Onpload database.
Informix High Performance Loader uses its own database
called onpload. Check the existence of this database. If it is
not already there, then it must be created prior to using this tool.
First time setup
----------------
Assuming all the pre-requisites have been satisfied,
1. Run attached script file hpl.sql on the onpload database. This
script file contains stored procedure, which drives this tool.
2. Compile myonpload.ec
esql -o myonpload myonpload.ec
How to run this tool
--------------------
myonpload -d database -t table -f textfile|-p pipe_command -U|-L [-w] [-l]
-w where clause for selective unload of the table
if -l is not specified, then log dir will be set
to the current directory.
-U to Unload
[-U D ] for Dirty Read Unload
[-U C ] for Committed Read Unload
[-U S ] for Cusor Stability Read Unload
-L to Load
[-L D ] for Delux Mode Load
[-L X ] for Express Mode Load
Version Info
------------
Version 2.1 : Date 12-Mar-2003
In version 2.1, table can be downloaded or uploaded
thru pipes. This will help in circumventing 2GB file limit.
Thanks to Isidre PONS ROCA <ipons@dtgna.altanet.org> for helping
me on this.
Version 2.0 : Date 20-Feb-2003
In version 2.0, condition to unload the table can be
mentioned. The where clause can be mentioned as -w
within double quotes.
Parameters
----------
-d database
The name of the database against which the tool is to run.
-t table
The name of the table against which the tool is to run.
-f textfile
textfile is the full path of the pipe-delimited file that contains
the data to be loaded, or where the data will be downloaded.
For e.g., /opt/data/account.unl
-p pipe_command
Can be used instead of -f option. Both -f and -p can not be used.
Using this option, table can be download using pipes to some
external processes. For e.g, the following downloads and compress
simulataneously.
-t table1 -p "gzip -9 > table1.unl.gz" -U C
Note the double quotes around -p option.
To load to a table using PIPES
-t table1 -p "gzip -cd table1.unl.gz" -L X
-w where clause
This option can be used to selectively download rows from a table.
For e.g: -w "create_date <= '12/31/1999'"
The above will download only records that have create_date <= 12/31/1999.
The where clause can be upto 8KB long and can contain any valid SQL
statement.
Note: The keyword WHERE should not be mentioned in -w parameter.It
is added automatically.
-l log_dir
log dir is name of the directory where High Performance loader
will store rejected file and log files. This is a directory and not
a file. This directory should have enough space to hold large number
of rejected rows.
The rejected file will have the same name as the name of the table
with the extension .err and log file will have the same name as that
of the table with the extension .log.
For e.g., if data is being loaded to table account and the log
directory is /opt/rejected, then the 2 files that will be created
is: -
/opt/rejected/account.err
/opt/rejected/account.log
If this parameter is not specified then the current working directory
will be taken as the log directory.
-U to unload
[-U D ] for Dirty Read Unload
[-U C ] for Committed Read Unload
[-U S ] for Cusor Stability Read Unload
-L to load
[-L D ] for Delux Mode Load
[-L X ] for Express Mode Load
In case the table contains TEXT or BLOB fields, then the
load will automatically convert itself to Delux mode load.
Same will happen if the row size is greater than the
page size of the system. This is due to the restriction of
onpload.
Limitations of this tool
-----------------------
1. This tool supports only local database. This tool can not
be used to load/unload from remote database.
2. Conversion is not supported. Only no conversion.
Bugs and Suggestions to: srkrishna@yahoo.com
Date: 12-Mar-2003