When I connect to Oracle database, I got ” ORA-12547: TNS:lost contact ” error.
ORA-12547: TNS:lost contact
Details of error are like following.
[oracle@MehmetSalih ~]$ sqlplus mehmet/mehmet@PRELIVE SQL*Plus: Release 12.1.0.2.0 Production on Thu Aug 1 16:16:23 2019 Copyright (c) 1982, 2014, Oracle. All rights reserved. ERROR: ORA-12547: TNS:lost contact Enter user-name: ^C [oracle@MehmetSalih ~]$
TNS:lost contact
This ORA-12547: TNS:lost contact error is related with the tcp.validnode_checking = yes in sqlnet.ora file.
To solve this problem, firstly check sqlnet.ora file.
[oracle@MehmetSalih PRELIVE_MehmetSalih]$ cat sqlnet.ora ############################################################### # # Do not edit settings in this file manually. They are managed # automatically and will be overwritten when AutoConfig runs. # For more information about AutoConfig, refer to the Oracle # E-Business Suite Setup Guide. # #$Header: NetServiceHandler.java 120.28.12020000.2 2012/07/05 11:52:15 brayasam ship $ # ############################################################### NAMES.DIRECTORY_PATH=(TNSNAMES, ONAMES, HOSTNAME) SQLNET.EXPIRE_TIME= 10 tcp.validnode_checking = yes tcp.invited_nodes=(MehmetSalih.Deveci.local) SQLNET.INBOUND_CONNECT_TIMEOUT =60 IFILE=/data/oracle/PRELIVE/12.1.0/network/admin/PRELIVE_MehmetSalih/sqlnet_ifile.ora [oracle@MehmetSalih PRELIVE_MehmetSalih]$
You should remove tcp.validnode_checking = yes and tcp.invited_nodes=(MehmetSalih.Deveci.local) entries.
[oracle@MehmetSalih PRELIVE_MehmetSalih]$ vi sqlnet.ora [oracle@MehmetSalih PRELIVE_MehmetSalih]$ [oracle@MehmetSalih PRELIVE_MehmetSalih]$ After remove related parameters, sqlnet.ora file should be like following. [oracle@MehmetSalih PRELIVE_MehmetSalih]$ cat sqlnet.ora ############################################################### # # Do not edit settings in this file manually. They are managed # automatically and will be overwritten when AutoConfig runs. # For more information about AutoConfig, refer to the Oracle # E-Business Suite Setup Guide. # #$Header: NetServiceHandler.java 120.28.12020000.2 2012/07/05 11:52:15 brayasam ship $ # ############################################################### NAMES.DIRECTORY_PATH=(TNSNAMES, ONAMES, HOSTNAME) SQLNET.EXPIRE_TIME= 10 SQLNET.INBOUND_CONNECT_TIMEOUT =60 IFILE=/data/oracle/PRELIVE/12.1.0/network/admin/PRELIVE_MehmetSalih/sqlnet_ifile.ora [oracle@MehmetSalih PRELIVE_MehmetSalih]$
ORA-12547
To solve this error, Now reload or stop start Listener. Login database via sqlplus or Toad like following.
Problem has been solved.
[oracle@MehmetSalih ~]$ sqlplus mehmet/mehmet@PRELIVE SQL*Plus: Release 12.1.0.2.0 Production on Thu Aug 1 16:33:34 2019 Copyright (c) 1982, 2014, Oracle. All rights reserved. Last Successful login time: Thu Aug 01 2019 17:24:06 +03:00 Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
Sometimes oracle.exe or oracle executable file’s permission may be modified
Check oracle like following.
[oracle@MehmetSalih ~]$ cd $ORACLE_HOME/bin [oracle@MehmetSalih bin] $ ls -ltr oracle [oracle@MehmetSalih bin] $ -rwx-xr-x 1 oracle oinstall 136803483 Jul 16 10:24 oracle
Change permissions and give 6751 permission as below:
[oracle@MehmetSalih bin] $ chmod 6751 oracle [oracle@MehmetSalih bin] $ ls -ltr oracle -rwsr-s--x 1 oracle oinstall 136803483 Jul 16 10:24 oracle
Other case I have seen that extra slash usage with Oracle home as follows 🙂
/u01/app/oracle/product/18.0/dbhome_1/
To solve this problem check your Oracle home’s extra slash and remove it 😉 use as follows without slash.
/u01/app/oracle/product/18.0/dbhome_1
Do you want to learn Oracle Database for Beginners, then Click and read the following articles.
Oracle Database Tutorials for Beginners ( Junior Oracle DBA )