ORACLE/ADMIN2022. 9. 15. 12:51
반응형

/etc/hosts
### Public
192.168.219.141         seha1
192.168.219.143         seha2

### Private
192.168.56.41           seha1-priv
192.168.56.42           seha2-priv

### Virtual
192.168.219.192         seha1-vip
192.168.219.194         seha2-vip

### SCAN
192.168.219.147         seha-scan 



[root@seha1 ~]# crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISTENER.lsnr
               ONLINE  ONLINE       seha1                    STABLE
               ONLINE  ONLINE       seha2                    STABLE
ora.chad
               ONLINE  ONLINE       seha1                    STABLE
               ONLINE  ONLINE       seha2                    STABLE
ora.net1.network
               ONLINE  ONLINE       seha1                    STABLE
               ONLINE  ONLINE       seha2                    STABLE
ora.ons
               ONLINE  ONLINE       seha1                    STABLE
               ONLINE  ONLINE       seha2                    STABLE
ora.proxy_advm
               OFFLINE OFFLINE      seha1                    STABLE
               OFFLINE OFFLINE      seha2                    STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr(ora.asmgroup)
      1        ONLINE  ONLINE       seha1                    STABLE
      2        ONLINE  ONLINE       seha2                    STABLE
ora.DATA.dg(ora.asmgroup)
      1        ONLINE  ONLINE       seha1                    STABLE
      2        ONLINE  ONLINE       seha2                    STABLE
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       seha2                    STABLE
ora.asm(ora.asmgroup)
      1        ONLINE  ONLINE       seha1                    Started,STABLE
      2        ONLINE  ONLINE       seha2                    Started,STABLE
ora.asmnet1.asmnetwork(ora.asmgroup)
      1        ONLINE  ONLINE       seha1                    STABLE
      2        ONLINE  ONLINE       seha2                    STABLE
ora.cvu
      1        ONLINE  ONLINE       seha1                    STABLE
ora.qosmserver
      1        ONLINE  ONLINE       seha1                    STABLE
ora.scan1.vip
      1        ONLINE  ONLINE       seha2                    STABLE
ora.seha.db
      1        ONLINE  ONLINE       seha1                    Open,HOME=/u01/app/o
                                                             racle/product/19c,ST
                                                             ABLE
ora.seha1.vip
      1        ONLINE  ONLINE       seha1                    STABLE
ora.seha2.vip
      1        ONLINE  ONLINE       seha2                    STABLE
--------------------------------------------------------------------------------

tnsnames.ora 등록
1번 서버 등록
lisa =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = seha1-vip)(PORT = 2555))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME =seha)
    )
  )

2번 서버 등록
lisa =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = seha2-vip)(PORT = 2555))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME =seha)
    )
  )


리스너 삭제 후 변경 
srvctl stop listener
srvctl remove listener -l listener

리스너 생성 2555포트 사용
srvctl add listener -o /u01/app/grid -p 2555 -l lisa

리스너 기동
srvctl start listener -l lisa

상태 확인
[oracle@seha admin]$ crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISA.lsnr
               ONLINE  ONLINE       seha1                    STABLE
               ONLINE  ONLINE       seha2                    STABLE
ora.chad
               ONLINE  ONLINE       seha1                    STABLE
               ONLINE  ONLINE       seha2                    STABLE
ora.net1.network
               ONLINE  ONLINE       seha1                    STABLE
               ONLINE  ONLINE       seha2                    STABLE
ora.ons
               ONLINE  ONLINE       seha1                    STABLE
               ONLINE  ONLINE       seha2                    STABLE
ora.proxy_advm
               OFFLINE OFFLINE      seha1                    STABLE
               OFFLINE OFFLINE      seha2                    STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr(ora.asmgroup)
      1        ONLINE  ONLINE       seha1                    STABLE
      2        ONLINE  ONLINE       seha2                    STABLE
ora.DATA.dg(ora.asmgroup)
      1        ONLINE  ONLINE       seha1                    STABLE
      2        ONLINE  ONLINE       seha2                    STABLE
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  INTERMEDIATE seha1                    STABLE
ora.asm(ora.asmgroup)
      1        ONLINE  ONLINE       seha1                    Started,STABLE
      2        ONLINE  ONLINE       seha2                    Started,STABLE
ora.asmnet1.asmnetwork(ora.asmgroup)
      1        ONLINE  ONLINE       seha1                    STABLE
      2        ONLINE  ONLINE       seha2                    STABLE
ora.cvu
      1        ONLINE  ONLINE       seha1                    STABLE
ora.qosmserver
      1        ONLINE  ONLINE       seha1                    STABLE
ora.scan1.vip
      1        ONLINE  ONLINE       seha1                    STABLE
ora.seha.db
      1        ONLINE  ONLINE       seha1                    Open,HOME=/u01/app/o
                                                             racle/product/19c,ST
                                                             ABLE
ora.seha1.vip
      1        ONLINE  ONLINE       seha1                    STABLE
ora.seha2.vip
      1        ONLINE  ONLINE       seha2                    STABLE
--------------------------------------------------------------------------------


[oracle@seha ~]$ sqlplus system/oracle@lisa

SQL*Plus: Release 19.0.0.0.0 - Production on Thu Sep 15 11:25:24 2022
Version 19.16.0.0.0

Copyright (c) 1982, 2022, Oracle.  All rights reserved.

Last Successful login time: Thu Sep 15 2022 10:58:22 +09:00

Connected to:
Oracle Database 19c Standard Edition 2 Release 19.0.0.0.0 - Production
Version 19.16.0.0.0

접속 실패 시 DB 인스턴스 재 기동
[oracle@seha admin]$ sqlplus scott/tiger@lisa

SQL*Plus: Release 19.0.0.0.0 - Production on Thu Sep 15 10:13:12 2022
Version 19.16.0.0.0

Copyright (c) 1982, 2022, Oracle.  All rights reserved.

ERROR:
ORA-12514: TNS:listener does not currently know of service requested in connect
descriptor


[oracle@seha admin]$ lsnrctl status lisa

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 15-SEP-2022 09:57:55

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISA)))
STATUS of the LISTENER
------------------------
Alias                     LISA
Version                   TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date                15-SEP-2022 09:56:03
Uptime                    0 days 0 hr. 1 min. 51 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/grid/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/seha1/lisa/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISA)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.219.141)(PORT=2555)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.219.192)(PORT=2555)))
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...
The command completed successfully

================================================

인스턴스 재 기동 후
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISA.lsnr
               ONLINE  ONLINE       seha1                    STABLE
               ONLINE  ONLINE       seha2                    STABLE
ora.chad
               ONLINE  ONLINE       seha1                    STABLE
               ONLINE  ONLINE       seha2                    STABLE
ora.net1.network
               ONLINE  ONLINE       seha1                    STABLE
               ONLINE  ONLINE       seha2                    STABLE
ora.ons
               ONLINE  ONLINE       seha1                    STABLE
               ONLINE  ONLINE       seha2                    STABLE
ora.proxy_advm
               OFFLINE OFFLINE      seha1                    STABLE
               OFFLINE OFFLINE      seha2                    STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr(ora.asmgroup)
      1        ONLINE  ONLINE       seha1                    STABLE
      2        ONLINE  ONLINE       seha2                    STABLE
ora.DATA.dg(ora.asmgroup)
      1        ONLINE  ONLINE       seha1                    STABLE
      2        ONLINE  ONLINE       seha2                    STABLE
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       seha2                    STABLE
ora.asm(ora.asmgroup)
      1        ONLINE  ONLINE       seha1                    Started,STABLE
      2        ONLINE  ONLINE       seha2                    Started,STABLE
ora.asmnet1.asmnetwork(ora.asmgroup)
      1        ONLINE  ONLINE       seha1                    STABLE
      2        ONLINE  ONLINE       seha2                    STABLE
ora.cvu
      1        ONLINE  ONLINE       seha1                    STABLE
ora.qosmserver
      1        ONLINE  ONLINE       seha1                    STABLE
ora.scan1.vip
      1        ONLINE  ONLINE       seha2                    STABLE
ora.seha.db
      1        ONLINE  ONLINE       seha1                    Open,HOME=/u01/app/o
                                                                                  racle/product/19c,ST
                                                                                  ABLE
ora.seha1.vip
      1        ONLINE  ONLINE       seha1                    STABLE
ora.seha2.vip
      1        ONLINE  ONLINE       seha2                    STABLE
--------------------------------------------------------------------------------

[oracle@seha admin]$ lsnrctl status lisa

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 15-SEP-2022 09:58:31

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISA)))
STATUS of the LISTENER
------------------------
Alias                     LISA
Version                   TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date                15-SEP-2022 09:56:03
Uptime                    0 days 0 hr. 2 min. 27 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/grid/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/seha1/lisa/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISA)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.219.141)(PORT=2555)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.219.192)(PORT=2555)))
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 "seha" has 1 instance(s).
  Instance "seha", status READY, has 1 handler(s) for this service...
Service "sehaXDB" has 1 instance(s).
  Instance "seha", status READY, has 1 handler(s) for this service...
The command completed successfully

접속 확인
[oracle@seha admin]$ sqlplus system/oracle@lisa

SQL*Plus: Release 19.0.0.0.0 - Production on Thu Sep 15 11:38:28 2022
Version 19.16.0.0.0

Copyright (c) 1982, 2022, Oracle.  All rights reserved.

Last Successful login time: Thu Sep 15 2022 11:25:24 +09:00

Connected to:
Oracle Database 19c Standard Edition 2 Release 19.0.0.0.0 - Production
Version 19.16.0.0.0

SQL> 
================================================

반응형

'ORACLE > ADMIN' 카테고리의 다른 글

오라클 asm disk 그룹 추가 시 설정 ASM AFD  (0) 2023.05.25
ORACLE SEHA 인스턴스 이동  (0) 2022.09.15
RAC DB삭제  (0) 2022.05.22
오라클 메모리 튜닝 권고  (0) 2022.05.22
oracle ERROR: ORA-12547: TNS:lost contact  (0) 2018.08.08
Posted by [PineTree]