0

I have two machines on my network:

  1. pc-1 is running on Windows XP SP3, IP 192.168.1.15
  2. pc-2 is running on Windows Vista, IP 192.168.1.16

Now I have loaded Oracle 11gR2 on pc-2 (Vista) and the listener is running with the following settings: address=192.168.1.16 and port=1065.

I am trying to connect to Oracle database via pc-1 (XP) using jdbc thin driver but I get the error The network adapter could not establish the connection.
My JDBC url: jdbc:oracle:thin:@192.168.1.16:1065:ora

The pc-2 is reachable, I checked it by ping 192.168.1.16

I tried a few things from PC-1:

  • TELNET 192.168.l.16 1065 gives error Connecting To 192.168.1.16...Could not open connection to the host, on port 1065: Connect failed. The firewall on pc-2 (vista+oracle) is turned off so I don't think firewall is blocking port 1065.

  • tnsping 192.168.1.16:1065 gives error TNS-12535: TNS:operation timed out

  • sqlplus sys/sys@//192.168.1.16:1065/ora as sysdba but it gives error

    ERROR:ORA-12170: TNS:Connect timeout occurred

Some of the commands output on PC-2

  • netstat -a

LOCAL ADDRESS------------ FOREIGN ADDRESS-------------- STATE
192.168.1.16:1065----------------- PCNAME -------------------LISTENING

Can anyone please specify in details what shall I do? I am trying to do this first time so no idea about what is going wrong?

1
  • 2
    I think you may be facing Issue 3: which is given on link
    – Akki
    Mar 19, 2013 at 13:15

3 Answers 3

0

You have to give the proper SID details in the tnsnames.ora file located under

for Linux: /home/oracle/oracle/product/10.2.0/db_1/network/admin/tnsnames.ora

0
0

You don't say how you're connecting - I am assuming through TNS?

Did you specify the port of 1065 in your TNSNAMES.ORA file on the XP system?

Can you connect from your XP system using EZCONNECT? That takes tnsnames.ora out of the equation.

sqlplus user/pw@//192.168.1.16:1065/db_name
11
  • i am doing it for first time so no idea about all this can u explain me what parameter i shall change. I also have oracle database loaded on my windows xp
    – Abby D
    Mar 14, 2013 at 20:08
  • So you need to modify your tnsnames.ora file to set the host, port, and sid/service names appropriately: Host=192.168.1.16, port=1065, and sid=db_name
    – DCookie
    Mar 14, 2013 at 20:11
  • Try this: sqlplus sys/[email protected]:1065/ora as sysdba
    – DCookie
    Mar 14, 2013 at 23:19
  • Does TELNET 192.168.l.16 1065 give you a black screen or a connection failure? Maybe you have a firewall running blocking port 1065.
    – Nick.Mc
    Mar 14, 2013 at 23:47
  • the output is Connecting To 192.168.1.16...Could not open connection to the host, on port 1065: Connect failed but the firewall on windows vista pc is turned off
    – Abby D
    Mar 15, 2013 at 6:54
0

ERROR:ORA-12170: TNS:Connect timeout occurred

this error usually means failure network connection

It's simple

shut down your windows firewall

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.