Solved

my impdp not working

Posted on 2008-10-15
6
690 Views
Last Modified: 2013-12-18
I exported my scott user to newdir
But when I imported...
error is attached..
impdp.bmp
0
Comment
Question by:dbaseek
  • 3
  • 2
6 Comments
 
LVL 1

Expert Comment

by:czuriaga
ID: 22728278
Try to remove the @newdata.

It would be a help to see the expdp execution
0
 
LVL 1

Expert Comment

by:czuriaga
ID: 22728300
if the expdp is well done, a simple statement with this format should work

impdp scott/tiger DIRECTORY=dmpdir DUMPFILE=scott.dmp

Your newdir must be a Oracle Directory, not a OS directory, You must create this way as SYS:

CREATE USER user_exporter IDENTIFIED BY user_exporter_pwd DEFAULT TABLESPACE USERS TEMPORARY TABLESPACE TEMP;
GRANT CONNECT, RESOURCE TO user_exporter;
GRANT EXP_FULL_DATABASE, IMP_FULL_DATABASE TO user_exporter;
CREATE OR REPLACE DIRECTORY newdir AS 'c:\yourpath\newdir\';
GRANT READ, WRITE ON DIRECTORY newdir TO user_exporter;

Then you can export you scott user with

expdp user_exporter/user_exporter_pwd DIRECTORY=newdir DUMPFILE=scott_dumpfile.dmp SCHEMAS=scott

and import it with

impdp exporter/user_exporter_pwd DIRECTORY=newdir DUMPFILE=scott_dumpfile.dmp

or in a new schema

impdp exporter/user_exporter_pwd DIRECTORY=newdir DUMPFILE=scott_dumpfile.dmp REMAP_SCHEMAS=scott:new_scott
0
 
LVL 1

Expert Comment

by:czuriaga
ID: 22728646
Sorry, the last two examples start

impdp user_exporter/user_exporter_pwd  ...
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 48

Accepted Solution

by:
schwertner earned 500 total points
ID: 22728886
To import you exported dump file (if it really has been exported, because there is a error assigning logical directory) use

expdp parfie=some_file

where some_file is:


USERID='sys/manager@main7  as sysdba'
DIRECTORY=PUMP
DUMPFILE=010f_pump.dmp
LOGFILE=impsch.log
FULL=yes
CONTENT=all

Pay attention that:
1. User sys should log 'as sysdba'
2. The logical and appropriate physical directory should exist:

SQL> create or replace directory dpump_demo as 'C:\temp';

Directory created.

SQL> grant read,write on directory dpump_demo to simon;

Grant succeeded.

The best choice is to work as SYS, so you do not need

grant read,write on directory dpump_demo to simon;


Also a common mistake is do not create physically the directory.
It should physically exist and this is achiewed via OS commands.
In the example create with Windows explorer the dirsctory 'C:\temp'
0
 
LVL 4

Expert Comment

by:hqassap
ID: 22747631
Hello,

You have two different errors:
The first one is the Directory creation error:
"create directory newdir on sys" where the correct syntax is:
SQL> CREATE OR REPLACE DIRECTORY newdir as '{OS Directory Path}';

The second error is the connection error, most probably you the server is referenced by IP and the listener is listining on Server name not the IP:
Try to troubleshoot using "tnsping {TNS Alias Name}"
0
 
LVL 48

Expert Comment

by:schwertner
ID: 22755926
Thank you!
Good luck!
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Wrong number of values in the INTO list of a FETCH statement 16 87
exp/imp 25 84
how to trim oracle sql sentence in unix 17 58
date show only hh:mm 2 25
Subquery in Oracle: Sub queries are one of advance queries in oracle. Types of advance queries: •      Sub Queries •      Hierarchical Queries •      Set Operators Sub queries are know as the query called from another query or another subquery. It can …
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

789 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question