Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How to IMPORT ORACLE .DMP Files using command line IMP?

user5383425Mar 20 2019 — edited Mar 22 2019

HELP!!!

I am an ORACLE newbie(and that's putting it mildly).  This is going to be a long one, and I've researched for days and am no closer to a solution to get this done.  Here goes:

Here’s the situation in a nutshell. We received from one of our clients ORACLE dmp files, which as you know are ORACLE proprietary binary format files intended to be re-imported to an ORACLE database. We are a MS-SQLServer Shop and I have no experience with ORACLE.(until now).I downloaded the 18c express version of ORACLE, but this comes with no technical support.

and created a pluggable database(I’ll figure that out later what that means).  I tried using DataPump to import the DMP files but was given a message indicating that DP could NOT import, and that the original IMP/EXP utility should be used. OK, so I figured out what that was(all with no technical support) and began the experience of importing the DMP files to my SYSTEM table space.  It worked well up to a point.  It showed me the SQL to recreate the table(I cut and pasted because it was not able to create the table itself) and created the table using SQLDeveloper. I also manually created the ALTER Database script as that was not executed from the DMP file within the IMP utility.

So essentially I have the table created, but now I need to import the data ONLY from this DMP file and I need the correct IMP syntax in order to do so.

I’m using the IMP syntax at the command line(as administrator), logging in as ‘SYSTEM’, which the correct password.  Here is the command line from the export, sent to us, I guess
to help us:

for CUST

exp ar/live file=/gers/live/tmp/CUST_190312.dmp tables=cust query=\" where acct_opn_dt between \'01-JAN-98\' and sysdate-1\" record=n buffer=250000 statistics=none indexes=n triggers=n grants=n

So what’s the import syntax that I can do all at once, rather than piece meal, which is what I’m getting now(I have to type in IMP and then validate my credentials), followed by a series of
questions….which do not work.

What am I missing here.  Any help is greatly appreciated!!!

Thanks AJVINKLES(My display name does not work either....)

Comments

top.gun

OMG - where do I start!

If you are using Oracle for commercial purposes then you or your client needs a licence from Oracle. So really you should stop now.

Once you have your licence from Oracle, you can do a simulated import (ie show metadata) like this:

imp ar/live show=y statistics=none buffer=100000 feedback=100000 log=/gers/live/tmp/CUST_190312.log file=/gers/live/tmp/CUST_190312.dmp

Then if the above works you can do the real import (ie metadata and data) like this:

imp ar/live full=y statistics=none buffer=100000 feedback=100000 log=/gers/live/tmp/CUST_190312.log file=/gers/live/tmp/CUST_190312.dmp

Dean Gagne-Oracle

You can always use

imp help=y

to give you the available commands and options.  If you only want the data, then you can use:

imp user/password file=your_file.dmp rows=y

Hope this helps.

Dean

Lisa-Oracle

Hi AJVinkles,

You need to add ignore=y since the table pre-exists

Using IGNORE=y instructs Oracle to ignore any creation errors during the import

and permit the import to complete.

imp user/password file=  log= FROMUSER= TABLES=  ignore=y

rows=y as stated above is the default so it is not needed in the command

Regards,

Lisa

1 - 3

Post Details

Added on Mar 20 2019
3 comments
26,061 views