2022. 4. 15. 16:38 오라클
Oracle Restart (Single ASM환경) Deconfig / Reconfig
Reconfiguring & Recreating The 11gR2/12cR1 Restart/OHAS/SIHA Stack Configuration (Standalone) / How to Reconfigure Oracle Restart (Doc ID 1422517.1)
테스트 환경은 19.3
Oracle Restart (Single ASM환경) 는 deconfig 시 -keepdg 옵션이 없기 때문에 deconfig 해도 재구성시 Diskgroup 정상적으로 물고 올라오는지
확인하기 위해 테스트 함.
해당문서상의 ./roothas.pl 명령어는 오래되서 업데이트가 안된건지 12c 이상이므로 ./roothas.sh 로 바꾸어서 실행해야 한다.
- 현재 상태
[TEST]oracle@singleasm:/home/oracle# crsctl stat res -t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
ONLINE ONLINE singleasm STABLE
ora.LISTENER.lsnr
ONLINE ONLINE singleasm STABLE
ora.asm
ONLINE ONLINE singleasm Started,STABLE
ora.ons
OFFLINE OFFLINE singleasm STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssdex
1 ONLINE ONLINE singleasm STABLE
ora.diskmon
1 OFFLINE OFFLINE STABLE
ora.evmd
1 ONLINE ONLINE singleasm STABLE
ora.test.db
1 ONLINE ONLINE singleasm Open,HOME=/u01/app/o
racle/product/19.3.0
.0/dbhome_1,STABLE
우선 Reconfigure 작업전 기본 필요정보는 백업을 받아 놓도록 한다.
1. ASM pfile
show parameter pfile
+DATA/ASM/ASMPARAMETERFILE/registry.253.1101819307
cd/u01/app/19.3.0.0/grid/dbs
sqlplus "/as sysasm"
create pfile from spfile;
2.Database pfile
show parameter pfile
+DATA/TEST/PARAMETERFILE/spfile.266.1101821921
cd /u01/app/oracle/product/19.3.0.0/dbhome_1/dbs
sqlplus "/as sysdba"
create pfile from spfile;
root@singleasm:/u01/app/19.3.0.0/grid/crs/install# ./roothas.sh -deconfig -force
Using configuration parameter file: /u01/app/19.3.0.0/grid/crs/install/crsconfig_params
The log of current session can be found at:
/u01/app/oracle/crsdata/singleasm/crsconfig/hadeconfig.log
2022/04/15 16:07:14 CLSRSC-332: CRS resources for listeners are still configured
2022/04/15 16:07:29 CLSRSC-337: Successfully deconfigured Oracle Restart stack
root@singleasm:/u01/app/19.3.0.0/grid/crs/install# ./roothas.sh
Using configuration parameter file: /u01/app/19.3.0.0/grid/crs/install/crsconfig_params
The log of current session can be found at:
/u01/app/oracle/crsdata/singleasm/crsconfig/roothas_2022-04-15_03-25-10PM.log
2022/04/15 15:25:12 CLSRSC-363: User ignored prerequisites during installation
LOCAL ADD MODE
Creating OCR keys for user 'oracle', privgrp 'dba'..
Operation successful.
LOCAL ONLY MODE
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
CRS-4664: Node singleasm successfully pinned.
2022/04/15 15:25:19 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service'
singleasm 2022/04/15 15:26:15 /u01/app/oracle/crsdata/singleasm/olr/backup_20220415_152615.olr 724960844
2022/04/15 15:26:16 CLSRSC-327: Successfully configured Oracle Restart for a standalone server
재구성이 되면 Resource 를 확인한다.
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ons
OFFLINE OFFLINE singleasm STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
1 OFFLINE OFFLINE STABLE
ora.diskmon
1 OFFLINE OFFLINE STABLE
ora.evmd
1 ONLINE INTERMEDIATE singleasm STABLE
--------------------------------------------------------------------------------
- cssd 를 기동시켜 준다. (cssd는 AUTO_START 기본속성이 never 이다)
root@singleasm:/u01/app/19.3.0.0/grid/bin#./crsctl start resource "ora.cssd" -unsupported
- ASM 을 start 한다.
srvctl add asm -spfile +DATA/ASM/ASMPARAMETERFILE/registry.253.1101819307
srvctl start asm
- ASM 인스턴스로 접속해서 Diskgroup 을 마운트 해준다.
[TEST]oracle@singleasm:/home/oracle# . oraenv
ORACLE_SID = [TEST] ? +ASM
ORACLE_HOME = [/home/oracle] ? /u01/app/19.3.0.0/grid
The Oracle base remains unchanged with value /u01/app/oracle
SQL> alter diskgroup DATA mount;
Diskgroup altered.
- 자동으로 Start 안되어 있을 경우 Diskgroup 기동
srvctl start diskgroup -diskgroup DATA
srvctl add database -d TEST -oraclehome /u01/app/oracle/product/19.3.0.0/dbhome_1
srvctl start database -d TEST
srvctl add listener -l LISTENER -endpoints "TCP:1521" -oraclehome /u01/app/19.3.0.0/grid
srvctl start listener
- 정상 구성됨을 최종적으로 확인
[+ASM]oracle@singleasm:/home/oracle# crsctl stat res -t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
ONLINE ONLINE singleasm STABLE
ora.LISTENER.lsnr
ONLINE ONLINE singleasm STABLE
ora.asm
ONLINE ONLINE singleasm Started,STABLE
ora.ons
OFFLINE OFFLINE singleasm STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
1 ONLINE ONLINE singleasm STABLE
ora.diskmon
1 OFFLINE OFFLINE STABLE
ora.evmd
1 ONLINE ONLINE singleasm STABLE
ora.test.db
1 ONLINE ONLINE singleasm Open,HOME=/u01/app/o
racle/product/19.3.0
.0/dbhome_1,STABLE
--------------------------------------------------------------------------------
- 테스트 끝!!