Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Import Assistance

Re: Import Assistance

From: Howard J. Rogers <howardjr2000_at_yahoo.com.au>
Date: Sun, 05 Oct 2003 07:27:46 +1000
Message-ID: <3f7f3c0d$0$28898$afc38c87@news.optusnet.com.au>


Ste wrote:

> Hi,
>
> Question about ways of import:
>
> When I have exp.dmp from one db and import it into another db with
> different index tablespace, can I use sed or awk to change the index
> tablesapce name in the exp.dmp file, then import the data and index with
> proper index
> tablespace at the same time? Have anyone done it before?
>
> TIA,
> Ste

You can't muck around with the export file. It's not a text file, and editing it will corrupt it.

If you wish to change the tablespace into which objects get imported, there are a number of workarounds that Oracle supports.

For indexes, for example, you can run import with rows=n and indexes=n (so nothing actually gets imported) but with indexfile=name_of_file.txt ...that will cause import to generate a text file containing a script which, if run, will create all your indexes for you, from scratch. And since the indexfile *is* a text file, you can edit that to your heart's content, including changing the tablespace names. Once edited, you invoke it as you would any other SQL script -in SQL*Plus, using the "@" command.

Regards
HJR Received on Sat Oct 04 2003 - 16:27:46 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US