f Oracle 19.3 RAC 安裝於OL 7.9 及Patch至19.11.0.0.210420 ~ 迪貝之家

Oracle 19.3 RAC 安裝於OL 7.9 及Patch至19.11.0.0.210420

 

(請看到最後,Patch 狀況的發生,Internet上有人也是碰到相同的狀況,太新的Patch真的不要打)
基本上19.3 RAC 安裝跟12.2差不多
只是DB Binary的安裝改成跟grid一樣子
應該是為了節省硬碟的空間
反正就是解開來後,就是$ORACLE_HOME
安裝的時候,我就覺得奇怪
怎麼會拋出放software source的目錄
在另一個RAC NODE建不出來的錯誤
我就手動建立
讓系統先建出再說
然後找了一下Internet
原來db binary 安裝方式改了
我就只好將錯就錯囉~~
安裝步驟還是可以參考RedHat寫的文件啦~~
DEPLOYING ORACLE RAC DATABASE 12C RELEASE 2 ON RED HAT ENTERPRISE LINUX 7
udev 的設定
請參照
Oracle Linux 7中使用udev來設置用戶自定義的設備名
因為只是在VirtualBox上進行安裝測試
我也就懶得弄DNS
都寫到/etc/hosts
安裝檢核時發生的錯誤
就全部ignore就好了
反正scan ip設一個就夠了
我的udev rule
[root@rac2 ~]# /usr/lib/udev/scsi_id -g -u /dev/sdb
 1ATA_VBOX_HARDDISK_VB3831c189-6132ef1e

 KERNEL=="sd*[!0-9]", ENV{DEVTYPE}=="disk", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode", RESULT=="1ATA_VBOX_HARDDISK_VB3831c189-6132ef1e", RUN+="/bin/sh -c 'mknod /dev/asmdisk01 b $major $minor; chown grid:oinstall /dev/asmdisk01; chmod 0660 /dev/asmdisk01'"

firewall一定要關
systemctl stop firewalld.service
systemctl disable firewalld

pre-package
yum install oracle-database-preinstall-19c

目錄:

是打db patch出了一些差錯
居然在快完成的時候
出現因權限問題寫入的錯誤
"/u01/app/oracle-software/.patch_storage/NApply/2021-06-12_16-25-11PM"
[Jun 12, 2021 4:30:02 PM] [INFO]    --------------------------------------------------------------------------------
[Jun 12, 2021 4:30:02 PM] [INFO]    Finishing UtilSession at Sat Jun 12 16:30:02 CST 2021
[Jun 12, 2021 4:30:02 PM] [INFO]    Log file location: /u01/app/oracle-software/cfgtoollogs/opatch/opatch2021-06-12_16-25-11PM_1.log
[Jun 12, 2021 4:30:02 PM] [INFO]    Stack Description: java.lang.RuntimeException: ApplySession failed in system modification phase... 'ApplySession::apply failed: java.io.IOException: oracle.sysman.oui.patch.PatchException: java.io.FileNotFoundException: /u01/app/oraInventory/ContentsXML/oui-patch.xml (Permission denied)'



本來想說...要不要放棄
整個環境重新安裝後
再來一次
不過想想後...
算了..解看看好了
因為這是第二個node
其實第一個node的db patch已經打了上去了
就進系統看權限
還真的哩~~
權限是640
其他檔案都是660
我就把它改成了660
然後再重跑了一次opatch指令
..........
出錯.......error code 73
哈.....
又想放棄了
好吧~~
還是仔細地去看一下log的內容好了
$ORACLE_HOME/inventory/oneoffs/32545013 is corrupted.
PatchObject constructor:
Input file "/u01/app/oracle-software/inventory/oneoffs/32545013/etc/config/actions"
or "/u01/app/oracle-software/inventory/oneoffs/32545013/etc/config/inventory" does not exist.
104...三小....
就去看了$ORACLE_HOME/inventory/oneoffs/32545013
裏頭是空的
好吧 ~~~
我就把它從第一個node 給拷了過來
然後重跑opatch指令
這次就告訴你了
這個Patch已經打上去了
哈~~
還真是誤打誤撞....
後續就是把binary patch打完就是了
接著就是打sqlpatch
這野蠻好玩的
一開始打是上去的去
但是就是success with error
你知道的
工程師性格
雖然這不是什麼大不了的問題
因為是系統物件compile error所造成
(log內有寫)
我就接連在cdb及pdb手動執行了utlrp.sql
然後再重新打上sqlpatch
就ok了


patch的步驟也跟12.2一樣

For Grid Infrastructure Home, as home user:
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /home/grid/32545008/32545013
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /home/grid/32545008/32579761
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /home/grid/32545008/32576499
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /home/grid/32545008/32584670
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /home/grid/32545008/32585572
For Database home, as home user:
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /home/grid/32545008/32545013
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /home/grid/32545008/32579761
Execute the following on each node of the cluster in non-shared CRS and DB home environment to apply the patch.
1. Stop the CRS managed resources running from DB homes.
If this is a GI Home environment, as the database home owner execute:
$ <ORACLE_HOME>/bin/srvctl stop home -o <ORACLE_HOME> -s <status file location> -n <node name>
srvctl stop home -o $ORACLE_HOME -s /home/oracle/patch.txt -n rac1
srvctl stop home -o $ORACLE_HOME -s /home/oracle/patch.txt -n rac2
2. Run the pre root script.
this is a GI Home, as the root user execute:
# <GI_HOME>/crs/install/rootcrs.sh -prepatch
$ORACLE_HOME/crs/install/rootcrs.sh -prepatch
3. Patch GI home.
As the GI home owner execute:
$ <GI_HOME>/OPatch/opatch apply -oh <GI_HOME> -local <UNZIPPED_PATCH_LOCATION>/%BUGNO%/%OCW TRACKING BUG%
$ORACLE_HOME/OPatch/opatch apply -oh $ORACLE_HOME -local /home/grid/32545008/32545013
$ORACLE_HOME/OPatch/opatch apply -oh $ORACLE_HOME -local /home/grid/32545008/32579761
$ORACLE_HOME/OPatch/opatch apply -oh $ORACLE_HOME -local /home/grid/32545008/32576499
$ORACLE_HOME/OPatch/opatch apply -oh $ORACLE_HOME -local /home/grid/32545008/32584670
$ORACLE_HOME/OPatch/opatch apply -oh $ORACLE_HOME -local /home/grid/32545008/32585572
As the database home owner execute:
$ <UNZIPPED_PATCH_LOCATION>/%BUGNO%/%OCW TRACKING BUG%/custom/scripts/prepatch.sh -dbhome <ORACLE_HOME>
/home/grid/32545008/32579761/custom/scripts/prepatch.sh -dbhome $ORACLE_HOME
$ <ORACLE_HOME>/OPatch/opatch apply -oh <ORACLE_HOME> -local <UNZIPPED_PATCH_LOCATION>/%BUGNO%/%OCW TRACKING BUG%
$ORACLE_HOME/OPatch/opatch apply -oh $ORACLE_HOME -local /home/grid/32545008/32545013
$ORACLE_HOME/OPatch/opatch apply -oh $ORACLE_HOME -local /home/grid/32545008/32579761
$ <UNZIPPED_PATCH_LOCATION>/%BUGNO%/%OCW TRACKING BUG%/custom/scripts/postpatch.sh -dbhome <ORACLE_HOME>
/home/grid/32545008/32579761/custom/scripts/postpatch.sh -dbhome $ORACLE_HOME
5. Run the post script.
As the root user execute:
# <GI_HOME>/rdbms/install/rootadd_rdbms.sh
$ORACLE_HOME/rdbms/install/rootadd_rdbms.sh
If this is a GI Home, as the root user execute:
# <GI_HOME>/crs/install/rootcrs.pl -postpatch
$ORACLE_HOME/crs/install/rootcrs.sh -postpatch
If this is a GI Home environment, as the database home owner execute:
$ <ORACLE_HOME>/bin/srvctl start home -o <ORACLE_HOME> -s <status file location> -n <node name>
srvctl start home -o $ORACLE_HOME -s /home/oracle/patch.txt -n rac1
srvctl start home -o $ORACLE_HOME -s /home/oracle/patch.txt -n rac2
8. For each database instance running on the Oracle home being patched, run the datapatch utility as described in next table.
sqlplus / as sysdba
startup
quit
cd $ORACLE_HOME/OPatch
./datapatch -verbose

目錄
mkdir --parents /u01/app/19.3.0/grid
chown --recursive grid.oinstall /u01
chown grid.oinstall V982068-01.zip
mv V982068-01.zip /u01/app/19.3.0/grid
/u01/app/19.3.0/grid/gridSetup.sh
mkdir --parents /u01/app/oracle
mkdir --parents /u01/app/oracle/product/19.3.0/dbhome_1
chown --recursive oracle.oinstall /u01/app/oracle
##########2021/06/19###########
假日了...終於有空再重新安裝一次RAC 19.3
端午節打了OJVM Patch(32399816)失敗
今天又再打一次
結果同樣的錯誤
實在是被Oracle打敗了
[Jun 19, 2021 12:10:52 PM] [INFO] The following make actions have failed :
[Jun 19, 2021 12:10:52 PM] [WARNING]OUI-67124:Re-link fails on target "ioracle".
端午節打第二季的RU的狀況
有人發生同樣的狀況
哈~~
19c 打RU patch遇到oui-patch.xml (Permission denied)问题
Oracle Support 好意思跟客戶講
最好按照每一季出新Patch來進行更新
真是他媽的,見你的大頭鬼
在前一家公司
就是出了大trouble
跑到母公司去屁這種話
什麼都推給bug
那你還賣那麼貴 !!
反正OJVM能不打就不要打
這就是我的結論
真的要打上去的話
要有心理準備
一定要做好測試
及到metalink 上開call
討論好怎麼解決
再打到Production
不測試直接上到營運套
 你就準備哭喔~