-
With your .DMP file, create a SQL file containing the structure (Tables): (The default path of the index file is C:\Users\Administrator)
imp <xe_username>/<password>@XE file=<filename.dmp> indexfile=index.sql full=y
-
Open the indexfile (index.sql) in a text editor that can do find and replace over an entire file, and issue the following find and replace statements IN ORDER (ignore the single quotes.. '):
Find: 'REM<space>' Replace: <nothing>
Find: '"<source_tablespace>"' Replace: '"<Your_tablespace>"'
Find: '...' Replace: 'REM ...'
Find: 'CONNECT' Replace: 'REM CONNECT
-
Save the indexfile, then run it against your Oracle Express Edition account (I find it's best to create a new, blank XE user account - or drop and recreate if I'm refreshing): sqlplus <xe_username>/<password>@XE @index.sql
-
Finally run the same .DMP file you created the indexfile with against the same account to import the data, stored procedures, views etc:
imp <xe_username>/<password>@XE file=<filename.dmp> fromuser=<original_username> touser=<xe_username> ignore=y
How to import an oracle dump into a different tablespace
Original Blog: http://stackoverflow.com/questions/61963/howto-import-an-oracle-dump-in-an-different-tablespace