How do I import a .dmp file into Oracle? How do I import a .dmp file into Oracle? oracle oracle

How do I import a .dmp file into Oracle?


Presuming you have a .dmp file created by oracle exp then

imp help=y

will be your friend. It will lead you to

imp file=<file>.dmp show=y

to see the contents of the dump and then something like

imp scott/tiger@example file=<file>.dmp fromuser=<source> touser=<dest>

to import from one user to another. Be prepared for a long haul though if it is a complicated schema as you will need to precreate all referenced schema users, and tablespaces to make the imp work correctly


I am Using Oracle Database Express Edition 11g Release 2.

Follow the Steps:

Open run SQl Command Line

Step 1: Login as system user

       SQL> connect system/tiger

Step 2 : SQL> CREATE USER UserName IDENTIFIED BY Password;

Step 3 : SQL> grant dba to UserName ;

Step 4 : SQL> GRANT UNLIMITED TABLESPACE TO UserName;

Step 5:

        SQL> CREATE BIGFILE TABLESPACE TSD_UserName             DATAFILE 'tbs_perm_03.dat'             SIZE 8G             AUTOEXTEND ON;

Open Command Prompt in Windows or Terminal in Ubuntu. Then Type:

Note : if you Use Ubuntu then replace " \" to " /" in path.

Step 6: C:\> imp UserName/password@localhost file=D:\abc\xyz.dmp log=D:\abc\abc_1.log full=y;

Done....

I hope you Find Right solution here.

Thanks.


i got solution what you are getting as per imp help=y it is mentioned that imp is only valid for TRANSPORT_TABLESPACE as below:

Keyword  Description (Default)       Keyword      Description (Default)--------------------------------------------------------------------------USERID   username/password           FULL         import entire file (N)BUFFER   size of data buffer         FROMUSER     list of owner usernamesFILE     input files (EXPDAT.DMP)    TOUSER       list of usernamesSHOW     just list file contents (N) TABLES       list of table namesIGNORE   ignore create errors (N)    RECORDLENGTH length of IO recordGRANTS   import grants (Y)           INCTYPE      incremental import typeINDEXES  import indexes (Y)          COMMIT       commit array insert (N)ROWS     import data rows (Y)        PARFILE      parameter filenameLOG      log file of screen output   CONSTRAINTS  import constraints (Y)DESTROY                overwrite tablespace data file (N)INDEXFILE              write table/index info to specified fileSKIP_UNUSABLE_INDEXES  skip maintenance of unusable indexes (N)FEEDBACK               display progress every x rows(0)TOID_NOVALIDATE        skip validation of specified type idsFILESIZE               maximum size of each dump fileSTATISTICS             import precomputed statistics (always)RESUMABLE              suspend when a space related error is encountered(N)RESUMABLE_NAME         text string used to identify resumable statementRESUMABLE_TIMEOUT      wait time for RESUMABLECOMPILE                compile procedures, packages, and functions (Y)STREAMS_CONFIGURATION  import streams general metadata (Y)STREAMS_INSTANTIATION  import streams instantiation metadata (N)DATA_ONLY              import only data (N)The following keywords only apply to transportable tablespacesTRANSPORT_TABLESPACE import transportable tablespace metadata (N)TABLESPACES tablespaces to be transported into databaseDATAFILES datafiles to be transported into databaseTTS_OWNERS users that own data in the transportable tablespace set

So, Please create table space for your user:

CREATE TABLESPACE <tablespace name> DATAFILE <path to save, example: 'C:\ORACLEXE\APP\ORACLE\ORADATA\XE\ABC.dbf'> SIZE 100M AUTOEXTEND ON NEXT 100M MAXSIZE 10G EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M;