Dont Panic!

TimeHole.com

Oracle utilities

PreviousPage NextPage

Updated: 01 Sep 09

Main

What I do

Background

Customers

Contact Me

About Software

Personal

Some pages on Software
Databases & Linux

Operating Systems

Security

Databases

Database software

Some Oracle utils

Nice software


Some Old pages

SQL guide

PL/SQL guide

Jersey and Open Source

Linux File server

Linux Firewalls

Thin clients

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, the Oracle Export/Import function or a number of other programs instead, but 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, 8 and 9 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.
Moving data the other way is not possible because the script is dependent on the Oracle Data dictionary, the data in it, sqlplus and Oracle SQL functions.
To use it: Start SQLPlus, Log in on the database and run the script with:
@@Unload_ldi "your_table_name"
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 "tbl2"
@@Unload_ldi "tbl3" etc.
Run this script to dump all your reference information. And then load it with a script containing
@@LDI_tbl1.sql
@@LDI_tbl2.sql
@@LDI_tbl3.sql etc.

>> Page 4

Copyright(@)2003 www.Timehole.com.
You may use and redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or later.

I work with databases

images/ora_logo.gif
images/postgresql.jpg


And OpenSource Sw

images/phpclasses.gif


I use fedora linux

For non-techies try:

Ubuntu or PcLinuxOs


Share information and knowledge!

images/180px-Green_and_white_machine.jpg

I'm based in Jersey, Available for assignments in all of Europe, On-Site or Remote. Call or mail me!

Jersey Information

Page: th_orautl Date:Sun Sep 5 9:24:29 EDT 2010

Copyright©2003-2009 Timehole.com All Rights Reserved.

Updated: Tue, 01 Sep 2009 06:11:55 -0400 Load time:0.02s