1. Problem description:
Open sqlplus and log on with the system role
Switch to scott user and switch to sys
D:/> sqlplus sys/admin @ orcl as sysdba
Next, the following error occurs: "TNS: The Listener cannot distribute client connections"
2. Solution Process
Use lsnrctl service to view the listener status
D:/Documents and Settings> lsnrctl service
- LSNRCTL for 32-bit Windows: Version 10.2.0.1.0-Production on 3-10-2012 20:11:19
- Copyright (c) 1991,200 5, Oracle. All rights reserved.
- Connecting to (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1 )))
- Service summary ..
- The Service "PLSExtProc" contains one routine.
- Routine "PLSExtProc", status UNKNOWN, contains one handler of this service...
- Handler:
- "DEDICATED" created: 0 rejected: 0
- LOCAL SERVER
- The Service "orcl" contains one routine.
- Routine "orcl", status READY, contains three processing programs of this service...
- Handler:
- "DEDICATED" created: 33 rejected: 0 status: ready
- LOCAL SERVER
- "D001" created: 0 rejected: 9 current: 0 maximum: 1002 status: ready
- DISPATCHER <machine: NETPLUS, pid: 3448>
- (ADDRESS = (PROTOCOL = tcps) (HOST = netplus) (PORT = 1934 ))
- "D000" created: 1 rejected: 0 current: 1 Maximum: 1002 status: ready
- DISPATCHER <machine: NETPLUS, pid: 3996>
- (ADDRESS = (PROTOCOL = tcp) (HOST = netplus) (PORT = 1933 ))
- The Service "orcl_XPT" contains one routine.
- Routine "orcl", status READY, contains three processing programs of this service...
- Handler:
- "DEDICATED" created: 33 rejected: 0 status: ready
- LOCAL SERVER
- "D001" created: 0 rejected: 9 current: 0 maximum: 1002 status: ready
- DISPATCHER <machine: NETPLUS, pid: 3448>
- (ADDRESS = (PROTOCOL = tcps) (HOST = netplus) (PORT = 1934 ))
- "D000" created: 1 rejected: 0 current: 1 Maximum: 1002 status: ready
- DISPATCHER <machine: NETPLUS, pid: 3996>
- (ADDRESS = (PROTOCOL = tcp) (HOST = netplus) (PORT = 1933 ))
- Command executed successfully
The following reason: After the customer connects to the listener, the listener redirects the customer to the scheduling program port (probably not port 1521). Due to operating system problems, these connections will be rejected.
To solve this problem, you only need to use LISTENER. Add this line of DIRECT_HANDOFF_TTC_LISTENER = OFF to the ORA header.
Solution:
Add the following "add content" to listener. ora"
- # Listener. ora Network Configuration File: E: \ oracle \ product \ 11.2.0 \ dbhome_1 \ network \ admin \ listener. ora
- # Generated by Oracle configuration tools.
- DIRECT_HANDOFF_TTC_LISTENER = OFF // added content </SPAN> <SPAN style = "COLOR: #333333">
- SID_LIST_LISTENER =
- (SID_LIST =
- (SID_DESC =
- (SID_NAME = CLRExtProc)
- (ORACLE_HOME = E: \ oracle \ product \ 11.2.0 \ dbhome_1)
- (PROGRAM = extproc)
- (ENVS = "EXTPROC_DLLS = ONLY: E: \ oracle \ product \ 11.2.0 \ dbhome_1 \ bin \ oraclr11.dll ")
- )
- )
Then execute the following command in the command line to restart the listener and EM. If there is still a problem, restart the oracle service.
Lsnrctl stop
Lsnrctl start
Emctl stop dbconsole
Emctl start dbconsole