How do I import data into a new installation of oracle 11g r2 using a .dmp
file and a .par
file?
Here is what I have done so far, on a Windows 8.1 devbox:
1.) Open command line as administrator
2.) C:\WINDOWS\system32>sqlplus / as sysdba
This will reveal the SQL prompt as follows:
SQL*Plus: Release 11.2.0.1.0 Production on Thu Feb 25 14:20:46 2016
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> CREATE DIRECTORY DMPDIR AS 'C:\path\to\DumpDir\';
SQL> exit;
3.) Then back in windows command prompt:
C:\WINDOWS\system32>impdp parfile=C:\path\to\DumpDir\impdp.par;
Then I read this other posting which contains the following answer code:
impdp user/pass schemas=schema1 directory=dumpdir \
remap_schema=schema1:schema2 \
dumpfile=schema1.dmp \
logfile=impdp_schema2.log
Since my question is slightly different, I guessed at the following, which I have not typed yet:
impdp schemas=schema1 directory=dumpdir \
dumpfile=schema1.dmp \
logfile=impdp_logfile.log
What is the correct syntax to use? And what other steps should I take to do this properly?
1 Answer 1
The PAR file is a parameter file, which contains parameters for data pump that you don't need to enter on the command line. Without knowing what those are, we can't advise what you need to use in any detail.
Generally speaking, if you have a parameter file, you just put that on the command line:
impdp user/pass parfile=/path/to/parfile
However, there may be other parameters required.
Assuming you have a parameter file, you need the command line to contain at minimum:
Username
Parfile
To perform an import, you need at minimum these parameters defined between the command line and parameter file:
Username
Directory
Dumpfile
Full OR Schemas OR Tables
(and for good practice, Logfile)
For a basic import, those four parameters between the command line and the parameter file will import data. Without knowing what you're trying to achieve, anything else is guesswork.
Explore related questions
See similar questions with these tags.
Syntax
as a key word or name, I was using syntax meaning what specific characters do I type. Yes, I found your link before posting this question, but its contents are not clear to me. I am used to MySQL, which has very clear and easy documentation that lists specific sequences of commands. Can you suggest what commands to type?impdp
command from the windows command line, but it asks for a username and password. The oracle installation just has an administration password with no other users set up yet. I know the administration password, but I don't know how to use it to accomplish what I am seeking to accomplish, or how to narrow the question to produce usable steps.