编程知识 cdmana.com

Oracle 12C RAC modifying scan configuration

This article blog look down 12c Chinese vs SCAN Modification of , Modifications include 2 In terms of :

(1)   modify SCAN The name of .

(2)   modify SCAN Of IP Address .

If you are using /etc/hosts Inside SCAN, Then just modify hosts Documents will do , If you use DNS Of , You need from DNS To modify the , I'm going to use DNS Of RAC Environmental Science , So modify DNS For example , Conduct demonstration .

in addition , The modification will stop SCAN, So if the database is using SCAN Linked , You need to stop some operations , This part can be converted to VIP Link , During revision , The database can run normally , Other operations are not affected .

1   The current environment

[grid@rac1 ~]$ crs_stat -t

Name           Type           Target    State    Host       

------------------------------------------------------------

ora....SM.lsnr ora....er.type ONLINE    ONLINE   rac1       

ora....ER.lsnr ora....er.type ONLINE    ONLINE   rac1       

ora....N1.lsnr ora....er.type ONLINE    ONLINE   rac2       

ora....N2.lsnr ora....er.type ONLINE    ONLINE   rac1       

ora....N3.lsnr ora....er.type ONLINE    ONLINE   rac1       

ora.MGMTLSNR   ora....nr.type ONLINE    ONLINE   rac1       

ora.OCR.dg     ora....up.type ONLINE    ONLINE   rac1       

ora.asm       ora.asm.type   ONLINE   ONLINE    rac1       

ora.cvu        ora.cvu.type   ONLINE   ONLINE    rac1       

ora.mgmtdb     ora....db.type ONLINE    ONLINE   rac1       

ora....network ora....rk.type ONLINE    ONLINE   rac1       

ora.oc4j       ora.oc4j.type ONLINE    ONLINE    rac1       

ora.ons        ora.ons.type   ONLINE   ONLINE    rac1       

ora.proxy_advm ora....vm.type ONLINE    ONLINE   rac1       

ora....C1.lsnr application    ONLINE   ONLINE    rac1       

ora.rac1.ons   application    ONLINE   ONLINE    rac1       

ora.rac1.vip   ora....t1.type ONLINE    ONLINE   rac1       

ora....C2.lsnr application    ONLINE   ONLINE    rac2       

ora.rac2.ons   application    ONLINE   ONLINE    rac2       

ora.rac2.vip   ora....t1.type ONLINE    ONLINE   rac2       

ora.scan1.vip  ora....ip.type ONLINE    ONLINE   rac2       

ora.scan2.vip  ora....ip.type ONLINE    ONLINE   rac1       

ora.scan3.vip  ora....ip.type ONLINE    ONLINE   rac1       

[grid@rac1 ~]$ srvctl config scan

SCAN name: scan.cndba.cn, Network: 1

Subnet IPv4:192.168.56.0/255.255.255.0/eth0

Subnet IPv6:

SCAN 0 IPv4 VIP: 192.168.56.21

SCAN name: scan.cndba.cn, Network: 1

Subnet IPv4:192.168.56.0/255.255.255.0/eth0

Subnet IPv6:

SCAN 1 IPv4 VIP: 192.168.56.22

SCAN name: scan.cndba.cn, Network: 1

Subnet IPv4:192.168.56.0/255.255.255.0/eth0

Subnet IPv6:

SCAN 2 IPv4 VIP: 192.168.56.20

[grid@rac1 ~]$

 

Here is 2 Of nodes RAC colony .

 

SCAN The name is :scan.cndba.cn

3 individual SCAN IP:

192.168.56.20

192.168.56.21

192.168.56.22

 

 

2   modify SCAN
 

2.1             stop it SCAN
 

[grid@rac1 ~]$ srvctl stop scan_listener

[grid@rac1 ~]$ srvctl stop scan

[grid@rac1 ~]$ srvctl status scan

SCAN VIP scan1 is enabled

SCAN VIP scan1 is not running

SCAN VIP scan2 is enabled

SCAN VIP scan2 is not running

SCAN VIP scan3 is enabled

SCAN VIP scan3 is not running

 

2.2             modify SCAN Information
 

Here we modify SCAN Name and IP Address .

 

There will be SCAN Name from SCAN Modified into cndba-scan.

 

IP Change the address to :

192.168.56.30

192.168.56.31

192.168.56.32

 

About SCAN Modification of , Refer to the link below :

Oracle 12c RAC Cluster use DNS Realization SCAN

http://www.cndba.cn/Dave/article/757

 

After the modification , as follows :

 

[grid@rac1 grid]$ nslookupcndba-scan.cndba.cn

Server:       192.168.56.200

Address:   192.168.56.200#53

 

Name:  cndba-scan.cndba.cn

Address: 192.168.56.30

Name:  cndba-scan.cndba.cn

Address: 192.168.56.31

Name:  cndba-scan.cndba.cn

Address: 192.168.56.32

 

[grid@rac2 ~]$ nslookup cndba-scan.cndba.cn

Server:       192.168.56.200

Address:   192.168.56.200#53

 

Name:  cndba-scan.cndba.cn

Address: 192.168.56.31

Name:  cndba-scan.cndba.cn

Address: 192.168.56.32

Name:  cndba-scan.cndba.cn

Address: 192.168.56.30

 

2.3             Perform modification operations
 

use root The user performs the following operations .

 

[grid@rac1 ~]$ which srvctl

/u01/gridsoft/12.1.0/bin/srvctl

 

[grid@rac1 ~]$ which crsctl

/u01/gridsoft/12.1.0/bin/crsctl

 

[root@rac1 /]# /u01/gridsoft/12.1.0/bin/srvctlmodify scan -n cndba-scan.cndba.cn

 

[grid@rac1 ~]$ srvctl config scan

SCAN name: cndba-scan.cndba.cn, Network: 1

Subnet IPv4:192.168.56.0/255.255.255.0/eth0

Subnet IPv6:

SCAN 0 IPv4 VIP: 192.168.56.30

SCAN name: cndba-scan.cndba.cn, Network: 1

Subnet IPv4:192.168.56.0/255.255.255.0/eth0

Subnet IPv6:

SCAN 1 IPv4 VIP: 192.168.56.31

SCAN name: cndba-scan.cndba.cn, Network: 1

Subnet IPv4:192.168.56.0/255.255.255.0/eth0

Subnet IPv6:

SCAN 2 IPv4 VIP: 192.168.56.32

[grid@rac1 ~]$

 

 

it seems , all ok 了 , actually , did not , We also SCAN_VIP Properties of :

 

[grid@rac1 ~]$ crs_stat -t

Name           Type           Target    State    Host       

------------------------------------------------------------

ora.scan1.vip  ora....ip.type OFFLINE   OFFLINE              

ora.scan2.vip  ora....ip.type OFFLINE   OFFLINE              

ora.scan3.vip  ora....ip.type OFFLINE   OFFLINE    

 

[grid@rac1 ~]$ crsctl stat res ora.scan3.vip-p

NAME=ora.scan3.vip

TYPE=ora.scan_vip.type

ACL=owner:root:rwx,pgrp:root:r-x,other::r--,group:oinstall:r-x,user:grid:r-x

ACTIONS=

RESTART_ATTEMPTS=0

SCAN_NAME=scan.cndba.cn

SCRIPT_TIMEOUT=60

SERVER_CATEGORY=ora.hub.category

USR_ORA_VIP=192.168.56.20

VERSION=12.1.0.1.0

 

[grid@rac1 ~]$

 

[grid@rac1 ~]$ crsctl stat resora.scan3.vip

NAME=ora.scan3.vip

TYPE=ora.scan_vip.type

TARGET=OFFLINE

STATE=OFFLINE

 

So we , We need to modify type Information in .

 

use root User execution :

[root@rac1 /]#/u01/gridsoft/12.1.0/bin/crsctl modify type ora.scan_vip.type -attr"ATTRIBUTE=SCAN_NAME,DEFAULT_VALUE=cndba-scan.cndba.cn"

[root@rac1 /]#

 

It's all changed this time :

[grid@rac1 ~]$ crsctl stat res  ora.scan3.vip -p

NAME=ora.scan3.vip

TYPE=ora.scan_vip.type

SCAN_NAME=cndba-scan.cndba.cn

USR_ORA_VIP=192.168.56.32

VERSION=12.1.0.1.0

 

thus , Modified to complete .

 

 

 

2.4             start-up SCAN
 

use grid The user action :

 

[grid@rac1 ~]$ srvctl start scan

[grid@rac1 ~]$ srvctl start scan_listener

 

 

 

2.5             verification
 

[grid@rac2 ~]$ srvctl config scan

SCAN name: cndba-scan.cndba.cn, Network: 1

Subnet IPv4:192.168.56.0/255.255.255.0/eth0

Subnet IPv6:

SCAN 0 IPv4 VIP: 192.168.56.30

SCAN name: cndba-scan.cndba.cn, Network: 1

Subnet IPv4:192.168.56.0/255.255.255.0/eth0

Subnet IPv6:

SCAN 1 IPv4 VIP: 192.168.56.31

SCAN name: cndba-scan.cndba.cn, Network: 1

Subnet IPv4:192.168.56.0/255.255.255.0/eth0

Subnet IPv6:

SCAN 2 IPv4 VIP: 192.168.56.32

[grid@rac2 ~]$

 

 

[grid@rac2 ~]$ crsctl stat res -t

--------------------------------------------------------------------------------

Name           Target  State       Server                   Statedetails      

--------------------------------------------------------------------------------

Local Resources

--------------------------------------------------------------------------------

ora.ASMNET1LSNR_ASM.lsnr

               ONLINE  ONLINE      rac1                     STABLE

               ONLINE  ONLINE      rac2                     STABLE

ora.LISTENER.lsnr

               ONLINE  ONLINE      rac1                     STABLE

               ONLINE  ONLINE      rac2                     STABLE

ora.OCR.dg

               ONLINE  ONLINE      rac1                     STABLE

               ONLINE  ONLINE      rac2                     STABLE

ora.net1.network

               ONLINE  ONLINE      rac1                     STABLE

               ONLINE  ONLINE      rac2                     STABLE

ora.ons

               ONLINE  ONLINE      rac1                     STABLE

               ONLINE  ONLINE      rac2                     STABLE

ora.proxy_advm

               ONLINE  ONLINE      rac1                     STABLE

               ONLINE  ONLINE      rac2                     STABLE

--------------------------------------------------------------------------------

Cluster Resources

--------------------------------------------------------------------------------

ora.LISTENER_SCAN1.lsnr

      1       ONLINE  ONLINE       rac2                     STABLE

ora.LISTENER_SCAN2.lsnr

      1       ONLINE  ONLINE       rac1                     STABLE

ora.LISTENER_SCAN3.lsnr

      1       ONLINE  ONLINE       rac1                     STABLE

ora.MGMTLSNR

     1        ONLINE  ONLINE      rac1                    169.254.95.238 192.1

                                                            68.57.5,STABLE

ora.asm

     1        ONLINE  ONLINE      rac1                     STABLE

     2        ONLINE  ONLINE      rac2                     STABLE

     3        OFFLINE OFFLINE                               STABLE

ora.cvu

     1        ONLINE  ONLINE      rac1                     STABLE

ora.mgmtdb

     1        ONLINE  ONLINE      rac1                     Open,STABLE

ora.oc4j

     1        ONLINE  ONLINE      rac1                     STABLE

ora.rac1.vip

     1        ONLINE  ONLINE      rac1                     STABLE

ora.rac2.vip

     1        ONLINE  ONLINE      rac2                     STABLE

ora.scan1.vip

      1       ONLINE  ONLINE      rac2                     STABLE

ora.scan2.vip

      1       ONLINE  ONLINE       rac1                     STABLE

ora.scan3.vip

      1       ONLINE  ONLINE       rac1                     STABLE
--------------------- 
Copyright notice : This paper is about CSDN Blogger 「Dave」 The original article of , follow CC 4.0 by-sa Copyright agreement , For reprint, please attach the original source link and this statement .
Link to the original text :https://blog.csdn.net/tianlesoftware/article/details/42919785

版权声明
本文为[wx5caecf2ed0645]所创,转载请带上原文链接,感谢
https://cdmana.com/2021/08/20210809181600662m.html

Scroll to Top