Thursday, August 18, 2011

How to restore oracle dmp file to the database.

Here are the easiest steps to restore oracle dmp file to your database.

1. First you need to login to the sql command line terminal. Open command prompt if you are using windows and if you are using Linux environment open terminal.

2. Then you have to login to the SQL-PLUS as a system administrator. To do that use following command.
"sqlplus sys/admin@ORADB as sysdba"
Eg: D:\Documents and Settings\Administrator>sqlplus sys/admin@ORADB as sysdba

3. Then you have to create a new database user.
3.1 "create user username identified by password account unlock;"
Eg : create user chamara identified by chamara account unlock;
3.2 "grant connect to username;"
Eg : grant connect to chamara;
3.3 "grant create session, dba to chamara;"
Eg : grant create session, dba to chamara;

4. Now you have to exit from the SQL-PLUS and use "exit" command for that.

5. Finally restore your dmp file using this command.

"imp SYSTEM/test@ORADB fromuser=dbadmin touser=username IGNORE=Y FILE=file_path.dmp"

Eg : D:\Documents and Settings\Administrator>imp SYSTEM/test@ORADB fromuser=WSO2_RSCE touser=chamara IGNORE=Y FILE=D:\chamara\sample.dmp

1 comment:

B.B.A.'s World said...

Hello, my name is Bogdan from Romania. You have a wonderful site. I would likeif we exchange links / banners. Thank you!
My website address is:
If you want to do link exchange, banners leave your comments on my blog! a good day!
Can you give me one like the :