ORACLE/ADMIN2022. 9. 15. 13:34
반응형

상태 체크

[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  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
--------------------------------------------------------------------------------
2번 서버로 인스턴스 이동
[oracle@seha admin]$ srvctl relocate database -d seha -n seha2 -w 1 -v

[oracle@seha admin]$ srvctl   relocate   database -h

RAC One Node 데이터베이스의 온라인 재배치를 시작합니다.

사용법: srvctl relocate database -db <db_unique_name> {[-node <target>] [-timeout <timeout>] [-stopoption <stop_option>] | -abort [-revert]} [-drain_timeout <timeout>] [-verbose]
    -db <db_unique_name>           재배치할 데이터베이스의 고유 이름
    -node <target>                 데이터베이스를 재배치할 대상 노드
    -timeout <timeout>             온라인 재배치 시간 초과(분)
    -abort                         실패한 온라인 재배치 중단
    -revert                        관리자 관리 RAC One Node 데이터베이스의 후보 서버 목록에서 실패한 온라인 재배치 요청의 대상 노드 제거
    -stopoption <stop_option>      인스턴스 실행을 위한 기본 종료 옵션 무효화(NORMAL만 허용됨)
    -drain_timeout <drain_timeout> 초 단위로 지정된 서비스 비우기 시간 초과입니다.
    -verbose                       상세 정보 출력
    -help                          사용법 인쇄
옵션 설명
출처:https://hoing.io/archives/5280#relocate
-w 옵션을 기술 하지 않는다면 online relocation timeout : 30  이 적용 됩니다.
단위 는 분 이며 이 시간은 세션을 종료 하고 , 인스턴스를 migrate , 트랜잭션을 OPEN 하는 시간을 의미 합니다.

시간 안에  트랜젝션이 종료 되지 않는다면, shutdown abort 과 같은 일환으로 트랜젝션은 취소 가  되며, 세션은 사라지게 됩니다.

이런 시간에 대한 제한에 대해서 default 30분이 아닌 다른 시간으로 제한을 두고자 할 때 -w 옵션을 사용하게 됩니다.

보통의 경우 테스트 문서나 외국 문서들의 대부분이 -w 1 을 주며 시간의 범위는 1~720 분 까지 입니다.


[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  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       seha2                    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
--------------------------------------------------------------------------------
1번 서버로 인스턴스 이동
srvctl relocate database -d seha -n seha1 -w 1 -v

[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  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 > ADMIN' 카테고리의 다른 글

ORACLE ASM DISKGROUP 삭제  (0) 2023.05.25
오라클 asm disk 그룹 추가 시 설정 ASM AFD  (0) 2023.05.25
ORACLE SEHA LISTENER설정 및 상태 체크  (0) 2022.09.15
RAC DB삭제  (0) 2022.05.22
오라클 메모리 튜닝 권고  (0) 2022.05.22
Posted by [PineTree]