ORACLE/ADMIN2023. 6. 2. 21:07
반응형

oracle restart 기동 절차

## 상태 확인
[grid@+ASM ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
               ONLINE  ONLINE       restart19c               STABLE
ora.LISTENER.lsnr
               ONLINE  ONLINE       restart19c               STABLE
ora.asm
               ONLINE  ONLINE       restart19c               Started,STABLE
ora.ons
               OFFLINE OFFLINE      restart19c               STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
      1        ONLINE  ONLINE       restart19c               STABLE
ora.diskmon
      1        OFFLINE OFFLINE                               STABLE
ora.driver.afd
      1        ONLINE  ONLINE       restart19c               STABLE
ora.evmd
      1        ONLINE  ONLINE       restart19c               STABLE
ora.restart.db
      1        ONLINE  ONLINE       restart19c               Open,HOME=/u01/app/o
                                                             racle/product/19c/db
                                                             _1,STABLE
--------------------------------------------------------------------------------

## oracle restart 정지
-- (1) DB 정지
[oracle@RESTART ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Fri Jun 2 20:43:45 2023
Version 19.19.0.0.0

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


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.19.0.0.0

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.

-- (2) DB 정지 확인
[grid@+ASM ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
               ONLINE  ONLINE       restart19c               STABLE
ora.LISTENER.lsnr
               ONLINE  ONLINE       restart19c               STABLE
ora.asm
               ONLINE  ONLINE       restart19c               Started,STABLE
ora.ons
               OFFLINE OFFLINE      restart19c               STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
      1        ONLINE  ONLINE       restart19c               STABLE
ora.diskmon
      1        OFFLINE OFFLINE                               STABLE
ora.driver.afd
      1        ONLINE  ONLINE       restart19c               STABLE
ora.evmd
      1        ONLINE  ONLINE       restart19c               STABLE
ora.restart.db
      1        OFFLINE OFFLINE                               STABLE
--------------------------------------------------------------------------------

-- (3) 그리드 인프라 스트럭처 정지 및 프로세스  확인
그리드 계정으로 명령어 실행

[grid@+ASM ~]$ crsctl stop has
CRS-2791: 'restart19c'에서 Oracle 고가용성 서비스가 관리하는 리소스의 종료 시작 중
CRS-2673: 'ora.DATA.dg'을(를) 'restart19c'에서 정지하려고 시도하는 중입니다.
CRS-2673: 'ora.LISTENER.lsnr'을(를) 'restart19c'에서 정지하려고 시도하는 중입니다.
CRS-2677: 'ora.DATA.dg' 정지('restart19c')가 성공했습니다.
CRS-2673: 'ora.asm'을(를) 'restart19c'에서 정지하려고 시도하는 중입니다.
CRS-2677: 'ora.LISTENER.lsnr' 정지('restart19c')가 성공했습니다.
CRS-2677: 'ora.asm' 정지('restart19c')가 성공했습니다.
CRS-2673: 'ora.evmd'을(를) 'restart19c'에서 정지하려고 시도하는 중입니다.
CRS-2677: 'ora.evmd' 정지('restart19c')가 성공했습니다.
CRS-2673: 'ora.cssd'을(를) 'restart19c'에서 정지하려고 시도하는 중입니다.
CRS-2677: 'ora.cssd' 정지('restart19c')가 성공했습니다.
CRS-2673: 'ora.driver.afd'을(를) 'restart19c'에서 정지하려고 시도하는 중입니다.
CRS-2677: 'ora.driver.afd' 정지('restart19c')가 성공했습니다.
CRS-2793: 'restart19c'에서 Oracle 고가용성 서비스가 관리하는 리소스 종료가 완료되었습니다.
CRS-4133: Oracle 고가용성 서비스가 정지되었습니다.
[grid@+ASM ~]$ ps -ef |grep d.bin
grid      6929  6514  0 20:48 pts/1    00:00:00 grep --color=auto d.bin
[grid@+ASM ~]$ crsctl stat res -t
CRS-4639: Oracle 고가용성 서비스에 접속할 수 없습니다.
CRS-4000: Status 명령을 실패했거나 오류와 함께 완료되었습니다.
[grid@+ASM ~]$ 


## 오라클 리스타트 기동
-- 서버가 재 기동 하면 자동 기동 한다
-- db 인스턴스를 정상 정지 (shutdown immediate) 하였다면 자동으로 올라 가지 않는다
[grid@+ASM ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
               ONLINE  ONLINE       restart19c               STABLE
ora.LISTENER.lsnr
               ONLINE  ONLINE       restart19c               STABLE
ora.asm
               ONLINE  ONLINE       restart19c               Started,STABLE
ora.ons
               OFFLINE OFFLINE      restart19c               STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
      1        ONLINE  ONLINE       restart19c               STABLE
ora.diskmon
      1        OFFLINE OFFLINE                               STABLE
ora.driver.afd
      1        ONLINE  ONLINE       restart19c               STABLE
ora.evmd
      1        ONLINE  ONLINE       restart19c               STABLE
ora.restart.db
      1        OFFLINE OFFLINE                               Instance Shutdown,ST
                                                             ABLE
--------------------------------------------------------------------------------

--(2) DB 기동 및 확인

[oracle@RESTART ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Fri Jun 2 20:56:36 2023
Version 19.19.0.0.0

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

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area 3154113376 bytes
Fixed Size                  8930144 bytes
Variable Size             637534208 bytes
Database Buffers         2499805184 bytes
Redo Buffers                7843840 bytes
Database mounted.
Database opened.
SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.19.0.0.0
[oracle@RESTART ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
               ONLINE  ONLINE       restart19c               STABLE
ora.LISTENER.lsnr
               ONLINE  ONLINE       restart19c               STABLE
ora.asm
               ONLINE  ONLINE       restart19c               Started,STABLE
ora.ons
               OFFLINE OFFLINE      restart19c               STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
      1        ONLINE  ONLINE       restart19c               STABLE
ora.diskmon
      1        OFFLINE OFFLINE                               STABLE
ora.driver.afd
      1        ONLINE  ONLINE       restart19c               STABLE
ora.evmd
      1        ONLINE  ONLINE       restart19c               STABLE
ora.restart.db
      1        ONLINE  ONLINE       restart19c               Open,HOME=/u01/app/o
                                                             racle/product/19c/db
                                                             _1,STABLE

 
※ 그리드 인프라 스트럭처 기동 명령어
[grid@+ASM ~]$ crsctl start has
CRS-4123: Oracle 고가용성 서비스가 시작되었습니다.
[grid@+ASM ~]$ ps -ef |grep d.bin
grid      6216     1 11 21:01 ?        00:00:01 /u01/app/oracle/19c/grid/bin/ohasd.bin reboot
grid      6346     1  1 21:01 ?        00:00:00 /u01/app/oracle/19c/grid/bin/orarootagent.bin
grid      6569     1  6 21:01 ?        00:00:00 /u01/app/oracle/19c/grid/bin/oraagent.bin
grid      6596     1  1 21:01 ?        00:00:00 /u01/app/oracle/19c/grid/bin/evmd.bin
grid      6603     1  0 21:01 ?        00:00:00 /u01/app/oracle/19c/grid/bin/tnslsnr LISTENER -no_crs_notify -inherit
grid      6658  6596  1 21:01 ?        00:00:00 /u01/app/oracle/19c/grid/bin/evmlogger.bin -o /u01/app/oracle/19c/grid/log/[HOSTNAME]/evmd/evmlogger.info -l /u01/app/oracle/19c/grid/log/[HOSTNAME]/evmd/evmlogger.log
grid      6674     1  1 21:01 ?        00:00:00 /u01/app/oracle/19c/grid/bin/cssdagent
grid      6694     1  0 21:01 ?        00:00:00 /u01/app/oracle/19c/grid/bin/ocssd.bin
grid      6706  5865  0 21:01 pts/0    00:00:00 grep --color=auto d.bin

반응형
Posted by [PineTree]