Oracle DataPump 5 – Import database using IMPDP command

Create a user named jijo then grant directory and other privileges to user jijo. If you are not familiar with how to create and grant privileges then read the post –> Oracle DataPump 3 – Create and grant privileges to user

SQL> CREATE USER jijo IDENTIFIED BY kjose DEFAULT TABLESPACE SYSAUX TEMPORARY TBLESPACE "TEMP";

User created.

SQL> GRANT connect, create procedure, create session, create table, create type, create view, create synonym,create sequence, create trigger, resource TO jijo;

Grant succeeded.

SQL> GRANT READ, WRITE ON DIRECTORY TEST_DIR TO jijo;

Grant succeeded.


IMPDP Command Format

After creating the user we can import the database of  scott into jijo by using the following command.

impdp <username>/<password> DIRECTORY=<directory_name> DUMPFILE=<dump_file_name> REMAP_SCHEMA=<old_schema>:<new_schema>

or

impdp jijo/kjose DIRECTORY=TEST_DIR DUMPFILE=DB11G.dmp REMAP_SCHEMA=scott:jijo

Example

Open Command prompt (CMD) and enter the following command

C:\Users\A-5518>impdp jijo/kjose DIRECTORY=TEST_DIR DUMPFILE=DB11G.dmp REMAP_SCH
EMA=scott:jijo

Import: Release 11.2.0.2.0 – Production on Mon Aug 5 15:02:00 2013

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 11g Express Edition Release 11.2.0.2.0 – Productio
n
Master table "JIJO"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
Starting "JIJO"."SYS_IMPORT_FULL_01":  jijo/******** DIRECTORY=TEST_DIR DUMPFILE
=DB11G.dmp REMAP_SCHEMA=scott:jijo
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
. . imported "JIJO"."EMP"                                5.875 KB       2 rows
. . imported "JIJO"."STUDENT"                            5.882 KB       2 rows
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Job "JIJO"."SYS_IMPORT_FULL_01" successfully completed at 15:02:03



 

You can leave a response, or trackback from your own site.

Leave a Reply