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

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: