How to solve ORA-12170 TNS connection timeout
Recently, when I suddenly connected to the local Oracle database through plsql for a while, I reported that the ORA-12170 TNS connection timed out!
The phenomenon is that the network is not connected at startup, and then oracle can be connected through plsql, But Unicom is connected through the wireless Nic, and hswf is shared through 360 free wifi, you cannot connect to oracle through plsql, and configure the project database in eclipse to <jdbcurl> jdbc: oracle: thin: @ 127.0.0.1: 1521: orcl </jdbcurl> or connect to the database.
Really strange, I searched the internet for a lot of content and made various changes to tnsnames. ora, listener. ora and hosts did not work. A similar problem was found in an inconspicuous blog, saying that after the Internet connection, if IPv4 is manually entered, you can view the IPv4 ip address through ipconfig, the ip address of the local IPv4 address is 192. 168. *..
Solution:
(1) You need to change the obtained IP address to an automatically obtained IP address (it seems that the shared network will not work)
(2) modify the IP address where the HOST in tnsnames. ora is IPv4, but the database address in the project must also be changed to the actual IPv4 IP address,
After this change, you can actually connect to the oracle database!
An example of ORA-12170: TNS: Connection timeout Solution
Installing Oracle 12C in Linux-6-64
Install Oracle 11gR2 (x64) in CentOS 6.4)
Steps for installing Oracle 11gR2 in vmwarevm
Install Oracle 11g XE R2 In Debian