ora 12170 TNS Connect timeout occured

Hello
I have a user that got a new pc, used a file and settings transfer to copy data and settings to the new pc.
old pc XP
Toad 8.6
SQL server 2005
oracle 9

new pc Vista ( no local admin rights to the pc for the user)
Toad 9.6
sql server 2005
oracle 10g
had to copy over the TNS names file so the sites show on the right hand window in toad

did not see how to edit my post…
forgot to mention toad was installed after the settings and data software was run. Did not see toad when I was seeing what apps they had on their old pc.

Have you tested to see if the oracle installation is the weak link on your new
Vista PC?

Can you tnsping your database from the command line? If you get the TNS Timeout
there, it’s not Toad.

I know how to ping, I know I have to copy the tns names file over , not sure what for , I think it might have the database addresses ??? so how do I do a tns ping of the datbases.

Morning William,

I know how to ping, I know I have to copy the tns names file
over , not sure what for , I think it might have the
database addresses ???
There are many ways to get from user/password@database_alias to
host=server_name, port=port_number, sid (or service) = Database Sid, or
service. Tnsnames.ora is probably the easiest and simplest of them all
and it works with all versions of Oracle.

so how do I do a tns ping of the databases.
Here's one from my session.

in a DOS box, or Shell on Unix:

C:>tnsping perf10g

TNS Ping Utility for 32-bit Windows: Version 9.2.0.8.0 - Production on
29-JUN-2010 08:02:58

Copyright (c) 1997, 2006, Oracle Corporation. All rights reserved.

Used parameter files:
c:\oracle\ora9i\network\admin\sqlnet.ora

Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (SOURCE_ROUTE = OFF) (ADDRESS_LIST
= (ADDRE
SS = (PROTOCOL = TCP)(HOST = greenbird.ea.gov)(PORT = 1521)))
(CONNECT_DATA = (S
ID = perf10g) (SRVR = DEDICATED)))
OK (20 msec)

The last line says that it took 20 milliseconds to contact the listener
and get the details back. All that this tells me is that:

  • My name resolution system is set up correctly; and

  • A listener is indeed listening on the host (server) and port that was
    returned from the name resolution; and

It doesn't tell me that the listener is actually listening for my
particular database though.

What happens is the following:

  • You type tnsping, or use Toad, SQLPlus, your application etc to
    connect to a database "alias".

  • SQLNet (Oracle's networking system) looks in certain places to find
    sqlnet.ora (in %TNS_ADMIN%, then in %ORACLE_HOME%\network\admin).

  • Sqlnet.ora tells SQLNet where to look, and in what order to resolve
    the alias name supplied: "NAMES.DIRECTORY_PATH= (onames, tnsnames)" in
    my case.

  • In my case, Oracle Names is checked first then TNSNAMES.ORA if Oracle
    Names fails. Tnsnames.ora is looked for in the same locations as
    sqlnet.ora above.

  • Either way, the list is scanned until a hit on the database alias is
    found. The connection details are returned: (DESCRIPTION =
    (SOURCE_ROUTE = OFF) (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST =
    greenbird.ea.gov)(PORT = 1521))) (CONNECT_DATA = (SID = perf10g) (SRVR =
    DEDICATED))).

  • These details are used to connect to the database in the event of a
    login.

  • In the event of a tnsping, the details are used to contact a listener.
    If a listener is found, you get the OK message, otherwise not. However,
    as mentioned above, the listener is all that is checked, not the
    connectivity to the actual database itself. You can successfully tnsping
    a database alias and get an OK message, but connecting to it will give
    you a message that the listener isn't actually listening for that
    database! Confusing!

In my tnsping example above, the database I'm looking for is not in
Oracle Names, so I see this prompt "Used TNSNAMES adapter to resolve the
alias".

HTH

Cheers,
Norm. [TeamT]

Information in this message may be confidential and may be legally privileged. If you have received this message by mistake, please notify the sender immediately, delete it and do not copy it to anyone else. We have checked this email and its attachments for viruses. But you should still check any attachment before opening it. We may have to make this message and any reply to it public if asked to under the Freedom of Information Act, Data Protection Act or for litigation. Email messages and attachments sent to or from any Environment Agency address may also be accessed by someone other than the sender or recipient, for business purposes. If we have sent you information and you wish to use it please read our terms and conditions which you can get by calling us on 08708 506 506. Find out more about the Environment Agency at www.environment-agency.gov.uk

Information in this message may be confidential and may be legally privileged. If you have received this message by mistake, please notify the sender immediately, delete it and do not copy it to anyone else.

We have checked this email and its attachments for viruses. But you should still check any attachment before opening it.
We may have to make this message and any reply to it public if asked to under the Freedom of Information Act, Data Protection Act or for litigation. Email messages and attachments sent to or from any Environment Agency address may also be accessed by someone other than the sender or recipient, for business purposes.

If we have sent you information and you wish to use it please read our terms and conditions which you can get by calling us on 08708 506 506. Find out more about the Environment Agency at www.environment-agency.gov.uk

command prompt optional, because as with so many other things with Toad, “It’s
in there”
image001.png

Disable Antivirus and try. If connecting add it to Antivirus accepting list.