How to IMPDP to PDB? [message #683437] |
Wed, 13 January 2021 16:16 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](http://www.gravatar.com/avatar/9961da737236ac59ed767ae2f04d5a57?s=64&d=mm&r=g) |
noob2021
Messages: 5 Registered: January 2021
|
Junior Member |
|
|
I am trying out Oracle DB 19.3 on Linux.
When I try to data pump to PDB, using
impdp system/<pwd>@PDB01 DIRECTORY=DATA_PUMP_DIR DUMPFILE=TestDump.dmp LOGFILE=IMP_TestDump.log
I get the errors:
UDI-12154: operation generated ORACLE error 12154
ORA-12154: TNS:could not resolve the connect identifier specified
So when I tried on SQL+, I get the same ORA-12154
SQL> conn system/<pwd>@PDB01
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified
Warning: You are no longer connected to ORACLE.
SQL>
When I connect to CDB$ROOT, I can see the PDB on v$pdbs and I can connect via ALTER SESSION SET CONTAINER=PDB01
When I check , I can see the service.
What am I missing?
Thank you
|
|
|
|
|
|
Re: How to IMPDP to PDB? [message #683447 is a reply to message #683446] |
Thu, 14 January 2021 11:30 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](http://www.orafaq.com/forum/images/custom_avatars/102589.gif) |
Michel Cadot
Messages: 68653 Registered: March 2007 Location: Nanterre, France, http://...
|
Senior Member Account Moderator |
|
|
Most of us can't (policy limitation) or don't want to download stuff from the web.
As all of this is text, you can post it inside your post, don't forget to use tags as explained in How to use [code] tags and make your code easier to read.
Note that you didn't answer the first points of my posts, from the point you issued the impdp and sqlplus commands:
- Make sure that "TNSNAMES" is listed as one of the values of the
NAMES.DIRECTORY_PATH parameter in the Oracle Net profile
(SQLNET.ORA)
- Verify that a TNSNAMES.ORA file exists and is in the proper
directory and is accessible.
- Check that the net service name used as the connect identifier
exists in the TNSNAMES.ORA file.
- Make sure there are no syntax errors anywhere in the TNSNAMES.ORA
file. Look for unmatched parentheses or stray characters. Errors
in a TNSNAMES.ORA file may make it unusable.
So at this point, issue (and post the result in text in your answer):
env | egrep -i '(oracle|path|tns)'
tnsping PDB01
cat $ORACLE_HOME/network/admin/sqlnet.ora
cat $ORACLE_HOME/network/admin/tnsnames.ora
# If you use TNS_ADMIN
cat $TNS_ADMIN/sqlnet.ora
cat $TNS_ADMIN/tnsnames.ora
sqlplus system/<pwd>@PDB01
[Updated on: Thu, 14 January 2021 11:31] Report message to a moderator
|
|
|
Re: How to IMPDP to PDB? [message #683449 is a reply to message #683447] |
Fri, 15 January 2021 10:01 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](http://www.gravatar.com/avatar/9961da737236ac59ed767ae2f04d5a57?s=64&d=mm&r=g) |
noob2021
Messages: 5 Registered: January 2021
|
Junior Member |
|
|
Hello Michel,
Sorry for the late reply - have been trying to resolve the issues.
Good news is the issue is resolved for now. To answer your question, TNS entries are correct. TNSNAMES is also listed in SQLNET.ORA.
All I did was set TNS_ADMIN environment on the putty session as of your recent suggestions. That seems to fix the issue.
But, I'm not quite sure what's going on.
Can you please explain what happened? Why wasn't it picking up the TNSNAMES.ora until I set the variable to $ORACLE_HOME/network/admin? Is that an alternate way of connecting? Also, should I include TNS_ADMIN variable in the bash_profile?
Thank you
[Updated on: Fri, 15 January 2021 10:03] Report message to a moderator
|
|
|
|
|
Re: How to IMPDP to PDB? [message #683573 is a reply to message #683452] |
Mon, 01 February 2021 10:50 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](http://www.gravatar.com/avatar/9961da737236ac59ed767ae2f04d5a57?s=64&d=mm&r=g) |
noob2021
Messages: 5 Registered: January 2021
|
Junior Member |
|
|
Thank you Michel and EdStevens for viewing and responding.
For my future memory / if it helps anyone:
Setting TNS_ADMIN in bash_profile sort of fixed the issues for the user.
To fix for all users, set in oraenv as SU for each PDBs running on the server.
That's how I fixed it anyway.
Edit: Not sure how to mark this as solved. Admin can mark this as solved / close the thread, if necessary.
[Updated on: Mon, 01 February 2021 10:53] Report message to a moderator
|
|
|
Re: How to IMPDP to PDB? [message #683575 is a reply to message #683573] |
Mon, 01 February 2021 18:28 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](http://www.gravatar.com/avatar/d29f577f753cb4b873212fd5ed0da4cd?s=64&d=mm&r=g) |
EdStevens
Messages: 1376 Registered: September 2013
|
Senior Member |
|
|
By default, when a connection request is made, the requesting client will look for tnsnames.ora in $ORACLE_HOME/network/admin. If you are having to set TNS_ADMIN, it means that you have not correctly set ORACLE_HOME, or you have your tnsnames in some other location. And as previously stated, this error is entirely on the client. It has zero to do with the listener or the database. It is the equivalent of not being able to place a telephone call because either 1) you cannot find the listing in the telephone directory, or 2) you cannot find the telephone directory at all. In such cases, you do not try to solve the problem by analyzing the telephone switchboard (the listener) or the telephone of the person you want to call.
|
|
|