Import into a different tablespace

From: Marian Collins-Steding <collins_at_pt5000.pto.ford.com>
Date: Fri, 2 Dec 1994 07:30:50 +1000
Message-ID: <collins.2.001EA3FA_at_pt5000.pto.ford.com>


>I ahve an import file that was created from a series of tables stored in
>an archive tablespace. I can't use the archive tablespace anymore (data
>files trashed; tablespace won't drop) and am trying to get the data from
>teh import file into another tablespace.
 

>The first table gets created in
>the user's default tablespace, but all subsequent tables (the dmp file contains
>data from 6 tables) do not get created because the import utility is trying
>to create them in the original tablespace which is now invalid.
 

>Any tips?
 

>Glenn

This will be a two step process. The first step is to use imp to create an ascii file that has the create statements in it. Then you can edit the file and change the tablespace name. Use that file to create empty tables with the indexes. Step 2 then would be to import the data.

step1: imp scott/tiger file=expdat.dmp indexfile=ascii.file

	(The create statements will be in ascii.file.  Edit ascii.file changing the 
	tablespace name to whatever you want.  You will have to edit out rem 
	statements and some other garbage but its pretty obvious.  Use this file to 
	recreate the tables and indexes under the appropriate user's account. 	
	
Step 2: Import the data into the new tables:  
	imp scott/tiger file=expdat.dmp	fromuser=1stuser touser=2nduser							
Received on Thu Dec 01 1994 - 22:30:50 CET

Original text of this message