Oracle12cRAC modify SCAN Configuration

Source: Internet
Author: User

Oracle12cRAC modify SCAN Configuration

Check the SCAN modification in 12c. The modification includes two aspects:

(1) modify the SCAN name.

(2) modify the IP address of SCAN.

 

If SCAN in/etc/hosts is used, you only need to modify the hosts file. If DNS is used, you need to modify it from DNS, I use the RAC environment of DNS here, so I will modify DNS as an example for demonstration.

 

In addition, the modification will stop scanning. If the database uses SCAN to connect to the database, you need to stop some operations. This part can be converted to a VIP connection. During the modification, the database can run normally and other operations are not affected.

 

1. Current Environment

 

[Grid @ rac1 ~] $ Crs_stat-t

Name Type Target State Host

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

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

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

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

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

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

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

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

Ora. asm ora. asm. type ONLINE rac1

Ora. cvu ora. cvu. type ONLINE rac1

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

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

Ora. Solaris ora. productname. type ONLINE rac1

Ora. ons ora. ons. type ONLINE rac1

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

Ora... C1.lsnr application ONLINE rac1

Ora. rac1.ons application ONLINE rac1

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

Ora... C2.lsnr application ONLINE rac2

Ora. rac2.ons application ONLINE rac2

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

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

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

Ora. scan3.vip ora... ip. type 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 the RAC cluster with two nodes.

 

SCAN name: scan.cndba.cn

Three scan ip addresses:

192.168.56.20

192.168.56.21

192.168.56.22

 

 

2. Modify SCAN

 

2.1 Stop 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 the SCAN name and IP address.

 

Modify the SCAN name from SCAN to cndba-scan.

 

Change the IP address:

192.168.56.30

192.168.56.31

192.168.56.32

 

For details about how to modify SCAN, refer to the following link:

Oracle 12c RAC cluster uses DNS for SCAN

Http://blog.csdn.net/tianlesoftware/article/details/42917867

 

After the modification, it is 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

 

Use the root user to perform 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 that everything is okay. In fact, there is no. We still have the attributes of SCAN_VIP:

 

[Grid @ rac1 ~] $ Crs_stat-t

Name Type Target State Host

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

...

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

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

Ora. scan3.vip ora... ip. type 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

 

Therefore, we need to modify the information in type.

 

Run the following command with the root user:

[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/] #

 

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

 

So far, the modification is complete.

 

 

 

2.4 start SCAN

 

Operation with the grid user:

 

[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 rac1 STABLE

ONLINE rac2 STABLE

Ora. LISTENER. lsnr

ONLINE rac1 STABLE

ONLINE rac2 STABLE

Ora. OCR. dg

ONLINE rac1 STABLE

ONLINE rac2 STABLE

Ora. net1.network

ONLINE rac1 STABLE

ONLINE rac2 STABLE

Ora. ons

ONLINE rac1 STABLE

ONLINE rac2 STABLE

Ora. proxy_advm

ONLINE rac1 STABLE

ONLINE rac2 STABLE

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

Cluster Resources

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

Ora. LISTENER_SCAN1.lsnr

1 ONLINE rac2 STABLE

Ora. LISTENER_SCAN2.lsnr

1 ONLINE rac1 STABLE

Ora. LISTENER_SCAN3.lsnr

1 ONLINE rac1 STABLE

Ora. MGMTLSNR

1 ONLINE rac1 169.254.95.238 192.1

68.57.5, STABLE

Ora. asm

1 ONLINE rac1 STABLE

2 ONLINE rac2 STABLE

3 OFFLINE STABLE

Ora. cvu

1 ONLINE rac1 STABLE

Ora. mgmtdb

1 ONLINE rac1 Open, STABLE

Ora. productname

1 ONLINE rac1 STABLE

Ora. rac1.vip

1 ONLINE rac1 STABLE

Ora. rac2.vip

1 ONLINE rac2 STABLE

Ora. scan1.vip

1 ONLINE rac2 STABLE

Ora. scan2.vip

1 ONLINE rac1 STABLE

Ora. scan3.vip

1 ONLINE rac1 STABLE

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

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.