Ransford Okpoti's Blog

19 March, 2015

Import An Oracle Dump File

Filed under: Database — Tags: — ranskills @ 7:40 pm

These are the steps I normally follow when restoring Oracle dump files for the purposes of my work.

I prefer to logically keep the restored entities logically and physically separate through the use of tablespace and associated datafile(s) respectively.

CREATE BIGFILE TABLESPACE xxxTBS
DATAFILE 'xxx.DBF'
SIZE 1000M AUTOEXTEND ON

Create and assign the user to the earlier defined tablespace.

CREATE USER xxx IDENTIFIED BY password
DEFAULT TABLESPACE xxxTBS
QUOTA UNLIMITED ON xxxTBS

If I want the created user to log in to the database, the statement below is executed.

GRANT CREATE SESSION TO xxx

And now to the import part,

Oracle Dump Log File With Highlighted User

IMP system/[password here] IGNORE=Y FROMUSER={...} TOUSER=xxx FILE=path_to/file.dmp;

In the sample above, the FROMUSER will be SA

Advertisements

Create a free website or blog at WordPress.com.