On Wed, 9 Jun 1999 gerowati@sg.ibm.com wrote:
> Dear Sir,
> Hi, I am very new to Oracle and is very in need for guidences.

Welcome to the fun world of Oracle. I hope you have a successful career.

> I need to archive my inactive data in the database to tape in order to
> maintenance the performance.  I intend to use the Export/Import utilities
> to perform this function.  Is it possible?  Here are my few questions + any
> help will be appreciatable:
> 1) It seems that the export function can only export the whole table.  What
> can I do if I only want to export selected data?

You are correct - Oracle can only export the whole table. The other option
is to generate a tab-delimited file (see my tips at
www.arikaplan.com/oracle.html). You can specify a
WHERE clause in your SQL. The only difference is that you use SQL*Loader
to load the data instead of the import utility. It does not save index
definitions, grants, etc.

Another option is to physically create another table with the WHERE

CREATE TABLE emp_archive AS SELECT * FROM emp WHERE create_date <

Then you can export the EMP_ARCHIVE table and drop it from the database.

> 2) Do I need to write SQL program to create a archive database and copy the
> selected data to it before I do the export?  If yes, what is the best way
> to do this?

You can export straight from your database to the export file. There is no
need to archive the data first (unless you want to try the method above).

> 3) If I want to restore the data, can I directly import the data from the
> tape.  Will there any constraint?
Kesavan Sundararaj (iu122@btc.com.bh) writes:
I tried to export a table to floppy and tried to import that into another

Yes it is possible, you can import data from the floppy.  So, from tape
also it should be possible.   But when you have to specify the device and
file name from where you want to import.


> Thanks in advance.
> Regards
> Minzinda
Best regards,

-Ari Kaplan
Independent Oracle DBA Consultant

<-> For 300+ Oracle tips, visit my Web Page:                      <->
<->                                                               <->
<->             www.arikaplan.com                                 <->
<->                                                               <->
<->             email: akaplan@interaccess.com                    <->

Back to Ari Kaplan's Home Page ight="18"> Back to Ari Kaplan's Home Page