내맘대로긍정이 알려주는
Oracle 23ai 신기능
무료 세미나 발표자료
OS환경 : Oracle Linux 6.8 (64bit)
DB 환경 : Oracle Database 11.2.0.4 3node rac + 2node rac(newrac)
방법 : Oracle Linux 6.8에 Oracle 11g R2 RAC에 RAC(db) 추가 구성 가이드
기존 3node rac(racdb) 가 구성되어 있는 서버에서 세번째 노드는 꺼둔 상태로
2node rac(newrac)를 추가로 구성하는 방법을 설명함
스토리지는 ASM임
서버1, 서버2에 db가 모두 오픈되어있는지 확인
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | [root@rac1 ~]# su - oracle [oracle@rac1 ~]$ crsctl stat res -t -------------------------------------------------------------------------------- NAME TARGET STATE SERVER STATE_DETAILS -------------------------------------------------------------------------------- Local Resources -------------------------------------------------------------------------------- ora.LISTENER.lsnr ONLINE ONLINE rac1 ONLINE ONLINE rac2 ora.OCR_VOTE.dg ONLINE ONLINE rac1 ONLINE ONLINE rac2 ora.ORADATA.dg ONLINE ONLINE rac1 ONLINE ONLINE rac2 ora.ORAFRA.dg ONLINE ONLINE rac1 ONLINE ONLINE rac2 ora.asm ONLINE ONLINE rac1 Started ONLINE ONLINE rac2 Started ora.gsd OFFLINE OFFLINE rac1 OFFLINE OFFLINE rac2 ora.net1.network ONLINE ONLINE rac1 ONLINE ONLINE rac2 ora.ons ONLINE ONLINE rac1 ONLINE ONLINE rac2 -------------------------------------------------------------------------------- Cluster Resources -------------------------------------------------------------------------------- ora.LISTENER_SCAN1.lsnr 1 ONLINE OFFLINE ora.cvu 1 ONLINE ONLINE rac1 ora.oc4j 1 ONLINE OFFLINE STARTING ora.rac1.vip 1 ONLINE ONLINE rac1 ora.rac2.vip 1 ONLINE ONLINE rac2 ora.rac3.vip 1 ONLINE INTERMEDIATE rac2 FAILED OVER ora.racdb.db 1 ONLINE ONLINE 2 ONLINE ONLINE 3 ONLINE OFFLINE ora.scan1.vip 1 ONLINE ONLINE rac2 |
xmanager - Passive 실행
dbca 실행
1 | [oracle@rac1 ~]$ dbca |
Oracle Real Application Clusters (RAC) database 선택
Create a Database 선택
General Purpose or Transaction Processing 선택
Admin_managed 선택 후 db sid 설정(노드1과 노드2만 선택)
Configure Enterprise Manager 선택해제
패스워드 설정(oracle)
패스워드가 단순해서 발생하는 오류로 Yes 선택
ASM 사용중이기 때문에 +ORADATA 선택
Specify Fase Recovery Area(FRA) 선택해제
Sample Schemas 선택해제
메모리 450 이상으로 설정(나의경우 350으로 해서 문제발생함)
캐릭터셋 KO16MSWIN949 선택
Next 선택
Generate Database Creation Scripts 선택(설치 시 어떤 스크립트들이 돌아가는지 볼 수 있음)
설치 요약 내용 확인 후 OK
스크립트가 추출되는 화면
추출된 스크립트가 해당위치에 저장되었다고 나옴
Db가 구성되고 있는중
거의 완료됨
나의 경우 마지막에 메모리 부족(SGA) 경고 메세지가 발생함
DB는 생성되었으나 기동이 안되는 문제 뒤에서 트러블슈팅함
최소 276M 이상이어야하는데 264M으로 설정되어 발생한 문제
pfile 확인
1 2 3 | [oracle@rac1 ~]$ $ORACLE_HOME/dbs [oracle@rac1 dbs]$ vi initnewrac1.ora SPFILE='+ORADATA/newrac/spfilenewrac.ora' |
현재 spfile에서 값을 받아와서 사용중
spfile을 다시 pfile(txt형식)으로 변경
1 2 3 4 5 6 7 8 9 10 11 | [oracle@rac1 dbs]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.4.0 Production on Thu Oct 10 12:02:57 2019 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to an idle instance. SQL> create pfile='$ORACLE_HOME/dbs/initnewrac1new.ora' from spfile='+ORADATA/newrac/spfilenewrac.ora'; File created. |
pfile에 지정된 메모리(sga_target) 확인
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | [oracle@rac1 dbs]$ vi initnewrac1new.ora *.audit_file_dest='/oracle/app/oracle/admin/newrac/adump' *.audit_trail='db' *.cluster_database=true *.compatible='11.2.0.4.0' *.control_files='+ORADATA/newrac/controlfile/current.275.1021291019' *.db_block_size=8192 *.db_create_file_dest='+ORADATA' *.db_domain='' *.db_name='newrac' *.diagnostic_dest='/oracle/app/oracle' *.dispatchers='(PROTOCOL=TCP) (SERVICE=newracXDB)' newrac1.instance_number=1 newrac2.instance_number=2 *.open_cursors=300 *.pga_aggregate_target=91226112 *.processes=150 *.remote_listener='rac-scan:1521' *.remote_login_passwordfile='exclusive' *.sga_target=274726912 newrac2.thread=2 newrac1.thread=1 newrac1.undo_tablespace='UNDOTBS1' newrac2.undo_tablespace='UNDOTBS2' |
274726912로 설정되어 있는 것을 앞자리를 3으로 변경 후 저장
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | [oracle@rac1 dbs]$ vi initnewrac1new.ora *.audit_file_dest='/oracle/app/oracle/admin/newrac/adump' *.audit_trail='db' *.cluster_database=true *.compatible='11.2.0.4.0' *.control_files='+ORADATA/newrac/controlfile/current.275.1021291019' *.db_block_size=8192 *.db_create_file_dest='+ORADATA' *.db_domain='' *.db_name='newrac' *.diagnostic_dest='/oracle/app/oracle' *.dispatchers='(PROTOCOL=TCP) (SERVICE=newracXDB)' newrac1.instance_number=1 newrac2.instance_number=2 *.open_cursors=300 *.pga_aggregate_target=91226112 *.processes=150 *.remote_listener='rac-scan:1521' *.remote_login_passwordfile='exclusive' *.sga_target=374726912 newrac2.thread=2 newrac1.thread=1 newrac1.undo_tablespace='UNDOTBS1' newrac2.undo_tablespace='UNDOTBS2' |
sqlplus 접속 후 startup mount
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | [oracle@rac1 dbs]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.4.0 Production on Thu Oct 10 12:05:41 2019 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to an idle instance. SQL> startup mount pfile='$ORACLE_HOME/dbs/initnewrac1new.ora' ORACLE instance started. Total System Global Area 375791616 bytes Fixed Size 2253424 bytes Variable Size 234884496 bytes Database Buffers 134217728 bytes Redo Buffers 4435968 bytes alter dataDatabase mounted. |
정상적으로 mount 됨
open 시도
1 2 3 | SQL> alter database open; Database altered. |
정상적으로 open 됨
2번노드도 똑같이 sga_target 변경 후 open
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | [oracle@rac2 dbs]$ vi initnewrac2new.ora sga_target 수정 [oracle@rac2 dbs]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.4.0 Production on Thu Oct 10 12:05:20 2019 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to an idle instance. SQL> startup mount pfile='$ORACLE_HOME/dbs/initnewrac2new.ora' ORACLE instance started. Total System Global Area 375791616 bytes Fixed Size 2253424 bytes Variable Size 234884496 bytes Database Buffers 134217728 bytes Redo Buffers 4435968 bytes Database mounted. SQL> alter database open; Database altered. |
정상적으로 open 됨
전체 리소스들 확인
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | [oracle@rac1 dbs]$ crsctl stat res -t -------------------------------------------------------------------------------- NAME TARGET STATE SERVER STATE_DETAILS -------------------------------------------------------------------------------- Local Resources -------------------------------------------------------------------------------- ora.LISTENER.lsnr ONLINE ONLINE rac1 ONLINE ONLINE rac2 ora.OCR_VOTE.dg ONLINE ONLINE rac1 ONLINE ONLINE rac2 ora.ORADATA.dg ONLINE ONLINE rac1 ONLINE ONLINE rac2 ora.ORAFRA.dg ONLINE ONLINE rac1 ONLINE ONLINE rac2 ora.asm ONLINE ONLINE rac1 Started ONLINE ONLINE rac2 Started ora.gsd OFFLINE OFFLINE rac1 OFFLINE OFFLINE rac2 ora.net1.network ONLINE ONLINE rac1 ONLINE ONLINE rac2 ora.ons ONLINE ONLINE rac1 ONLINE ONLINE rac2 -------------------------------------------------------------------------------- Cluster Resources -------------------------------------------------------------------------------- ora.LISTENER_SCAN1.lsnr 1 ONLINE ONLINE rac1 ora.cvu 1 ONLINE ONLINE rac1 ora.newrac.db 1 ONLINE ONLINE rac1 Open 2 ONLINE ONLINE rac2 Open ora.oc4j 1 ONLINE ONLINE rac2 ora.rac1.vip 1 ONLINE ONLINE rac1 ora.rac2.vip 1 ONLINE ONLINE rac2 ora.rac3.vip 1 ONLINE INTERMEDIATE rac2 FAILED OVER ora.racdb.db 1 ONLINE ONLINE rac1 Open 2 ONLINE ONLINE rac2 Open 3 ONLINE OFFLINE ora.scan1.vip 1 ONLINE ONLINE rac1 |
기존db(racdb)와 추가한db(newrac)가 정상적으로 Open 상태임을 확인
참조 :
'ORACLE > Install' 카테고리의 다른 글
Windows Server 2008 R2에 Oracle 10g R2에서 11g R2로 DB 업그레이드 가이드 (0) | 2019.10.16 |
---|---|
Windows Server 2008 R2에 Oracle 10g R2 설치 가이드 (0) | 2019.10.15 |
[스크랩]Oracle 11G R2 Kernel parameter | 파즈 (0) | 2019.09.13 |
무료 xwindow 사용 xming 사용 가이드 (0) | 2019.02.18 |
oracle grid opatch 방법 (0) | 2018.11.05 |