Free Script and utilities
Table API generator
Old SQL guide
Old PL/SQL guide
A Jersey Linux User Group?
|<1em margin-right:1em="" class="div">|
Data Unload function.
This script is most useful when you are developing a system and want to move test or reference data from your development system to another system, user or schema. You can of course use Database links, Export/Import functions or a number of other programs instead. This is a simple script that can be run for one table or in batch for a number of tables. It creates a sqlplus command file that you can transfer, edit or include in your system in several ways. The script just dumps data from a table into a file with simple insert statements. This means that the data is easy to move between Oracle versions and also into other databases that understands basic SQL-insert-statements. The Script works with version 7-11 of Oracle Rdbms (I do not remember if I tested it with earlier versions). It is limited to handle tables with the most common data types, char/varchar and numeric fields. It does not work with long data, raw long, or lobs, sorry.1em>
To use it: Start SQLPlus, Log in on the database and run the script with:
This will give you a file with insert statements for all data from the table (or view).
The script takes one argument, the table or view name to be dumped and creates a temporary file $t_xxxx.sql that can be deleted.
It then runs this file to create the "load" file named LDI_tablename.sql, where tablename is replaced with the name of the table you are dumping.
You can write a script to dump a number of table by creating a script with @@Unload_ldi "tbl1"
@@Unload_ldi "tbl3" etc.
Run this script to dump all your reference information. And then load it with a script containing
Code is released under the terms of the GNU General Public License as published by the Free Software Foundation.