[Oracle problem set 3] ORA-12543: TNS: destination host unreachable Description: [oracle problem set] is the problem encountered by the bloggers usually operate the database and the solution. Statement execution: Indicates An error occurred while operating the database. Cause: indicates the cause of the Error. Solution: indicates the solution to the error. Related Knowledge: indicates the knowledge related to this topic ============================================ ====================================== execute the statement: connection database: connect sys/oracle@192.168.135.243/orcl as sysdba error: ORA-12543: TNS: destination host unreachable error cause: sqlnet. NAMES. DIRECTORY_PATH = (TNSNAMES, EZCONNECT), add the ezconnect parameter value, so if you specify a database instance, you must keep up with the Host IP address. See [Easy Connect Naming ]. So the correct syntax is: CONNECT username/password @ host [: port] [/service_name] For example connect sys/oracle@192.168.135.243/orcl as sysdba solution: You need to specify the host IP address when connecting to the database: connect sys/orcl@192.168.135.243/orcl as sysdba related knowledge: The following knowledge from the oracle official documentation Naming Method DescriptionLocal NamingResolves a net service name stored in a tnsnames. ora file stored on a clientLocal naming is most appropriate for simple distributed networks with a small number of services that change infrequently. see Also: "indexing the Local Naming Method" Directory NamingResolves a database service name, net service name, or net service alias stored in a centralized LDAP-compliant directory serverSee Also: "sorting the Directory Naming Method" Easy Connect NamingEnables clients to connect to a database server without any configuration. clients use a connect string for a simple TCP/IP address, consisting of a host name and optional port and service name: CONNECT username/password @ host [: port] [/service_name] This method is recommended for simple TCP/IP environments. see Also: "Using the Easy Connect Naming Method" External NamingResolves service information stored in an a third-party naming serviceSee Also: "processing ing External Naming Methods" test tool commands for Listener Configuration: lnsrctl, tnsping listener. ora file content: # listener. ora Network Configuration File:/home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener. ora # Generated by Oracle configuration tools. SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME = orcl) (ORACLE_HOME =/home/oracle/app/oracle/product/11.2.0/dbhome_1 ))) LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1521) (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.135.243) (PORT = 1521) ADR_BASE_LISTENER =/home/oracle/app/oracle tnsnames. ora file content # tnsnames. ora Network Configuration File:/home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames. ora # Generated by Oracle configuration tools. ORCL = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.135.243) (PORT = 1521) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl.192.168.132.243 ))) sqlnet. ora # sqlnet. ora Network Configuration File:/home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/sqlnet. ora # Generated by Oracle configuration tools. NAMES. DIRECTORY_PATH = (TNSNAMES, EZCONNECT) ADR_BASE =/home/oracle/app/oracle