ORA-12170: TNS:Connect timeout occurred

前端 未结 8 1966
梦毁少年i
梦毁少年i 2020-12-03 01:48

I was trying to connect to the database here in my laptop using Oracle Toad but I kept on having this error:

ORA-12170: TNS:Connect timeout occurred

8条回答
  •  温柔的废话
    2020-12-03 02:00

    It is because of conflicting SID. For example, in your Oracle12cBase\app\product\12.1.0\dbhome_1\NETWORK\ADMIN\tnsnames.ora file, connection description for ORCL is this:

    ORCL =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = orcl)
        )
      )
    

    And, you are trying to connect using the connection string using same SID but different IP, username/password, like this:

    sqlplus username/password@192.168.130.52:1521/orcl

    To resolve this, make changes in the tnsnames.ora file:

    ORCL =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.130.52)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = orcl)
        )
      )
    

提交回复
热议问题