이 방법은 기존에 rac 운영에 문제가 생겨서 single로 변경 했을 시에
문제 처리가 끝났다고 가정한 후 rac로 바꾸는 방법
==============================
기존 rac to single 방법
https://theone79.tistory.com/1012
==============================
crsctl stat res -t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr
ONLINE ONLINE arac1 STABLE
ora.CRS.dg
ONLINE ONLINE arac1 STABLE
ora.DATA.dg
ONLINE ONLINE arac1 STABLE
ora.FRA.dg
ONLINE ONLINE arac1 STABLE
ora.LISTENER.lsnr
ONLINE OFFLINE arac1 STARTING
ora.MGMT.dg
ONLINE ONLINE arac1 STABLE
ora.chad
ONLINE OFFLINE arac1 STABLE
ora.net1.network
ONLINE ONLINE arac1 STABLE
ora.ons
ONLINE ONLINE arac1 STABLE
ora.proxy_advm
OFFLINE OFFLINE arac1 STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE arac1 STABLE
ora.MGMTLSNR
1 ONLINE ONLINE arac1 169.254.51.97 192.16
8.0.111,STABLE
ora.arac1.vip
1 ONLINE ONLINE arac1 STABLE
ora.arac2.vip
1 ONLINE INTERMEDIATE arac1 FAILED OVER,STABLE
ora.aracdb.db
1 ONLINE ONLINE arac1 Open,HOME=/u01/app/o
racle/product/12c/db
_1,STABLE
2 OFFLINE OFFLINE STABLE
ora.asm
1 ONLINE ONLINE arac1 Started,STABLE
2 ONLINE OFFLINE STABLE
3 OFFLINE OFFLINE STABLE
ora.cvu
1 ONLINE ONLINE arac1 STABLE
ora.mgmtdb
1 ONLINE OFFLINE arac1 Instance Shutdown,ST
ARTING
ora.qosmserver
1 ONLINE ONLINE arac1 STABLE
ora.scan1.vip
1 ONLINE ONLINE arac1 STABLE
--------------------------------------------------------------------------------
Shutdown instance
Shutdown all the listeners.
SQL> shutdown immediate
srvctl stop listener -n arac1
srvctl stop scan_listener
crsctl stat res -t
[aracdb1:/u01/app/oracle/product/12c/db_1/rdbms/lib]> crsctl stat res -t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr
ONLINE ONLINE arac1 STABLE
ONLINE ONLINE arac2 STABLE
ora.CRS.dg
ONLINE ONLINE arac1 STABLE
ONLINE ONLINE arac2 STABLE
ora.DATA.dg
ONLINE ONLINE arac1 STABLE
ONLINE ONLINE arac2 STABLE
ora.FRA.dg
ONLINE ONLINE arac1 STABLE
ONLINE ONLINE arac2 STABLE
ora.LISTENER.lsnr
OFFLINE OFFLINE arac1 STABLE
OFFLINE OFFLINE arac2 STABLE
ora.MGMT.dg
ONLINE ONLINE arac1 STABLE
ONLINE ONLINE arac2 STABLE
ora.chad
ONLINE ONLINE arac1 STABLE
ONLINE ONLINE arac2 STABLE
ora.net1.network
ONLINE ONLINE arac1 STABLE
ONLINE ONLINE arac2 STABLE
ora.ons
ONLINE ONLINE arac1 STABLE
ONLINE ONLINE arac2 STABLE
ora.proxy_advm
OFFLINE OFFLINE arac1 STABLE
OFFLINE OFFLINE arac2 STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 OFFLINE OFFLINE STABLE
ora.MGMTLSNR
1 ONLINE ONLINE arac1 169.254.51.97 192.16
8.0.111,STABLE
ora.arac1.vip
1 ONLINE ONLINE arac1 STABLE
ora.arac2.vip
1 ONLINE ONLINE arac2 STABLE
ora.aracdb.db
1 OFFLINE OFFLINE STABLE
2 OFFLINE OFFLINE Instance Shutdown,ST
ABLE
ora.asm
1 ONLINE ONLINE arac1 Started,STABLE
2 ONLINE ONLINE arac2 Started,STABLE
3 OFFLINE OFFLINE STABLE
ora.cvu
1 ONLINE ONLINE arac1 STABLE
ora.mgmtdb
1 ONLINE ONLINE arac1 Open,STABLE
ora.qosmserver
1 ONLINE ONLINE arac1 STABLE
ora.scan1.vip
1 ONLINE ONLINE arac1 STABLE
--------------------------------------------------------------------------------
Relink Oracle executable with rac_on option
[aracdb1:/u01/app/oracle/product/12c/db_1/rdbms/lib]> make -f ins_rdbms.mk rac_on
(if /u01/app/oracle/product/12c/db_1/bin/skgxpinfo | grep rds;\
then \
make -f /u01/app/oracle/product/12c/db_1/rdbms/lib/ins_rdbms.mk ipc_rds; \
else \
make -f /u01/app/oracle/product/12c/db_1/rdbms/lib/ins_rdbms.mk ipc_g; \
fi)
make[1]: Entering directory `/u01/app/oracle/product/12c/db_1/rdbms/lib'
rm -f /u01/app/oracle/product/12c/db_1/lib/libskgxp12.so
cp /u01/app/oracle/product/12c/db_1/lib//libskgxpg.so /u01/app/oracle/product/12c/db_1/lib/libskgxp12.so
make[1]: Leaving directory `/u01/app/oracle/product/12c/db_1/rdbms/lib'
- Use stub SKGXN library
cp /u01/app/oracle/product/12c/db_1/lib/libskgxns.so /u01/app/oracle/product/12c/db_1/lib/libskgxn2.so
/usr/bin/ar d /u01/app/oracle/product/12c/db_1/rdbms/lib/libknlopt.a ksnkcs.o
/usr/bin/ar cr /u01/app/oracle/product/12c/db_1/rdbms/lib/libknlopt.a /u01/app/oracle/product/12c/db_1/rdbms/lib/kcsm.o
[aracdb1:/u01/app/oracle/product/12c/db_1/rdbms/lib]> make -f ins_rdbms.mk ioracle
chmod 755 /u01/app/oracle/product/12c/db_1/bin
- Linking Oracle
rm -f /u01/app/oracle/product/12c/db_1/rdbms/lib/oracle
/u01/app/oracle/product/12c/db_1/bin/orald -o /u01/app/oracle/product/12c/db_1/rdbms/lib/oracle -m64 -z noexecstack -Wl,--disable-new-dtags -L/u01/app/oracle/product/12c/db_1/rdbms/lib/ -L/u01/app/oracle/product/12c/db_1/lib/ -L/u01/app/oracle/product/12c/db_1/lib/stubs/ -Wl,-E /u01/app/oracle/product/12c/db_1/rdbms/lib/opimai.o /u01/app/oracle/product/12c/db_1/rdbms/lib/ssoraed.o /u01/app/oracle/product/12c/db_1/rdbms/lib/ttcsoi.o -Wl,--whole-archive -lperfsrv12 -Wl,--no-whole-archive /u01/app/oracle/product/12c/db_1/lib/nautab.o /u01/app/oracle/product/12c/db_1/lib/naeet.o /u01/app/oracle/product/12c/db_1/lib/naect.o /u01/app/oracle/product/12c/db_1/lib/naedhs.o /u01/app/oracle/product/12c/db_1/rdbms/lib/config.o -ldmext -lserver12 -lodm12 -lofs -lcell12 -lnnet12 -lskgxp12 -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lxml12 -lcore12 -lunls12 -lsnls12 -lnls12 -lcore12 -lnls12 -lclient12 -lvsn12 -lcommon12 -lgeneric12 -lknlopt `if /usr/bin/ar tv /u01/app/oracle/product/12c/db_1/rdbms/lib/libknlopt.a | grep xsyeolap.o > /dev/null 2>&1 ; then echo "-loraolap12" ; fi` -lskjcx12 -lslax12 -lpls12 -lrt -lplp12 -ldmext -lserver12 -lclient12 -lvsn12 -lcommon12 -lgeneric12 `if [ -f /u01/app/oracle/product/12c/db_1/lib/libavserver12.a ] ; then echo "-lavserver12" ; else echo "-lavstub12"; fi` `if [ -f /u01/app/oracle/product/12c/db_1/lib/libavclient12.a ] ; then echo "-lavclient12" ; fi` -lknlopt -lslax12 -lpls12 -lrt -lplp12 -ljavavm12 -lserver12 -lwwg `cat /u01/app/oracle/product/12c/db_1/lib/ldflags` -lncrypt12 -lnsgr12 -lnzjs12 -ln12 -lnl12 -lngsmshd12 -lnro12 `cat /u01/app/oracle/product/12c/db_1/lib/ldflags` -lncrypt12 -lnsgr12 -lnzjs12 -ln12 -lnl12 -lngsmshd12 -lnnzst12 -lzt12 -lztkg12 -lmm -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lxml12 -lcore12 -lunls12 -lsnls12 -lnls12 -lcore12 -lnls12 -lztkg12 `cat /u01/app/oracle/product/12c/db_1/lib/ldflags` -lncrypt12 -lnsgr12 -lnzjs12 -ln12 -lnl12 -lngsmshd12 -lnro12 `cat /u01/app/oracle/product/12c/db_1/lib/ldflags` -lncrypt12 -lnsgr12 -lnzjs12 -ln12 -lnl12 -lngsmshd12 -lnnzst12 -lzt12 -lztkg12 -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lxml12 -lcore12 -lunls12 -lsnls12 -lnls12 -lcore12 -lnls12 `if /usr/bin/ar tv /u01/app/oracle/product/12c/db_1/rdbms/lib/libknlopt.a | grep "kxmnsd.o" > /dev/null 2>&1 ; then echo " " ; else echo "-lordsdo12 -lserver12"; fi` -L/u01/app/oracle/product/12c/db_1/ctx/lib/ -lctxc12 -lctx12 -lzx12 -lgx12 -lctx12 -lzx12 -lgx12 -lordimt12 -lclsra12 -ldbcfg12 -lhasgen12 -lskgxn2 -lnnzst12 -lzt12 -lxml12 -lgeneric12 -locr12 -locrb12 -locrutl12 -lhasgen12 -lskgxn2 -lnnzst12 -lzt12 -lxml12 -lgeneric12 -lgeneric12 -lorazip -loraz -llzopro5 -lorabz2 -lipp_z -lipp_bz2 -lippdcemerged -lippsemerged -lippdcmerged -lippsmerged -lippcore -lippcpemerged -lippcpmerged -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lxml12 -lcore12 -lunls12 -lsnls12 -lnls12 -lcore12 -lnls12 -lsnls12 -lunls12 -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lxml12 -lcore12 -lunls12 -lsnls12 -lnls12 -lcore12 -lnls12 -lasmclnt12 -lcommon12 -lcore12 -laio -lons -lfthread12 `cat /u01/app/oracle/product/12c/db_1/lib/sysliblist` -Wl,-rpath,/u01/app/oracle/product/12c/db_1/lib -lm `cat /u01/app/oracle/product/12c/db_1/lib/sysliblist` -ldl -lm -L/u01/app/oracle/product/12c/db_1/lib `test -x /usr/bin/hugeedit -a -r /usr/lib64/libhugetlbfs.so && test -r /u01/app/oracle/product/12c/db_1/rdbms/lib/shugetlbfs.o && echo -Wl,-zcommon-page-size=2097152 -Wl,-zmax-page-size=2097152 -lhugetlbfs`
test ! -f /u01/app/oracle/product/12c/db_1/bin/oracle || (\
mv -f /u01/app/oracle/product/12c/db_1/bin/oracle /u01/app/oracle/product/12c/db_1/bin/oracleO &&\
chmod 600 /u01/app/oracle/product/12c/db_1/bin/oracleO )
mv /u01/app/oracle/product/12c/db_1/rdbms/lib/oracle /u01/app/oracle/product/12c/db_1/bin/oracle
chmod 6751 /u01/app/oracle/product/12c/db_1/bin/oracle
기존에 백업 해 뒀던 파라미터 파일 내용 복사
[aracdb1:/u01/app/oracle/product/12c/db_1/dbs]> vi initaracdb1.ora
*.audit_file_dest='/u01/app/oracle/admin/aracdb/adump'
*.audit_trail='db'
*.cluster_database=true
*.compatible='12.2.0'
*.control_files='+DATA/ARACDB/CONTROLFILE/current.269.1136924667','+FRA/ARACDB/CONTROLFILE/current.259.1136924667'
*.db_block_size=8192
*.db_create_file_dest='+DATA'
*.db_name='aracdb'
*.db_recovery_file_dest='+FRA'
*.db_recovery_file_dest_size=10g
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=aracdbXDB)'
family:dw_helper.instance_mode='read-only'
aracdb1.instance_number=1
aracdb2.instance_number=2
*.local_listener='-oraagent-dummy-'
*.log_archive_format='%t_%s_%r.dbf'
*.nls_language='KOREAN'
*.nls_territory='KOREA'
*.open_cursors=300
*.pga_aggregate_target=1000m
*.processes=320
*.remote_login_passwordfile='exclusive'
*.sga_target=2998m
aracdb2.thread=2
aracdb1.thread=1
aracdb1.undo_tablespace='UNDOTBS1'
aracdb2.undo_tablespace='UNDOTBS2'
[aracdb1:/u01/app/oracle/product/12c/db_1/dbs]> sqlplus / as sysdba
SQL*Plus: Release 12.2.0.1.0 Production on Mon Jan 29 15:01:15 2024
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 3154116608 bytes
Fixed Size 8625656 bytes
Variable Size 838861320 bytes
Database Buffers 2298478592 bytes
Redo Buffers 8151040 bytes
Database mounted.
Database opened.
SQL> select * from v$logfile;
GROUP# STATUS TYPE MEMBER IS_ CON_ID
---------- ------- ------- -------------------------------------------------- --- ----------
2 ONLINE +DATA/ARACDB/ONLINELOG/group_2.271.1136924671 NO 0
2 ONLINE +FRA/ARACDB/ONLINELOG/group_2.261.1136924673 YES 0
1 ONLINE +DATA/ARACDB/ONLINELOG/group_1.270.1136924671 NO 0
1 ONLINE +FRA/ARACDB/ONLINELOG/group_1.260.1136924673 YES 0
3 ONLINE +DATA/ARACDB/ONLINELOG/group_3.274.1136924835 NO 0
3 ONLINE +FRA/ARACDB/ONLINELOG/group_3.262.1136924835 YES 0
4 ONLINE +DATA/ARACDB/ONLINELOG/group_4.275.1136924837 NO 0
4 ONLINE +FRA/ARACDB/ONLINELOG/group_4.263.1136924837 YES 0
8 rows selected.
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES BLOCKSIZE MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TI NEXT_CHANGE# NEXT_TIM CON_ID
---------- ---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- -------- ------------ -------- ----------
1 1 27 209715200 512 2 YES INACTIVE 1840293 24/01/26 1852823 24/01/26 0
2 1 28 209715200 512 2 NO CURRENT 1853020 24/01/27 1.8447E+19 24/01/27 0
3 2 5 209715200 512 2 YES INACTIVE 1849934 24/01/26 1859299 24/01/27 0
4 2 6 209715200 512 2 YES INACTIVE 1859343 24/01/27 1866531 24/01/27
spfile 생성
SQL> create spfile from pfile;
File created.
SQL> select tablespace_name from dba_data_files;
TABLESPACE_NAME
------------------------------
SYSTEM
SYSAUX
UNDOTBS2
USERS
UNDOTBS1
파라미터 파일 spfile 로 교체 및 2번 서버 기동
spfile asm 경로 확인
ASMCMD> ls -l
Type Redund Striped Time Sys Name
Y ASM/
N aracdb/
PARAMETERFILE UNPROT COARSE JAN 29 15:00:00 N spfilearacdb1.ora => +DATA/aracdb/PARAMETERFILE/spfile.278.1159542267
ASMCMD>
[aracdb1:/u01/app/oracle/product/12c/db_1/dbs]> vi initaracdb1.ora
spfile='+DATA/aracdb/PARAMETERFILE/spfile.278.1159542267'
[aracdb2:/u01/app/oracle/product/12c/db_1/dbs]> vi initaracdb2.ora
spfile='+DATA/aracdb/PARAMETERFILE/spfile.278.1159542267'
srvctl start instacne -d aracdb -i aracdb2
상태 확인
[aracdb1:/u01/app/oracle/product/12c/db_1/dbs]> crsctl stat res -t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr
ONLINE ONLINE arac1 STABLE
ONLINE ONLINE arac2 STABLE
ora.CRS.dg
ONLINE ONLINE arac1 STABLE
ONLINE ONLINE arac2 STABLE
ora.DATA.dg
ONLINE ONLINE arac1 STABLE
ONLINE ONLINE arac2 STABLE
ora.FRA.dg
ONLINE ONLINE arac1 STABLE
ONLINE ONLINE arac2 STABLE
ora.LISTENER.lsnr
ONLINE ONLINE arac1 STABLE
ONLINE ONLINE arac2 STABLE
ora.MGMT.dg
ONLINE ONLINE arac1 STABLE
ONLINE ONLINE arac2 STABLE
ora.chad
ONLINE ONLINE arac1 STABLE
ONLINE ONLINE arac2 STABLE
ora.net1.network
ONLINE ONLINE arac1 STABLE
ONLINE ONLINE arac2 STABLE
ora.ons
ONLINE ONLINE arac1 STABLE
ONLINE ONLINE arac2 STABLE
ora.proxy_advm
OFFLINE OFFLINE arac1 STABLE
OFFLINE OFFLINE arac2 STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE arac1 STABLE
ora.MGMTLSNR
1 ONLINE ONLINE arac1 169.254.51.97 192.16
8.0.111,STABLE
ora.arac1.vip
1 ONLINE ONLINE arac1 STABLE
ora.arac2.vip
1 ONLINE ONLINE arac2 STABLE
ora.aracdb.db
1 ONLINE ONLINE arac1 Open,HOME=/u01/app/o
racle/product/12c/db
_1,STABLE
2 ONLINE OFFLINE arac2 Instance Shutdown,ST
ARTING
ora.asm
1 ONLINE ONLINE arac1 Started,STABLE
2 ONLINE ONLINE arac2 Started,STABLE
3 OFFLINE OFFLINE STABLE
ora.cvu
1 ONLINE ONLINE arac1 STABLE
ora.mgmtdb
1 ONLINE ONLINE arac1 Open,STABLE
ora.qosmserver
1 ONLINE ONLINE arac1 STABLE
ora.scan1.vip
1 ONLINE ONLINE arac1 STABLE
--------------------------------------------------------------------------------
완료
'ORACLE > ADMIN' 카테고리의 다른 글
ASM 디스크 그룹 삭제 방법 (0) | 2024.02.22 |
---|---|
oracle autoupgrade 12C -> 19C 업그레이드 방법 (0) | 2024.02.08 |
12.2.0.1 기준 rac to single로 변환 (0) | 2024.01.28 |
12C RAC GIRU Patch ROLLBACK (0) | 2024.01.26 |
오라클 ASM 에서 filesystem으로 복사 하는 3가지 방법 (0) | 2024.01.25 |