In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces the example analysis of oracle11g rac snooping configuration, which has a certain reference value. Interested friends can refer to it. I hope you will learn a lot after reading this article.
(1) Overview
The rac configuration is as follows:
[grid@dbrac1 admin] $cat / etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
:: 1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.56.2 dbrac1
192.168.56.3 dbrac1-vip
10.10.10.10 dbrac1-priv
192.168.56.4 dbrac2
192.168.56.5 dbrac2-vip
10.10.10.11 dbrac2-priv
192.168.56.8 rac-scan
[grid@dbrac1 admin] $
1. View the monitoring and tns configuration files of oracle and grid users in Node 1
Under oracle users:
[oracle@dbrac1 admin] $cat tnsnames.ora
# tnsnames.ora Network Configuration File: / oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
DBRAC =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = rac-scan) (PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = dbrac)
)
)
[oracle@dbrac1 admin] $
[oracle@dbrac1 admin] $sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Thu Oct 19 10:12:34 2017
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0-64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP
Data Mining and Real Application Testing options
SQL > show parameter name
NAME TYPE VALUE
-
Cell_offloadgroup_name string
Db_file_name_convert string
Db_name string dbrac
Db_unique_name string dbrac
Global_names boolean FALSE
Instance_name string dbrac1
Lock_name_space string
Log_file_name_convert string
Processor_group_name string
Service_names string dbrac
SQL >
SQL > show parameter listener
NAME TYPE VALUE
-
Listener_networks string
Local_listener string (ADDRESS= (PROTOCOL=TCP) (HOST=
192.168.56.3) (PORT=1521))
Remote_listener string rac-scan:1521
SQL >
Under grid users:
[grid@dbrac1 ~] $cd $ORACLE_HOME/network/admin
[grid@dbrac1 admin] $ls-lrt
Total 28
-rw-r--r-- 1 grid oinstall 381 Dec 17 2012 shrept.lst
Drwxr-xr-x 2 grid oinstall 4096 Oct 16 20:40 samples
-rw-r--r-- 1 grid oinstall 184 Oct 16 20:59 listener.ora.bak.dbrac1
-rw-r--r-- 1 grid oinstall 184 Oct 16 21:10 listener1710169PM1019.bak
-rw-r--r-- 1 grid oinstall 222 Oct 16 21:10 sqlnet.ora
-rw-r--r-- 1 grid oinstall 350 Oct 16 21:10 listener.ora
-rw-r--r-- 1 grid oinstall 185 Oct 16 21:10 endpoints_listener.ora
[grid@dbrac1 admin] $
-- endpoints_listener.ora file:
[grid@dbrac1 admin] $cat endpoints_listener.ora
LISTENER_DBRAC1= (DESCRIPTION= (ADDRESS_LIST= (ADDRESS= (PROTOCOL=TCP) (HOST=dbrac1-vip) (PORT=1521)) (ADDRESS= (PROTOCOL=TCP) (HOST=192.168.56.2) (PORT=1521) (IP=FIRST) # line added by Agent
[grid@dbrac1 admin] $
-- listener.ora snooping profile:
[grid@dbrac1 admin] $cat listener.ora
LISTENER= (DESCRIPTION= (ADDRESS_LIST= (ADDRESS= (PROTOCOL=IPC) (KEY=LISTENER) # line added by Agent
LISTENER_SCAN1= (DESCRIPTION= (ADDRESS_LIST= (ADDRESS= (PROTOCOL=IPC) (KEY=LISTENER_SCAN1) # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1=ON # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON # line added by Agent
[grid@dbrac1 admin] $
-- sqlnet.ora file:
[grid@dbrac1 admin] $cat sqlnet.ora
# sqlnet.ora.dbrac1 Network Configuration File: / oracle/app/11.2.0/grid/network/admin/sqlnet.ora.dbrac1
# Generated by Oracle configuration tools.
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
ADR_BASE = / oracle/app/grid
[grid@dbrac1 admin] $
[grid@dbrac1 admin] $
2. View the monitoring and tns configuration files of oracle and grid users in node 2.
Under oracle users:
[oracle@dbrac2 ~] $cd $ORACLE_HOME/network/admin
[oracle@dbrac2 admin] $ls
Samples shrept.lst tnsnames.ora
[oracle@dbrac2 admin] $cat tnsnames.ora
# tnsnames.ora Network Configuration File: / oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
DBRAC =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = rac-scan) (PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = dbrac)
)
)
[oracle@dbrac2 admin] $
[oracle@dbrac2 admin] $sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Thu Oct 19 14:49:34 2017
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0-64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP
Data Mining and Real Application Testing options
SQL > show parameter name
NAME TYPE VALUE
-
Cell_offloadgroup_name string
Db_file_name_convert string
Db_name string dbrac
Db_unique_name string dbrac
Global_names boolean FALSE
Instance_name string dbrac2
Lock_name_space string
Log_file_name_convert string
Processor_group_name string
Service_names string dbrac
SQL >
SQL > show parameter listener
NAME TYPE VALUE
-
Listener_networks string
Local_listener string (ADDRESS= (PROTOCOL=TCP) (HOST=
192.168.56.5) (PORT=1521))
Remote_listener string rac-scan:1521
SQL >
Under grid users:
[grid@dbrac2 ~] $cd $ORACLE_HOME/network/admin
[grid@dbrac2 admin] $ls-lrt
Total 28
-rw-r--r-- 1 grid oinstall 381 Oct 16 20:48 shrept.lst
Drwxr-xr-x 2 grid oinstall 4096 Oct 16 20:48 samples
-rw-r--r-- 1 grid oinstall 222 Oct 16 21:10 sqlnet.ora
-rw-r--r-- 1 grid oinstall 166 Oct 16 21:10 listener.ora.bak.dbrac2
-rw-r--r-- 1 grid oinstall 185 Oct 16 21:10 endpoints_listener.ora
-rw-r--r-- 1 grid oinstall 350 Oct 16 23:33 listener.bak
-rw-r--r-- 1 grid oinstall 481 Oct 19 10:31 listener.ora
-- endpoints_listener.ora file:
[grid@dbrac2 admin] $cat endpoints_listener.ora
LISTENER_DBRAC2= (DESCRIPTION= (ADDRESS_LIST= (ADDRESS= (PROTOCOL=TCP) (HOST=dbrac2-vip) (PORT=1521)) (ADDRESS= (PROTOCOL=TCP) (HOST=192.168.56.4) (PORT=1521) (IP=FIRST) # line added by Agent
[grid@dbrac2 admin] $
-- listener.ora snooping profile:
[grid@dbrac2 admin] $cat listener.ora
LISTENER_SCAN1= (DESCRIPTION= (ADDRESS_LIST= (ADDRESS= (PROTOCOL=IPC) (KEY=LISTENER_SCAN1) # line added by Agent
LISTENER= (DESCRIPTION= (ADDRESS_LIST= (ADDRESS= (PROTOCOL=IPC) (KEY=LISTENER) # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1=ON # line added by Agent
[grid@dbrac2 admin] $
-- sqlnet.ora file:
[grid@dbrac2 admin] $cat sqlnet.ora
# sqlnet.ora.dbrac2 Network Configuration File: / oracle/app/11.2.0/grid/network/admin/sqlnet.ora.dbrac2
# Generated by Oracle configuration tools.
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
ADR_BASE = / oracle/app/grid
[grid@dbrac2 admin] $
3. Check the cluster status:
[grid@dbrac2 admin] $crsctl stat res-t
NAME TARGET STATE SERVER STATE_DETAILS
Local Resources
Ora.DATA.dg
ONLINE ONLINE dbrac1
ONLINE ONLINE dbrac2
Ora.FRA.dg
ONLINE ONLINE dbrac1
ONLINE ONLINE dbrac2
Ora.LISTENER.lsnr
ONLINE ONLINE dbrac1
ONLINE ONLINE dbrac2
Ora.OCRVOTE.dg
ONLINE ONLINE dbrac1
ONLINE ONLINE dbrac2
Ora.asm
ONLINE ONLINE dbrac1 Started
ONLINE ONLINE dbrac2 Started
Ora.gsd
OFFLINE OFFLINE dbrac1
OFFLINE OFFLINE dbrac2
Ora.net1.network
ONLINE ONLINE dbrac1
ONLINE ONLINE dbrac2
Ora.ons
ONLINE ONLINE dbrac1
ONLINE ONLINE dbrac2
Ora.registry.acfs
ONLINE ONLINE dbrac1
ONLINE ONLINE dbrac2
Cluster Resources
Ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE dbrac2
Ora.cvu
1 ONLINE ONLINE dbrac2
Ora.dbrac.db
1 ONLINE ONLINE dbrac1 Open
2 ONLINE ONLINE dbrac2 Open
Ora.dbrac1.vip
1 ONLINE ONLINE dbrac1
Ora.dbrac2.vip
1 ONLINE ONLINE dbrac2
Ora.oc4j
1 ONLINE ONLINE dbrac2
Ora.scan1.vip
1 ONLINE ONLINE dbrac2
[grid@dbrac2 admin] $
It is found that local listeners have their own online on ora.LISTENER.lsnr, while scan listens on ora.LISTENER_SCAN1.lsnr online on node 2
-- check their listening status:
Node 2
[grid@dbrac2 admin] $lsnrctl status
LSNRCTL for Linux: Version 11.2.0.4.0-Production on 19-OCT-2017 14:45:19
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION= (ADDRESS= (PROTOCOL=IPC) (KEY=LISTENER)
STATUS of the LISTENER
-
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0-Production
Start Date 19-OCT-2017 10:33:22
Uptime 0 days 4 hr. 11 min. 56 sec
Trace Level off
Security ON: Password or Local OS Authentication
SNMP OFF
Listener Parameter File / oracle/app/11.2.0/grid/network/admin/listener.ora
Listener Log File / oracle/app/grid/diag/tnslsnr/dbrac2/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION= (ADDRESS= (PROTOCOL=ipc) (KEY=LISTENER)
(DESCRIPTION= (ADDRESS= (PROTOCOL=tcp) (HOST=192.168.56.4) (PORT=1521))
(DESCRIPTION= (ADDRESS= (PROTOCOL=tcp) (HOST=192.168.56.5) (PORT=1521))
Services Summary...
Service "+ ASM" has 1 instance (s).
Instance "+ ASM2", status READY, has 1 handler (s) for this service...
Service "dbrac" has 1 instance (s).
Instance "dbrac2", status READY, has 1 handler (s) for this service...
Service "dbracXDB" has 1 instance (s).
Instance "dbrac2", status READY, has 1 handler (s) for this service...
The command completed successfully
[grid@dbrac2 admin] $
[grid@dbrac2 admin] $lsnrctl status LISTENER_SCAN1
LSNRCTL for Linux: Version 11.2.0.4.0-Production on 19-OCT-2017 14:45:22
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION= (ADDRESS= (PROTOCOL=IPC) (KEY=LISTENER_SCAN1)
STATUS of the LISTENER
-
Alias LISTENER_SCAN1
Version TNSLSNR for Linux: Version 11.2.0.4.0-Production
Start Date 18-OCT-2017 22:54:51
Uptime 0 days 15 hr. 50 min. 31 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File / oracle/app/11.2.0/grid/network/admin/listener.ora
Listener Log File / oracle/app/11.2.0/grid/log/diag/tnslsnr/dbrac2/listener_scan1/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION= (ADDRESS= (PROTOCOL=ipc) (KEY=LISTENER_SCAN1)
(DESCRIPTION= (ADDRESS= (PROTOCOL=tcp) (HOST=192.168.56.8) (PORT=1521))
Services Summary...
Service "dbrac" has 2 instance (s).
Instance "dbrac1", status READY, has 1 handler (s) for this service...
Instance "dbrac2", status READY, has 1 handler (s) for this service...
Service "dbracXDB" has 2 instance (s).
Instance "dbrac1", status READY, has 1 handler (s) for this service...
Instance "dbrac2", status READY, has 1 handler (s) for this service...
The command completed successfully
[grid@dbrac2 admin] $
Because scan snooping resides on node 2.
Node 1:
[grid@dbrac1 admin] $lsnrctl status
LSNRCTL for Linux: Version 11.2.0.4.0-Production on 19-OCT-2017 14:43:02
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION= (ADDRESS= (PROTOCOL=IPC) (KEY=LISTENER)
STATUS of the LISTENER
-
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0-Production
Start Date 19-OCT-2017 02:50:38
Uptime 0 days 11 hr. 52 min. 23 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File / oracle/app/11.2.0/grid/network/admin/listener.ora
Listener Log File / oracle/app/grid/diag/tnslsnr/dbrac1/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION= (ADDRESS= (PROTOCOL=ipc) (KEY=LISTENER)
(DESCRIPTION= (ADDRESS= (PROTOCOL=tcp) (HOST=192.168.56.2) (PORT=1521))
(DESCRIPTION= (ADDRESS= (PROTOCOL=tcp) (HOST=192.168.56.3) (PORT=1521))
Services Summary...
Service "+ ASM" has 1 instance (s).
Instance "+ ASM1", status READY, has 1 handler (s) for this service...
Service "dbrac" has 1 instance (s).
Instance "dbrac1", status READY, has 1 handler (s) for this service...
Service "dbracXDB" has 1 instance (s).
Instance "dbrac1", status READY, has 1 handler (s) for this service...
The command completed successfully
[grid@dbrac1 admin] $
[grid@dbrac1 admin] $lsnrctl status LISTENER_SCAN1
LSNRCTL for Linux: Version 11.2.0.4.0-Production on 19-OCT-2017 14:43:09
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION= (ADDRESS= (PROTOCOL=IPC) (KEY=LISTENER_SCAN1)
STATUS of the LISTENER
-
Alias LISTENER_SCAN1
Version TNSLSNR for Linux: Version 11.2.0.4.0-Production
Start Date 19-OCT-2017 09:56:13
Uptime 0 days 4 hr. 46 min. 57 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File / oracle/app/11.2.0/grid/network/admin/listener.ora
Listener Log File / oracle/app/grid/diag/tnslsnr/dbrac1/listener_scan1/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION= (ADDRESS= (PROTOCOL=ipc) (KEY=LISTENER_SCAN1)
The listener supports no services
The command completed successfully
[grid@dbrac1 admin] $
Local_listener does not need to be configured by default. The default configuration points to port 1521. For a single instance to change the port, it needs to point to the connection string in tns, while in rac configuration, it points to the vip of this node by default.
Remote_listener points to the name of scan listener, which is configured if remote listening is required.
After Oracle version 11.2, a new listening file, endpoints_listener.ora, is introduced, which contains the IP and VIP information of the node.
The function of Endpoints_listener.ora file is to be backward compatible with the database before version 11.2. When DBCA builds the database, it is necessary to configure the database parameters and tnsnames by obtaining the location information of endpoints. The bottom two lines of parameters involve ENABLE_GLOBAL_DYNAMIC_ENDPOINT parameters, and the function of ENABLE_GLOBAL_DYNAMIC_ENDPOINT parameter is to allow listeners to accept connections that have not been dynamically registered before oracle 11.2.
(2) use the srvctl tool to add monitoring and manually add static registration information
-- add monitoring: (execute under grid user)
[grid@dbrac2 admin] $srvctl config network
Network exists: 1/192.168.56.0/255.255.255.0/eth0, type static
[grid@dbrac2 admin] $
[grid@dbrac2 admin] $srvctl add listener-h
Adds a listener configuration to the Oracle Clusterware.
Usage: srvctl add listener [- l] [- s] [- p "[TCP:] [,...] [/ IPC:] [/ NMP:] [/ TCPS:] [/ SDP:]"] [- o] [- k]
-l Listener name (default name is LISTENER)
-o ORACLE_HOME path (default value is CRS_HOME)
-k network number (default number is 1)
-s Skip the checking of ports
-p "[TCP:] [,...] [/ IPC:] [/ NMP:] [/ TCPS:] [/ SDP:]" Comma separated tcp ports or listener endpoints
-h Print usage
-k enter the network number,-p obtained just now. Enter the port number.-l. Enter the listener name.-o. Enter the GI HOME path.
-- execute:
[grid@dbrac2 admin] $srvctl add listener-l LISTENER_wang-o $ORACLE_HOME-p 1522-k 1
[grid@dbrac2 admin] $
-- query listening status:
[grid@dbrac2 admin] $srvctl status listener-h
Displays the current state of the listener.
Usage: srvctl status listener [- l] [- n] [- v]
-l Listener name
-n Node name
-v Verbose output
-h Print usage
[grid@dbrac2 admin] $srvctl status listener-l LISTENER_wang
Listener LISTENER_WANG is enabled
Listener LISTENER_WANG is not running
[grid@dbrac2 admin] $
-- start listening:
[grid@dbrac2 admin] $srvctl start listener-l LISTENER_wang
[grid@dbrac2 admin] $
-- View the newly created listening status:
[grid@dbrac2 admin] $lsnrctl stauts LISTENER_wang
LSNRCTL for Linux: Version 11.2.0.4.0-Production on 19-OCT-2017 15:29:34
Copyright (c) 1991, 2013, Oracle. All rights reserved.
NL-00853: undefined command "stauts". Try "help"
[grid@dbrac2 admin] $
[grid@dbrac2 admin] $lsnrctl status LISTENER_wang
LSNRCTL for Linux: Version 11.2.0.4.0-Production on 19-OCT-2017 15:29:46
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION= (ADDRESS= (PROTOCOL=IPC) (KEY=LISTENER_WANG)
STATUS of the LISTENER
-
Alias LISTENER_WANG
Version TNSLSNR for Linux: Version 11.2.0.4.0-Production
Start Date 19-OCT-2017 15:29:12
Uptime 0 days 0 hr. 0 min. 35 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File / oracle/app/11.2.0/grid/network/admin/listener.ora
Listener Log File / oracle/app/11.2.0/grid/log/diag/tnslsnr/dbrac2/listener_wang/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION= (ADDRESS= (PROTOCOL=ipc) (KEY=LISTENER_WANG)
(DESCRIPTION= (ADDRESS= (PROTOCOL=tcp) (HOST=192.168.56.4) (PORT=1522))
(DESCRIPTION= (ADDRESS= (PROTOCOL=tcp) (HOST=192.168.56.5) (PORT=1522))
The listener supports no services
The command completed successfully
[grid@dbrac2 admin] $
-- View the monitoring configuration file: new records will appear in listener.ora and endpoints_listener.ora after srvctl start listener starts the newly added monitoring
[grid@dbrac2 admin] $ls-lrt
Total 32
-rw-r--r-- 1 grid oinstall 381 Oct 16 20:48 shrept.lst
Drwxr-xr-x 2 grid oinstall 4096 Oct 16 20:48 samples
-rw-r--r-- 1 grid oinstall 222 Oct 16 21:10 sqlnet.ora
-rw-r--r-- 1 grid oinstall 185 Oct 16 21:10 endpoints_listener.ora.bak.dbrac2
-rw-r--r-- 1 grid oinstall 350 Oct 16 23:33 listener.bak
-rw-r--r-- 1 grid oinstall 481 Oct 19 10:31 listener.ora.bak.dbrac2
-rw-r--r-- 1 grid oinstall 662Oct 19 15:29 listener.ora
-rw-r--r-- 1 grid oinstall 375Oct 19 15:29 endpoints_listener.ora
[grid@dbrac2 admin] $
[grid@dbrac2 admin] $cat listener.ora
LISTENER_WANG= (DESCRIPTION= (ADDRESS_LIST= (ADDRESS= (PROTOCOL=IPC) (KEY=LISTENER_WANG) # line added by Agent
LISTENER_SCAN1= (DESCRIPTION= (ADDRESS_LIST= (ADDRESS= (PROTOCOL=IPC) (KEY=LISTENER_SCAN1) # line added by Agent
LISTENER= (DESCRIPTION= (ADDRESS_LIST= (ADDRESS= (PROTOCOL=IPC) (KEY=LISTENER) # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1=ON # line added by Agent
#-ADDED BY TNSLSNR 19-OCT-2017 10-31Rose 25muri--
PASSWORDS_LISTENER = 1DF5C2FD0FE9CFA2
#-
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_WANG=ON # line added by Agent
[grid@dbrac2 admin] $
[grid@dbrac2 admin] $cat endpoints_listener.ora
LISTENER_WANG_DBRAC2= (DESCRIPTION= (ADDRESS_LIST= (ADDRESS= (PROTOCOL=TCP) (HOST=dbrac2-vip) (PORT=1522)) (ADDRESS= (PROTOCOL=TCP) (HOST=192.168.56.4) (PORT=1522) (IP=FIRST) # line added by Agent
LISTENER_DBRAC2= (DESCRIPTION= (ADDRESS_LIST= (ADDRESS= (PROTOCOL=TCP) (HOST=dbrac2-vip) (PORT=1521)) (ADDRESS= (PROTOCOL=TCP) (HOST=192.168.56.4) (PORT=1521) (IP=FIRST) # line added by Agent
[grid@dbrac2 admin] $
-after that, you only need to add static registration information, such as:
SID_LIST_LISTENER_WANG =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = dbrac)
(ORACLE_HOME = / oracle/app/11.2.0/grid)
(SID_NAME=dbrac2)
)
)
Add the above information to the listener.ora configuration file (SID_LIST_ ($LISTENER_NAME), and restart listening to complete the static registration:
[grid@dbrac2 admin] $srvctl status listener-l LISTENER_WANG
Listener LISTENER_WANG is enabled
Listener LISTENER_WANG is running on node (s): dbrac1,dbrac2
[grid@dbrac2 admin] $
[grid@dbrac2 admin] $srvctl stop listener-l LISTENER_WANG
[grid@dbrac2 admin] $
[grid@dbrac2 admin] $srvctl status listener-l LISTENER_WANG
Listener LISTENER_WANG is enabled
Listener LISTENER_WANG is not running
[grid@dbrac2 admin] $
[grid@dbrac2 admin] $srvctl start listener-l LISTENER_WANG-n dbrac2
[grid@dbrac2 admin] $
[grid@dbrac2 admin] $srvctl status listener-l LISTENER_WANG
Listener LISTENER_WANG is enabled
Listener LISTENER_WANG is running on node (s): dbrac2
The command srvctl start listener-l LISTENER_WANG-n dbrac2 starts listening on only one node
-- start listening without parameters. By default, two nodes are started at the same time.
[grid@dbrac2 admin] $srvctl stop listener-l LISTENER_WANG
[grid@dbrac2 admin] $
[grid@dbrac2 admin] $srvctl status listener-l LISTENER_WANG
Listener LISTENER_WANG is enabled
Listener LISTENER_WANG is not running
[grid@dbrac2 admin] $
[grid@dbrac2 admin] $srvctl start listener-l LISTENER_WANG-n dbrac1,dbrac2
PRKO-2003: Invalid command line option value: dbrac1,dbrac2
[grid@dbrac2 admin] $
[grid@dbrac2 admin] $
[grid@dbrac2 admin] $srvctl start listener-l LISTENER_WANG
[grid@dbrac2 admin] $
[grid@dbrac2 admin] $
[grid@dbrac2 admin] $srvctl status listener-l LISTENER_WANG
Listener LISTENER_WANG is enabled
Listener LISTENER_WANG is running on node (s): dbrac1,dbrac2
-- query listening LISTENER_WANG status:
[grid@dbrac2 admin] $lsnrctl status LISTENER_WANG
LSNRCTL for Linux: Version 11.2.0.4.0-Production on 19-OCT-2017 16:08:14
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION= (ADDRESS= (PROTOCOL=IPC) (KEY=LISTENER_WANG)
STATUS of the LISTENER
-
Alias LISTENER_WANG
Version TNSLSNR for Linux: Version 11.2.0.4.0-Production
Start Date 19-OCT-2017 16:05:30
Uptime 0 days 0 hr. 2 min. 43 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File / oracle/app/11.2.0/grid/network/admin/listener.ora
Listener Log File / oracle/app/11.2.0/grid/log/diag/tnslsnr/dbrac2/listener_wang/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION= (ADDRESS= (PROTOCOL=ipc) (KEY=LISTENER_WANG)
(DESCRIPTION= (ADDRESS= (PROTOCOL=tcp) (HOST=192.168.56.4) (PORT=1522))
(DESCRIPTION= (ADDRESS= (PROTOCOL=tcp) (HOST=192.168.56.5) (PORT=1522))
Services Summary...
Service "dbrac" has 1 instance (s).
Instance "dbrac2", status UNKNOWN, has 1 handler (s) for this service...
The command completed successfully
[grid@dbrac2 admin] $
Attach the monitoring configuration information for Node 1:
[grid@dbrac1 admin] $cat listener.ora
LISTENER_WANG= (DESCRIPTION= (ADDRESS_LIST= (ADDRESS= (PROTOCOL=IPC) (KEY=LISTENER_WANG) # line added by Agent
LISTENER= (DESCRIPTION= (ADDRESS_LIST= (ADDRESS= (PROTOCOL=IPC) (KEY=LISTENER) # line added by Agent
LISTENER_SCAN1= (DESCRIPTION= (ADDRESS_LIST= (ADDRESS= (PROTOCOL=IPC) (KEY=LISTENER_SCAN1) # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1=ON # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_WANG=ON # line added by Agent
[grid@dbrac1 admin] $
[grid@dbrac1 admin] $cat endpoints_listener.ora
LISTENER_WANG_DBRAC1= (DESCRIPTION= (ADDRESS_LIST= (ADDRESS= (PROTOCOL=TCP) (HOST=dbrac1-vip) (PORT=1522)) (ADDRESS= (PROTOCOL=TCP) (HOST=192.168.56.2) (PORT=1522) (IP=FIRST) # line added by Agent
LISTENER_DBRAC1= (DESCRIPTION= (ADDRESS_LIST= (ADDRESS= (PROTOCOL=TCP) (HOST=dbrac1-vip) (PORT=1521)) (ADDRESS= (PROTOCOL=TCP) (HOST=192.168.56.2) (PORT=1521) (IP=FIRST) # line added by Agent
[grid@dbrac1 admin] $
Thank you for reading this article carefully. I hope the article "sample Analysis of oracle11g rac snooping configuration" shared by the editor will be helpful to you. At the same time, I also hope that you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
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
Wget-no-cookies-no-check-certificate header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; ora
© 2024 shulou.com SLNews company. All rights reserved.