Infrastruktur & Datenbanktechnologie28.07.2023Tom Lieber
Easy Autoupgrade/Autopatch Oracle Out-of-Place 19.20 within Sphinx Environment
If not already exists a „not used“ Oracle Home. create a new one..
dbsw_install dbs 19.EE 19.20
(19.EE is our 19.16 Prepared Image)
Now it will create our new Home in
/app_oracle/product/dbs/19.20
(it will prompt that you have to make an root commando, please do that)
Replace the OPatch utility with the newest Version
mv $ORACLE_HOME/OPatch $ORACLE_HOME/OPatch_old
unzip /app_oracle/local/tools/p6880880_210000_Linux-x86-64.zip -d $ORACLE_HOME/
Download the Patches from Oracle with WGET
Find Patchnr here:
https://support.oracle.com/knowledge/Oracle%20Database%20Products/888_1.html#19
Patch 35320081: DATABASE RELEASE UPDATE 19.20.0.0.0
Patch 35370174: COMBO OF OJVM RU COMPONENT 19.20.0.0.230718 + DB RU 19.20.0.0.230718
— Patch 35261302: DATAPUMP BUNDLE PATCH 19.19.0.0.0
ORACLE
Thx WGET its easy , i dont like the support.oracle.com Page to download Patchs..
The 19.20 DB+OJW Bundle Patch
wget --http-user=myuser@sphinx.at --http-password=Dontellu --no-check-certificate --output-document=p35370174_190000_Linux-x86-64.zip "https://updates.oracle.com/Orion/Download/download_patch/p35370174_190000_Linux-x86-64.zip"
The 19.19 DBRU Patch (which cannot be applied at the moment)
i have to wait for 19.20
wget --http-user=myuser@sphinx.at --http-password=Dontellu --no-check-certificate --output-document=p35261302_1919000DBRU_Generic.zip "https://updates.oracle.com/Orion/Download/download_patch/p35261302_1919000DBRU_Generic.zip"
Unpack the *.zip into to /app_oracle/product/dbs/19.20-patch/ (or/tmp)
Set the enviroment to the Target new home:
export ORACLE_HOME=/app_oracle/product/dbs/19.20
export PATH=/app_oracle/product/dbs/19.20/OPatch:$PATH
opatch version
cd /app_oracle/product/dbs/19.20-patch/35370174/35320081
opatch apply
cd /app_oracle/product/dbs/19.20-patch/35370174/35354406
opatch apply
y
y
$ORACLE_HOME/OPatch/opatch lspatches
Oracle recommends to use the autoupgrade Tool to switch the home and install all correctly: You have to create an cfg to use autoupgrade correctly.
cd /app_oracle/local/tools/autoupgrade.jar
vi autoupgrade_patch_CDB.cfg
patch_C10P.log_dir=/app_oracle/log
patch_C10P.sid=C10P1
patch_C10P.source_home=/app_oracle/product/dbs/19.EE
patch_C10P.target_home=/app_oracle/product/dbs/19.20
patch_C10P.start_time=NOW
patch_C10P.run_utlrp=yes
Okay last Check – autoupgrades brings an „analyze“ with it
$ORACLE_HOME/jdk/bin/java -jar autoupgrade.jar \
-config autoupgrade_patch_CDB.cfg \
-mode analyze
cat /app_oracle/cfgtoollogs/autoupgrade/cfgtoollogs/upgrade/auto/status/status.log
looks good -- everthing fine
Okay start the upgrade- now the database is a while unavailable – if it is a singe instance
$ORACLE_HOME/jdk/bin/java -jar /app_oracle/autoupgrade/autoupgrade.jar \
-config /app_oracle/autoupgrade/autoupgrade_patch_CDB.txt \
-mode deploy
cat /app_oracle/cfgtoollogs/autoupgrade/cfgtoollogs/upgrade/auto/status/status.log
Within our Sphinx Environment now its needed to change some things
cd /app_oracle/local/etc
Copy our oraenv specific shellscript too
cp oraenv-dbs-19.EE.sh oraenv-dbs-19.20.sh
change the .EE with the current version
vi oraenv-dbs-19.20.sh -- change .EE mit .20
Relink oraenv-default.sh
rm oraenv-default.sh
ln -s oraenv-dbs-19.20.sh oraenv-default.sh
Switch to the current environment an take a look
chenv c10p
sqlplus "sys/sx123 as sysdba"
Also change listener.ora to run on
ORACLE_HOME=/app_oracle/product/dbs/19.20
instead of 19.EE
-- 19.20.0.0 -- all is good