Home » RDBMS Server » Server Administration » How to IMPDP to PDB? (DB 19.3, RHEL)
How to IMPDP to PDB? [message #683437] Wed, 13 January 2021 16:16 Go to next message
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
lsnrctl service
, I can see the service.

What am I missing?
Thank you
Re: How to IMPDP to PDB? [message #683441 is a reply to message #683437] Thu, 14 January 2021 00:13 Go to previous messageGo to next message
Michel Cadot
Messages: 67918
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Quote:
I can see the service.
We can't as you didn't post it.
You must SHOW us what you do and get NOT just tell us.

ORA-12154: TNS:could not resolve the connect identifier specified
 *Cause:  A connection to a database or other service was requested using
 a connect identifier, and the connect identifier specified could not
 be resolved into a connect descriptor using one of the naming methods
 configured. For example, if the type of connect identifier used was a
 net service name then the net service name could not be found in a
 naming method repository, or the repository could not be
 located or reached.
 *Action:
   - If you are using local naming (TNSNAMES.ORA file):
      - 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.
   - If you are using directory naming:
      - Verify that "LDAP" is listed as one of the values of the
        NAMES.DIRETORY_PATH parameter in the Oracle Net profile
        (SQLNET.ORA).
      - Verify that the LDAP directory server is up and that it is
        accessible.
      - Verify that the net service name or database name used as the
        connect identifier is configured in the directory.
      - Verify that the default context being used is correct by
        specifying a fully qualified net service name or a full LDAP DN
        as the connect identifier
   - If you are using easy connect naming:
      - Verify that "EZCONNECT" is listed as one of the values of the
        NAMES.DIRETORY_PATH parameter in the Oracle Net profile
        (SQLNET.ORA).
      - Make sure the host, port and service name specified
        are correct.
      - Try enclosing the connect identifier in quote marks.

   See the Oracle Net Services Administrators Guide or the Oracle
   operating system specific guide for more information on naming.
Re: How to IMPDP to PDB? [message #683445 is a reply to message #683441] Thu, 14 January 2021 10:26 Go to previous messageGo to next message
noob2021
Messages: 5
Registered: January 2021
Junior Member
I rebuilt the instance with similar results. So, some of the names may be a little different.
Lsnrctl service:
/foru/forum/fa/14465/0/
Re: How to IMPDP to PDB? [message #683446 is a reply to message #683445] Thu, 14 January 2021 10:30 Go to previous messageGo to next message
noob2021
Messages: 5
Registered: January 2021
Junior Member
lsnrctl service
https://www.dropbox.com/s/2knvlztgfammk3p/lsnrctl%20service.JPG?dl=0

Connect
https://www.dropbox.com/s/i0pzozqtfck3i3u/connect.JPG?dl=0

TNS
https://www.dropbox.com/s/djffi1x2fewzldk/tns.JPG?dl=0

lsnrctl status
https://www.dropbox.com/s/14pecuiugz34ozz/lsnrctl%20status.JPG?dl=0

[Updated on: Thu, 14 January 2021 10:55]

Report message to a moderator

Re: How to IMPDP to PDB? [message #683447 is a reply to message #683446] Thu, 14 January 2021 11:30 Go to previous messageGo to next message
Michel Cadot
Messages: 67918
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 messageGo to next message
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 #683450 is a reply to message #683449] Fri, 15 January 2021 10:18 Go to previous messageGo to next message
Michel Cadot
Messages: 67918
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Quote:
ll I did was set TNS_ADMIN environment on the putty session as of your recent suggestions.

I didn't suggest that, I just asked to show if you set it.


Quote:
Can you please explain what happened?

For this you have to post what I asked, the answer is in this.

Re: How to IMPDP to PDB? [message #683452 is a reply to message #683437] Sat, 16 January 2021 14:41 Go to previous messageGo to next message
EdStevens
Messages: 1330
Registered: September 2013
Senior Member
tns-12154 has zero to do with the listener config. The request never even left the client, much less arrive at a listener.

https://edstevensdba.wordpress.com/2018/09/19/troubleshooting-ora-12154/
Re: How to IMPDP to PDB? [message #683573 is a reply to message #683452] Mon, 01 February 2021 10:50 Go to previous messageGo to next message
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
EdStevens
Messages: 1330
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.
Previous Topic: sys.x$dbgalertext alert log info text access
Next Topic: Trying to export a table that contains blobs
Goto Forum:
  


Current Time: Fri Jul 23 11:49:36 CDT 2021