내맘대로긍정이 알려주는
Oracle 23ai 신기능
무료 세미나 발표자료
다운로드
trending_flat
OS환경 : Oracle Linux 7.6 (64bit)
DB 환경 : Oracle Database 19.6.0.0
방법 : 오라클 19c RAC 리스너 포트 변경 방법
RAC 환경에서 리스너 포트를 변경하는 방법을 설명함
1521 포트에서 1555 포트로 변경하는 시나리오
기존 리스너 확인
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
1번 노드
$ lsnrctl status
LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 15-AUG-2021 06:36:01
Copyright (c) 1991, 2019, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date 15-AUG-2021 06:34:50
Uptime 0 days 0 hr. 1 min. 10 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /ORA19/app/grid/19.3.0/network/admin/listener.ora
Listener Log File /ORA19/app/oracle/diag/tnslsnr/oel19db1/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.200.10)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.200.100)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM1", status READY, has 1 handler(s) for this service...
Service "+ASM_DATA" has 1 instance(s).
Instance "+ASM1", status READY, has 1 handler(s) for this service...
Service "+ASM_OCR_VOTE" has 1 instance(s).
Instance "+ASM1", status READY, has 1 handler(s) for this service...
Service "ORADB" has 1 instance(s).
Instance "ORADB1", status READY, has 1 handler(s) for this service...
Service "ORADBXDB" has 1 instance(s).
Instance "ORADB1", status READY, has 1 handler(s) for this service...
The command completed successfully
2번 노드
$ lsnrctl status
LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 15-AUG-2021 06:36:22
Copyright (c) 1991, 2019, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date 15-AUG-2021 06:34:53
Uptime 0 days 0 hr. 1 min. 29 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /ORA19/app/grid/19.3.0/network/admin/listener.ora
Listener Log File /ORA19/app/oracle/diag/tnslsnr/oel19db2/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.200.20)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.200.200)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM2", status READY, has 1 handler(s) for this service...
Service "+ASM_DATA" has 1 instance(s).
Instance "+ASM2", status READY, has 1 handler(s) for this service...
Service "+ASM_OCR_VOTE" has 1 instance(s).
Instance "+ASM2", status READY, has 1 handler(s) for this service...
Service "ORADB" has 1 instance(s).
Instance "ORADB2", status READY, has 1 handler(s) for this service...
Service "ORADBXDB" has 1 instance(s).
Instance "ORADB2", status READY, has 1 handler(s) for this service...
The command completed successfully
|
기존 리스너 포트는 1521임
기존 로컬리스너 파라미터 확인
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
1번 노드
SQL> show parameter local_listener
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
local_listener string (ADDRESS=(PROTOCOL=TCP)(HOST=
192.168.200.100)(PORT=1521))
2번 노드
SQL> show parameter local_listener
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
local_listener string (ADDRESS=(PROTOCOL=TCP)(HOST=
192.168.200.200)(PORT=1521))
|
local_listener의 포트가 1521로 되어있음
기존 리스너 종료
1
2
3
4
5
|
예시
$ srvctl stop listener -l {리스너명} -n {nodename}
$ srvctl stop listener -l LISTENER -n oel19db1
$ srvctl stop listener -l LISTENER -n oel19db2
|
리스너 포트 1555로 변경
1
2
3
4
|
예시
$ srvctl modify listener -l {리스너명} -p {변경할포트}
$ srvctl modify listener -l LISTENER -p 1555
|
리스너 기동
1
2
3
4
5
|
예시
$ srvctl start listener -l {리스너명} -n {nodename}
$ srvctl start listener -l LISTENER -n oel19db1
$ srvctl start listener -l LISTENER -n oel19db2
|
리스너 확인
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
1번 노드
$ lsnrctl status
LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 15-AUG-2021 06:40:18
Copyright (c) 1991, 2019, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date 15-AUG-2021 06:39:11
Uptime 0 days 0 hr. 1 min. 6 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /ORA19/app/grid/19.3.0/network/admin/listener.ora
Listener Log File /ORA19/app/oracle/diag/tnslsnr/oel19db1/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.200.10)(PORT=1555)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.200.100)(PORT=1555)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM1", status READY, has 1 handler(s) for this service...
Service "+ASM_DATA" has 1 instance(s).
Instance "+ASM1", status READY, has 1 handler(s) for this service...
Service "+ASM_OCR_VOTE" has 1 instance(s).
Instance "+ASM1", status READY, has 1 handler(s) for this service...
Service "ORADB" has 1 instance(s).
Instance "ORADB1", status READY, has 1 handler(s) for this service...
Service "ORADBXDB" has 1 instance(s).
Instance "ORADB1", status READY, has 1 handler(s) for this service...
The command completed successfully
2번 노드
$ lsnrctl status
LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 15-AUG-2021 06:40:23
Copyright (c) 1991, 2019, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date 15-AUG-2021 06:39:14
Uptime 0 days 0 hr. 1 min. 9 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /ORA19/app/grid/19.3.0/network/admin/listener.ora
Listener Log File /ORA19/app/oracle/diag/tnslsnr/oel19db2/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.200.20)(PORT=1555)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.200.200)(PORT=1555)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM2", status READY, has 1 handler(s) for this service...
Service "+ASM_DATA" has 1 instance(s).
Instance "+ASM2", status READY, has 1 handler(s) for this service...
Service "+ASM_OCR_VOTE" has 1 instance(s).
Instance "+ASM2", status READY, has 1 handler(s) for this service...
Service "ORADB" has 1 instance(s).
Instance "ORADB2", status READY, has 1 handler(s) for this service...
Service "ORADBXDB" has 1 instance(s).
Instance "ORADB2", status READY, has 1 handler(s) for this service...
The command completed successfully
|
정상적으로 포트가 1555로 변경됨
로컬 리스너 파라미터 확인
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
1번 노드
SQL> show parameter local_listener
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
local_listener string (ADDRESS=(PROTOCOL=TCP)(HOST=
192.168.200.100)(PORT=1555))
2번 노드
SQL> show parameter local_listener
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
local_listener string (ADDRESS=(PROTOCOL=TCP)(HOST=
192.168.200.200)(PORT=1555))
|
수동으로 변경하지 않아도 local_listener 값이 정상적으로 변경됨
+리스너 포트 변경 후 조회시 오류 발생하는 경우
1
2
3
4
5
6
7
8
9
10
11
|
$ lsnrctl status
LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 15-AUG-2021 06:16:56
Copyright (c) 1991, 2019, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
|
TNS_ADMIN 값 지정 후 재조회
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
$ export TNS_ADMIN=$GRID_HOME/network/admin
$ lsnrctl status
LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 15-AUG-2021 06:40:18
Copyright (c) 1991, 2019, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date 15-AUG-2021 06:39:11
Uptime 0 days 0 hr. 1 min. 6 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /ORA19/app/grid/19.3.0/network/admin/listener.ora
Listener Log File /ORA19/app/oracle/diag/tnslsnr/oel19db1/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.200.10)(PORT=1555)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.200.100)(PORT=1555)))
.
.
|
정상 조회됨
참조 :
https://positivemh.tistory.com/458
'ORACLE > Rac' 카테고리의 다른 글
오라클 11g R2 RAC grid 재기동시 db 자동기동 중지 (5) | 2021.10.27 |
---|---|
오라클 19c RAC network interface 변경 후 grid 기동불가 시 해결방법2(gpnptool 이용) (0) | 2021.09.27 |
오라클 19c RAC network interface 변경 후 grid 기동불가 시 해결방법 (0) | 2021.08.04 |
오라클 19c RAC IP 변경 방법(IP Change) (8) | 2021.07.27 |
오라클 19c RAC에서 ASM 리소스 제거 방법 (0) | 2021.05.10 |