Re: Unload-/loading data

From: Harald Becker <harry_at_merlin.unterland.de>
Date: 1995/10/03
Message-ID: <DFwAyA.2sA_at_merlin.unterland.de>#1/1


Hi,

In article <44og4d$6u8_at_sdaw04.seinf.abb.se>, Pär Carlsson <pcarl_at_plants.seisy.abb.se> wrote:
>Can anyone tell me an easy way to unload the data (only the data) from a
>table to a file. This file is later to be used by SQLloader to load the
>table (or another instance of the table) again.

Pär, you did not say what kind of tools you have. I only could tell you my solution. I wrote a small program which scans the system-tables (especially ALL_TAB_COLUMNS) to extract the columns of a table and creates two files: one C-program-source with embedded SQL-statements to export the data to a pure ascii-file and a control-file for SQL-Loader which imports this ascii-file. The only problem with this solution ist: you need a C-Compiler and the ORACLE-SQL-Precompiler (Pro*C).

I tried this with a table containing over seven million rows and it worked.

If you are interested in this small generator(a very good example of quick and dirty programming) please e-mail.

Greetings

Harry

-- 
----------------------------------------------------------------------
  Harald (Harry) Becker                   harry_at_merlin.unterland.de   
     74080 Heilbronn                                                  
        Want to turn your Pentium-PC into a gameboy?   type WIN       
Received on Tue Oct 03 1995 - 00:00:00 CET

Original text of this message