[Oracle] RAC 엔진을 이용해 Single로 전환 후 복구(RAC to Single)

728x90

RAC to Single 복구 과정이랑 전체적으로 같으나

복구 전 RAC 기능을 끄고 Single 엔진으로 전환하는 작업이 필요합니다.

 

RAC에서 백업 받은 Data File, Control File, Archive Log File, 파라미터 파일(pfile)을 모두 Single DB 서버로 옮겨줍니다.

RAC Off 후 Relink (Single 엔진으로 전환)

$ cd $ORACLE_HOME/rdbms/lib
$ make -f ins_rdbms.mk rac_off

Relinking oracle
$ make -f ins_rdbms.mk ioracle
## OR , both working fine
$ cd $ORACLE_HOME/bin
$ relink oracle

파라미터 파일 수정

$ cat initORADB1.ora
ORADB1.__data_transfer_cache_size=0
ORADB2.__data_transfer_cache_size=0
ORADB1.__db_cache_size=234881024
ORADB2.__db_cache_size=301989888
ORADB1.__inmemory_ext_roarea=0
ORADB2.__inmemory_ext_roarea=0
ORADB1.__inmemory_ext_rwarea=0
ORADB2.__inmemory_ext_rwarea=0
ORADB1.__java_pool_size=16777216
ORADB2.__java_pool_size=16777216
ORADB1.__large_pool_size=16777216
ORADB2.__large_pool_size=16777216
ORADB1.__oracle_base='/ORA19/app/oracle'#ORACLE_BASE set from environment
ORADB2.__oracle_base='/ORA19/app/oracle'#ORACLE_BASE set from environment
ORADB1.__pga_aggregate_target=822083584
ORADB2.__pga_aggregate_target=771751936
ORADB1.__sga_target=721420288
ORADB2.__sga_target=771751936
ORADB1.__shared_io_pool_size=33554432
ORADB2.__shared_io_pool_size=33554432
ORADB1.__shared_pool_size=402653184
ORADB2.__shared_pool_size=385875968
ORADB1.__streams_pool_size=0
ORADB2.__streams_pool_size=0
ORADB1.__unified_pga_pool_size=0
ORADB2.__unified_pga_pool_size=0
*.audit_file_dest='/ORA19/app/oracle/admin/ORADB/adump'
*.audit_trail='none'
*.cluster_database=true
*.compatible='19.0.0'
*.control_files='+DATA/ORADB/CONTROLFILE/current.261.1034734897'
*.db_block_size=8192
*.db_create_file_dest='+DATA'
*.db_name='ORADB'
*.diagnostic_dest='/ORA19/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=ORADBXDB)'
family:dw_helper.instance_mode='read-only'
ORADB2.instance_number=2
ORADB1.instance_number=1
*.local_listener='-oraagent-dummy-'
*.log_archive_dest_1='location=/ora_arch'
*.log_archive_format='%t_%s_%r.arc'
*.memory_target=1470m
*.nls_language='AMERICAN'
*.nls_territory='AMERICA'
*.open_cursors=300
*.processes=300
*.remote_login_passwordfile='exclusive'
ORADB2.thread=2
ORADB1.thread=1
ORADB2.undo_tablespace='UNDOTBS2'
ORADB1.undo_tablespace='UNDOTBS1'


init 파일 명 initCLONE.ora 로 변경

dbname은 기존과 동일하게 다른 디렉토리 명은 새 서버 디렉토리에 맞게 CLONE로 변경함

ORADB1,2.__ 부분 모두 삭제

audit_file_dest, dispatchers 변경

local_listener 서버에 맞게 변경

파라미터 주석 : cluster_database,db_create_file_dest, family:dw_helper.instance_mode='read-only', racdb2.instance_number=2, racdb1.instance_number=1, racdb2.thread=1, racdb2.thread=2

컨트롤 파일 위치 변경

memory_target 변경(선택)

undo_tablespace 변경

 

수정된 pfile

$ cat $ORACLE_HOME/dbs/initCLONE.ora 
*.audit_file_dest='/app/oracle/admin/CLONE/adump'
*.audit_trail='none'
#*.cluster_database=true
*.compatible='19.0.0'
*.control_files='/app/oracle/oradata/CLONE/control01.ctl'
*.db_block_size=8192
#*.db_create_file_dest='+DATA'
*.db_name='ORADB'
*.diagnostic_dest='/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=CLONEXDB)'
#family:dw_helper.instance_mode='read-only'
#ORADB2.instance_number=2
#ORADB1.instance_number=1
*.local_listener='LISTENER_CLONE'
*.log_archive_dest_1='location=/app/oracle/arch'
*.log_archive_format='%t_%s_%r.arc'
*.memory_target=1470m
*.nls_language='AMERICAN'
*.nls_territory='AMERICA'
*.open_cursors=300
*.processes=300
*.remote_login_passwordfile='exclusive'
#ORADB2.thread=2
#ORADB1.thread=1
#ORADB2.undo_tablespace='UNDOTBS2'
*.undo_tablespace='UNDOTBS1'

 

이후 백업 파일(Data File, Control File, Archive Log File)을 이용해 nomount -> mount -> open 단계까지 수행합니다.

 

 

 

참고

 

oracle rac to single

다른서버에 엔진을 묶어서 싱글로 올릴때는 tar로 말아서 옮긴후 아래 내용중 relink 단계까지만 하고 dbca로 생성 하니 잘되네요 My last post about Turn on/off RAC basically is to implement Converting/Migrating Oracle

theone79.tistory.com

 

Oracle 19c rac to single clone db 생성 가이드

OS환경 : Oracle Linux 7.6 (64bit) DB 환경 : Oracle Database 19.6.0.0 RAC, 19.10.0.0 SINGLE 방법 : 오라클 19c rac to single clone db 생성 가이드RAC DB(asm)에서 특정시점의 데이터를 SINGLE DB(filesystem)로 복구하는 내

positivemh.tistory.com

 

728x90