Listen for configuration independent of the database server, solve ORA-12520 and ORA-12545 errors 1. Environment: 1. linux host ocm (192.168.217.130) as Database sys @ OCM> select * from v $ version; BANNER monitoring Oracle Database 11g Enterprise Edition Release 11.2.0.1.0-Production 2. linux host ocp (192.168.217.large) as an independent remote listener sys @ OCP> select * from v $ version; BANNER monitoring ------------------------------------------------------ -------------------------- Oracle Database 11g Enterprise Edition Release 11.2.0.3.0-64bit Production 3. windows host (192.168.217.2) as the client windows 7. perform operations on the ocm host (192.168.217.130): 1. Configure tnsnames. ora LISTENER_OCP = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.217.htm) (PORT = 1521 ))) 2. Configure the parameter sys @ OCM> alter system set remote_listener = LISTENER_OCP; 3. query and listen for [oracle @ ocm ~] $ Lsnrctl status LSNRCTL for Linux: Version 11.2.0.1.0-Production on 29-MAY-2013 21:13:28 Copyright (c) 1991,200 9, Oracle. all rights reserved. connecting to (ADDRESS = (PROTOCOL = tcp) (HOST =) (PORT = 1521) STATUS of the LISTENER ------------------------ Alias LISTENERVersion TNSLSNR for Linux: version 11.2.0.1.0-ProductionStart Date 29-MAY-2013 20: 34: 42 Uptime 0 days 0 hr. 38 min. 47 secTrace Level off Security ON: Local OS AuthenticationSNMP OFFListener Parameter File/u01/app/oracle/product/11.2.0/network/admin/listener. oraListener Log File/u01/app/oracle/diag/tnslsnr/ocm/listener/alert/log. xmlListening Endpoints Summary... (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = ocm.example.com) (PORT = 1521) Services Summary... service "ocm" has 1 instance (s ). instance "ocm", status READY, has 1 handler (s) f Or this service... service "ocmXDB" has 1 instance (s ). instance "ocm", status READY, has 1 handler (s) for this service... the command completed successfully 3. operate on The ocp host (192.168.217.htm): 1. query and listen to [oracle @ ocp ~] $ Lsnrctl status LSNRCTL for Linux: Version 11.2.0.3.0-Production on 29-MAY-2013 20:49:22 Copyright (c) 1991,201 1, Oracle. all rights reserved. connecting to (ADDRESS = (PROTOCOL = tcp) (HOST =) (PORT = 1521) STATUS of the LISTENER ------------------------ Alias LISTENERVersion TNSLSNR for Linux: version 11.2.0.3.0-ProductionStart Date 29-MAY-2013 20: 44: 12 Uptime 0 days 0 hr. 5 min. 10 secTrace Level offS Ecurity ON: Local OS AuthenticationSNMP OFFListener Parameter File/u01/app/oracle/product/11.2.0/network/admin/listener. oraListener Log File/u01/app/oracle/diag/tnslsnr/ocp/listener/alert/log. xmlListening Endpoints Summary... (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = ocp) (PORT = 1521) Services Summary... service "ocm" has 1 instance (s ). instance "ocm", status READY, has 1 handler (s) for this servi Ce... service "ocmXDB" has 1 instance (s ). instance "ocm", status READY, has 1 handler (s) for this service... service "ocp" has 1 instance (s ). instance "ocp", status READY, has 1 handler (s) for this service... the command completed successfully 2. With tnsnames. oraremote_130 = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.217.htm) (PORT = 1521) (CONNECT_DATA = (SERVICE_NAME = Ocm) 3. connection test [oracle @ ocm admin] $ sqlplus hr/hr @ remote_130 SQL * Plus: Release 11.2.0.3.0 Production on Wed May 29 23:07:19 2013 Copyright (c) 1982,200 9, Oracle. all rights reserved. ERROR: ORA-12520: TNS: listener cocould not find available handler for requested type ofserver Enter user-name: 4, solution :( 192.168.217.htm) configure vi/etc/hosts192.168.217.130 ocm192.168.217.20.ocp On the host. 4. Connect to remote_13 from the windows client. 0 = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.217.htm) (PORT = 1521) (CONNECT_DATA = (SERVICE_NAME = ocm) C: \ Users \ Administrator> sqlplus hr/hr @ remote_130 SQL * Plus: Release 10.2.0.1.0-Production on Wednesday May 29 21:02:34 2013 Copyright (c) 1982,200 5, Oracle. all rights reserved. ERROR: ORA-12545: because the target host or object does not exist, connection failed please enter User name: solution in C: \ Windows \ System32 \ drivers \ etc edit hos Add the following to ts: 192.168.217.130 ocm192.168.217.20.ocp v. Finally, summarize the configuration process and solution: 1. Configure tnsnames. ora LISTENER_OCP = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.217.htm) (PORT = 1521 ))) 2. Configure the parameter sys @ OCM> alter system set remote_listener = LISTENER_OCP; 3. query the service [oracle @ ocm ~] $ Lsnrctl servicesLSNRCTL for Linux: Version 11.2.0.1.0-Production on 29-MAY-2013 23:28:55 Copyright (c) 1991,200 9, Oracle. all rights reserved. connecting to (ADDRESS = (PROTOCOL = tcp) (HOST =) (PORT = 1521) Services Summary... service "ocm" has 1 instance (s ). instance "ocm", status READY, has 1 handler (s) for this service... handler (s): "DEDICATED" established: 0 refused: 0 state: ready LOCAL SERVERServic E "ocmXDB" has 1 instance (s ). instance "ocm", status READY, has 1 handler (s) for this service... handler (s): "D000" established: 0 refused: 0 current: 0 max: 972 state: ready DISPATCHER <machine: ocm, pid: 12608> (ADDRESS = (PROTOCOL = tcp) (HOST = ocm.example.com) (PORT = 46963) Service "ocp" has 1 instance (s ). instance "ocp", status READY, has 1 handler (s) for this service... handler (s): "DEDICATED" establishe D: 5 refused: 0 state: ready remote server (ADDRESS = (PROTOCOL = TCP) (HOST = ocp) (PORT = 1521 )) the command completed successfully (ADDRESS = (PROTOCOL = TCP) (HOST = ocp) (PORT = 1521) where The problem is located .... I understand that the listener uses the host name./etc/hosts or DNS 4 must be configured here, And tnsnames must be configured on the windows client. ora, or configure tnsnames on the linux client. ora remote_130 = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.217.htm) (PORT = 1521) (CONNECT_DATA = (SERVICE_NAME = ocm ))) 5. Connection ERROR in windows ERROR: ORA-12545: because the target host or object does not exist, connection failure please enter User name: linux ERROR: ORA-12520: TNS: listener cocould not find available handler for requested type ofserver Enter us Er-name: 6. Solution: (1) windowsC: \ Windows \ System32 \ drivers \ etc edit hosts and add the following: 192.168.217.130 ocm192.168.217.20.ocp (2) linuxvi/etc/hosts192.168.217.130 ocm192.168.217.20.ocp (3) if an error is returned, the parameter listener_local is configured. hey, it is generally not required. I have no configuration here, but it does not matter if it is configured. Alter system set local_listener = '(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.217.130) (PORT = 1521)'; (4) if an error is returned in the preceding three steps, it may be a bug. I have not tested this version yet... The operation is complete. please correct me if there are other deficiencies. Thank you!