Skip to content

AutoUpgrade lässt PDB$SEED im READ-WRITE Modus geöffnet

Das Patching mit AutoUpgrade ist bei vielen inzwischen angekommen.Bei einem der letzten Patchings ist dann aufgefallen, dass die PDB$SEED nach dem Patching im READ WRITE geblieben war.Die Frage ist jetzt natürlich, ist das Absicht oder ein BUG? In diesem Blog ist eine kurze Zusammenfassung, was gemacht wurde. Vorbereitung Zuerst überprüfen wir den aktuellen Status der...

 Chris Pfundtner
Nov 19, 20266 min read

as Patching mit AutoUpgrade ist bei vielen inzwischen angekommen.
Bei einem der letzten Patchings ist dann aufgefallen, dass die PDB$SEED nach dem Patching im READ WRITE geblieben war.
Die Frage ist jetzt natürlich, ist das Absicht oder ein BUG?

In diesem Blog ist eine kurze Zusammenfassung, was gemacht wurde.

Vorbereitung

Zuerst überprüfen wir den aktuellen Status der pdbs:

sqlplus / as sysdba <<< 'show pdbs;' sqlplus / as sysdba <<< 'show pdbs;' CON_ID CON_NAME OPEN MODE RESTRICTED ------ ------------------ ---------- ---------- 2 PDB$SEED READ ONLY NO 3 THOR READ WRITE NO 4 LOKI READ WRITE NO

Die PDB$SEED ist wie es sein soll in READ ONLY.

Nun setzen wir einige Variablen, die wir nutzen möchten:

export RU_VERSION_ALT=19.32 export RU_VERSION_NEU=19.33 export RU_NUMBER=39915792 export OJVM_NUMBER=39803650 export RU_PATCH_PARAMS=RU:${RU_VERSION_NEU},OPATCH,OJVM:${RU_VERSION_NEU} export OPATCH_NUMBER=54 export RU_FOLDER=/u01/patches

AutoUpgrade

Verzeichnis für Patch anlegen

mkdir -p ${RU_FOLDER}/${RU_VERSION_NEU}

Neueste Version vom Autoupgrade herunterladen

curl -L -o ${RU_FOLDER}/${RU_VERSION_NEU}/autoupgrade.jar -O https://download.oracle.com/otn-pub/otn_software/autoupgrade.jar

Patches vorbereiten

Da wir aus Zeitgründen keinen Download machen, laden wir die benötigen Files und patches von unserem Stage-Laufwerk hinüber.

cp /u01/stage/RU/1933/p${RU_NUMBER}* ${RU_FOLDER}/${RU_VERSION_NEU}/ cp /u01/stage/RU/1933/p${OJVM_NUMBER}* ${RU_FOLDER}/${RU_VERSION_NEU}/ cp /u01/stage/LINUX.X64_193000_db_home.zip ${RU_FOLDER}/${RU_VERSION_NEU}/ cp /u01/stage/OPatch/p6880880_190000_${OPATCH_NUMBER}_Linux-x86-64.zip ${RU_FOLDER}/${RU_VERSION_NEU}/

Config-Datei vorbereiten

cat > ${RU_FOLDER}/${RU_VERSION_NEU}/patch_${ORACLE_SID}.cfg <<EOF global.global_log_dir=/u01/app/oracle/autoupgrade/log patch1.log_dir=/u01/app/oracle/autoupgrade/log/${ORACLE_SID} patch1.source_home=/u01/app/oracle/product/${RU_VERSION_ALT}_EE patch1.target_home=/u01/app/oracle/product/${RU_VERSION_NEU}_EE patch1.folder=${RU_FOLDER}/${RU_VERSION_NEU} patch1.patch=${RU_PATCH_PARAMS} patch1.platform=LINUX.X64 patch1.sid=${ORACLE_SID} patch1.download=no EOF

Oracle Home erzeugen

$ORACLE_HOME/jdk/bin/java -jar ${RU_FOLDER}/${RU_VERSION_NEU}/autoupgrade.jar -patch -config ${RU_FOLDER}/${RU_VERSION_NEU}/patch_${ORACLE_SID}.cfg -mode create_home

Nach dem das neue ORACLE_HOME angelegt wurde müssen wir die ROOT-Scripte ausführen

su - /u01/app/oracle/product/19.33_EE/root.sh exit

Deploy des Patches

lsnrctl stop

Mit diesem Befehl wird die Datenbank vollständig in das neue Home verschoben (inkl. DataPatch)

$ORACLE_HOME/jdk/bin/java -jar ${RU_FOLDER}/${RU_VERSION_NEU}/autoupgrade.jar -patch -config ${RU_FOLDER}/${RU_VERSION_NEU}/patch_${ORACLE_SID}.cfg -mode deploy Job 101 completed ------------------- Final Summary -------------------- Number of databases [ 1 ] Jobs finished [1] Jobs failed [0] Jobs restored [0] Jobs pending [0] ---- Drop GRP at your convenience once you consider it is no longer needed ---- Drop GRP from ODIN: drop restore point AU_PATCHING_9212_ODIN1932000 Please check the summary report at: /u01/app/oracle/autoupgrade/log/cfgtoollogs/patch/auto/status/status.html /u01/app/oracle/autoupgrade/log/cfgtoollogs/patch/auto/status/status.log

Environment an neues Oracle-Home anpassen

Auf dieser VM reicht es dafür eifach .bash-profile auszuführen:

. /home/oracle/.bash_profile cd $ORACLE_HOME

Post-Checks

Status der PDB’s

Als erstes überprüfen wir erneut den Status unserer PDB’s:

sqlplus / as sysdba <<< 'show pdbs;' sqlplus / as sysdba <<< 'show pdbs;' CON_ID CON_NAME OPEN MODE RESTRICTED ------ ------------------ ---------- ---------- 2 PDB$SEED READ WRITE NO 3 THOR READ WRITE NO 4 LOKI READ WRITE NO

Man kann also deutlich sehen, dass Autoupgrade nach dem Patching die PDB$SEED in READ WRITE lässt.

Patchhistory in der Datenbank

sqlplus / as sysdba <<_EOF set lines 500 set pages 1000 set serveroutput on set long 2000000 col action_time for a22 col action for a10 col description for a60 col status for a20 col version for a10 col source_version for a20 col target_version for a20 col comp_id for a15 select to_char(action_time, 'YYYY-MM-DD hh24:mi:ss') as action_time , con_id , action , status , description , source_version , target_version , patch_id from cdb_registry_sqlpatch order by action_time ; _EOF ACTION_TIME CON_ID ACTION STATUS DESCRIPTION SOURCE_VERSION TARGET_VERSION PATCH_ID ------------------- ----- ---------- ------------ ------------------------------------------------------------- --------------- ------------------ ---------- 2026-11-11 16:15:00 1 ROLLBACK SUCCESS OJVM RELEASE UPDATE: 19.32.0.0.260721 (39222882) 19.32.0.0.0 19.33.0.0.0 39222882 2026-11-11 16:15:11 1 APPLY SUCCESS OJVM RELEASE UPDATE: 19.33.0.0.261020 (39803650) 19.32.0.0.0 19.33.0.0.0 39803650 2026-11-11 16:15:54 1 APPLY SUCCESS Database Release Update : 19.33.0.0.261020 (39915792) 19.32.0.0.0 19.33.0.0.0 39915792 2026-11-11 16:17:12 3 ROLLBACK SUCCESS OJVM RELEASE UPDATE: 19.32.0.0.260721 (39222882) 19.32.0.0.0 19.33.0.0.0 39222882 2026-11-11 16:17:24 3 APPLY SUCCESS OJVM RELEASE UPDATE: 19.33.0.0.261020 (39803650) 19.32.0.0.0 19.33.0.0.0 39803650 2026-11-11 16:17:46 3 APPLY SUCCESS Database Release Update : 19.33.0.0.261020 (39915792) 19.32.0.0.0 19.33.0.0.0 39915792 2026-11-11 16:18:38 4 ROLLBACK SUCCESS OJVM RELEASE UPDATE: 19.32.0.0.260721 (39222882) 19.32.0.0.0 19.33.0.0.0 39222882 2026-11-11 16:18:47 4 APPLY SUCCESS OJVM RELEASE UPDATE: 19.33.0.0.261020 (39803650) 19.32.0.0.0 19.33.0.0.0 39803650 2026-11-11 16:19:07 4 APPLY SUCCESS Database Release Update : 19.33.0.0.261020 (39915792) 19.32.0.0.0 19.33.0.0.0 39915792

Recompile nach Patching

Damit das utlrp-Script auch in allen PDB’s ausgeführt wird nutzen wir ein pearl-script:

$ORACLE_HOME/perl/bin/perl $ORACLE_HOME/rdbms/admin/catcon.pl -n 1 -e -b utlrp -d $ORACLE_HOME/rdbms/admin utlrp.sql

nicht mehr benötigten Restore Point löschen

sqlplus / as sysdba <<< 'drop restore point AU_PATCHING_9212_ODIN1932000;'

Listener starten und überprüfen

lsnrctl start lsnrctl status

Check der Instance

sqlplus / as sysdba <<'_EOF' set lines 200 pages 300 col status for a20 select status, logins from v$instance; select open_mode from v$database; select con_id,owner,count(*) from cdb_objects where status <>'VALID' group by con_id,owner order by con_id,owner; show pdbs; SELECT name, type, cause, message, status FROM pdb_plug_in_violations WHERE status <> 'RESOLVED' ORDER BY time DESC; _EOF Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.33.0.0.0 STATUS LOGINS -------------------- ---------- OPEN ALLOWED OPEN_MODE -------------------- READ WRITE no rows selected CON_ID CON_NAME OPEN MODE RESTRICTED ------ ------------------ ---------- ---------- 2 PDB$SEED READ WRITE NO 3 THOR READ WRITE NO 4 LOKI READ WRITE NO no rows selected

Alertlog prüfen

vi $ORACLE_BASE/diag/rdbms/odin/ODIN/trace/alert_ODIN.log

Hier folg ein längerer Output zu einer Fehlermeldung zur PDB$SEED

PDB$SEED(2):Buffer Cache flush started: 2 PDB$SEED(2):Buffer Cache flush finished: 2 Pluggable database PDB$SEED closed Completed: alter pluggable database "PDB$SEED" close immediate instances=all 2026-11-11T16:16:10.946952+01:00 alter pluggable database "PDB$SEED" close immediate instances=all PDB$SEED(2):Pluggable database PDB$SEED closing PDB$SEED(2):Error 65020 during pluggable database PDB$SEED closing 2026-11-11T16:16:10.962588+01:00 PDB$SEED(2):Errors in file /u01/app/oracle/diag/rdbms/odin/ODIN/trace/ODIN_ora_140792.trc: ORA-65020: pluggable database PDB$SEED already closed ORA-65020 signalled during: alter pluggable database "PDB$SEED" close immediate instances=all... alter pluggable database "PDB$SEED" open read write restricted PDB$SEED(2):Pluggable database PDB$SEED opening in read write PDB$SEED(2):Endian type of dictionary set to little PDB$SEED(2):Undo initialization recovery: Parallel FPTR complete: start:2425351209 end:2425351214 diff:5 ms (0.0 seconds) PDB$SEED(2):Undo initialization recovery: err:0 start: 2425351209 end: 2425351215 diff: 6 ms (0.0 seconds) PDB$SEED(2):[140792] Successfully onlined Undo Tablespace 2. PDB$SEED(2):Undo initialization online undo segments: err:0 start: 2425351215 end: 2425351330 diff: 115 ms (0.1 seconds) PDB$SEED(2):Undo initialization finished serial:0 start:2425351209 end:2425351337 diff:128 ms (0.1 seconds) PDB$SEED(2):Database Characterset for PDB$SEED is AL32UTF8 Violations: Type: 1, Count: 3 PDB$SEED(2):*************************************************************** PDB$SEED(2):WARNING: Pluggable Database PDB$SEED with pdb id - 2 is PDB$SEED(2): altered with errors or warnings. Please look into PDB$SEED(2): PDB_PLUG_IN_VIOLATIONS view for more details. PDB$SEED(2):*************************************************************** PDB$SEED(2) Error Violation: SQL Patch, Cause: Interim patch 39803650/29440738 (OJVM RELEASE UPDATE: 19.33.0.0.261020 (39803650)): Installed in the CDB but not in the PDB, Action: Call datapatch to install in the PDB or the CDB PDB$SEED(2) Error Violation: SQL Patch, Cause: Interim patch 39222882/28830205 (OJVM RELEASE UPDATE: 19.32.0.0.260721 (39222882)): Not installed in the CDB but installed in the PDB, Action: Call datapatch to install in the PDB or the CDB PDB$SEED(2) Error Violation: SQL Patch, Cause: '19.33.0.0.0 Release_Update 2610090853' is installed in the CDB but '19.32.0.0.0 Release_Update 2607052207' is installed in the PDB, Action: Call datapatch to install in the PDB or the CDB PDB$SEED(2):SUPLOG: Set PDB SUPLOG SGA at PDB OPEN, old 0x0, new 0x0 (no suplog) 2026-11-11T16:16:11.967990+01:00 PDB$SEED(2):Opening pdb with no Resource Manager plan active PDB$SEED(2):joxcsys_required_dirobj_exists: directory object exists with required path /u01/app/oracle/product/19.33_EE/javavm/admin/, pid 140792 cid 2 Pluggable database PDB$SEED opened read write Completed: alter pluggable database "PDB$SEED" open read write restricted

In den Violations finden wir folgendes:

sqlplus / as sysdba <<'_EOF' set lines 400 pages 300 col NAME for a12 col CAUSE for a12 col MESSAGE for a150 col TIME for a30 SELECT time, name, type, cause, message, status FROM pdb_plug_in_violations ORDER BY time; _EOF TIME NAME TYPE CAUSE MESSAGE STATUS ------------------------------ ------------ --------- ------------ ---------------------------------------------------------------------------------------------------------------------------------------- --------- 11-NOV-26 04.17.51.554386 PM PDB$SEED ERROR SQL Patch Interim patch 39803650/29440738 (OJVM RELEASE UPDATE: 19.33.0.0.261020 (39803650)): Installed in the CDB but not in the PDB RESOLVED 11-NOV-26 04.17.51.554386 PM PDB$SEED ERROR SQL Patch Interim patch 39222882/28830205 (OJVM RELEASE UPDATE: 19.32.0.0.260721 (39222882)): Not installed in the CDB but installed in the PDB RESOLVED 11-NOV-26 04.17.51.554386 PM PDB$SEED ERROR SQL Patch '19.33.0.0.0 Release_Update 2610090853' is installed in the CDB but '19.32.0.0.0 Release_Update 2607052207' is installed in the PDB RESOLVED

Fazit

Solange die DB nicht neu gestartet wird, zB. durch einen reboot nach einem OS-Update, bleibt PDB$SEED in READ WRITE Mode.

Abschließend nochmal die Überprüfung:

sqlplus / as sysdba <<< 'show pdbs;' CON_ID CON_NAME OPEN MODE RESTRICTED ------ ------------------ ---------- ---------- 2 PDB$SEED READ WRITE NO 3 THOR READ WRITE NO 4 LOKI READ WRITE NO

Die Frage ist jetzt: Ist das seitens Oracle beabsichtigt? Für mich sieht es eher wie ein Bug aus.

Did you enjoy this article?

Recommend it — Standard Reader surfaces well-loved writing to more readers across the network.

Across the AtmosphereDiscussions