Error: When try to connect getting the following error:
Copyright (c) 1982, 2009, Oracle. All rights reserved.
SQL> connect sys@proddb as sysdba
Enter password:
ERROR:
ORA-12543: TNS:destination host unreachable
Error detail:
oerr ora 12543
12543, 00000, "TNS:destination host unreachable"
Cause: Contact can not be made with remote party.
Action: Make sure the network driver is functioning and the network is up.
Solution:
- If you are using Windows then go to Services.msc and check the database name you created.
open services.msc --> Search for Oracle services present --> Check DBname is correct
If using Linux, then run the ps -ef|grep smon to check the sid name of database
2. Set the Environment parameter like ORACLE_HOME, PATH, ORACLE_SID
3. Check the connectivity with tnsping command
tnsping ORCL
4. Check the host, post and service_name parameter is correct mentioned in tnsnames.ora entry
orcl=
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = hostname/IPaddress)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl)
)
)
5. Check the lsnrctl status of listener sometime services name is not picked by Oracle default. So we need to put manually in it by editing listener.ora file.
Hopefully upper points will fixed your issue. Thanks