0
votes

I have installed VirtualBox image with Oracle Enterprise Linux. It contains installed Oracle Database 12.1.0.

In virtual machine network settings I choose 'Bridget Adapter'. Next on Linux I configured connection settings: static ip address: 192.168.0.110

Now I can ping to virtual machine using ping 192.168.0.110.

Files on virtual machine:

tnsnames.ora:

# tnsnames.ora Network Configuration File: /u01/app/oracle/product/12.1.0/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
ORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )
pdb1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = pdb1)
    )
  )

listener.ora:

# listener.ora Network Configuration File: /u01/app/oracle/product/12.1.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.

LISTENER =
  (DESCRIPTION_LIST =
 (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP) (HOST = 0.0.0.0) (PORT = 80))
      (PROTOCOL_STACK = (PRESENTATION = HTTP) (SESSION = RAW))
    )
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP) (HOST = 0.0.0.0) (PORT = 21))
      (PROTOCOL_STACK = (PRESENTATION = FTP) (SESSION = RAW))
    )


    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )

  )

Now I try to connect my database from host (Windows) using following connection properties: username: system password: oracle Hostname: 192.168.0.110 Port: 1521 Service name: orcl

I get following error: The Network Adapter could not establish the connection

1

1 Answers

0
votes

Check that port 1521 in the oracle enterprise linux firewall is open, or if this is just a test system disable the firewall.

If you have telnet available on the host you can telnet to the guest on port 1521 and see what response you get - useful for debugging