Patch and Upgrade Your
Database Like a Hero
Internals, Secrets, and More
Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates
1
The following is intended to outline our general product direction. It is
intended for information purposes only, and may not be incorporated
into any contract. It is not a commitment to deliver any material, code,
or functionality, and should not be relied upon in making purchasing
decisions. The development, release, timing, and pricing of any
features or functionality described for Oracle’s products may change
and remains at the sole discretion of Oracle Corporation.
The materials in this presentation pertain to Oracle Health,Oracle,OracleCerner,and Cerner Enviza which are all wholly owned subsidiaries of Oracle Corporation. Nothing in this presentation should be taken as indicating
that any decisions regarding the integration of any EMEA Cerner and/orEnviza entities have been made where an integration has not already occurred.
Oracle CloudWorld Copyright © 2024, Oracle and/or its affiliates
2
Safe harbor statement
Alex Zaballa
Oracle
Distinguished Product Manager
Cloud Migration, Upgrades and Patching
Rodrigo Jorge
Oracle
Distinguished Product Manager
Cloud Migration, Upgrades and Patching
Kamil Stawiarski
Database Whisperers
CEO
Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates
3
Speakers
4 Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates
Connect with us
alexzaballa
@alexzaballa
https://alexzaballa.com
rodrigoaraujorge
@rodrigojorgedba
https://dbarj.com.br
kamilstawiarski
@ora600pl
https://ora-600.pl
Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates
5
DBAs
run the world
Oracle
Two-Stage
Rolling
Replay
Upgrade
Kamil's
"Interesting" Case
Rolling Patch
Concept
Local
Rolling
AutoUpgrade
Patching
6 Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates
Agenda
Two-Stage
Rolling
Replay
Upgrade
Kamil's
"Interesting" Case
Rolling Patch
Concept
Local
Rolling
AutoUpgrade
Patching
7 Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates
Concept
Oracle CloudWorld Copyright © 2024, Oracle and/or its affiliates
8
Methods
• In-Place Patching
• Out-of-Place Patching
Types
• Single Instance Patching
• Standby-First Patching
• RAC Rolling Patching
Always patch Out-of-Place
Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates
9
RAC Rolling Patching
Oracle CloudWorld Copyright © 2024, Oracle and/or its affiliates
10
User
Connections
Instances
Oracle Homes
Nodes
Database
• New DB home
• Patch DB home
• Move to new home
• Execute datapatch
RAC nodes must function with mixed binaries
Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates
11
Requirement for RAC Rolling patching
• Yellow = Old Oracle Home (19.23)
• Red = New Oracle Home (19.24)
Oracle CloudWorld Copyright © 2024, Oracle and/or its affiliates
12
Standby-First installable
Release updates are always:
RAC Rolling installable
• Possible to include in Release Updates
Most patches are RAC Rolling Installable
Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates
14
What about the non-RAC Rolling patches
Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates
15
Example
Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates
16
• New column in v$ view
• Change code for v$ view
• New v$ view is part of a patch
Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates
17
Solution?
Two-Stage
Rolling
Replay
Upgrade
Kamil's
"Interesting" Case
Rolling Patch
Concept
Local
Rolling
AutoUpgrade
Patching
18 Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates
Oracle CloudWorld Copyright © 2024, Oracle and/or its affiliates
19
Online
Rolling
Non-Rolling
Two Stage Rolling
Patch Apply Methods
Allow non-Rolling patches to be applied
rolling to an RAC environment
Two Stage Rolling
20 Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates
Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates
21
1 Apply patch but don’t enable it
2 Enable fix with one command on all instances
To all instances in rolling manner
alter system enable rac two_stage rolling updates all;
Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates
22
--Enable non-rolling patch using two stage patching
Two-Stage Rolling Patching
Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates
23
• New Oracle Home
• Patch Oracle Home
• Move to new Oracle Home
Pause
Case 1: New V$/GV$ table added as part of patch.
v$ is stored in C code, not in the dictionary.
Example: V$ACME
What if ?
Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates
24
New Old
SQL> SELECT * FROM GV$ACME;
• Connect on Old Instance:
ORA-00942: table or view does not exist
• Connect on New Instance:
ORA-00942: table or view does not exist
Even though it is
already on the binary
Case 2: Modified V$/GV$ definition.
v$ is stored in C code, not in the dictionary.
Example: V$ACME
What if ?
Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates
25
New Old
SQL> SELECT * FROM V$ACME;
• Connect on Old Instance:
Result: old code for the view.
• Connect on New Instance:
Result: also the old code for the view.
Even though it is
already on the binary
Two-Stage Rolling Patching
Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates
26
• New Oracle Home
• Patch Oracle Home
• Move to new Oracle Home
Pause
Continue
What if ?
Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates
27
New New
Case 1: New V$/GV$ table added as part of patch.
Example: V$ACME
SQL> SELECT * FROM V$ACME;
• Connect on any Instance:
ORA-00942: table or view does not exist
Two-Stage Rolling Patching
Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates
28
• New Oracle Home
• Patch Oracle Home
• Move to new Oracle Home
• Enable two-stage rolling
Patch Changes
are now Visible
Patch Changes
are now Visible
SQL> ALTER SYSTEM ENABLE RAC TWO_STAGE ROLLING
UPDATES ALL;
Demo
Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates
30
... but I don't have RAC
Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates
31
Two-Stage
Rolling
Replay
Upgrade
Kamil's
"Interesting" Case
Rolling Patch
Concept
Local
Rolling
AutoUpgrade
Patching
32 Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates
Patch and Upgrade Internals
Starts another instance on the same node
and relocates sessions to the new instance
Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates
34
Local Rolling
Local Rolling Patching
Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates
35
• New Oracle Home
• Patch Oracle Home
• Add another local Instance
• Transfer connections
$ srvctl modify database –d <dbname>
-o $NEW_ORACLE_HOME –localrolling
• Execute datapatch
FAN event
You must have enough additional CPU and
memory to run a second instance on the
same host
Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates
36
12G
24G
Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates
37
32G
12G
24G
Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates
38
One host,
many databases
32G
5G
5G
5G
5G
5G
• Requires RAC or RAC Node instance
Uses RAC functionality to enable
two instances simultaneously
Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates
39
Demo
Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates
40
Oracle Real Application Clusters 23ai
Smart Features Tips and Tricks
Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates
41
PAN2949 - Thursday, 10:15
Titian 2302, The Venetian, Level 2
Two-Stage
Rolling
Replay
Upgrade
Kamil's
"Interesting" Case
Rolling Patch
Concept
Local
Rolling
AutoUpgrade
Patching
42 Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates
Patch and Upgrade Internals
• Available since Oracle Database 21c
Replay Upgrade is a usability feature
used to upgrade a single PDB
Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates
43
SQL> alter pluggable database pdb1 open;
Pluggable database altered.
Elapsed: 00:06:01.95
-- The database automatically starts an upgrade
-- when you plug in a lower-release PDB
SQL> select property_name, property_value
from database_properties
where property_name like '%OPEN%';
PROPERTY_NAME PROPERTY_VALUE
------------------------ --------------------
CONVERT_NONCDB_ON_OPEN true
UPGRADE_PDB_ON_OPEN true
Traditional vs Replay
Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates
46
Traditional
• Phase 1
Phase 2
Phase 3
Phase 4
Phase 5
:
:
:
:
Phase n
Replay
DROP INDEX SYSTEM.IDX$FLOW ...
CREATE OR REPLACE ...
ALTER TYPE ...
CREATE TABLE SYS.T1 ...
CREATE INDEX SYS.T1I1 ...
DROP INDEX MDSYS.IDX$IK ...
DROP TABLE MDSYS.TBL$TT ...
CREATE OR REPLACE ...
ALTER TYPE ...
GRANT SELECT ON ...
CREATE VIEW ...
Traditional vs Replay
Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates
47
Traditional
• Triggered by AutoUpgrade
• Runs catalog.sql / catproc.sql
• Many CREATE OR REPLACE
statements for objects that didn’t
change
• Customizable
• Logs everything allowing complete
diagnosability
Replay
• Triggered by OPEN command
• Runs captured statements
• Only statements that actually do some change
• Automated
• Basic logging only
• Requires manual datapatch invocation
SQL> select sqlstmt from pdb_sync$;
sqlstmt
--------------------------------------
ALTER SESSION SET "_oracle_script_counter"=7
alter pluggable database application app$cdb$pdbonly$ncdbtopdb begin install '1.0.upgmode'
alter session set "_enable_view_pdb"=false
alter session set NLS_LENGTH_SEMANTICS=BYTE
INSERT INTO sys.utl_recomp_skip_list select obj# from obj$ where BITAND(flags, 4194304)=0 ...
create or replace view sys.cdb$common_root_objects sharing=object as
select u.name owner, o.name object_name, o.type# object_type, o.namespace nsp,
o.subname object_subname, o.signature object_sig,
decode(bitand(o.flags, (65536+131072+4294967296)),
4294967296+65536, 'EDL', 131072, 'DL', 'MDL') sharing
from sys.obj$ o, sys.user$ u
where o.owner#=u.user# and bitand(o.flags, (65536+131072+4294967296)) <> 0
and bitand(o.flags,0)=0
Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates
53
-- To disable replay upgrade
ALTER DATABASE UPGRADE SYNC OFF;
-- or
ALTER DATABASE PROPERTY SET UPGRADE_PDB_ON_OPEN = 'false';
-- To disable convert on open
ALTER DATABASE PROPERTY SET CONVERT_NONCDB_ON_OPEN = 'false';
Two-Stage
Rolling
Replay
Upgrade
Kamil's
"Interesting" Case
Rolling Patch
Concept
Local
Rolling
AutoUpgrade
Patching
54 Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates
Patch and Upgrade Internals
Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates
55
We made upgrading easy.
Now we make patching just as easy.
AutoUpgrade functionality extended to patching
Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates
56
$ cat DB19.cfg
patch1.source_home=/u01/app/oracle/product/19/dbhome_19_23_0
patch1.target_home=/u01/app/oracle/product/19/dbhome_19_24_0
patch1.sid=DB19
$ java -jar autoupgrade.jar -config DB19.cfg -mode deploy
Oracle CloudWorld Copyright © 2024, Oracle and/or its affiliates
57
But we always want more…
AutoUpgrade can download and build your patched
home, and then patch your database
Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates
58
AutoUpgrade Patching
Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates
59
Connect on MOS
Download patches
Install patches
Patch the database
rolling
Dictionary
patching
Post checks
Keep
checking if
new patch is
available
AutoUpgrade
Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates
60
$ cat DB19.cfg
patch1.source_home=/u01/app/oracle/product/19/dbhome_1
patch1.target_home=/u01/app/oracle/product/19/dbhome_2
patch1.sid=FTEX
patch1.folder=/home/oracle/autopatch/patch
patch1.patch=RU,OPATCH,OJVM,DPBP
patch1.download=YES
patch1.db_availability=OFFLINE
patch1.method=OUTOFPLACE
$ java -jar autoupgrade.jar –patch -config DB19.cfg -mode deploy
Demo
Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates
61
Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates
62
My Oracle Support Doc ID 2485457.1
It is available already
Try it out NOW!
Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates
63
Check out our blogs NOW!
And give us feedback, please …
Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates
64
Btw, this works for
Oracle Database 19c
already …
Two-Stage
Rolling
Replay
Upgrade
Kamil's
"Interesting" Case
Rolling Patch
Concept
Local
Rolling
AutoUpgrade
Patching
66 Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates
Patch and Upgrade Internals
Thank You
Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates
68
The following is intended to outline our general product direction. It is
intended for information purposes only, and may not be incorporated
into any contract. It is not a commitment to deliver any material, code,
or functionality, and should not be relied upon in making purchasing
decisions. The development, release, timing, and pricing of any
features or functionality described for Oracle’s products may change
and remains at the sole discretion of Oracle Corporation.
The materials in this presentation pertain to Oracle Health,Oracle,OracleCerner,and Cerner Enviza which are all wholly owned subsidiaries of Oracle Corporation. Nothing in this presentation should be taken as indicating
that any decisions regarding the integration of any EMEA Cerner and/orEnviza entities have been made where an integration has not already occurred.
Oracle CloudWorld Copyright © 2024, Oracle and/or its affiliates
69
Safe harbor statement

Patch and upgrade databases for Oracle Databases

  • 1.
    Patch and UpgradeYour Database Like a Hero Internals, Secrets, and More Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates 1
  • 2.
    The following isintended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, timing, and pricing of any features or functionality described for Oracle’s products may change and remains at the sole discretion of Oracle Corporation. The materials in this presentation pertain to Oracle Health,Oracle,OracleCerner,and Cerner Enviza which are all wholly owned subsidiaries of Oracle Corporation. Nothing in this presentation should be taken as indicating that any decisions regarding the integration of any EMEA Cerner and/orEnviza entities have been made where an integration has not already occurred. Oracle CloudWorld Copyright © 2024, Oracle and/or its affiliates 2 Safe harbor statement
  • 3.
    Alex Zaballa Oracle Distinguished ProductManager Cloud Migration, Upgrades and Patching Rodrigo Jorge Oracle Distinguished Product Manager Cloud Migration, Upgrades and Patching Kamil Stawiarski Database Whisperers CEO Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates 3 Speakers
  • 4.
    4 Oracle CloudWorldCopyright© 2024, Oracle and/or its affiliates Connect with us alexzaballa @alexzaballa https://alexzaballa.com rodrigoaraujorge @rodrigojorgedba https://dbarj.com.br kamilstawiarski @ora600pl https://ora-600.pl
  • 5.
    Oracle CloudWorld Copyright©2024, Oracle and/or its affiliates 5 DBAs run the world Oracle
  • 6.
  • 7.
  • 8.
    Concept Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates 8 Methods • In-Place Patching • Out-of-Place Patching Types • Single Instance Patching • Standby-First Patching • RAC Rolling Patching
  • 9.
    Always patch Out-of-Place OracleCloudWorld Copyright© 2024, Oracle and/or its affiliates 9
  • 10.
    RAC Rolling Patching OracleCloudWorld Copyright © 2024, Oracle and/or its affiliates 10 User Connections Instances Oracle Homes Nodes Database • New DB home • Patch DB home • Move to new home • Execute datapatch
  • 11.
    RAC nodes mustfunction with mixed binaries Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates 11 Requirement for RAC Rolling patching
  • 12.
    • Yellow =Old Oracle Home (19.23) • Red = New Oracle Home (19.24) Oracle CloudWorld Copyright © 2024, Oracle and/or its affiliates 12
  • 13.
    Standby-First installable Release updatesare always: RAC Rolling installable
  • 14.
    • Possible toinclude in Release Updates Most patches are RAC Rolling Installable Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates 14
  • 15.
    What about thenon-RAC Rolling patches Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates 15
  • 16.
    Example Oracle CloudWorld Copyright©2024, Oracle and/or its affiliates 16 • New column in v$ view • Change code for v$ view • New v$ view is part of a patch
  • 17.
    Oracle CloudWorld Copyright©2024, Oracle and/or its affiliates 17 Solution?
  • 18.
  • 19.
    Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates 19 Online Rolling Non-Rolling Two Stage Rolling Patch Apply Methods
  • 20.
    Allow non-Rolling patchesto be applied rolling to an RAC environment Two Stage Rolling 20 Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates
  • 21.
    Oracle CloudWorld Copyright©2024, Oracle and/or its affiliates 21 1 Apply patch but don’t enable it 2 Enable fix with one command on all instances To all instances in rolling manner
  • 22.
    alter system enablerac two_stage rolling updates all; Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates 22 --Enable non-rolling patch using two stage patching
  • 23.
    Two-Stage Rolling Patching OracleCloudWorld Copyright© 2024, Oracle and/or its affiliates 23 • New Oracle Home • Patch Oracle Home • Move to new Oracle Home Pause
  • 24.
    Case 1: NewV$/GV$ table added as part of patch. v$ is stored in C code, not in the dictionary. Example: V$ACME What if ? Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates 24 New Old SQL> SELECT * FROM GV$ACME; • Connect on Old Instance: ORA-00942: table or view does not exist • Connect on New Instance: ORA-00942: table or view does not exist Even though it is already on the binary
  • 25.
    Case 2: ModifiedV$/GV$ definition. v$ is stored in C code, not in the dictionary. Example: V$ACME What if ? Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates 25 New Old SQL> SELECT * FROM V$ACME; • Connect on Old Instance: Result: old code for the view. • Connect on New Instance: Result: also the old code for the view. Even though it is already on the binary
  • 26.
    Two-Stage Rolling Patching OracleCloudWorld Copyright© 2024, Oracle and/or its affiliates 26 • New Oracle Home • Patch Oracle Home • Move to new Oracle Home Pause Continue
  • 27.
    What if ? OracleCloudWorld Copyright© 2024, Oracle and/or its affiliates 27 New New Case 1: New V$/GV$ table added as part of patch. Example: V$ACME SQL> SELECT * FROM V$ACME; • Connect on any Instance: ORA-00942: table or view does not exist
  • 28.
    Two-Stage Rolling Patching OracleCloudWorld Copyright© 2024, Oracle and/or its affiliates 28 • New Oracle Home • Patch Oracle Home • Move to new Oracle Home • Enable two-stage rolling Patch Changes are now Visible Patch Changes are now Visible SQL> ALTER SYSTEM ENABLE RAC TWO_STAGE ROLLING UPDATES ALL;
  • 29.
    Demo Oracle CloudWorld Copyright©2024, Oracle and/or its affiliates 30
  • 30.
    ... but Idon't have RAC Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates 31
  • 31.
    Two-Stage Rolling Replay Upgrade Kamil's "Interesting" Case Rolling Patch Concept Local Rolling AutoUpgrade Patching 32Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates Patch and Upgrade Internals
  • 32.
    Starts another instanceon the same node and relocates sessions to the new instance Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates 34 Local Rolling
  • 33.
    Local Rolling Patching OracleCloudWorld Copyright© 2024, Oracle and/or its affiliates 35 • New Oracle Home • Patch Oracle Home • Add another local Instance • Transfer connections $ srvctl modify database –d <dbname> -o $NEW_ORACLE_HOME –localrolling • Execute datapatch FAN event
  • 34.
    You must haveenough additional CPU and memory to run a second instance on the same host Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates 36
  • 35.
    12G 24G Oracle CloudWorld Copyright©2024, Oracle and/or its affiliates 37 32G 12G 24G
  • 36.
    Oracle CloudWorld Copyright©2024, Oracle and/or its affiliates 38 One host, many databases 32G 5G 5G 5G 5G 5G
  • 37.
    • Requires RACor RAC Node instance Uses RAC functionality to enable two instances simultaneously Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates 39
  • 38.
    Demo Oracle CloudWorld Copyright©2024, Oracle and/or its affiliates 40
  • 39.
    Oracle Real ApplicationClusters 23ai Smart Features Tips and Tricks Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates 41 PAN2949 - Thursday, 10:15 Titian 2302, The Venetian, Level 2
  • 40.
    Two-Stage Rolling Replay Upgrade Kamil's "Interesting" Case Rolling Patch Concept Local Rolling AutoUpgrade Patching 42Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates Patch and Upgrade Internals
  • 41.
    • Available sinceOracle Database 21c Replay Upgrade is a usability feature used to upgrade a single PDB Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates 43
  • 42.
    SQL> alter pluggabledatabase pdb1 open; Pluggable database altered. Elapsed: 00:06:01.95 -- The database automatically starts an upgrade -- when you plug in a lower-release PDB
  • 43.
    SQL> select property_name,property_value from database_properties where property_name like '%OPEN%'; PROPERTY_NAME PROPERTY_VALUE ------------------------ -------------------- CONVERT_NONCDB_ON_OPEN true UPGRADE_PDB_ON_OPEN true
  • 44.
    Traditional vs Replay OracleCloudWorld Copyright© 2024, Oracle and/or its affiliates 46 Traditional • Phase 1 Phase 2 Phase 3 Phase 4 Phase 5 : : : : Phase n Replay DROP INDEX SYSTEM.IDX$FLOW ... CREATE OR REPLACE ... ALTER TYPE ... CREATE TABLE SYS.T1 ... CREATE INDEX SYS.T1I1 ... DROP INDEX MDSYS.IDX$IK ... DROP TABLE MDSYS.TBL$TT ... CREATE OR REPLACE ... ALTER TYPE ... GRANT SELECT ON ... CREATE VIEW ...
  • 45.
    Traditional vs Replay OracleCloudWorld Copyright© 2024, Oracle and/or its affiliates 47 Traditional • Triggered by AutoUpgrade • Runs catalog.sql / catproc.sql • Many CREATE OR REPLACE statements for objects that didn’t change • Customizable • Logs everything allowing complete diagnosability Replay • Triggered by OPEN command • Runs captured statements • Only statements that actually do some change • Automated • Basic logging only • Requires manual datapatch invocation
  • 46.
    SQL> select sqlstmtfrom pdb_sync$; sqlstmt -------------------------------------- ALTER SESSION SET "_oracle_script_counter"=7 alter pluggable database application app$cdb$pdbonly$ncdbtopdb begin install '1.0.upgmode' alter session set "_enable_view_pdb"=false alter session set NLS_LENGTH_SEMANTICS=BYTE INSERT INTO sys.utl_recomp_skip_list select obj# from obj$ where BITAND(flags, 4194304)=0 ... create or replace view sys.cdb$common_root_objects sharing=object as select u.name owner, o.name object_name, o.type# object_type, o.namespace nsp, o.subname object_subname, o.signature object_sig, decode(bitand(o.flags, (65536+131072+4294967296)), 4294967296+65536, 'EDL', 131072, 'DL', 'MDL') sharing from sys.obj$ o, sys.user$ u where o.owner#=u.user# and bitand(o.flags, (65536+131072+4294967296)) <> 0 and bitand(o.flags,0)=0
  • 47.
    Oracle CloudWorld Copyright©2024, Oracle and/or its affiliates 53 -- To disable replay upgrade ALTER DATABASE UPGRADE SYNC OFF; -- or ALTER DATABASE PROPERTY SET UPGRADE_PDB_ON_OPEN = 'false'; -- To disable convert on open ALTER DATABASE PROPERTY SET CONVERT_NONCDB_ON_OPEN = 'false';
  • 48.
    Two-Stage Rolling Replay Upgrade Kamil's "Interesting" Case Rolling Patch Concept Local Rolling AutoUpgrade Patching 54Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates Patch and Upgrade Internals
  • 49.
    Oracle CloudWorld Copyright©2024, Oracle and/or its affiliates 55 We made upgrading easy. Now we make patching just as easy. AutoUpgrade functionality extended to patching
  • 50.
    Oracle CloudWorld Copyright©2024, Oracle and/or its affiliates 56 $ cat DB19.cfg patch1.source_home=/u01/app/oracle/product/19/dbhome_19_23_0 patch1.target_home=/u01/app/oracle/product/19/dbhome_19_24_0 patch1.sid=DB19 $ java -jar autoupgrade.jar -config DB19.cfg -mode deploy
  • 51.
    Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates 57 But we always want more…
  • 52.
    AutoUpgrade can downloadand build your patched home, and then patch your database Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates 58 AutoUpgrade Patching
  • 53.
    Oracle CloudWorld Copyright©2024, Oracle and/or its affiliates 59 Connect on MOS Download patches Install patches Patch the database rolling Dictionary patching Post checks Keep checking if new patch is available AutoUpgrade
  • 54.
    Oracle CloudWorld Copyright©2024, Oracle and/or its affiliates 60 $ cat DB19.cfg patch1.source_home=/u01/app/oracle/product/19/dbhome_1 patch1.target_home=/u01/app/oracle/product/19/dbhome_2 patch1.sid=FTEX patch1.folder=/home/oracle/autopatch/patch patch1.patch=RU,OPATCH,OJVM,DPBP patch1.download=YES patch1.db_availability=OFFLINE patch1.method=OUTOFPLACE $ java -jar autoupgrade.jar –patch -config DB19.cfg -mode deploy
  • 55.
    Demo Oracle CloudWorld Copyright©2024, Oracle and/or its affiliates 61
  • 56.
    Oracle CloudWorld Copyright©2024, Oracle and/or its affiliates 62 My Oracle Support Doc ID 2485457.1 It is available already Try it out NOW!
  • 57.
    Oracle CloudWorld Copyright©2024, Oracle and/or its affiliates 63 Check out our blogs NOW! And give us feedback, please …
  • 58.
    Oracle CloudWorld Copyright©2024, Oracle and/or its affiliates 64 Btw, this works for Oracle Database 19c already …
  • 59.
    Two-Stage Rolling Replay Upgrade Kamil's "Interesting" Case Rolling Patch Concept Local Rolling AutoUpgrade Patching 66Oracle CloudWorld Copyright© 2024, Oracle and/or its affiliates Patch and Upgrade Internals
  • 60.
    Thank You Oracle CloudWorldCopyright© 2024, Oracle and/or its affiliates 68
  • 61.
    The following isintended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, timing, and pricing of any features or functionality described for Oracle’s products may change and remains at the sole discretion of Oracle Corporation. The materials in this presentation pertain to Oracle Health,Oracle,OracleCerner,and Cerner Enviza which are all wholly owned subsidiaries of Oracle Corporation. Nothing in this presentation should be taken as indicating that any decisions regarding the integration of any EMEA Cerner and/orEnviza entities have been made where an integration has not already occurred. Oracle CloudWorld Copyright © 2024, Oracle and/or its affiliates 69 Safe harbor statement