Problem:
Any connection through the database listener is extremely slow. It works fine, but it is not unusual for connection to take over a minute.
I try to start the listener as follows:
oracle@soa11gdev:/u01/app/oracle/product/11.2.0/db_1> lsnrctl startIt starts up after several minutes, instead of a few seconds.
Once it's up, I try to ping the listener as follows:
oracle@soa11gdev:/u01/app/oracle/product/11.2.0/db_1> tnsping orclThe response is over 60 seconds.
When I try to sqlplus into the database through the listener, it takes over 60 to 70 seconds:
oracle@soa11gdev:/u01/app/oracle/product/11.2.0/db_1> sqlplus system/manager@orclTrying to sqlplus to the database directly (i.e., bypassing the listener) is fine:
oracle@soa11gdev:/u01/app/oracle/product/11.2.0/db_1> sqlplus system/managerThe thing is, the listener works and is not misconfigured. But connecting is exceptionally slow.
Investigation:
Check your $ORACLE_HOME/network/admin/sqlnet.ora configuration file and ensure that the TNSNAMES is specified first as follows:
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)In my case, the database was installed on Oracle Enterprise Linux 5.5.
My hostname was set to the fully qualified name of "oradev.ipnweb.com" and my /etc/hosts had the following entry:
192.168.1.55 oradev.ipnweb.com oradevSolution:
The problem is that /etc/resolv.conf had an incorrectly configured search domain.
Original /etc/resolv.conf:
nameserver 192.168.1.2Corrected /etc/resolv.conf:
search localdomain
nameserver 192.168.1.2Once this was corrected, problem was solved.
Applicable Versions:
- Oracle Database 11g (11.2.0) 32-bit and 64-bit
- Oracle Enterprise Linux 5.5 32-bit and 64-bit
No comments:
Post a Comment