SCAN IP 解释

Summary of points about SCAN:
  • SCAN Name will represent the cluster in the network. 
  • SCAN used by clients to connect to any database in the cluster.
  • SCAN is a GSD resource, which is managed by CRS.
  • SCAN provides a single domain name (via DNS), allowing end-users to address a RAC cluster as-if it were a single IP address.
  • Removes the requirement to change the client connection if cluster changes.
  • Load balances across the instances providing a service. SCAN listener selects least loaded node.
  • SCAN requires a DNS entry or GNS to be used.
  • SCAN is an alternative to the transparent application failover (TAF) for automatic load balancing.
  • Provides failover between instances.
  • SCAN VIP/LISTENER will failover to another node in the cluster.
  • Clients do not require VIP information.
  • Must resolve to at least one address on the public network.
  • SCAN provides location independence for the databases.
  • Allow clients to use EZConnect or JDBC connections.
  • SCAN Listener would forward the request to local listener that’s running on VIPs.
  • Each cluster will have 3 SCAN listeners, each having a SCAN VIP defined as cluster resources.
  • Instance registers with local listener on its node. Database “REMOTE_LISTENER” registers instances with all SCAN listeners.
  • SCAN listeners on each node in the cluster, which are not replacements for a regular listener.
  • PMON process of each instance registers the database services with the default listener on the local node and with each SCAN listener, which is specified by the REMOTE_LISTENER database parameter.
  • Client queries DNS to resolve to SCAN.
 
SCAN (Single Client Access Name) commands in Oracle RAC
 
cluvfy comp scan -> Use the cluvfy comp scan component verification command to check the Single Client Access Name (SCAN) configuration.
 
crsctl status resource -w "TYPE = ora.scan_listner.type"
 
SCAN:
srvctl add scan -n scan_name [-k network_number] [-S subnet/netmask[/if1[|if2|...]]]
#srvctl add scan -n scan.mycluster.example.com   -- Adds new SCAN information for a cluster
 
srvctl remove scan [-f]   -- Removes SCAN information
srvctl remove scan
srvctl remove scan -f
 
srvctl start scan [-i ordinal_number] [-n node_name]
srvctl start scan
srvctl start scan -i 1 -n node1
 
srvctl stop scan [-i ordinal_number] [-f]
srvctl stop scan
srvctl stop scan -i 1
 
srvctl status scan [-i ordinal_number]
srvctl status scan
srvctl status scan -i 1
 
srvctl enable scan [-i ordinal_number]
srvctl enable scan
srvctl enable scan -i 1
 
srvctl disable scan [-i ordinal_number]
srvctl disable scan
srvctl disable scan -i 3
 
srvctl config scan [-i ordinal_number]   -- Shows the current SCAN configuration
srvctl config scan
srvctl config scan -i 2
 
srvctl modify scan -n scan_name
srvctl modify scan -n scan1
-- Modifies SCAN information (used when changing SCAN to DNS after initially using /etc/hosts)
 
srvctl relocate scan -i ordinal_number [-n node_name]
srvctl relocate scan -i 2 -n node2
 
ordinal_number=1,2,3 --> this refers to the SCAN VIPs
 
Scan_listener:
srvctl add scan_listener [-l lsnr_name_prefix] [-s] [-p "[TCP:]port_list[/IPC:key][/NMP:pipe_name][/TCPS:s_port] [/SDP:port]"]
#srvctl add scan_listener -l myscanlistener   -- Adds a new SCAN listener for a cluster on the default port of 1521
#srvctl add scan_listener -p 1565         -- Adds a new SCAN listener on a different port
 
srvctl remove scan_listener [-f]
srvctl remove scan_listener        -- Removes the SCAN listener
srvctl remove scan_listener -f
 
srvctl start scan_listener [-n node_name] [-i ordinal_number]
srvctl start scan_listener
 
srvctl stop scan_listener [-i ordinal_number] [-f]
srvctl stop scan_listener
srvctl stop scan_listener -i 3
 
srvctl status scan_listener [-i ordinal_number]
srvctl status scan_listener
srvctl status scan_listener -i 1
 
srvctl enable scan_listener [-i ordinal_number]
srvctl enable scan_listener
srvctl enable scan_listener -i 2
 
srvctl disable scan_listener [-i ordinal_number]
srvctl disable scan_listener
srvctl disable scan_listener -i 1
 
srvctl config scan_listener [-i ordinal_number]  -- Shows the existence and port numbers for the SCAN listeners
srvctl config scan_listener
srvctl config scan_listener -i 3
 
srvctl modify scan_listener {-p [TCP:]port[/IPC:key][/NMP:pipe_name] [/TCPS:s_port][/SDP:port] | -u }
srvctl modify scan_listener –u -- Modifies the SCAN listener information to match the new SCAN VIP information
srvctl modify scan_listener -p 1521
 
srvctl relocate scan_listener -i ordinal_number [-n node_name]
srvctl relocate scan_listener -i 1
 
ordinal_number=1,2,3
 
GNS (Grid Naming Service):
srvctl add gns -i ip_address -d domain
srvctl add gns -i 192.124.16.96 -d cluster.mycompany.com
 
srvctl remove gns [-f]
srvctl remove gns
 
srvctl start gns [-l log_level] [-n node_name]
 
srvctl stop gns [-n node_name [-v] [-f]
srvctl stop gns
 
srvctl status gns [-n node_name]
srvctl status gns
 
srvctl enable gns [-n node_name]
srvctl enable gns
 
srvctl disable gns [-n node_name]
srvctl disable gns -n devnode2
 
srvctl config gns [-a] [-d] [-k] [-m] [-n node_name] [-p] [-s] [-V] [-q name] [-l] [-v]
srvctl config gns -n lnx03
 
srvctl modify gns [-i ip_address] [-d domain]
srvctl modify gns -i 192.100.010.007
 
srvctl relocate gns [-n node_name]
srvctl relocate gns -n node2

Related Oracle Articles:  Virtual IP (VIP) in RAC    srvctl commands RAC    cluvfy commands RAC    crsctl commands RAC
原文地址:https://www.cnblogs.com/yaoyangding/p/14590894.html