반응형
■ [2025-05-31] RAC환경에서 Scan Name 변경 (12cR2)

 

1. 실습 환경

OS : Oracle Linux Server 7.9 (Linux rdb01d 5.4.17-2102.201.3.el7uek.x86_64)
DB : Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
RAC1 : rdb01d(192.168.0.31) : DRDB1
RAC2 : rdb01d(192.168.0.32) : DRDB2

 

2. 상황

 

최근에 2노드 RAC를 구축함. 구축 후 설치 과정에서 스캔명이 잘못 설정된 것을 알게됨
지금부터 스캔 이름을 변경할 것임

현재 drdb2-scan 에서 drdb-scan 으로 바꿀 것임

해당 작업을 하면서 스캔 리스너의 포트도 1526에서 1521로 바꿀것임

 

3. 작업 절차

 

[+ASM1:grid@rdb01d][/home/grid]$ srvctl config scan
SCAN name: drdb2-scan, Network: 1
Subnet IPv4: 192.168.0.0/255.255.255.0/enp0s3, static
Subnet IPv6:
SCAN 1 IPv4 VIP: 192.168.0.37
SCAN VIP is enabled.
SCAN VIP is individually enabled on nodes:
SCAN VIP is individually disabled on nodes:
SCAN 2 IPv4 VIP: 192.168.0.38
SCAN VIP is enabled.
SCAN VIP is individually enabled on nodes:
SCAN VIP is individually disabled on nodes:
SCAN 3 IPv4 VIP: 192.168.0.39
SCAN VIP is enabled.
SCAN VIP is individually enabled on nodes:
SCAN VIP is individually disabled on nodes:

 

[+ASM1:grid@rdb01d][/home/grid]$ srvctl config scan_listener
SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1526
Registration invited nodes:
Registration invited subnets:
SCAN Listener is enabled.
SCAN Listener is individually enabled on nodes:
SCAN Listener is individually disabled on nodes:
SCAN Listener LISTENER_SCAN2 exists. Port: TCP:1526
Registration invited nodes:
Registration invited subnets:
SCAN Listener is enabled.
SCAN Listener is individually enabled on nodes:
SCAN Listener is individually disabled on nodes:
SCAN Listener LISTENER_SCAN3 exists. Port: TCP:1526
Registration invited nodes:
Registration invited subnets:
SCAN Listener is enabled.
SCAN Listener is individually enabled on nodes:
SCAN Listener is individually disabled on nodes:


[root@rdb01d][/root]$ vi /etc/hosts
[root@rdb01d][/root]$ cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4

::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

### Public IP
192.168.0.31       rdb01d
192.168.0.32       rdb02d

### Private IP
10.0.0.31    rdb01d-priv
10.0.0.32    rdb02d-priv

### Virtual IP
192.168.0.34       rdb01d-vip
192.168.0.35       rdb02d-vip

### DNS
192.168.0.37       drdb-scan
192.168.0.38       drdb-scan
192.168.0.39       drdb-scan


## Standby
192.168.0.41    tdb01p

 

[root@rdb01d][/root]$ srvctl modify scan -help

Modifies the SCAN name.

Usage: srvctl modify scan -scanname <scan_name> [-netnum <network_number>]
    -scanname <scan_name>          SCAN name, domain qualified for static networks
    -netnum  <network_number>      Network number of the SCAN to modify
    -help                          Print usage

 

[root@rdb01d][/root]$ srvctl modify scan -scanname drdb-scan

--> 스캔명 변경


[root@rdb01d][/root]$ srvctl modify scan_listener -endpoints 1521

[root@rdb01d][/root]$ srvctl modify scan_listener -update

--> 스캔 리스너 포트 변경

 

[+ASM1:grid@rdb01d][/home/grid]$ srvctl config scan
SCAN name: drdb-scan, Network: 1
Subnet IPv4: 192.168.0.0/255.255.255.0/enp0s3, static
Subnet IPv6:
SCAN 1 IPv4 VIP: 192.168.0.37
SCAN VIP is enabled.
SCAN VIP is individually enabled on nodes:
SCAN VIP is individually disabled on nodes:
SCAN 2 IPv4 VIP: 192.168.0.38
SCAN VIP is enabled.
SCAN VIP is individually enabled on nodes:
SCAN VIP is individually disabled on nodes:
SCAN 3 IPv4 VIP: 192.168.0.39
SCAN VIP is enabled.
SCAN VIP is individually enabled on nodes:
SCAN VIP is individually disabled on nodes:

 

[+ASM1:grid@rdb01d][/home/grid]$ srvctl config scan_listener
SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521
Registration invited nodes:
Registration invited subnets:
SCAN Listener is enabled.
SCAN Listener is individually enabled on nodes:
SCAN Listener is individually disabled on nodes:
SCAN Listener LISTENER_SCAN2 exists. Port: TCP:1521
Registration invited nodes:
Registration invited subnets:
SCAN Listener is enabled.
SCAN Listener is individually enabled on nodes:
SCAN Listener is individually disabled on nodes:
SCAN Listener LISTENER_SCAN3 exists. Port: TCP:1521
Registration invited nodes:
Registration invited subnets:
SCAN Listener is enabled.
SCAN Listener is individually enabled on nodes:
SCAN Listener is individually disabled on nodes:


[root@rdb02d][/root]$ vi /etc/hosts
[root@rdb02d][/root]$ cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

### Public IP
192.168.0.31       rdb01d
192.168.0.32       rdb02d

### Private IP
10.0.0.31    rdb01d-priv
10.0.0.32    rdb02d-priv

### Virtual IP
192.168.0.34       rdb01d-vip
192.168.0.35       rdb02d-vip

### DNS
192.168.0.37       drdb-scan
192.168.0.38       drdb-scan
192.168.0.39       drdb-scan

## Standby
192.168.0.41    tdb01p


[+ASM2:grid@rdb02d][/home/grid]$ srvctl start scan
[+ASM2:grid@rdb02d][/home/grid]$ srvctl start scan_listener

 


Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       rdb02d                   STABLE
ora.LISTENER_SCAN2.lsnr
      1        ONLINE  ONLINE       rdb01d                   STABLE
ora.LISTENER_SCAN3.lsnr
      1        ONLINE  ONLINE       rdb01d                   STABLE


ora.scan1.vip
      1        ONLINE  ONLINE       rdb02d                   STABLE
ora.scan2.vip
      1        ONLINE  ONLINE       rdb01d                   STABLE
ora.scan3.vip
      1        ONLINE  ONLINE       rdb01d                   STABLE


[+ASM1:grid@rdb01d][/home/grid]$ lsnrctl status LISTENER_SCAN2

LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 31-MAY-2025 13:57:21

Copyright (c) 1991, 2016, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN2)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER_SCAN2
Version                   TNSLSNR for Linux: Version 12.2.0.1.0 - Production
Start Date                31-MAY-2025 13:55:40
Uptime                    0 days 0 hr. 1 min. 41 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/12c/grid/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/rdb01d/listener_scan2/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN2)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.38)(PORT=1521)))
Services Summary...
Service "DRDB" has 2 instance(s).
  Instance "DRDB1", status READY, has 1 handler(s) for this service...
  Instance "DRDB2", status READY, has 1 handler(s) for this service...
Service "DRDBXDB" has 2 instance(s).
  Instance "DRDB1", status READY, has 1 handler(s) for this service...
  Instance "DRDB2", status READY, has 1 handler(s) for this service...
Service "DRDB_CFG" has 2 instance(s).
  Instance "DRDB1", status READY, has 1 handler(s) for this service...
  Instance "DRDB2", status READY, has 1 handler(s) for this service...
Service "DRDB_DGB" has 2 instance(s).
  Instance "DRDB1", status READY, has 1 handler(s) for this service...
  Instance "DRDB2", status READY, has 1 handler(s) for this service...
The command completed successfully

 

[+ASM1:grid@rdb01d][/home/grid]$ lsnrctl status LISTENER_SCAN3

LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 31-MAY-2025 13:57:28

Copyright (c) 1991, 2016, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN3)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER_SCAN3
Version                   TNSLSNR for Linux: Version 12.2.0.1.0 - Production
Start Date                31-MAY-2025 13:55:44
Uptime                    0 days 0 hr. 1 min. 44 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/12c/grid/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/rdb01d/listener_scan3/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN3)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.39)(PORT=1521)))
Services Summary...
Service "DRDB" has 2 instance(s).
  Instance "DRDB1", status READY, has 1 handler(s) for this service...
  Instance "DRDB2", status READY, has 1 handler(s) for this service...
Service "DRDBXDB" has 2 instance(s).
  Instance "DRDB1", status READY, has 1 handler(s) for this service...
  Instance "DRDB2", status READY, has 1 handler(s) for this service...
Service "DRDB_CFG" has 2 instance(s).
  Instance "DRDB1", status READY, has 1 handler(s) for this service...
  Instance "DRDB2", status READY, has 1 handler(s) for this service...
Service "DRDB_DGB" has 2 instance(s).
  Instance "DRDB1", status READY, has 1 handler(s) for this service...
  Instance "DRDB2", status READY, has 1 handler(s) for this service...
The command completed successfully


[+ASM2:grid@rdb02d][/home/grid]$ lsnrctl status LISTENER_SCAN1

LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 31-MAY-2025 13:57:50

Copyright (c) 1991, 2016, 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 12.2.0.1.0 - Production
Start Date                31-MAY-2025 13:55:35
Uptime                    0 days 0 hr. 2 min. 15 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/12c/grid/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/rdb02d/listener_scan1/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN1)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.37)(PORT=1521)))
Services Summary...
Service "DRDB" has 2 instance(s).
  Instance "DRDB1", status READY, has 1 handler(s) for this service...
  Instance "DRDB2", status READY, has 1 handler(s) for this service...
Service "DRDBXDB" has 2 instance(s).
  Instance "DRDB1", status READY, has 1 handler(s) for this service...
  Instance "DRDB2", status READY, has 1 handler(s) for this service...
Service "DRDB_CFG" has 2 instance(s).
  Instance "DRDB1", status READY, has 1 handler(s) for this service...
  Instance "DRDB2", status READY, has 1 handler(s) for this service...
Service "DRDB_DGB" has 2 instance(s).
  Instance "DRDB1", status READY, has 1 handler(s) for this service...
  Instance "DRDB2", status READY, has 1 handler(s) for this service...
The command completed successfully

 

--> remote_listener 파라미터의 값이 자동으로 바뀌어져 있는것을 확인함

[2025-05-31:13:58:26][rdb01d]<SYS@DRDB1> show parameter remote_listener

NAME                                 TYPE                              VALUE
------------------------------------ --------------------------------- ------------------------------
remote_listener                      string                             drdb-scan:1521

 


[2025-05-31:13:58:50][rdb02d]<SYS@DRDB2> show parameter remote_listener

NAME                                 TYPE                              VALUE
------------------------------------ --------------------------------- ------------------------------
remote_listener                      string                             drdb-scan:1521


반응형

+ Recent posts