Skip to main content
added 767 characters in body
Source Link
Achim Schmitz
  • 141
  • 1
  • 1
  • 5

Edit#3 20200706

The preceding information makes it pretty clear that the problem is one in networking, rather than in the database setup, Following an extended chat session with pifor the following aspects were checked:

  • Ensure SELinux is disabled.
  • Ensure that no firewall is running on the host server.
  • Check that the port for the listener service is open (on Linux use nmap).
  • As mentioned by pifor in the answer below, ensure that the service names match between the init.ora and tnsnames.ora. (Note: in init.ora the property is called service_names, i.e. plural).
  • After a database or server restart, remember to restart the listener service. ;-)

Once I'd done all this, the database was usable.

Edit#3 20200706

The preceding information makes it pretty clear that the problem is one in networking, rather than in the database setup, Following an extended chat session with pifor the following aspects were checked:

  • Ensure SELinux is disabled.
  • Ensure that no firewall is running on the host server.
  • Check that the port for the listener service is open (on Linux use nmap).
  • As mentioned by pifor in the answer below, ensure that the service names match between the init.ora and tnsnames.ora. (Note: in init.ora the property is called service_names, i.e. plural).
  • After a database or server restart, remember to restart the listener service. ;-)

Once I'd done all this, the database was usable.

corrected the error message
Source Link
Achim Schmitz
  • 141
  • 1
  • 1
  • 5
[oracle@linuxoracle12 ~]$admin]$ sqlplus tmf/xxxxxxxx@linuxoracl19xxxxxxxx@linuxoracle19.my-company-name.com:1521/TEMP

SQL*Plus: Release 12.2.0.1.0 Production on Thu Jun 18 1617:1642:2821 2020

Copyright (c) 1982, 2016, Oracle.  All rights reserved.

ERROR:
ORA-1215412543: TNS:could not resolve the connectdestination identifierhost specifiedunreachable
[oracle@linuxoracle12 ~]$ sqlplus tmf/xxxxxxxx@linuxoracl19.my-company-name.com:1521/TEMP

SQL*Plus: Release 12.2.0.1.0 Production on Thu Jun 18 16:16:28 2020

Copyright (c) 1982, 2016, Oracle.  All rights reserved.

ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified
[oracle@linuxoracle12 admin]$ sqlplus tmf/xxxxxxxx@linuxoracle19.my-company-name.com:1521/TEMP

SQL*Plus: Release 12.2.0.1.0 Production on Thu Jun 18 17:42:21 2020

Copyright (c) 1982, 2016, Oracle.  All rights reserved.

ERROR:
ORA-12543: TNS:destination host unreachable
added 2029 characters in body
Source Link
Achim Schmitz
  • 141
  • 1
  • 1
  • 5

Edit#2 20200618

In addition to the above, a colleague suggested that the host machine doesn't "know" what it's external name is. Therefore I should add the host name as used from a remote site to the loop-back address in /etc/hosts file. I was skeptical, but it makes sort of sense, since DNS plays no role when the machine is "talking to itself". So the /etc/hosts now looks like this:

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4 linuxoracle19 linuxoracle19.my-company-name.com
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6 linuxoracle19 linuxoracle19.my-company-name.com

(Note the last two entries in the IPV4 and IPV6 loop-back entries.) Unfortunately this had no effect, even after restarting the listener.

A further suggestion from pifor was to try connecting on with sqlplus (I assume that meant "connect from a remote site"). I therefore logged onto the other oracle host (linuxoracle12) and tried it out. The result:

[oracle@linuxoracle12 ~]$ sqlplus tmf/[email protected]:1521/TEMP

SQL*Plus: Release 12.2.0.1.0 Production on Thu Jun 18 16:16:28 2020

Copyright (c) 1982, 2016, Oracle.  All rights reserved.

ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified

OK, that's something I can start with. To make sure I'd done the test correctly, I tried it in the other direction (i.e. connect to a DB instance on linuxoracle12 when logged onto linuxoracle19):

[oracle@linuxoracle19 bin]$ sqlplus tmf/[email protected]:1521/TMF

SQL*Plus: Release 19.0.0.0.0 - Production on Thu Jun 18 16:46:17 2020
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle.  All rights reserved.

Letzte erfolgreiche Anmeldezeit: Do Jun 18 2020 15:22:27 +02:00

Verbunden mit: 
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

So now I have to figure out why the first test failed whereas the second worked.

Edit#2 20200618

In addition to the above, a colleague suggested that the host machine doesn't "know" what it's external name is. Therefore I should add the host name as used from a remote site to the loop-back address in /etc/hosts file. I was skeptical, but it makes sort of sense, since DNS plays no role when the machine is "talking to itself". So the /etc/hosts now looks like this:

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4 linuxoracle19 linuxoracle19.my-company-name.com
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6 linuxoracle19 linuxoracle19.my-company-name.com

(Note the last two entries in the IPV4 and IPV6 loop-back entries.) Unfortunately this had no effect, even after restarting the listener.

A further suggestion from pifor was to try connecting on with sqlplus (I assume that meant "connect from a remote site"). I therefore logged onto the other oracle host (linuxoracle12) and tried it out. The result:

[oracle@linuxoracle12 ~]$ sqlplus tmf/[email protected]:1521/TEMP

SQL*Plus: Release 12.2.0.1.0 Production on Thu Jun 18 16:16:28 2020

Copyright (c) 1982, 2016, Oracle.  All rights reserved.

ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified

OK, that's something I can start with. To make sure I'd done the test correctly, I tried it in the other direction (i.e. connect to a DB instance on linuxoracle12 when logged onto linuxoracle19):

[oracle@linuxoracle19 bin]$ sqlplus tmf/[email protected]:1521/TMF

SQL*Plus: Release 19.0.0.0.0 - Production on Thu Jun 18 16:46:17 2020
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle.  All rights reserved.

Letzte erfolgreiche Anmeldezeit: Do Jun 18 2020 15:22:27 +02:00

Verbunden mit: 
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

So now I have to figure out why the first test failed whereas the second worked.

added 3684 characters in body
Source Link
Achim Schmitz
  • 141
  • 1
  • 1
  • 5
Loading
Source Link
Achim Schmitz
  • 141
  • 1
  • 1
  • 5
Loading