I. Grid Install
GRID_HOME 경로 생성 및 설치 파일 압축 해제
grid_env mkdir -p $GRID_HOME unzip <zip 파일이 있는 경로>/LINUX.X64_193000_grid_home.zip -d $GRID_HOME
[orcl:/home/oracle]> grid_env [grid@+ASM ~]$ mkdir -p $GRID_HOME [grid@+ASM ~]$ unzip /mnt/LINUX.X64_193000_grid_home.zip -d $GRID_HOME
cvuqdisk 패키지 설치
cd $GRID_HOME/cv/rpm rpm -ivh cvuqdisk-*.rpm
[root@ol7 ~]# cd $GRID_HOME/cv/rpm [root@ol7 rpm]# rpm -ivh cvuqdisk-1.0.10-1.rpm 준비 중... ################################# [100%] Updating / installing... 1:cvuqdisk-1.0.10-1 ################################# [100%]
vi /etc/oraInst.loc 로 파일 생성
inventory_loc=/u01/app/oraInventory inst_group=oinstall
[root@ol7 ~]# vi /etc/oraInst.loc [root@ol7 ~]# cat /etc/oraInst.loc inventory_loc=/u01/app/oraInventory inst_group=oinstall
/etc/oraInst.loc 파일 소유권 및 권한 수정
chown oracle:oinstall /etc/oraInst.loc chmod 664 /etc/oraInst.loc
[root@ol7 ~]# chown oracle:oinstall /etc/oraInst.loc [root@ol7 ~]# chmod 664 /etc/oraInst.loc
Grid response 파일 생성
cat > ~oracle/grid_install.rsp oracle.install.responseFileVersion=/oracle/install/rspfmt_crsinstall_response_schema_v19.0.0 INVENTORY_LOCATION=/u01/app/oraInventory oracle.install.option=HA_CONFIG ORACLE_BASE=/u01/app/oracle oracle.install.asm.OSDBA=asmdba oracle.install.asm.OSOPER=asmoper oracle.install.asm.OSASM=asmadmin oracle.install.asm.SYSASMPassword=oracle_4U oracle.install.asm.diskGroup.name=DATA oracle.install.asm.diskGroup.redundancy=EXTERNAL oracle.install.asm.diskGroup.AUSize=4 oracle.install.asm.diskGroup.FailureGroups= oracle.install.asm.diskGroup.disksWithFailureGroupNames= oracle.install.asm.diskGroup.disks=/dev/oracleasm/disks/DATA1,/dev/oracleasm/disks/DATA2,/dev/oracleasm/disks/DATA3 oracle.install.asm.diskGroup.quorumFailureGroupNames= oracle.install.asm.diskGroup.diskDiscoveryString=/dev/oracleasm/disks/* oracle.install.asm.monitorPassword=oracle_4U oracle.install.asm.configureAFD=false <ctrl+C>
설치 전 검사
$GRID_HOME/gridSetup.sh -silent -responseFile ~/grid_install.rsp -executePrereqs
[+ASM:/home/oracle]> $GRID_HOME/gridSetup.sh -silent -responseFile ~/grid_install.rsp -executePrereqs Oracle Grid Infrastructure 설정 마법사 실행 중... 필요 조건 검사가 성공적으로 실행되었습니다.
Grid 설치
$GRID_HOME/gridSetup.sh -silent -responseFile ~/grid_install.rsp
[+ASM:/home/oracle]> $GRID_HOME/gridSetup.sh -silent -responseFile ~/grid_install.rsp Oracle Grid Infrastructure 설정 마법사 실행 중... 이 세션에 대한 응답 파일을 다음에서 찾을 수 있습니다. /u01/app/oracle/19c/grid/install/response/grid_2020-01-10_11-26-23PM.rsp 다음 위치에서 이 설치 세션의 로그를 찾을 수 있습니다. /u01/app/oraInventory/logs/GridSetupActions2020-01-10_11-26-23PM/gridSetupActions2020-01-10_11-26-23PM.log 루트 사용자로 다음 스크립트를 실행합니다. 1. /u01/app/oracle/19c/grid/root.sh 다음 노드에서 /u01/app/oracle/19c/grid/root.sh을(를) 실행하십시오. [ol7] Successfully Setup Software. 설치 사용자로서 다음 명령을 실행하여 구성을 완료합니다. /u01/app/oracle/19c/grid/gridSetup.sh -executeConfigTools -responseFile /home/oracle/grid_install.rsp [-silent]
root.sh 스크립트 실행
/u01/app/oracle/19c/grid/root.sh
[root@ol7 ~]# /u01/app/oracle/19c/grid/root.sh Check /u01/app/oracle/19c/grid/install/root_ol7_2020-01-10_23-30-39-981866027.log for the output of root script
Grid 환경 설정 수행
$GRID_HOME/gridSetup.sh -executeConfigTools -responseFile ~/grid_install.rsp -silent
[+ASM:/home/oracle]> $GRID_HOME/gridSetup.sh -executeConfigTools -responseFile ~/grid_install.rsp -silent Oracle Grid Infrastructure 설정 마법사 실행 중... 다음 위치에서 이 세션의 로그를 찾을 수 있습니다. /u01/app/oraInventory/logs/GridSetupActions2020-01-10_11-33-16PM 다음 위치에서 이 설치 세션의 로그를 찾을 수 있습니다. /u01/app/oraInventory/logs/UpdateNodeList2020-01-10_11-33-16PM.log Successfully Configured Software.
초기 설치 결과 확인
crsctl stat res -t
[root@ol7 ~]# crsctl stat res -t -------------------------------------------------------------------------------- Name Target State Server State details -------------------------------------------------------------------------------- Local Resources -------------------------------------------------------------------------------- ora.DATA.dg ONLINE ONLINE ol7 STABLE ora.LISTENER.lsnr ONLINE ONLINE ol7 STABLE ora.asm ONLINE ONLINE ol7 Started,STABLE ora.ons OFFLINE OFFLINE ol7 STABLE -------------------------------------------------------------------------------- Cluster Resources -------------------------------------------------------------------------------- ora.cssd 1 ONLINE ONLINE ol7 STABLE ora.diskmon 1 OFFLINE OFFLINE STABLE ora.evmd 1 ONLINE ONLINE ol7 STABLE --------------------------------------------------------------------------------
FRA 디스크 그룹 생성
asmca -silent -createDiskGroup -diskGroupName FRA -diskList /dev/oracleasm/disks/FRA1,/dev/oracleasm/disks/FRA2 -redundancy EXTERNAL
[+ASM:/home/oracle]> asmca -silent -createDiskGroup -diskGroupName FRA -diskList /dev/oracleasm/disks/FRA1,/dev/oracleasm/disks/FRA2 -redundancy EXTERNAL [DBT-30001] 디스크 그룹이 성공적으로 생성되었습니다. 자세한 내용은 /u01/app/oracle/cfgtoollogs/asmca/asmca-200110오후113810.log을(를) 확인하십시오.
FRA 디스크 그룹 추가 결과 확인
crsctl stat res -t
[root@ol7 ~]# crsctl stat res -t -------------------------------------------------------------------------------- Name Target State Server State details -------------------------------------------------------------------------------- Local Resources -------------------------------------------------------------------------------- ora.DATA.dg ONLINE ONLINE ol7 STABLE ora.FRA.dg ONLINE ONLINE ol7 STABLE ora.LISTENER.lsnr ONLINE ONLINE ol7 STABLE ora.asm ONLINE ONLINE ol7 Started,STABLE ora.ons OFFLINE OFFLINE ol7 STABLE -------------------------------------------------------------------------------- Cluster Resources -------------------------------------------------------------------------------- ora.cssd 1 ONLINE ONLINE ol7 STABLE ora.diskmon 1 OFFLINE OFFLINE STABLE ora.evmd 1 ONLINE ONLINE ol7 STABLE --------------------------------------------------------------------------------
ASM 디스크 그룹 확인
asmcmd lsdg
[+ASM:/home/oracle]> asmcmd lsdg State Type Rebal Sector Logical_Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name MOUNTED EXTERN N 512 512 4096 4194304 30708 30584 0 30584 0 N DATA/ MOUNTED EXTERN N 512 512 4096 1048576 20478 20421 0 20421 0 N FRA/
{}
II. DB Install
DB_HOME 경로 생성 및 설치 파일 압축 해제
mkdir -p $DB_HOME unzip <설치 파일 다운로드 위치>/LINUX.X64_193000_db_home.zip -d $DB_HOME
[orcl:/home/oracle]> mkdir -p $DB_HOME [orcl:/home/oracle]> unzip /mnt/LINUX.X64_193000_db_home.zip -d $DB_HOME
Database response 파일 생성
cat > ~oracle/db_install.rsp oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v19.0.0 oracle.install.option=INSTALL_DB_SWONLY UNIX_GROUP_NAME=oinstall INVENTORY_LOCATION=/u01/app/oraInventory ORACLE_HOME=/u01/app/oracle/product/19c/db_1 ORACLE_BASE=/u01/app/oracle oracle.install.db.InstallEdition=EE oracle.install.db.OSDBA_GROUP=dba oracle.install.db.OSOPER_GROUP=oper oracle.install.db.OSBACKUPDBA_GROUP=backupdba oracle.install.db.OSDGDBA_GROUP=dgdba oracle.install.db.OSKMDBA_GROUP=kmdba oracle.install.db.OSRACDBA_GROUP=racdba oracle.install.db.rootconfig.executeRootScript=false <ctrl+C>
[orcl:/home/oracle]> cat > ~oracle/db_install.rsp oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v19.0.0 oracle.install.option=INSTALL_DB_SWONLY UNIX_GROUP_NAME=oinstall INVENTORY_LOCATION=/u01/app/oraInventory ORACLE_HOME=/u01/app/oracle/product/19c/db_1 ORACLE_BASE=/u01/app/oracle oracle.install.db.InstallEdition=EE oracle.install.db.OSDBA_GROUP=dba oracle.install.db.OSOPER_GROUP=oper oracle.install.db.OSBACKUPDBA_GROUP=backupdba oracle.install.db.OSDGDBA_GROUP=dgdba oracle.install.db.OSKMDBA_GROUP=kmdba oracle.install.db.OSRACDBA_GROUP=racdba oracle.install.db.rootconfig.executeRootScript=false ^C
설치 전 검사
$DB_HOME/runInstaller -silent -responseFile ~/db_install.rsp -executePrereqs
[orcl:/home/oracle]> $DB_HOME/runInstaller -silent -responseFile ~/db_install.rsp -executePrereqs Oracle Database 설정 마법사 실행 중... 필요 조건 검사가 성공적으로 실행되었습니다.
DB 설치
$DB_HOME/runInstaller -silent -responseFile ~/db_install.rsp
[orcl:/home/oracle]> $DB_HOME/runInstaller -silent -responseFile ~/db_install.rsp Oracle Database 설정 마법사 실행 중... 이 세션에 대한 응답 파일을 다음에서 찾을 수 있습니다. /u01/app/oracle/product/19c/db_1/install/response/db_2020-01-10_11-48-03PM.rsp 다음 위치에서 이 설치 세션의 로그를 찾을 수 있습니다. /u01/app/oraInventory/logs/InstallActions2020-01-10_11-48-03PM/installActions2020-01-10_11-48-03PM.log 루트 사용자로 다음 스크립트를 실행합니다. 1. /u01/app/oracle/product/19c/db_1/root.sh 다음 노드에서 /u01/app/oracle/product/19c/db_1/root.sh을(를) 실행하십시오. [ol7] Successfully Setup Software.
root.sh 스크립트 실행
/u01/app/oracle/product/19c/db_1/root.sh
[root@ol7 ~]# /u01/app/oracle/product/19c/db_1/root.sh Check /u01/app/oracle/product/19c/db_1/install/root_ol7_2020-01-10_23-52-20-388011057.log for the output of root script
{}
III. Patch
root 유저 경로 환경 변수 설정
export ORACLE_BASE=/u01/app/oracle export GRID_HOME=$ORACLE_BASE/19c/grid export DB_HOME=$ORACLE_BASE/product/19c/db_1 export ORACLE_HOME=$GRID_HOME
[root@ol7 ~]# export ORACLE_BASE=/u01/app/oracle [root@ol7 ~]# export GRID_HOME=$ORACLE_BASE/19c/grid [root@ol7 ~]# export DB_HOME=$ORACLE_BASE/product/19c/db_1 [root@ol7 ~]# export ORACLE_HOME=$GRID_HOME
Grid opatch 버전 확인 및 업데이트
$GRID_HOME/OPatch/opatch version #mv $GRID_HOME/OPatch $GRID_HOME/OPatch.old #unzip <패치 다운로드 경로>/p6880880_122010_Linux-x86-64.zip -d $GRID_HOME #chown -R oracle:oinstall $GRID_HOME/OPatch #ll $GRID_HOME | grep OPatch #$GRID_HOME/OPatch/opatch version
[orcl:/home/oracle]> $GRID_HOME/OPatch/opatch version OPatch Version: 12.2.0.1.17 OPatch succeeded.
DB opatch 버전 확인 및 업데이트
$DB_HOME/OPatch/opatch version #mv $DB_HOME/OPatch $DB_HOME/OPatch.old #unzip <패치 다운로드 경로>/p6880880_122010_Linux-x86-64.zip -d $DB_HOME #chown -R oracle:oinstall $DB_HOME/OPatch #ll $DB_HOME | grep OPatch #$DB_HOME/OPatch/opatch version
[orcl:/home/oracle]> $GRID_HOME/OPatch/opatch version OPatch Version: 12.2.0.1.17 OPatch succeeded.
패치 압축 해제
mkdir ~oracle/patch unzip <패치번호>_190000_Linux-x86-64.zip -d ~oracle/patch
[orcl:/home/oracle]> mkdir ~oracle/patch [orcl:/home/oracle]> unzip p30116789_190000_Linux-x86-64.zip -d ~oracle/patch << 생략 >>
패치 현황 확인
$GRID_HOME/OPatch/opatch lspatches -oh $GRID_HOME $DB_HOME/OPatch/opatch lspatches -oh $DB_HOME
[orcl:/home/oracle]> $GRID_HOME/OPatch/opatch lspatches -oh $GRID_HOME 29585399;OCW RELEASE UPDATE 19.3.0.0.0 (29585399) 29517247;ACFS RELEASE UPDATE 19.3.0.0.0 (29517247) 29517242;Database Release Update : 19.3.0.0.190416 (29517242) 29401763;TOMCAT RELEASE UPDATE 19.0.0.0.0 (29401763) OPatch succeeded. [orcl:/home/oracle]> $DB_HOME/OPatch/opatch lspatches -oh $DB_HOME 29585399;OCW RELEASE UPDATE 19.3.0.0.0 (29585399) 29517242;Database Release Update : 19.3.0.0.190416 (29517242) OPatch succeeded.
Grid 패치의 소프트웨어 충돌 여부 확인
$GRID_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -oh $GRID_HOME -phBaseDir ~oracle/patch/<패치번호>/<OCW Release Update> $GRID_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -oh $GRID_HOME -phBaseDir ~oracle/patch/<패치번호>/<ACFS Release Update> $GRID_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -oh $GRID_HOME -phBaseDir ~oracle/patch/<패치번호>/<Database Release Update> $GRID_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -oh $GRID_HOME -phBaseDir ~oracle/patch/<패치번호>/<Tomcat Release Update>
[orcl:/home/oracle]> $GRID_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -oh $GRID_HOME -phBaseDir ~oracle/patch/30116789/30122149 Oracle Interim 패치 설치 프로그램 버전 12.2.0.1.17 Copyright (c) 2020, Oracle Corporation. All rights reserved. PREREQ session Oracle 홈: /u01/app/oracle/19c/grid 중앙 인벤토리: /u01/app/oraInventory 출처: /u01/app/oracle/19c/grid/oraInst.loc OPatch 버전: 12.2.0.1.17 OUI 버전: 12.2.0.7.0 로그 파일 위치: /u01/app/oracle/19c/grid/cfgtoollogs/opatch/opatch2020-01-11_10-05-16오전_1.log Invoking prereq "checkconflictagainstohwithdetail" Prereq "checkConflictAgainstOHWithDetail" passed. OPatch succeeded. [orcl:/home/oracle]> $GRID_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -oh $GRID_HOME -phBaseDir ~oracle/patch/30116789/30122167 Oracle Interim 패치 설치 프로그램 버전 12.2.0.1.17 Copyright (c) 2020, Oracle Corporation. All rights reserved. PREREQ session Oracle 홈: /u01/app/oracle/19c/grid 중앙 인벤토리: /u01/app/oraInventory 출처: /u01/app/oracle/19c/grid/oraInst.loc OPatch 버전: 12.2.0.1.17 OUI 버전: 12.2.0.7.0 로그 파일 위치: /u01/app/oracle/19c/grid/cfgtoollogs/opatch/opatch2020-01-11_10-05-26오전_1.log Invoking prereq "checkconflictagainstohwithdetail" Prereq "checkConflictAgainstOHWithDetail" passed. OPatch succeeded. [orcl:/home/oracle]> $GRID_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -oh $GRID_HOME -phBaseDir ~oracle/patch/30116789/30125133 Oracle Interim 패치 설치 프로그램 버전 12.2.0.1.17 Copyright (c) 2020, Oracle Corporation. All rights reserved. PREREQ session Oracle 홈: /u01/app/oracle/19c/grid 중앙 인벤토리: /u01/app/oraInventory 출처: /u01/app/oracle/19c/grid/oraInst.loc OPatch 버전: 12.2.0.1.17 OUI 버전: 12.2.0.7.0 로그 파일 위치: /u01/app/oracle/19c/grid/cfgtoollogs/opatch/opatch2020-01-11_10-05-33오전_1.log Invoking prereq "checkconflictagainstohwithdetail" Prereq "checkConflictAgainstOHWithDetail" passed. OPatch succeeded. [orcl:/home/oracle]> $GRID_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -oh $GRID_HOME -phBaseDir ~oracle/patch/30116789/29401763 Oracle Interim 패치 설치 프로그램 버전 12.2.0.1.17 Copyright (c) 2020, Oracle Corporation. All rights reserved. PREREQ session Oracle 홈: /u01/app/oracle/19c/grid 중앙 인벤토리: /u01/app/oraInventory 출처: /u01/app/oracle/19c/grid/oraInst.loc OPatch 버전: 12.2.0.1.17 OUI 버전: 12.2.0.7.0 로그 파일 위치: /u01/app/oracle/19c/grid/cfgtoollogs/opatch/opatch2020-01-11_10-05-41오전_1.log Invoking prereq "checkconflictagainstohwithdetail" Prereq "checkConflictAgainstOHWithDetail" passed. OPatch succeeded.
Grid 패치의 패치간 충돌 여부 확인
$GRID_HOME/OPatch/opatch prereq CheckConflictAmongPatches -oh $GRID_HOME -phBaseDir ~oracle/patch/<패치번호>/<OCW Release Update> $GRID_HOME/OPatch/opatch prereq CheckConflictAmongPatches -oh $GRID_HOME -phBaseDir ~oracle/patch/<패치번호>/<ACFS Release Update> $GRID_HOME/OPatch/opatch prereq CheckConflictAmongPatches -oh $GRID_HOME -phBaseDir ~oracle/patch/<패치번호>/<Database Release Update> $GRID_HOME/OPatch/opatch prereq CheckConflictAmongPatches -oh $GRID_HOME -phBaseDir ~oracle/patch/<패치번호>/<Tomcat Release Update>
[orcl:/home/oracle]> $GRID_HOME/OPatch/opatch prereq CheckConflictAmongPatches -oh $GRID_HOME -phBaseDir ~oracle/patch/30116789/30122149 Oracle Interim 패치 설치 프로그램 버전 12.2.0.1.17 Copyright (c) 2020, Oracle Corporation. All rights reserved. PREREQ session Oracle 홈: /u01/app/oracle/19c/grid 중앙 인벤토리: /u01/app/oraInventory 출처: /u01/app/oracle/19c/grid/oraInst.loc OPatch 버전: 12.2.0.1.17 OUI 버전: 12.2.0.7.0 로그 파일 위치: /u01/app/oracle/19c/grid/cfgtoollogs/opatch/opatch2020-01-11_10-06-24오전_1.log Invoking prereq "checkconflictamongpatches" Prereq "checkConflictAmongPatches" passed. OPatch succeeded. [orcl:/home/oracle]> $GRID_HOME/OPatch/opatch prereq CheckConflictAmongPatches -oh $GRID_HOME -phBaseDir ~oracle/patch/30116789/30122167 Oracle Interim 패치 설치 프로그램 버전 12.2.0.1.17 Copyright (c) 2020, Oracle Corporation. All rights reserved. PREREQ session Oracle 홈: /u01/app/oracle/19c/grid 중앙 인벤토리: /u01/app/oraInventory 출처: /u01/app/oracle/19c/grid/oraInst.loc OPatch 버전: 12.2.0.1.17 OUI 버전: 12.2.0.7.0 로그 파일 위치: /u01/app/oracle/19c/grid/cfgtoollogs/opatch/opatch2020-01-11_10-06-37오전_1.log Invoking prereq "checkconflictamongpatches" Prereq "checkConflictAmongPatches" passed. OPatch succeeded. [orcl:/home/oracle]> $GRID_HOME/OPatch/opatch prereq CheckConflictAmongPatches -oh $GRID_HOME -phBaseDir ~oracle/patch/30116789/30125133 Oracle Interim 패치 설치 프로그램 버전 12.2.0.1.17 Copyright (c) 2020, Oracle Corporation. All rights reserved. PREREQ session Oracle 홈: /u01/app/oracle/19c/grid 중앙 인벤토리: /u01/app/oraInventory 출처: /u01/app/oracle/19c/grid/oraInst.loc OPatch 버전: 12.2.0.1.17 OUI 버전: 12.2.0.7.0 로그 파일 위치: /u01/app/oracle/19c/grid/cfgtoollogs/opatch/opatch2020-01-11_10-06-47오전_1.log Invoking prereq "checkconflictamongpatches" Prereq "checkConflictAmongPatches" passed. OPatch succeeded. [orcl:/home/oracle]> $GRID_HOME/OPatch/opatch prereq CheckConflictAmongPatches -oh $GRID_HOME -phBaseDir ~oracle/patch/30116789/29401763 Oracle Interim 패치 설치 프로그램 버전 12.2.0.1.17 Copyright (c) 2020, Oracle Corporation. All rights reserved. PREREQ session Oracle 홈: /u01/app/oracle/19c/grid 중앙 인벤토리: /u01/app/oraInventory 출처: /u01/app/oracle/19c/grid/oraInst.loc OPatch 버전: 12.2.0.1.17 OUI 버전: 12.2.0.7.0 로그 파일 위치: /u01/app/oracle/19c/grid/cfgtoollogs/opatch/opatch2020-01-11_10-06-58오전_1.log Invoking prereq "checkconflictamongpatches" Prereq "checkConflictAmongPatches" passed. OPatch succeeded.
Grid 패치 필요 공간 확인
cat > /tmp/patch_list_gihome.txt /home/oracle/patch/<패치번호>/<OCW Release Update> /home/oracle/patch/<패치번호>/<ACFS Release Update> /home/oracle/patch/<패치번호>/<Database Release Update> /home/oracle/patch/<패치번호>/<Tomcat Release Update> <ctrl+c> cat /tmp/patch_list_gihome.txt $GRID_HOME/OPatch/opatch prereq CheckSystemSpace -oh $GRID_HOME -phBaseFile /tmp/patch_list_gihome.txt
[orcl:/home/oracle]> cat > /tmp/patch_list_gihome.txt /home/oracle/patch/30116789/30122149 /home/oracle/patch/30116789/30122167 /home/oracle/patch/30116789/30125133 /home/oracle/patch/30116789/29401763 ^C [orcl:/home/oracle]> cat /tmp/patch_list_gihome.txt /home/oracle/patch/30116789/30122149 /home/oracle/patch/30116789/30122167 /home/oracle/patch/30116789/30125133 /home/oracle/patch/30116789/29401763 [orcl:/home/oracle]> $GRID_HOME/OPatch/opatch prereq CheckSystemSpace -oh $GRID_HOME -phBaseFile /tmp/patch_list_gihome.txt Oracle Interim 패치 설치 프로그램 버전 12.2.0.1.17 Copyright (c) 2020, Oracle Corporation. All rights reserved. PREREQ session Oracle 홈: /u01/app/oracle/19c/grid 중앙 인벤토리: /u01/app/oraInventory 출처: /u01/app/oracle/19c/grid/oraInst.loc OPatch 버전: 12.2.0.1.17 OUI 버전: 12.2.0.7.0 로그 파일 위치: /u01/app/oracle/19c/grid/cfgtoollogs/opatch/opatch2020-01-11_10-10-29오전_1.log Invoking prereq "checksystemspace" Prereq "checkSystemSpace" passed. OPatch succeeded.
root 유저로 prepatch 수행
$GRID_HOME/crs/install/roothas.sh -prepatch
[root@ol7 ~]# $GRID_HOME/crs/install/roothas.sh -prepatch Using configuration parameter file: /u01/app/oracle/19c/grid/crs/install/crsconfig_params The log of current session can be found at: /u01/app/oracle/crsdata/ol7/crsconfig/hapatch_2020-01-11_11-39-45AM.log 2020/01/11 11:40:13 CLSRSC-347: Successfully unlock /u01/app/oracle/19c/grid 2020/01/11 11:40:13 CLSRSC-671: Pre-patch steps for patching GI home successfully completed.
Grid 패치 적용
$GRID_HOME/OPatch/opatch apply -oh $GRID_HOME -local ~oracle/patch/<패치번호>/<OCW Release Update> $GRID_HOME/OPatch/opatch apply -oh $GRID_HOME -local ~oracle/patch/<패치번호>/<ACFS Release Update> $GRID_HOME/OPatch/opatch apply -oh $GRID_HOME -local ~oracle/patch/<패치번호>/<Database Release Update> $GRID_HOME/OPatch/opatch apply -oh $GRID_HOME -local ~oracle/patch/<패치번호>/<Tomcat Release Update>
[orcl:/home/oracle]> $GRID_HOME/OPatch/opatch apply -oh $GRID_HOME -local ~oracle/patch/30116789/30122149 Oracle Interim 패치 설치 프로그램 버전 12.2.0.1.17 Copyright (c) 2020, Oracle Corporation. All rights reserved. Oracle 홈: /u01/app/oracle/19c/grid 중앙 인벤토리: /u01/app/oraInventory 출처: /u01/app/oracle/19c/grid/oraInst.loc OPatch 버전: 12.2.0.1.17 OUI 버전: 12.2.0.7.0 로그 파일 위치: /u01/app/oracle/19c/grid/cfgtoollogs/opatch/opatch2020-01-11_10-36-27오전_1.log Verifying environment and performing prerequisite checks... -------------------------------------------------------------------------------- Start OOP by Prereq process. Launch OOP... Oracle Interim 패치 설치 프로그램 버전 12.2.0.1.17 Copyright (c) 2020, Oracle Corporation. All rights reserved. Oracle 홈: /u01/app/oracle/19c/grid 중앙 인벤토리: /u01/app/oraInventory 출처: /u01/app/oracle/19c/grid/oraInst.loc OPatch 버전: 12.2.0.1.17 OUI 버전: 12.2.0.7.0 로그 파일 위치: /u01/app/oracle/19c/grid/cfgtoollogs/opatch/opatch2020-01-11_10-36-41오전_1.log Verifying environment and performing prerequisite checks... OPatch continues with these patches: 30122149 계속하겠습니까? [y|n] Y (auto-answered by -silent) User Responded with: Y All checks passed. 로컬 시스템의 이 ORACLE_HOME에서 실행 중인 Oracle 인스턴스를 종료하십시오. (Oracle 홈 = '/u01/app/oracle/19c/grid') 로컬 시스템이 패치할 준비가 되었습니까? [y|n] Y (auto-answered by -silent) User Responded with: Y Backing up files... OH '/u01/app/oracle/19c/grid'에 Interim 패치 '30122149'을(를) 적용하는 중 ApplySession: Oracle 홈에 선택적 구성요소 [ oracle.has.db.cvu, 19.0.0.0.0 ] 이(가) 없거나 상위 버전이 발견되었습니다. oracle.rdbms, 19.0.0.0.0 구성요소를 패치하는 중... oracle.has.crs.cvu, 19.0.0.0.0 구성요소를 패치하는 중... oracle.has.cvu, 19.0.0.0.0 구성요소를 패치하는 중... oracle.has.crs, 19.0.0.0.0 구성요소를 패치하는 중... oracle.rhp.common, 19.0.0.0.0 구성요소를 패치하는 중... oracle.has.db, 19.0.0.0.0 구성요소를 패치하는 중... oracle.has.rsf, 19.0.0.0.0 구성요소를 패치하는 중... oracle.rhp.db, 19.0.0.0.0 구성요소를 패치하는 중... oracle.xag, 19.0.0.0.0 구성요소를 패치하는 중... oracle.has.common, 19.0.0.0.0 구성요소를 패치하는 중... oracle.has.common.cvu, 19.0.0.0.0 구성요소를 패치하는 중... oracle.rhp.crs, 19.0.0.0.0 구성요소를 패치하는 중... Patch 30122149 successfully applied. Sub-set patch [29585399] has become inactive due to the application of a super-set patch [30122149]. Please refer to Doc ID 2161861.1 for any possible further required actions. Log file location: /u01/app/oracle/19c/grid/cfgtoollogs/opatch/opatch2020-01-11_10-36-41오전_1.log OPatch succeeded. [orcl:/home/oracle]> $GRID_HOME/OPatch/opatch apply -oh $GRID_HOME -local ~oracle/patch/30116789/30122167 Oracle Interim 패치 설치 프로그램 버전 12.2.0.1.17 Copyright (c) 2020, Oracle Corporation. All rights reserved. Oracle 홈: /u01/app/oracle/19c/grid 중앙 인벤토리: /u01/app/oraInventory 출처: /u01/app/oracle/19c/grid/oraInst.loc OPatch 버전: 12.2.0.1.17 OUI 버전: 12.2.0.7.0 로그 파일 위치: /u01/app/oracle/19c/grid/cfgtoollogs/opatch/opatch2020-01-11_10-38-42오전_1.log Verifying environment and performing prerequisite checks... OPatch continues with these patches: 30122167 계속하겠습니까? [y|n] y User Responded with: Y All checks passed. 로컬 시스템의 이 ORACLE_HOME에서 실행 중인 Oracle 인스턴스를 종료하십시오. (Oracle 홈 = '/u01/app/oracle/19c/grid') 로컬 시스템이 패치할 준비가 되었습니까? [y|n] y User Responded with: Y Backing up files... OH '/u01/app/oracle/19c/grid'에 Interim 패치 '30122167'을(를) 적용하는 중 oracle.usm, 19.0.0.0.0 구성요소를 패치하는 중... Patch 30122167 successfully applied. Sub-set patch [29517247] has become inactive due to the application of a super-set patch [30122167]. Please refer to Doc ID 2161861.1 for any possible further required actions. Log file location: /u01/app/oracle/19c/grid/cfgtoollogs/opatch/opatch2020-01-11_10-38-42오전_1.log OPatch succeeded. [orcl:/home/oracle]> $GRID_HOME/OPatch/opatch apply -oh $GRID_HOME -local ~oracle/patch/30116789/30125133 Oracle Interim 패치 설치 프로그램 버전 12.2.0.1.17 Copyright (c) 2020, Oracle Corporation. All rights reserved. Oracle 홈: /u01/app/oracle/19c/grid 중앙 인벤토리: /u01/app/oraInventory 출처: /u01/app/oracle/19c/grid/oraInst.loc OPatch 버전: 12.2.0.1.17 OUI 버전: 12.2.0.7.0 로그 파일 위치: /u01/app/oracle/19c/grid/cfgtoollogs/opatch/opatch2020-01-11_10-39-48오전_1.log Verifying environment and performing prerequisite checks... OPatch continues with these patches: 30125133 계속하겠습니까? [y|n] y User Responded with: Y All checks passed. 로컬 시스템의 이 ORACLE_HOME에서 실행 중인 Oracle 인스턴스를 종료하십시오. (Oracle 홈 = '/u01/app/oracle/19c/grid') 로컬 시스템이 패치할 준비가 되었습니까? [y|n] y User Responded with: Y Backing up files... OH '/u01/app/oracle/19c/grid'에 Interim 패치 '30125133'을(를) 적용하는 중 ApplySession: Oracle 홈에 선택적 구성요소 [ oracle.ctx, 19.0.0.0.0 ] , [ oracle.network.gsm, 19.0.0.0.0 ] , [ oracle.rdbms.ic, 19.0.0.0.0 ] , [ oracle.sdo, 19.0.0.0.0 ] , [ oracle.network.cman, 19.0.0.0.0 ] , [ oracle.ctx.atg, 19.0.0.0.0 ] , [ oracle.rdbms.oci, 19.0.0.0.0 ] , [ oracle.net.cman, 19.0.0.0.0 ] , [ oracle.options.olap.awm, 19.0.0.0.0 ] , [ oracle.xdk, 19.0.0.0.0 ] , [ oracle.oraolap.mgmt, 19.0.0.0.0 ] , [ oracle.dbdev, 19.0.0.0.0 ] , [ oracle.rdbms.scheduler, 19.0.0.0.0 ] , [ oracle.rdbms.dv, 19.0.0.0.0 ] , [ oracle.assistants.usm, 19.0.0.0.0 ] , [ oracle.rdbms.install.seeddb, 19.0.0.0.0 ] , [ oracle.odbc, 19.0.0.0.0 ] , [ oracle.marvel, 19.0.0.0.0 ] , [ oracle.precomp.common, 19.0.0.0.0 ] , [ oracle.precomp.lang, 19.0.0.0.0 ] 이(가) 없거나 상위 버전이 발견되었습니다. oracle.rdbms, 19.0.0.0.0 구성요소를 패치하는 중... oracle.rdbms.rsf, 19.0.0.0.0 구성요소를 패치하는 중... oracle.assistants.acf, 19.0.0.0.0 구성요소를 패치하는 중... oracle.assistants.deconfig, 19.0.0.0.0 구성요소를 패치하는 중... oracle.assistants.server, 19.0.0.0.0 구성요소를 패치하는 중... oracle.buildtools.rsf, 19.0.0.0.0 구성요소를 패치하는 중... oracle.ldap.rsf, 19.0.0.0.0 구성요소를 패치하는 중... oracle.network.rsf, 19.0.0.0.0 구성요소를 패치하는 중... oracle.rdbms.dbscripts, 19.0.0.0.0 구성요소를 패치하는 중... oracle.sqlplus, 19.0.0.0.0 구성요소를 패치하는 중... oracle.ldap.rsf.ic, 19.0.0.0.0 구성요소를 패치하는 중... oracle.rdbms.rman, 19.0.0.0.0 구성요소를 패치하는 중... oracle.rdbms.util, 19.0.0.0.0 구성요소를 패치하는 중... oracle.ovm, 19.0.0.0.0 구성요소를 패치하는 중... oracle.network.listener, 19.0.0.0.0 구성요소를 패치하는 중... oracle.rdbms.install.plugins, 19.0.0.0.0 구성요소를 패치하는 중... oracle.dbjava.jdbc, 19.0.0.0.0 구성요소를 패치하는 중... oracle.rdbms.deconfig, 19.0.0.0.0 구성요소를 패치하는 중... oracle.nlsrtl.rsf, 19.0.0.0.0 구성요소를 패치하는 중... oracle.oraolap.dbscripts, 19.0.0.0.0 구성요소를 패치하는 중... oracle.install.deinstalltool, 19.0.0.0.0 구성요소를 패치하는 중... oracle.dbjava.ic, 19.0.0.0.0 구성요소를 패치하는 중... oracle.sdo.locator, 19.0.0.0.0 구성요소를 패치하는 중... oracle.ons, 19.0.0.0.0 구성요소를 패치하는 중... oracle.ldap.security.osdt, 19.0.0.0.0 구성요소를 패치하는 중... oracle.ctx.rsf, 19.0.0.0.0 구성요소를 패치하는 중... oracle.duma, 19.0.0.0.0 구성요소를 패치하는 중... oracle.ldap.owm, 19.0.0.0.0 구성요소를 패치하는 중... oracle.oracore.rsf, 19.0.0.0.0 구성요소를 패치하는 중... oracle.assistants.asm, 19.0.0.0.0 구성요소를 패치하는 중... oracle.sdo.locator.jrf, 19.0.0.0.0 구성요소를 패치하는 중... oracle.network.client, 19.0.0.0.0 구성요소를 패치하는 중... oracle.tfa, 19.0.0.0.0 구성요소를 패치하는 중... oracle.sqlplus.ic, 19.0.0.0.0 구성요소를 패치하는 중... oracle.dbjava.ucp, 19.0.0.0.0 구성요소를 패치하는 중... oracle.xdk.rsf, 19.0.0.0.0 구성요소를 패치하는 중... oracle.xdk.parser.java, 19.0.0.0.0 구성요소를 패치하는 중... oracle.rdbms.rsf.ic, 19.0.0.0.0 구성요소를 패치하는 중... oracle.nlsrtl.rsf.core, 19.0.0.0.0 구성요소를 패치하는 중... Patch 30125133 successfully applied. Sub-set patch [29517242] has become inactive due to the application of a super-set patch [30125133]. Please refer to Doc ID 2161861.1 for any possible further required actions. Log file location: /u01/app/oracle/19c/grid/cfgtoollogs/opatch/opatch2020-01-11_10-39-48오전_1.log OPatch succeeded. [orcl:/home/oracle]> $GRID_HOME/OPatch/opatch apply -oh $GRID_HOME -local ~oracle/patch/30116789/29401763 Oracle Interim 패치 설치 프로그램 버전 12.2.0.1.17 Copyright (c) 2020, Oracle Corporation. All rights reserved. Oracle 홈: /u01/app/oracle/19c/grid 중앙 인벤토리: /u01/app/oraInventory 출처: /u01/app/oracle/19c/grid/oraInst.loc OPatch 버전: 12.2.0.1.17 OUI 버전: 12.2.0.7.0 로그 파일 위치: /u01/app/oracle/19c/grid/cfgtoollogs/opatch/opatch2020-01-11_10-42-19오전_1.log Verifying environment and performing prerequisite checks... The following patch(es) are duplicate patches with patches installed in the Oracle Home. [ 29401763] You have already installed same patch(es) with same UPI(s) or same version(s). These patch(es) will be skipped. OPatch Session이 경고와 함께 완료되었습니다. Log file location: /u01/app/oracle/19c/grid/cfgtoollogs/opatch/opatch2020-01-11_10-42-19오전_1.log OPatch completed with warnings.
DB 패치의 소프트웨어 충돌 여부 확인
$DB_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -oh $DB_HOME -phBaseDir ~oracle/patch/<패치번호>/<OCW Release Update> $DB_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -oh $DB_HOME -phBaseDir ~oracle/patch/<패치번호>/<Database Release Update>
[orcl:/home/oracle]> $DB_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -oh $DB_HOME -phBaseDir ~oracle/patch/30116789/30122149 Oracle Interim 패치 설치 프로그램 버전 12.2.0.1.17 Copyright (c) 2020, Oracle Corporation. All rights reserved. PREREQ session Oracle 홈: /u01/app/oracle/product/19c/db_1 중앙 인벤토리: /u01/app/oraInventory 출처: /u01/app/oracle/product/19c/db_1/oraInst.loc OPatch 버전: 12.2.0.1.17 OUI 버전: 12.2.0.7.0 로그 파일 위치: /u01/app/oracle/product/19c/db_1/cfgtoollogs/opatch/opatch2020-01-11_10-10-55오전_1.log Invoking prereq "checkconflictagainstohwithdetail" Prereq "checkConflictAgainstOHWithDetail" passed. OPatch succeeded. [orcl:/home/oracle]> $DB_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -oh $DB_HOME -phBaseDir ~oracle/patch/30116789/30125133 Oracle Interim 패치 설치 프로그램 버전 12.2.0.1.17 Copyright (c) 2020, Oracle Corporation. All rights reserved. PREREQ session Oracle 홈: /u01/app/oracle/product/19c/db_1 중앙 인벤토리: /u01/app/oraInventory 출처: /u01/app/oracle/product/19c/db_1/oraInst.loc OPatch 버전: 12.2.0.1.17 OUI 버전: 12.2.0.7.0 로그 파일 위치: /u01/app/oracle/product/19c/db_1/cfgtoollogs/opatch/opatch2020-01-11_10-11-03오전_1.log Invoking prereq "checkconflictagainstohwithdetail" Prereq "checkConflictAgainstOHWithDetail" passed. OPatch succeeded.
DB 패치의 패치간 충돌 여부 확인
$DB_HOME/OPatch/opatch prereq CheckConflictAmongPatches -oh $DB_HOME -phBaseDir ~oracle/patch/<패치번호>/<OCW Release Update> $DB_HOME/OPatch/opatch prereq CheckConflictAmongPatches -oh $DB_HOME -phBaseDir ~oracle/patch/<패치번호>/<Database Release Update>
[orcl:/home/oracle]> $DB_HOME/OPatch/opatch prereq CheckConflictAmongPatches -oh $DB_HOME -phBaseDir ~oracle/patch/30116789/30122149 Oracle Interim 패치 설치 프로그램 버전 12.2.0.1.17 Copyright (c) 2020, Oracle Corporation. All rights reserved. PREREQ session Oracle 홈: /u01/app/oracle/product/19c/db_1 중앙 인벤토리: /u01/app/oraInventory 출처: /u01/app/oracle/product/19c/db_1/oraInst.loc OPatch 버전: 12.2.0.1.17 OUI 버전: 12.2.0.7.0 로그 파일 위치: /u01/app/oracle/product/19c/db_1/cfgtoollogs/opatch/opatch2020-01-11_10-11-36오전_1.log Invoking prereq "checkconflictamongpatches" Prereq "checkConflictAmongPatches" passed. OPatch succeeded. [orcl:/home/oracle]> $DB_HOME/OPatch/opatch prereq CheckConflictAmongPatches -oh $DB_HOME -phBaseDir ~oracle/patch/30116789/30125133 Oracle Interim 패치 설치 프로그램 버전 12.2.0.1.17 Copyright (c) 2020, Oracle Corporation. All rights reserved. PREREQ session Oracle 홈: /u01/app/oracle/product/19c/db_1 중앙 인벤토리: /u01/app/oraInventory 출처: /u01/app/oracle/product/19c/db_1/oraInst.loc OPatch 버전: 12.2.0.1.17 OUI 버전: 12.2.0.7.0 로그 파일 위치: /u01/app/oracle/product/19c/db_1/cfgtoollogs/opatch/opatch2020-01-11_10-11-48오전_1.log Invoking prereq "checkconflictamongpatches" Prereq "checkConflictAmongPatches" passed. OPatch succeeded.
DB 패치 필요 공간 확인
cat > /tmp/patch_list_dbhome.txt /home/oracle/patch/<패치번호>/<OCW Release Update> /home/oracle/patch/<패치번호>/<Database Release Update> <ctrl + c> cat /tmp/patch_list_dbhome.txt $DB_HOME/OPatch/opatch prereq CheckSystemSpace -oh $DB_HOME -phBaseFile /tmp/patch_list_dbhome.txt
[orcl:/home/oracle]> cat > /tmp/patch_list_dbhome.txt /home/oracle/patch/30116789/30122149 /home/oracle/patch/30116789/30125133 ^C [orcl:/home/oracle]> cat /tmp/patch_list_dbhome.txt /home/oracle/patch/30116789/30122149 /home/oracle/patch/30116789/30125133 [orcl:/home/oracle]> $DB_HOME/OPatch/opatch prereq CheckSystemSpace -oh $DB_HOME -phBaseFile /tmp/patch_list_dbhome.txt Oracle Interim 패치 설치 프로그램 버전 12.2.0.1.17 Copyright (c) 2020, Oracle Corporation. All rights reserved. PREREQ session Oracle 홈: /u01/app/oracle/product/19c/db_1 중앙 인벤토리: /u01/app/oraInventory 출처: /u01/app/oracle/product/19c/db_1/oraInst.loc OPatch 버전: 12.2.0.1.17 OUI 버전: 12.2.0.7.0 로그 파일 위치: /u01/app/oracle/product/19c/db_1/cfgtoollogs/opatch/opatch2020-01-11_10-13-39오전_1.log Invoking prereq "checksystemspace" Prereq "checkSystemSpace" passed. OPatch succeeded.
DB 패치 적용
~oracle/patch/<패치번호>/<OCW Release Update>/custom/scripts/prepatch.sh -dbhome $DB_HOME $DB_HOME/OPatch/opatch apply -oh $DB_HOME -local ~oracle/patch/<패치번호>/<OCW Release Update> $DB_HOME/OPatch/opatch apply -oh $DB_HOME -local ~oracle/patch/<패치번호>/<Database Release Update> ~oracle/patch/<패치번호>/<OCW Release Update>/custom/scripts/postpatch.sh -dbhome $DB_HOME
[orcl:/home/oracle]> ~oracle/patch/30116789/30122149/custom/scripts/prepatch.sh -dbhome $DB_HOME /home/oracle/patch/30116789/30122149/custom/scripts/prepatch.sh completed successfully. [orcl:/home/oracle]> $DB_HOME/OPatch/opatch apply -oh $DB_HOME -local ~oracle/patch/30116789/30122149 Oracle Interim 패치 설치 프로그램 버전 12.2.0.1.17 Copyright (c) 2020, Oracle Corporation. All rights reserved. Oracle 홈: /u01/app/oracle/product/19c/db_1 중앙 인벤토리: /u01/app/oraInventory 출처: /u01/app/oracle/product/19c/db_1/oraInst.loc OPatch 버전: 12.2.0.1.17 OUI 버전: 12.2.0.7.0 로그 파일 위치: /u01/app/oracle/product/19c/db_1/cfgtoollogs/opatch/opatch2020-01-11_10-43-41오전_1.log Verifying environment and performing prerequisite checks... -------------------------------------------------------------------------------- Start OOP by Prereq process. Launch OOP... Oracle Interim 패치 설치 프로그램 버전 12.2.0.1.17 Copyright (c) 2020, Oracle Corporation. All rights reserved. Oracle 홈: /u01/app/oracle/product/19c/db_1 중앙 인벤토리: /u01/app/oraInventory 출처: /u01/app/oracle/product/19c/db_1/oraInst.loc OPatch 버전: 12.2.0.1.17 OUI 버전: 12.2.0.7.0 로그 파일 위치: /u01/app/oracle/product/19c/db_1/cfgtoollogs/opatch/opatch2020-01-11_10-43-55오전_1.log Verifying environment and performing prerequisite checks... OPatch continues with these patches: 30122149 계속하겠습니까? [y|n] Y (auto-answered by -silent) User Responded with: Y All checks passed. 로컬 시스템의 이 ORACLE_HOME에서 실행 중인 Oracle 인스턴스를 종료하십시오. (Oracle 홈 = '/u01/app/oracle/product/19c/db_1') 로컬 시스템이 패치할 준비가 되었습니까? [y|n] Y (auto-answered by -silent) User Responded with: Y Backing up files... OH '/u01/app/oracle/product/19c/db_1'에 Interim 패치 '30122149'을(를) 적용하는 중 ApplySession: Oracle 홈에 선택적 구성요소 [ oracle.has.crs.cvu, 19.0.0.0.0 ] , [ oracle.has.cvu, 19.0.0.0.0 ] , [ oracle.has.crs, 19.0.0.0.0 ] , [ oracle.xag, 19.0.0.0.0 ] , [ oracle.rhp.crs, 19.0.0.0.0 ] 이(가) 없거나 상위 버전이 발견되었습니다. oracle.rdbms, 19.0.0.0.0 구성요소를 패치하는 중... oracle.rhp.common, 19.0.0.0.0 구성요소를 패치하는 중... oracle.has.db, 19.0.0.0.0 구성요소를 패치하는 중... oracle.has.rsf, 19.0.0.0.0 구성요소를 패치하는 중... oracle.rhp.db, 19.0.0.0.0 구성요소를 패치하는 중... oracle.has.db.cvu, 19.0.0.0.0 구성요소를 패치하는 중... oracle.has.common, 19.0.0.0.0 구성요소를 패치하는 중... oracle.has.common.cvu, 19.0.0.0.0 구성요소를 패치하는 중... Patch 30122149 successfully applied. Sub-set patch [29585399] has become inactive due to the application of a super-set patch [30122149]. Please refer to Doc ID 2161861.1 for any possible further required actions. Log file location: /u01/app/oracle/product/19c/db_1/cfgtoollogs/opatch/opatch2020-01-11_10-43-55오전_1.log OPatch succeeded. [orcl:/home/oracle]> $DB_HOME/OPatch/opatch apply -oh $DB_HOME -local ~oracle/patch/30116789/30125133 Oracle Interim 패치 설치 프로그램 버전 12.2.0.1.17 Copyright (c) 2020, Oracle Corporation. All rights reserved. Oracle 홈: /u01/app/oracle/product/19c/db_1 중앙 인벤토리: /u01/app/oraInventory 출처: /u01/app/oracle/product/19c/db_1/oraInst.loc OPatch 버전: 12.2.0.1.17 OUI 버전: 12.2.0.7.0 로그 파일 위치: /u01/app/oracle/product/19c/db_1/cfgtoollogs/opatch/opatch2020-01-11_10-44-33오전_1.log Verifying environment and performing prerequisite checks... OPatch continues with these patches: 30125133 계속하겠습니까? [y|n] y User Responded with: Y All checks passed. 로컬 시스템의 이 ORACLE_HOME에서 실행 중인 Oracle 인스턴스를 종료하십시오. (Oracle 홈 = '/u01/app/oracle/product/19c/db_1') 로컬 시스템이 패치할 준비가 되었습니까? [y|n] y User Responded with: Y Backing up files... OH '/u01/app/oracle/product/19c/db_1'에 Interim 패치 '30125133'을(를) 적용하는 중 ApplySession: Oracle 홈에 선택적 구성요소 [ oracle.network.gsm, 19.0.0.0.0 ] , [ oracle.rdbms.ic, 19.0.0.0.0 ] , [ oracle.network.cman, 19.0.0.0.0 ] , [ oracle.net.cman, 19.0.0.0.0 ] , [ oracle.options.olap.awm, 19.0.0.0.0 ] , [ oracle.oraolap.mgmt, 19.0.0.0.0 ] , [ oracle.assistants.usm, 19.0.0.0.0 ] , [ oracle.assistants.asm, 19.0.0.0.0 ] , [ oracle.tfa, 19.0.0.0.0 ] 이(가) 없거나 상위 버전이 발견되었습니다. oracle.rdbms, 19.0.0.0.0 구성요소를 패치하는 중... oracle.rdbms.rsf, 19.0.0.0.0 구성요소를 패치하는 중... oracle.assistants.acf, 19.0.0.0.0 구성요소를 패치하는 중... oracle.assistants.deconfig, 19.0.0.0.0 구성요소를 패치하는 중... oracle.assistants.server, 19.0.0.0.0 구성요소를 패치하는 중... oracle.buildtools.rsf, 19.0.0.0.0 구성요소를 패치하는 중... oracle.ctx, 19.0.0.0.0 구성요소를 패치하는 중... oracle.ldap.rsf, 19.0.0.0.0 구성요소를 패치하는 중... oracle.network.rsf, 19.0.0.0.0 구성요소를 패치하는 중... oracle.rdbms.dbscripts, 19.0.0.0.0 구성요소를 패치하는 중... oracle.sdo, 19.0.0.0.0 구성요소를 패치하는 중... oracle.sqlplus, 19.0.0.0.0 구성요소를 패치하는 중... oracle.ldap.rsf.ic, 19.0.0.0.0 구성요소를 패치하는 중... oracle.rdbms.rman, 19.0.0.0.0 구성요소를 패치하는 중... oracle.ctx.atg, 19.0.0.0.0 구성요소를 패치하는 중... oracle.rdbms.oci, 19.0.0.0.0 구성요소를 패치하는 중... oracle.rdbms.util, 19.0.0.0.0 구성요소를 패치하는 중... oracle.xdk, 19.0.0.0.0 구성요소를 패치하는 중... oracle.ovm, 19.0.0.0.0 구성요소를 패치하는 중... oracle.network.listener, 19.0.0.0.0 구성요소를 패치하는 중... oracle.rdbms.install.plugins, 19.0.0.0.0 구성요소를 패치하는 중... oracle.dbjava.jdbc, 19.0.0.0.0 구성요소를 패치하는 중... oracle.dbdev, 19.0.0.0.0 구성요소를 패치하는 중... oracle.rdbms.deconfig, 19.0.0.0.0 구성요소를 패치하는 중... oracle.nlsrtl.rsf, 19.0.0.0.0 구성요소를 패치하는 중... oracle.oraolap.dbscripts, 19.0.0.0.0 구성요소를 패치하는 중... oracle.install.deinstalltool, 19.0.0.0.0 구성요소를 패치하는 중... oracle.dbjava.ic, 19.0.0.0.0 구성요소를 패치하는 중... oracle.sdo.locator, 19.0.0.0.0 구성요소를 패치하는 중... oracle.rdbms.scheduler, 19.0.0.0.0 구성요소를 패치하는 중... oracle.rdbms.dv, 19.0.0.0.0 구성요소를 패치하는 중... oracle.ons, 19.0.0.0.0 구성요소를 패치하는 중... oracle.ldap.security.osdt, 19.0.0.0.0 구성요소를 패치하는 중... oracle.ctx.rsf, 19.0.0.0.0 구성요소를 패치하는 중... oracle.duma, 19.0.0.0.0 구성요소를 패치하는 중... oracle.ldap.owm, 19.0.0.0.0 구성요소를 패치하는 중... oracle.oracore.rsf, 19.0.0.0.0 구성요소를 패치하는 중... oracle.rdbms.install.seeddb, 19.0.0.0.0 구성요소를 패치하는 중... oracle.odbc, 19.0.0.0.0 구성요소를 패치하는 중... oracle.sdo.locator.jrf, 19.0.0.0.0 구성요소를 패치하는 중... oracle.network.client, 19.0.0.0.0 구성요소를 패치하는 중... oracle.sqlplus.ic, 19.0.0.0.0 구성요소를 패치하는 중... oracle.dbjava.ucp, 19.0.0.0.0 구성요소를 패치하는 중... oracle.xdk.rsf, 19.0.0.0.0 구성요소를 패치하는 중... oracle.marvel, 19.0.0.0.0 구성요소를 패치하는 중... oracle.xdk.parser.java, 19.0.0.0.0 구성요소를 패치하는 중... oracle.rdbms.rsf.ic, 19.0.0.0.0 구성요소를 패치하는 중... oracle.nlsrtl.rsf.core, 19.0.0.0.0 구성요소를 패치하는 중... oracle.precomp.common, 19.0.0.0.0 구성요소를 패치하는 중... oracle.precomp.lang, 19.0.0.0.0 구성요소를 패치하는 중... Patch 30125133 successfully applied. Sub-set patch [29517242] has become inactive due to the application of a super-set patch [30125133]. Please refer to Doc ID 2161861.1 for any possible further required actions. Log file location: /u01/app/oracle/product/19c/db_1/cfgtoollogs/opatch/opatch2020-01-11_10-44-33오전_1.log OPatch succeeded. [orcl:/home/oracle]> ~oracle/patch/30116789/30122149/custom/scripts/postpatch.sh -dbhome $DB_HOME Reading /u01/app/oracle/product/19c/db_1/install/params.ora.. Reading /u01/app/oracle/product/19c/db_1/install/params.ora.. Found uninstantiated /u01/app/oracle/product/19c/db_1/crs/sbs/srvctl.sbs file, copying to /u01/app/oracle/product/19c/db_1/bin/srvctl Parsing file /u01/app/oracle/product/19c/db_1/bin/srvctl Parsing file /u01/app/oracle/product/19c/db_1/bin/srvconfig Parsing file /u01/app/oracle/product/19c/db_1/bin/cluvfy Parsing file /u01/app/oracle/product/19c/db_1/bin/kfod Verifying file /u01/app/oracle/product/19c/db_1/bin/srvctl Verifying file /u01/app/oracle/product/19c/db_1/bin/srvconfig Verifying file /u01/app/oracle/product/19c/db_1/bin/cluvfy Verifying file /u01/app/oracle/product/19c/db_1/bin/kfod Reapplying file permissions on /u01/app/oracle/product/19c/db_1/bin/srvctl Reapplying file permissions on /u01/app/oracle/product/19c/db_1/bin/srvconfig Reapplying file permissions on /u01/app/oracle/product/19c/db_1/bin/cluvfy Reapplying file permissions on /u01/app/oracle/product/19c/db_1/bin/kfod Reapplying file permissions on /u01/app/oracle/product/19c/db_1/bin/diskmon.bin Reapplying file permissions on /u01/app/oracle/product/19c/db_1/bin/lsnodes Reapplying file permissions on /u01/app/oracle/product/19c/db_1/bin/osdbagrp Reapplying file permissions on /u01/app/oracle/product/19c/db_1/bin/rawutl Reapplying file permissions on /u01/app/oracle/product/19c/db_1/srvm/admin/ractrans Reapplying file permissions on /u01/app/oracle/product/19c/db_1/srvm/admin/getcrshome Reapplying file permissions on /u01/app/oracle/product/19c/db_1/bin/crsdiag.pl Postpatch completed successfully
root 유저로 postpatch 수행
$GRID_HOME/rdbms/install/rootadd_rdbms.sh $GRID_HOME/crs/install/roothas.sh -postpatch
[root@ol7 ~]# $GRID_HOME/rdbms/install/rootadd_rdbms.sh [root@ol7 ~]# $GRID_HOME/crs/install/roothas.sh -postpatch Using configuration parameter file: /u01/app/oracle/19c/grid/crs/install/crsconfig_params The log of current session can be found at: /u01/app/oracle/crsdata/ol7/crsconfig/hapatch_2020-01-11_12-02-39AM.log 2020/01/11 12:02:42 CLSRSC-329: Replacing Clusterware entries in file 'oracle-ohasd.service' 2020/01/11 12:05:37 CLSRSC-672: Post-patch steps for patching GI home successfully completed.
패치 결과 확인
$GRID_HOME/OPatch/opatch lspatches -oh $GRID_HOME $DB_HOME/OPatch/opatch lspatches -oh $DB_HOME
[orcl:/home/oracle]> $GRID_HOME/OPatch/opatch lspatches -oh $GRID_HOME 30125133;Database Release Update : 19.5.0.0.191015 (30125133) 30122167;ACFS RELEASE UPDATE 19.5.0.0.0 (30122167) 30122149;OCW RELEASE UPDATE 19.5.0.0.0 (30122149) 29401763;TOMCAT RELEASE UPDATE 19.0.0.0.0 (29401763) OPatch succeeded. [orcl:/home/oracle]> $DB_HOME/OPatch/opatch lspatches -oh $DB_HOME 30125133;Database Release Update : 19.5.0.0.191015 (30125133) 30122149;OCW RELEASE UPDATE 19.5.0.0.0 (30122149) OPatch succeeded.
{}
IV. Create DB
DBCA silent 모드로 스크립트 생성
dbca -silent -generateScripts -gdbName <글로벌DB명> -sid <ORACLE_SID> -templateName New_Database.dbt -scriptDest <스크립트 저장 경로> -createAsContainerDatabase <CDB 여부> -databaseConfigType <DB 타입> -memoryMgmtType <메모리 관리 타입> -totalMemory <DB에 할당할 메모리 크기(MB)> -characterSet <문자셋> -nationalCharacterSet <National 문자셋> -storageType <스토리지 타입> -useOMF <OMF 사용여부> -redoLogFileSize <Redo Log 크기(MB)> -databaseType <DB 용도> -datafileDestination <db_create_file_dest> -recoveryAreaDestination <db_recovery_file_dest> -recoveryAreaSize <FRA 영역 크기(MB)> -emConfiguration <EM 설정>
[orcl:/home/oracle]> dbca -silent -generateScripts -gdbName orcl -sid orcl -templateName New_Database.dbt -scriptDest ~/dbca_scripts -createAsContainerDatabase false -databaseConfigType SINGLE -memoryMgmtType AUTO_SGA -totalMemory 4000 -characterSet AL32UTF8 -nationalCharacterSet AL16UTF16 -storageType ASM -useOMF true -redoLogFileSize 200 -databaseType MULTIPURPOSE -datafileDestination +DATA -recoveryAreaDestination +FRA -recoveryAreaSize 20000 -emConfiguration none DB 작업 준비 4% 완료 Oracle Restart에 데이터베이스를 등록하는 중 7% 완료 Oracle 인스턴스 생성 및 시작 중 8% 완료 11% 완료 데이터베이스 파일 생성 중 12% 완료 16% 완료 데이터 딕셔너리 뷰 생성 중 17% 완료 20% 완료 22% 완료 24% 완료 25% 완료 29% 완료 Oracle JVM 36% 완료 42% 완료 49% 완료 51% 완료 Oracle Text 52% 완료 54% 완료 56% 완료 Oracle Multimedia 69% 완료 Oracle OLAP 73% 완료 Oracle Spatial 74% 완료 82% 완료 데이터베이스 생성 완료 중 84% 완료 85% 완료 87% 완료 사후 구성 작업 실행 중 100% 완료 스크립트 "/home/oracle/dbca_scripts" 생성을 성공했습니다. 자세한 내용은 로그 파일 "/u01/app/oracle/cfgtoollogs/dbca/orcl/orcl.log"을(를) 참조하십시오.
필요한 상황에 맞게 파라미터를 수정합니다.
파라미터(init.ora) 수정
nls_language="AMERICAN" # 변경 audit_trail=none # 변경 db_create_online_log_dest_1="+DATA" # 추가 db_create_online_log_dest_2="+FRA" #추가
############################################################################## # Copyright (c) 1991, 2013 by Oracle Corporation ############################################################################## ########################################### # NLS ########################################### nls_language="AMERICAN" nls_territory="KOREA" ########################################### # SGA Memory ########################################### sga_target=3000m ########################################### # Shared Server ########################################### dispatchers="(PROTOCOL=TCP) (SERVICE=orclXDB)" ########################################### # Miscellaneous ########################################### compatible=19.0.0 diagnostic_dest=/u01/app/oracle ########################################### # Network Registration ########################################### #local_listener=LISTENER_ORCL ########################################### # Database Identification ########################################### db_name="orcl" ########################################### # Security and Auditing ########################################### audit_file_dest="/u01/app/oracle/admin/orcl/adump" audit_trail=none remote_login_passwordfile=EXCLUSIVE ########################################### # System Managed Undo and Rollback Segments ########################################### undo_tablespace=UNDOTBS1 ########################################### # Sort, Hash Joins, Bitmap Indexes ########################################### pga_aggregate_target=1000m ########################################### # Cache and I/O ########################################### db_block_size=8192 ########################################### # Cursors and Library Cache ########################################### open_cursors=300 ########################################### # File Configuration ########################################### db_create_file_dest="+DATA" db_create_online_log_dest_1="+DATA" db_create_online_log_dest_2="+FRA" db_recovery_file_dest="+FRA" db_recovery_file_dest_size=20000m ########################################### # Processes and Sessions ########################################### processes=300
설치하지 않는 컴포넌트가 있을 경우 sql 파일을 수정합니다.
<DB명>.sql 에서 미설치 컴포넌트 주석 처리
#@/home/oracle/dbca_scripts/context.sql #@/home/oracle/dbca_scripts/ordinst.sql #@/home/oracle/dbca_scripts/interMedia.sql #@/home/oracle/dbca_scripts/cwmlite.sql #@/home/oracle/dbca_scripts/spatial.sql
set verify off ACCEPT sysPassword CHAR PROMPT 'Enter new password for SYS: ' HIDE ACCEPT systemPassword CHAR PROMPT 'Enter new password for SYSTEM: ' HIDE host /u01/app/oracle/product/19c/db_1/bin/srvctl add database -d orcl -o /u01/app/oracle/product/19c/db_1 -n orcl host /u01/app/oracle/product/19c/db_1/bin/srvctl disable database -d orcl host /u01/app/oracle/product/19c/db_1/bin/orapwd file=/u01/app/oracle/product/19c/db_1/dbs/orapworcl force=y format=12 host /u01/app/oracle/19c/grid/bin/setasmgidwrap o=/u01/app/oracle/product/19c/db_1/bin/oracle @/home/oracle/dbca_scripts/CreateDB.sql @/home/oracle/dbca_scripts/CreateDBFiles.sql @/home/oracle/dbca_scripts/CreateDBCatalog.sql @/home/oracle/dbca_scripts/JServer.sql #@/home/oracle/dbca_scripts/context.sql #@/home/oracle/dbca_scripts/ordinst.sql #@/home/oracle/dbca_scripts/interMedia.sql #@/home/oracle/dbca_scripts/cwmlite.sql #@/home/oracle/dbca_scripts/spatial.sql @/home/oracle/dbca_scripts/lockAccount.sql @/home/oracle/dbca_scripts/postDBCreation.sql
DB 생성 스크립트 수행
./<DB명>.sh
[orcl:/home/oracle/dbca_scripts]> ./orcl.sh SQL*Plus: Release 19.0.0.0.0 - Production on Tue Jan 14 10:14:02 2020 Version 19.5.0.0.0 Copyright (c) 1982, 2019, Oracle. All rights reserved. Connected. Diskgroup altered. Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.5.0.0.0 /etc/oratab : orcl:/u01/app/oracle/product/19c/db_1:Y SQL*Plus: Release 19.0.0.0.0 - Production on Tue Jan 14 10:14:03 2020 Version 19.5.0.0.0 Copyright (c) 1982, 2019, Oracle. All rights reserved. Enter new password for SYS: Enter new password for SYSTEM: Enter password for SYS: Connected to an idle instance. SQL> spool /home/oracle/dbca_scripts/CreateDB.log append SQL> startup nomount pfile="/home/oracle/dbca_scripts/init.ora"; ORACLE instance started. Total System Global Area 3154113400 bytes Fixed Size 8901496 bytes Variable Size 637534208 bytes Database Buffers 2499805184 bytes Redo Buffers 7872512 bytes SQL> CREATE DATABASE "orcl" 2 MAXINSTANCES 8 3 MAXLOGHISTORY 1 4 MAXLOGFILES 16 5 MAXLOGMEMBERS 3 6 MAXDATAFILES 100 7 DATAFILE SIZE 700M AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED 8 EXTENT MANAGEMENT LOCAL 9 SYSAUX DATAFILE SIZE 550M AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED 10 SMALLFILE DEFAULT TEMPORARY TABLESPACE TEMP TEMPFILE SIZE 20M AUTOEXTEND ON NEXT 640K MAXSIZE UNLIMITED 11 SMALLFILE UNDO TABLESPACE "UNDOTBS1" DATAFILE SIZE 200M AUTOEXTEND ON NEXT 5120K MAXSIZE UNLIMITED 12 CHARACTER SET AL32UTF8 13 NATIONAL CHARACTER SET AL16UTF16 14 LOGFILE GROUP 1 SIZE 200M, 15 GROUP 2 SIZE 200M, 16 GROUP 3 SIZE 200M 17 USER SYS IDENTIFIED BY "&&sysPassword" USER SYSTEM IDENTIFIED BY "&&systemPassword"; Database created. << 중략 >> SQL> select comp_id, status from dba_registry; COMP_ID STATUS ------------------------------ -------------------------------------------- CATALOG VALID CATPROC VALID RAC OPTION OFF JAVAVM VALID XML VALID CATJAVA VALID XDB VALID OWM VALID 8 rows selected. SQL> shutdown immediate; Database closed. Database dismounted. ORACLE instance shut down. SQL> host /u01/app/oracle/product/19c/db_1/bin/srvctl enable database -d orcl; SQL> host /u01/app/oracle/product/19c/db_1/bin/srvctl start database -d orcl; SQL> connect "SYS"/"&&sysPassword" as SYSDBA Connected. SQL> spool off SQL> exit; Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.5.0.0.0
DB 생성 결과 확인
crsctl stat res -t
[orcl:/home/oracle]> crsctl stat res -t -------------------------------------------------------------------------------- Name Target State Server State details -------------------------------------------------------------------------------- Local Resources -------------------------------------------------------------------------------- ora.DATA.dg ONLINE ONLINE ol7 STABLE ora.FRA.dg ONLINE ONLINE ol7 STABLE ora.LISTENER.lsnr ONLINE ONLINE ol7 STABLE ora.asm ONLINE ONLINE ol7 Started,STABLE ora.ons OFFLINE OFFLINE ol7 STABLE -------------------------------------------------------------------------------- Cluster Resources -------------------------------------------------------------------------------- ora.cssd 1 ONLINE ONLINE ol7 STABLE ora.diskmon 1 OFFLINE OFFLINE STABLE ora.evmd 1 ONLINE ONLINE ol7 STABLE ora.orcl.db 1 ONLINE ONLINE ol7 Open,HOME=/u01/app/o racle/product/19c/db _1,STABLE --------------------------------------------------------------------------------
{}
{}