In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
An experiment was done yesterday, and the environment is like this: set up a static listening port 1526 and a dynamic listening port 1521, and connect with two kinds of connection strings in tnsname. There is no problem with the static connection strings to connect directly, but later the dynamic connection strings can not be connected, so try to register.
SQL > alter system register;System altered. [oracle@demo2] $lsnrctl statLSNRCTL for Linux: Version 11.2.0.1.0-Production on 26-OCT-2016 15:43:10Copyright (c) 1991, 2009, Oracle. All rights reserved.Connecting to (DESCRIPTION= (ADDRESS= (PROTOCOL=TCP) (HOST=demo2) (PORT=1521)) STATUS of the LISTENER----Alias LISTENERVersion TNSLSNR for Linux: Version 11.2.0.1.0-ProductionStart Date 26-OCT-2016 15:41:57Uptime 0 days 0 hr. 1 min. 13 secTrace Level offSecurity ON: Local OS AuthenticationSNMP OFFListener Parameter File / u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.oraListener Log File / u01/app/oracle/diag/tnslsnr/demo2/listener/alert/log.xmlListening Endpoints Summary... (DESCRIPTION= (ADDRESS= (PROTOCOL=tcp) (HOST=demo2) (PORT=1521) The listener supports no servicesThe command completed successfully
There are two types of monitoring: dynamic monitoring and static monitoring. Static monitoring directly specifies the database or instance name, so you do not need to register, you can listen directly. Dynamic monitoring requires registration before it can be monitored. Because static monitoring is not a problem, I started testing dynamic monitoring.
First of all, I configured two dynamic listeners with netca. One port is 1526 or 1521. In general,
SQL > alter system register
In this way, dynamic monitoring will be registered, but it turns out that only 1521 of dynamic monitoring has gone on, and 1526 of them are unmoved.
[oracle@demo2] $lsnrctl statLSNRCTL for Linux: Version 11.2.0.1.0-Production on 26-OCT-2016 16:05:10Copyright (c) 1991, 2009, Oracle. All rights reserved.Connecting to (DESCRIPTION= (ADDRESS= (PROTOCOL=TCP) (HOST=demo2) (PORT=1521)) STATUS of the LISTENER----Alias LISTENERVersion TNSLSNR for Linux: Version 11.2.0.1.0-ProductionStart Date 26-OCT-2016 16:04:33Uptime 0 days 0 hr. 0 min. 37 secTrace Level offSecurity ON: Local OS AuthenticationSNMP OFFListener Parameter File / u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.oraListener Log File / u01/app/oracle/diag/tnslsnr/demo2/listener/alert/log.xmlListening Endpoints Summary... (DESCRIPTION= (ADDRESS= (PROTOCOL=tcp) (HOST=demo2) (PORT=1521)) Services Summary...Service "PROD.us.oracle.cn" has 1 instance (s). Instance "PROD", status READY, has 1 handler (s) for this service...The command completed successfully
After querying the data, it is found that the pmon process will only register 1521 ports on a regular basis, but will not register any process other than 1521. At this time, another parameter, local_listener, is required. The official definition of loacl_listener is
LOCAL_LISTENER specifies a network name that resolves to an address or address list of Oracle Net local listeners (that is, listeners that are running on the same machine as this instance). The address or address list is specified in the TNSNAMES.ORA file or other address repository as configured for your system.
At this time, let's take a look at the monitoring status.
[oracle@demo2 admin] $lsnrctl statLSNRCTL for Linux: Version 11.2.0.1.0-Production on 26-OCT-2016 16:46:57Copyright (c) 1991, 2009, Oracle. All rights reserved.Connecting to (DESCRIPTION= (ADDRESS= (PROTOCOL=TCP) (HOST=demo2) (PORT=1521)) TNS-12541: TNS:no listener TNS-12560: TNS:protocol adapter error TNS-00511: No listener Linux Error: 111: Connection refused
Listening is not up. At this time, I went to the database to modify the local_listener.
SQL > show parameter localNAME TYPE VALUE-- local_listener stringlog_ Archive_local_first boolean TRUEparallel_force_local boolean FALSESQL > alter system set local_listener='prod1526' System altered.SQL > show parameter localNAME TYPE VALUE-- local_listener String prod1526log_archive_local_first boolean TRUEparallel_force_local boolean FALSE
At this time, you can see that my parameter has been specified as port 1526 of tnsname. At this time, listen on and register dynamically, and then observe the listening status.
[oracle@demo2] $lsnrctl status prod1526LSNRCTL for Linux: Version 11.2.0.1.0-Production on 26-OCT-2016 16:56:05Copyright (c) 1991, 2009, Oracle. All rights reserved.Connecting to (DESCRIPTION= (ADDRESS= (PROTOCOL=TCP) (HOST=demo2) (PORT=1526)) (CONNECT_DATA= (service_name=PROD.us.oracle.cn)) STATUS of the LISTENER----Alias LISTENER8Version TNSLSNR for Linux: Version 11.2.0.1.0-ProductionStart Date 26-OCT-2016 16:45:25Uptime 0 days 0 hr. 10 min. 39 secTrace Level offSecurity ON: Local OS AuthenticationSNMP OFFListener Parameter File / u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.oraListener Log File / u01/app/oracle/diag/tnslsnr/demo2/listener8/alert/log.xmlListening Endpoints Summary... (DESCRIPTION= (ADDRESS= (PROTOCOL=tcp) (HOST=demo2) (PORT=1526)) Services Summary...Service "PROD.us.oracle.cn" has 1 instance (s). Instance "PROD", status READY, has 1 handler (s) for this service...The command completed successfully
Note that the name of tnsname or the name of the listener must be added to view the listener. At this time, you can see that 1526 of the listener has been listening, indicating that this parameter can be specified for dynamic connection. It also means that except for port 1521, which is registered by the pmon process, other dynamic registrations must be specified with the parameter local_listener, which means that an instance can only be monitored by one dynamic listener. Ports other than 1521 must specify locl_listener.
[oracle@demo2 admin] $sqlplus scott/flllll@prod1526SQL*Plus: Release 11.2.0.1.0 Production on Wed Oct 26 16:55:01 2016Copyright (c) 1982, 2009, Oracle. All rights reserved.Error accessing PRODUCT_USER_PROFILEWarning: Product user profile information not Loadedfolk you may need to run PUPBLD.SQL as SYSTEMConnected to:Oracle Database 11g Enterprise Edition Release 11.2.0.1.0-64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing options
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.