Post on 09-Feb-2022
transcript
<Insert Picture Here>
Oracle 10gR2 to 11gR2 Upgrade with IBM System z - Keeping It Simple
Paul Bramy – ORACLE Corporation – Oracle Integrated Solutions
Didier Wojciechowski – ORACLE Corporation – Oracle Integrated Solutions
3
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, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.
4
<Insert Picture Here>
Agenda
• Introduction• Database upgrade path with IBM system z
– Regular methodology (GUI )– Command Line Upgrade– Alternative methodologies
• Upgrading Oracle Grid Foundations• Evaluate the Database upgrade• Appendix
5
<Insert Picture Here>
Agenda
• Introduction• Database upgrade path with IBM system z
– Regular methodology (GUI )– Command Line Upgrade– Alternative methodologies
• Upgrading Oracle Grid Foundations• Evaluate the Database upgrade• Appendix
6
• The strategic upgrade questions:
1) Why does the database need to be upgraded? 2) Does the operating system type change?3) Is a refresh or a change to a new platform planned?4) How much downtime can be experienced?
Database upgrade or database migration?
7
Database upgrade or database migration?Te
chno
logi
esAp
plic
atio
ns
Storage/network
HW platform
Virtualization layer(s)
Operating System(s)
Solutions
Infra
stru
ctur
e
Database(s)
Middleware(s)
Current environment
Target environment
Refresh HW platform
Same/Upgraded OS
Database upgrade
New HW platform
New OS
Database migration
Same HW platform
Database upgrade
Same/Upgraded OS
Upgrade Solution Solution Solution
Each scenario determines the methodology to put in place and impact a downtime.
The triggers for a database upgrade or migration are generally a solution upgrade, an HW refresh, or a new HW platform..
8
Database upgrade or database migration?IBM system z running Linux
Tech
nolo
gies
Appl
icat
ions
Storage/network
IBM System z
z9, z10, zBC
z/VM
Linux RH or SuSe
Solutions
Infra
stru
ctur
e
10.2.0.x
Middleware(s)
Current environment
Target environment
IBM System zz10,z196, zEC
Same/Upgraded Linux
Upgrade to 11.2.0.2
IBM System z
z9, z10, zBC
Upgrade to 11.2.0.2
Same/Upgraded Linux
Solution Solution
Each scenario represents an upgrade path.
According to the Oracle product certification matrix on Linux on system z, the scenario could be summarized as follow.
9
upgradeupgrade
Database upgrade or migration ?Database upgrade or migration ?
Export/ImportExport/Import
CTAS, COPYCTAS, COPY
Transportable TablespacesTransportable Tablespaces
Transportable DatabaseTransportable Database
Oracle StreamsOracle Streams
A standard downtime A standard downtime
SQL ApplySQL ApplyDBUADBUA
Command Line InterfaceCommand Line Interface
SQL> @catupgrd
Oracle Golden GateOracle Golden Gate
Database upgrade or database migration?Methodologies introduction
migrationmigration
Specific downtime constraintSpecific downtime constraint
10
<Insert Picture Here>
Agenda
• Introduction• Database upgrade path with IBM system z
– Regular methodology (GUI )– Command Line Upgrade– Alternative methodologies
• Upgrading Oracle Grid Foundations• Evaluate the Database upgrade• Appendix
11
upgradeupgrade
Database upgrade or migration ?Database upgrade or migration ?
Export/ImportExport/Import
CTAS, COPYCTAS, COPY
Transportable TablespacesTransportable Tablespaces
Transportable DatabaseTransportable Database
Oracle StreamsOracle Streams
A standard downtime A standard downtime
SQL ApplySQL Apply
Command Line InterfaceCommand Line Interface
SQL> @catupgrd
Oracle Golden GateOracle Golden Gate
Database upgrade or database migration?
migrationmigration
Specific downtime constraintSpecific downtime constraint
12
Database upgrade path with IBM system z Why do we encounter downtime during a database upgrade?
Database is in "UPGRADE" modeThe data dictionary will be upgradedThe database is protected against changes apart from upgrade
This usually means downtime
It applies to:– Database release upgrades
Example: Upgrade from 10.2.0.x to 11.2.0.2
– Patch set upgradesExample: Patch set upgrade from 10.2.0.3 to 10.2.0.5
– Patches which modify the dictionary
13
upgradeupgrade
Database upgrade or migration ?Database upgrade or migration ?
Export/ImportExport/Import
CTAS, COPYCTAS, COPY
Transportable TablespacesTransportable Tablespaces
Transportable DatabaseTransportable Database
Oracle StreamsOracle Streams
A standard downtime A standard downtime
SQL ApplySQL Apply
Command Line InterfaceCommand Line Interface
SQL> @catupgrd
Oracle Golden GateOracle Golden Gate
Database upgrade or database migration?Regular methodology
migrationmigration
Specific downtime constraintSpecific downtime constraint
14
Regular methodology Upgrade duration
• How long will the upgrade take to complete?– Independent of:
• Size of the database• Used datatypes
– Dependent mainly on:• The number of installed components and options• Valid and non-stale data dictionary statistics• Number of synonyms – they'll get recompiled• Number of objects in XDB• At a very low rate, if COMPATIBLE is increased:
– Number of datafiles– Size of redo logs
15
Regular methodology Upgrade duration
• Upgrade duration is mainly dependent on the number of installed components– Completes usually in 20-90 minutes
• No difference between DBUA and command line upgrade
– We recommend to evaluate of all components are needed – check the impact on the upgrade duration.Component HH:MM:SS
Oracle Server 00:16:17
JServer JAVA Virtual Machine 00:05:19
Oracle Workspace Manager 00:01:01
Oracle Enterprise Manager 00:10:13
Oracle XDK 00:00:48
Oracle Text 00:00:58
Oracle XML Database 00:04:09
Oracle Database Java Packages 00:00:33
Oracle Multimedia 00:07:43
Oracle Expression Filter 00:00:18
Oracle Rule Manager 00:00:12
Gathering Statistics 00:04:53
Total Upgrade Time: 00:52:31
Component HH:MM:SS
Oracle Server 00:16:17
JServer JAVA Virtual Machine 00:05:19
Oracle Workspace Manager 00:01:01
Oracle Enterprise Manager 00:10:13
Oracle XDK 00:00:48
Oracle Text 00:00:58
Oracle XML Database 00:04:09
Oracle Database Java Packages 00:00:33
Oracle Multimedia 00:07:43
Oracle Expression Filter 00:00:18
Oracle Rule Manager 00:00:12
Gathering Statistics 00:04:53
Total Upgrade Time: 00:52:31
Component HH:MM:SS
Oracle Server 00:16:17
JServer JAVA Virtual Machine 00:05:19
Oracle XDK 00:00:48
Oracle Text 00:00:58
Oracle XML Database 00:04:09
Oracle Database Java Packages 00:00:33
Gathering Statistics 00:02:43
Total Upgrade Time: 00:30:47
Component HH:MM:SS
Oracle Server 00:16:17
JServer JAVA Virtual Machine 00:05:19
Oracle XDK 00:00:48
Oracle Text 00:00:58
Oracle XML Database 00:04:09
Oracle Database Java Packages 00:00:33
Gathering Statistics 00:02:43
Total Upgrade Time: 00:30:47
16
Regular methodology Database Upgrade Assistant (GUI)
• Features:– Graphically led upgrade– Lots of important checks– RAC aware - inclusion of all nodes
• for RAC (almost) a must !!!– Offline Backup and Restore possible– ASM upgrade (until 11.1)– Oracle XE upgrade– Patch upgrades
– Logs:• $ORACLE_HOME/cfgtoollogs/dbua
– Documentation:• Oracle® Database Upgrade Guide
http://download.oracle.com/docs/cd/E11882_01/server.112/e17222/toc.htm
19
Regular methodology Command Line Upgrade – Step-by-Step
Install and patch the new Oracle homeInstall and patch the new Oracle home
Take a complete onlinebackup of the current database
Take a complete onlinebackup of the current database
Download and run utlu112i.sqland follow its recommendations
Download and run utlu112i.sqland follow its recommendations
Start a new 11.2 listenerStart a new 11.2 listener
Copy password file andspfile to the new $OH/dbsCopy password file and
spfile to the new $OH/dbs
Switch to the new 11.2 env.Switch to the new 11.2 env.
SQL> startup upgradeSQL> startup upgrade
Check SYSAUX tablespaceCheck SYSAUX tablespace
SQL> @catupgrd.sqlSQL> @catupgrd.sql
SQL> @utlrp.sql SQL> @utlrp.sql
SQL> @utlu112s.sql SQL> @utlu112s.sql
Time zone changeTime zone change
DONE!DONE!
SQL> @catuppst.sql SQL> @catuppst.sql
SQL> @utluiobj.sql SQL> @utluiobj.sql
20
Regular methodology Command Line Upgrade – Step-by-Step
• Upgrade information script: utlu112i.sql– Runs in the environment of the source database– Checks all init parameters and displays warnings for obsolete and
deprecated parameters– Checks
• Components• Tablespace SYSAUX• Time zone file version• Cluster database
Info
21
Regular methodology Command Line Upgrade – Step-by-Step
• Get the current version of utlunmi.sql - download it now! • See note 884522.1
22
Upgrade Alternatives with IBM System zHow to minimize database downtime ?
• Minimal downtime methods– What does "minimal downtime" really mean?
• 12 hours?• 60 minutes?• 5 minutes?• Less?• No downtime at all?
23
upgradeupgrade
Database upgrade or migration ?Database upgrade or migration ?
Export/ImportExport/Import
CTAS, COPYCTAS, COPY
Transportable TablespacesTransportable Tablespaces
Transportable DatabaseTransportable Database
Oracle StreamsOracle Streams
A standard downtime A standard downtime
SQL ApplySQL Apply
Command Line InterfaceCommand Line Interface
SQL> @catupgrd
Oracle Golden GateOracle Golden Gate
Database upgrade or database migration?Alternative upgrade methodologies
migrationmigration
Specific downtime constraintSpecific downtime constraint
24
Alternative upgrade methodologiesOracle Streams
• Concept– Build up a copy of your database and upgrade it– Synchronize it with the source database– Downtime:
• Just reconnecting the clients– Cross platform– Cross version since Oracle 9iR2– Some effort necessary to set it up– Fallback possible– Logminer
• Datatype restrictions• Performance
• Documentation– How to:Oracle® Streams Concepts and Administration: Appendix D/E
http://download.oracle.com/docs/cd/E11882_01/server.112/e17069/ap_strmnt.htm#CIHJBIAA
25
Alternative upgrade methodologiesTransportable Database
• Characteristics, advantages and limitations– Feature since Oracle Database 10g Release 2– Cross-platform, but not cross-endianness!!!– With RMAN in an automated way
• Database must be switched to READ ONLY mode– Datafiles must be converted with RMAN into target format
• RMAN CONVERT DATABASE command• Either on the source or the target system – in most cases completes faster on
the target system– Not a real minimal downtime concept
• But very comfortable for migrations in between one Endianness group• Information
– Platform Migration using Transportable Database (RMAN): http://www.oracle.com/technetwork/database/features/availability/maa-wp-10gr2-platformmigrationtdb-131164.pdf
26© 2010 Oracle Corporation 26
Alternative upgrade methodologiesOracle GoldenGate
• Concept– Create a copy of your database with TTS or RMAN, etc..– GoldenGate CDG mechanism for synchronization
27
Alternative upgrade methodologies - 1/3Oracle GoldenGate
• Example: near-zero-downtime upgrade with Golden Gate
1. Provision a new linux guest2. Create ASM diskgroup3. Start Oracle GoldenGate Capture module
3
Oracle GoldenGateCapture
Linux guest
+Diskgroup
+ ASM
1Linux guest
4
4. Set up Clone database,5. Upgrade to 11.2.0.2 thru regular steps
5
+ ASM
2+Diskgroup
28
Alternative upgrade methodologies - 2/3Oracle GoldenGate
• Example: near-zero-downtime upgrade with Golden Gate
6. Enable a hipersocket or a vlan network between the linux guests 7. Start Oracle Golden Gate delivery module on target
Validate the migration ( e.g. Oracle Real Application Testing (RAT) – see in next slides )** Switchover ** (not depicted). Redirect Application to the new database
Oracle GoldenGate
Capture
Linux guest
+Diskgroup
+ ASM
Linux guest
+ ASM7
Oracle GoldenGate
Delivery
+Diskgroup
Hipersocketvlan
6
29
Alternative upgrade methodologies - 3/3Oracle GoldenGate
• Example: near-zero-downtime upgrade with Golden Gate
When the new Database is up and running8. Reverse Oracle GoldenGate’s Capture and Delivery processes…9. Once upgrade confirm and approved, stop Oracle GoldenGate and deprovision source
linux guest
Linux guest
+Diskgroup
+ ASM
Linux guest
+ ASM
+Diskgroup
Oracle GoldenGateCapture
8
Oracle GoldenGateDelivery
9
Hipersocketvlan
30
Alternative upgrade methodologiesLogical Standby and/or Transient Logical standby with Oracle Data Guard
• Concept: ( Logical Standby steps )– Build up a Physical Standby database– Convert the Physical Standby into a Logical Standby– Upgrade the Logical Standby database– Switchover – Standby will be production system now– Then: Upgrade of the former production database– Eventually: Switchover to the original roles
• Downtime less 2 minutes• Limitations
– No OS change possible– Logminer has known restrictions
• Concept ( Transient Locical standby added Value )– Build up a Physical Standby database– Convert the Physical Standby into a Logical Standby– Upgrade the Logical Standby database– Switchover – Standby will be production system now– Then: Flashback the former production database– Convert it into a Physical Standby– Upgrade just by log apply– Eventually: Switchover to the original setup
• Works pretty straight forward with Oracle Database 11g– Will work with Oracle Database 10g as well but requires more steps
– Find shell scripts in Note:949322.1
31
Alternative upgrade methodologiesLogical Standby with Oracle Data Guard
• Important documentation:– Patches, Links and Restrictions when upgrading from 10g:
Note: 300479.1– Note:748595.1 (how to create a logical standby from a physical)– White Paper (see OTN.oracle.com => High Availability => MAA):
Database Upgrades using SQL Applyhttp://www.oracle.com/technetwork/database/features/availability/maa-wp-10gr2-rollingupgradebestprac-1-132006.pdf Database Upgrades using a Transient Logical Standbyhttp://www.oracle.com/technetwork/database/features/availability/maa-wp-11g-transientlogicalrollingu-1-131927.pdf
– Database rolling Upgrade using Transient Logical Standbyhttp://www.oracle.com/technetwork/database/features/availability/maa-wp-
11g-transientlogicalrollingu-1-131927.pdf
32
<Insert Picture Here>
Agenda
• Introduction• Database upgrade path with IBM system z
– Regular methodology (GUI )– Command Line Upgrade– Alternative methodologies
• Upgrading Oracle Grid Foundations• Evaluate the Database upgrade• Appendix
33
Oracle Grid Foundationintroduction
Dat
abas
eC
lust
er
Luns/ECKD
Sto
rage
ASM (LVM)
Single
Instance
Oracle Clusterware
Services
VIP VIP
APPs
Single Instance
Luns/ECKD Luns/ECKD
RAC
Instance RAC
Instance RAC
Instance RAC
Instance
Silo Linux GuestSingle intance
Clustered Linux GuestsSingle Instance/Database
Clustered Linux GuestsRAC database
ASM (CLVM)ASM (CLVM)
ASM (CLVM)ASM (CLVM)
ASM (CLVM)ASM (CLVM)
ASM (CLVM)ASM (CLVM)
Single Instance
Oracle Clusterware
Services
VIP VIP
APPsRA
C
VM
/OS
Linux Guest
Linux GuestLinux Guest
Linux GuestLinux Guest
Linux GuestLinux Guest
Linux GuestLinux Guest
Linux GuestLinux Guest
Linux GuestLinux GuestA
rchi
tect
ure
laye
rs
34
Oracle Grid FoundationChanges in 11.2.0.2
Oracle ClusterwareOracle Clusterware
Oracle DatabaseOracle Database
Oracle ClusterwareOracle Clusterware
Oracle ASMOracle ASM
Grid Infrastructure
≥ 11.2.0.110.2.0.x
1.
2.
3.
$ORACLE_BASE$ORACLE_BASE
ORA_CRS_HOME
$ORACLE_HOME – for ASM
$ORACLE_HOME – for Database $ORACLE_HOME – for Database
same owner
Inventory, ADR etc.
GRID_HOME
Inventory, ADR etc.
Oracle DatabaseOracle Database
Oracle ASMOracle ASM
35
Oracle Database upgrade paths with IBM system z?Oracle Clusterware Upgrade 11g Release 2
Clusterware
R2R2
ASM:No rolling upgrade
ASM:No rolling upgrade
Clusterware
R2R2Clusterware ≥
10.2.0.3
Clusterware ≥10.2.0.3
R2R2
ASM R2R2
ASM 10.2.0.3ASM 10.2.0.3
Clusterware:Rolling
upgrade
Clusterware:Rolling
upgrade
Always upgrade Oracle Clusterware first.
R2R2
36
Oracle Database upgrade paths with IBM system zOracle Clusterware Upgrade 11g Release 2
• Always upgrade Oracle Clusterware first!!!• Upgrading to Oracle Clusterware 11g Release 2:
– Install new software into new Grid Infrastructure home– Out-of-place software upgrade– Grid Infrastructure home is owned by 'root‘– Make sure to check Note:948456.1 for known issues
37
<Insert Picture Here>
Agenda
• Introduction• Database upgrade path with IBM system z
– Regular methodology (GUI )– Command Line Upgrade– Alternative methodologies
• Upgrading Oracle Grid Foundations• Evaluate the Database upgrade• Appendix
38
Evaluate the Database upgrade Real Application Testing
• Goal:– Record and replay a real workload to see how the new system performs– Find regressions and changing plans before the upgrade
• Licensable database pack "Real Application Testing“Available since Oracle Database 11.1.0.6Available with patch set 10.2.0.4/5Available as single patch for 9.2.0.8 and 10.2.0.2/3
For patch numbers please see Note:560977.1
• Get started!http://www.oracle.com/us/products/database/options/real-application-
testing/index.html
39
Evaluate the Database upgrade Real Application Testing• Real Application Testing consists of:
– Database Replay • Package DBMS_WORKLOAD_CAPTURE
Capture works in 9.2.0.8 and 10.2.0.2/3/4/5 and 11.1.0.x and 11.2.0.x• Package DBMS_WORKLOAD_REPLAY
Replay works in 11.1.0.x and 11.2.0.x– SQL Performance Analyzer (SPA)
• Package DBMS_SQLPACollecting statements works in:
9.2.0.x and 10.1. 0.x with sql tracing10.2.0.2/3/4/5 and 11.1.0.x and 11.2.0.x by capturing from cursor cache
Evaluation and comparison works with:10.2.0.2/3/4/5 and 11.1.0.x and 11.2.0.x
– SQL Tuning Sets (STS)• Package DBMS_SQLTUNE
40© 2010 Oracle Corporation 40
• Replay actual production database workload in test environment• Identify, analyze and fix potential instabilities before making changes to
production
• Capture Workload in Production– Capture full production workload with real load, timing & concurrency
characteristics– Move the captured workload to test system
• Replay Workload in Test– Make the desired changes in test system– Replay workload with full production characteristics– Honor commit ordering
• Analyze & Report– Errors– Data divergence – Performance divergence
Database Replay
41
Test upgrade impact with existing workload - 1/3Database replay : step one : Capture
Linux guest
+Diskgroup
+ ASM
• Create a Database Reference : (backup your database or create a DB snaphot or use the same DB baseline used for your upgrade process )
• Capture load for interesting time period, e.g., peak workload, month-end processing, etc.
• All Database transaction captured in binary files • Independent of client protocol• System background and internal activity excluded
• Minimal overhead– Avoids function call when possible– Buffered I/O
• Can capture on 9i, 10g, and 11g and replay on 11g
File 1
File system
File 1File
1 File 1 File
n
Database replay Capture
42
Test upgrade impact with existing workload - 2/3Database replay : step one : Process Workload Files
• Create a linux guest. Copy all recording file to the new linux guest.
• Clone your source Database and upgrade it to 11gR2. (As described in the previous chapter)
• Processing transforms captured data into replayable format . (The workload recording is consumed by a special application called the replay driver, which sends requests to the RDBMS on which the workload is replayed)
• Once processed, workload can be replayed many times
• For RAC copy all capture files to single location for processing or use shared file system
Linux guest
+ ASM
+Diskgroup
File 1
File system
File 1File
1 File 1 File
n
File 1
File 2
File n
…
Metadata
Rep
lay
File
s
Database replayProcess Workload
Files
43
Test upgrade impact with existing workload - 3/3Database replay : step one : Process Workload Files
• Replays workload preserving timing, concurrency and dependencies of the capture system
• Replay Client is a special program that consumes processed workload and sends requests to the replay system
• Clients interpret captured calls into sequence of OCI calls and submit to database
• For high concurrency workloads, it may be necessary to start multiple clients
Linux guest
+ ASM
+Diskgroup
File 1
File 2
File n
…
Metadata
Rep
lay
File
sDatabase replayReplay workload
Replay Clients
44
Analysis & Reporting
• Error Divergence: For each call error divergence is reported–New: Error encountered during replay not seen during capture–Not Found: Error encountered during capture not seen during
replay–Mutated: Different error produced in replay than during capture
• Data Divergence–Replay: Number of rows returned by each call are compared and
divergences reported–User: Application level validation scripts
• Performance Reporting–Capture and Replay Report: Provides high-level performance
information–ADDM Report: Provides in-depth performance analysis–AWR, ASH Report: Facilitates comparative or skew analysis
45
Special thanks to ..
• Fabienne Lepetit– For her involvement in the creation of this presentation.
• Roy Swonger and Mike Dietrich– For their amazing documents about the database upgrade
document• http://blogs.oracle.com/UPGRADE/