Single Client Access Name (SCAN) is an Oracle Real Application Clusters (Oracle RAC) feature that provides a single name for clients to access Oracle Databases running in a cluster.The benefit is that the client’s connect information does not need to change if you add or remove nodes or databases in the cluster.
In Oracle RAC 11gR2 or higher there are two listeners: traditional and scan listener. The management of both listeners should be done via srvctl command under Grid Infrastructure Home.
Traditional listener status:
# Set Environment to Grid Infrastructure Home
[oracle@rac1 ~]$ . oraenv
ORACLE_SID = [+ASM1] ? +ASM1
The Oracle base remains unchanged with value /u01/app/oracle
# Listener Status
[oracle@rac1 ~]$ srvctl status listener
Listener LISTENER is enabled
Listener LISTENER is running on node(s): rac2,rac1
|
Traditional listener port number:
[oracle@rac1 admin]$ srvctl config listener
Name: LISTENER
Network: 1, Owner: oracle
Home: <CRS home>
End points: TCP:1521
|
Stop traditional listener:
# Stop listener on node rac1
[oracle@rac1 ~]$ srvctl stop listener -n rac1
# Check status
[oracle@rac1 ~]$ srvctl status listener
Listener LISTENER is enabled
Listener LISTENER is running on node(s): rac2
|
Start traditional listener:
# Start listener on node rac1
[oracle@rac1 ~]$ srvctl start listener -n rac1
# Check status
[oracle@rac1 ~]$ srvctl status listener
Listener LISTENER is enabled
Listener LISTENER is running on node(s): rac2,rac1
|
SCAN listener status:
# Set Environment to Grid Infrastructure Home
[oracle@rac1 ~]$ . oraenv
ORACLE_SID = [+ASM1] ? +ASM1
The Oracle base remains unchanged with value /u01/app/oracle
# SCAN Listener Status
[oracle@rac1 ~]$ srvctl status scan_listener
SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is running on node rac2
SCAN Listener LISTENER_SCAN2 is enabled
SCAN listener LISTENER_SCAN2 is running on node rac1
SCAN Listener LISTENER_SCAN3 is enabled
SCAN listener LISTENER_SCAN3 is running on node rac1
|
Scan listener port number:
[oracle@rac1 admin]$ srvctl config scan_listener
SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521
SCAN Listener LISTENER_SCAN2 exists. Port: TCP:1521
SCAN Listener LISTENER_SCAN3 exists. Port: TCP:1521
|
Stop SCAN listener:
# Stop SCAN Listener
[oracle@rac1 ~]$ srvctl stop scan_listener
|
Start SCAN listener:
# Start SCAN Listener
[oracle@rac1 ~]$ srvctl start scan_listener
|
Disable SCAN listener from automaticly start on the boot of the server:
# Disable SCAN Listener
[oracle@rac1 ~]$ srvctl disable scan_listener
# SCAN Listener Status
[oracle@rac1 ~]$ srvctl status scan_listener
SCAN Listener LISTENER_SCAN1 is disabled
SCAN listener LISTENER_SCAN1 is running on node rac2
SCAN Listener LISTENER_SCAN2 is disabled
SCAN listener LISTENER_SCAN2 is running on node rac1
SCAN Listener LISTENER_SCAN3 is disabled
SCAN listener LISTENER_SCAN3 is running on node rac1
|
For more information see:
I hope this helps.
Please feel free to leave your questions or suggest improvements to this section.
No comments:
Post a Comment