SlideShare ist ein Scribd-Unternehmen logo
1 von 56
Downloaden Sie, um offline zu lesen
<Insert Picture Here>




Best Practices for Upgrade to Oracle Database 11g
Release 2
Morana Kobal Butković
Senior Sales Consultant
Oracle Hrvatska
Agenda

               Preparation


               Best Practices


               Performance Testing


               Demos




2010 Oracle Corporation              2
Lifetime Support Policy
                                                               today




                                                          R2                                 January 2015        January 2018



                                                                      August 2012              August 2015



                                                        July 2010 July 2011     July 2013
                            R2



                                        January 2009            January 2012

                                                                                              Sustaining Support
               Premier Support                 Extended Support
                                 July 2007 July 2008    July 2010
   R2
                                                                                                                                       t
2002

        2003

                2004

                        2005

                                 2006

                                        2007

                                                2008

                                                       2009

                                                               2010

                                                                       2011

                                                                               2012

                                                                                      2013

                                                                                                2014

                                                                                                       2015

                                                                                                              2016

                                                                                                                     2017

                                                                                                                                2018
  2010 Oracle Corporation                                                                                                   3
Upgrade to Oracle Database 11g

                  ≥ 7.3.4                              9.2.0.8
                             R2
                                       ≥ 9.2.0.4


                 ≥ 8.0.6




                                                                              R2
                ≥ 8.1.7.4


                                                       10.1.0.5


                 ≥ 9.0.1.4                           ≥ 10.2.0.2

                                  R2
                                       "Empty" arrows mean: no specific patch release required


2010 Oracle Corporation                                                          4
Different Ways To Upgrade
                                               UPGRADE
Export/Import

                                          N   Stay on same OS?    Y

CTAS, COPY
                                                                 N    Downtime >30min?


                              SQL Apply
                                                                             Y
   Oracle Streams
                                                           DBUA
   Transportable Tablespaces
                                                                                 CLI
                                                                             SQL> @catupgrd
   Transportable Database

   Oracle Golden Gate



    2010 Oracle Corporation                                                              5
Upgrade Length
• How long will it take to upgrade?
   • Usually between 30 and 90 minutes
   • 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 (upgrade from 9i)
         •   Number of objects in XDB
         •   To a lesser degree, if COMPATIBLE is increased:
               • Datafile headers are updated
               • Format of redo logs can change


2010 Oracle Corporation                                             6
Upgrade Length
• Speed up your upgrade performance by:
   • Truncating the auditing table SYS.AUD$
         SQL> truncate SYS.AUD$;


   • Creating dictionary statistics right before the upgrade
      • Oracle 9i:
              SQL> exec DBMS_STATS.GATHER_SCHEMA_STATS
                          ('SYS', options => 'GATHER',estimate_percent =>
                            DBMS_STATS.AUTO_SAMPLE_SIZE, method_opt => 'FOR
                            ALL COLUMNS SIZE AUTO', cascade => TRUE);


         • Oracle 10g/11g:

               SQL> exec DBMS_STATS.GATHER_DICTIONARY_STATS;



2010 Oracle Corporation                                                   7
When to Choose Command-Line
• Can afford 30-90 minutes average downtime
• Manual command-line interface is preferred over GUI
• Existing database is at least 9.2.0.4 if upgrading to 11g
  and 9.2.0.8 if upgrading to 11g R2
• Migrating to a new hardware platform with same OS

• Consideration
    •     Cannot upgrade to a system with a different operating system
          architecture
    •     More manual steps required
    •     Potential for errors due to typos, missed details
    •     Upgrade scripts can be run again and again


 2010 Oracle Corporation                                            8
Command Line Upgrade
• Step-by-step:
         1. Complete online backup of the database
         2. Install 11g Oracle software and apply patch set, PSU etc.
         3. Analyze the DB using utlu112i.sql and follow all
            requirements given by the script
         4. Create a new 11g listener with NETCA
         5. Switch to the new environment, startup the DB (startup
            upgrade) and create the SYSAUX tablespace (only if source
            db is an Oracle 9i db)
         6. Run upgrade script catupgrd.sql
         7. Recompile with utlrp.sql - compare with utluiobj.sql
         8. Run catuppst.sql if you are upgrading from ≥10g for AWR
         9. Check the post upgrade status: utlu112s.sql



 2010 Oracle Corporation                                        9
Upgrade Mode

SQL> STARTUP UPGRADE;

          ALTER SYSTEM SET   _system_trig_enabled=FALSE SCOPE=MEMORY;
          Autotune of undo   retention is turned off.
          ALTER SYSTEM SET   _undo_autotune=FALSE SCOPE=MEMORY;
          ALTER SYSTEM SET   undo_retention=900 SCOPE=MEMORY;
          ALTER SYSTEM SET   aq_tm_processes=0 SCOPE=MEMORY;
          ALTER SYSTEM SET   enable_ddl_logging=FALSE SCOPE=MEMORY;
          Resource Manager   disabled during database migration: plan '' not set
          ALTER SYSTEM SET   resource_manager_plan='' SCOPE=MEMORY;
          ALTER SYSTEM SET   recyclebin=‘OFF’ DEFERRED SCOPE=MEMORY;
          Resource Manager   disabled during database migrationTaken from an example alert.log



      •    Supresses unnecessary error messages like
           ORA-00942: table or view does not exist -
           thus logfiles will be easier to read and check



2010 Oracle Corporation                                                                 10
When to Choose the DBUA
• Can afford 30 – 90 minutes average downtime
• Operating system remains the same
• GUI is preferred over manual command line interface
   • Automatically performs useful pre-upgrade checks
   • Less error-prone / less manual effort
• Existing database is at least 9.2.0.4 if upgrading to 11g or
  9.2.0.8 for 11g R2
• Note: especially useful for RAC and ASM installations*

• Consideration:
   • Source and target Oracle Homes must be on the same system
   • Cannot be re-run if an error is encountered mid-upgrade


2010 Oracle Corporation                                     11
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 to SE & EE
   • Patch upgrades
   • Best Practice: Before you start DBUA
      • Run $OH_11g/rdbms/admin/utlu112i.sql in your current
        environment
   • Logs:
         • $ORACLE_HOME/cfgtoollogs/dbua

   • Documented in Chapter 3 of the Oracle® Database Upgrade Guide

2010 Oracle Corporation                                         12
Database Upgrade Assistant (GUI)




2010 Oracle Corporation             13
Database Upgrade Assistant (GUI)




2010 Oracle Corporation             14
Database Upgrade Assistant (GUI)




2010 Oracle Corporation             15
Database Upgrade Assistant (GUI)




2010 Oracle Corporation             16
Agenda

               Preparation


               Best Practices


               Performance Testing


               Upgrade Summary




2010 Oracle Corporation              17
Best Practice


• Sanity operations: important checks




2010 Oracle Corporation                 18
Recycle bin
• If upgrading from 10g or 11g, purge the recycle bin before
  the upgrade.
     SQL> purge DBA_RECYCLEBIN;




2010 Oracle Corporation                                19
Timezone Patches
• Why DST timezone patches? (DST: Daylight Savings Time)
    • Since 2007 DST definitions and timezone names have been
      changed several times
    • Timezone versions by release:
           • Oracle 9i:           TZ V1
           • Oracle 10.1:         TZ V2
           • Oracle 10.2.0.1/2:   TZ V2
           • Oracle 10.2.0.3:     TZ V3
           • Oracle 10.2.0.4:     TZ V4
           • Oracle 11.1:         TZ V4
               • Source release needs to be patched to TZ V4 –
                 otherwise no upgrade will be possible
           • Oracle 11.2:         TZ V11
               • Source release does not have to be patched.
                 Timezone conversion will be done in 11.2



   2010 Oracle Corporation                                       20
Timezone Patches - 11g Release 2                                   R2

• Upgrade to Oracle Database 11g Release 2:
   • New 11.2-$OH has timezone V11
   • No need to patch the source $OH
   • Database only needs to be adjusted if you are using the
     datatype TIMESTAMP WITH TIMEZONE
         • Conversion done after the upgrade
         • See Note 944122.1
         • Package DBMS_DST
               •   DBMS_DST.FIND_AFFECTED_TABLES
               •   DBMS_DST.BEGIN_UPGRADE
               •   DBMS_DST.UPGRADE_DATABASE
               •   DBMS_DST.END_UPGRADE




2010 Oracle Corporation                                        21
Best Practice

• Always run the pre-upgrade script:
   • Upgrade to Oracle Database 11g : utlu111i.sql
   • Upgrade to Oracle Database 11.2 : utlu112i.sql




2010 Oracle Corporation                               22
Pre-Upgrade Check
• Run utlu112i.sql in your current environment
   Oracle Database 11.2 Pre-Upgrade Information Tool   09-21-2009 22:33:20
   **********************************************************************
   Database:
   **********************************************************************
   --> name:          ORCL
   --> version:       10.2.0.3.0
   --> compatible:    10.2.0.3.0
   --> blocksize:     8192
   --> platform:      Linux IA (32-bit)
   --> timezone file: V4
   [..]
   **********************************************************************
   Update Parameters: [Update Oracle Database 11.2 init.ora or spfile]
   **********************************************************************
   WARNING: --> "java_pool_size" needs to be increased to at least 64 MB
   [..]
   **********************************************************************
   Miscellaneous Warnings
   **********************************************************************
   WARNING: --> Database is using a timezone file older than version 11.
   .... After the release migration, it is recommended that DBMS_DST package
   .... be used to upgrade the 10.2.0.3.0 database timezone version
   .... to the latest version which comes with the new release.



2010 Oracle Corporation                                                     23
Pre-Upgrade Check
• Get the current version of utlu1nmi.sql
   • Download it
   • Note:884522.1




2010 Oracle Corporation                     24
Best Practice


• After upgrade leave COMPATIBLE at the
  original value for a week before changing to
  11.1 or 11.2.




2010 Oracle Corporation                          25
Parameter COMPATIBLE
• COMPATIBLE has to be at least 10.1.0 for an 11g database
• No way back once ≥11.1.0 has been enabled
      • Supported release downgrade to 10.1.0.5, ≥10.2.0.2, ≥11.1.0.6
      • No ALTER DATABASE RESET COMPATIBILITY command anymore



                           COMPATIBLE = 10.0/1/2.0




                             COMPATIBLE = 11.0.0




 2010 Oracle Corporation                                       26
Parameter COMPATIBLE
• DBUA raises COMPATIBLE only for 9i databases
• To enable new features after the upgrade:
      • 11.1:                     SQL> alter system
                           set compatible='11.1.0' scope=spfile;


      • 11.2 :                    SQL> alter system
                           set compatible='11.2.0' scope=spfile;



      • Afterwards: restart the database
         • New features will be enabled
         • Datafile headers will be adjusted
         • Redologfiles formats will be adjusted during first access



 2010 Oracle Corporation                                               27
Best Practice


• Do you have a fallback strategy? ...




2010 Oracle Corporation                  28
Fallback Strategies
• Always:
   • Create a valid and complete online backup with RMAN
   • Test the restore and the recovery at least once!!!
• Downgrade Options:
   • Back to Oracle Database 10g/11g
      • Use the downgrade scripts catdwgrd.sql and catrelod.sql
         • See the Database Upgrade Guide, Chapter 6 and
           Note:443890.1
      • Datapump with VERSION parameter (COMPATIBLE can be
        raised)
   • Back to Oracle Database 9i
      • Export/import
      • Use 9i exp to extract the data and 9i imp to import the data back
         • Note:158845.1

2010 Oracle Corporation                                          29
Fallback Strategy: catdwgrd.sql
•         Downgrade with catdwgrd.sgl
            •      Note:443890.1
                    •         Downgrade to the release you've upgraded from
                              • 10.1.0.5
                              • 10.2.0.2/3/4
                              • 11.1.0.6/7
                    •         Only possible if COMPATIBLE hasn't been raised!!!
                              •   Please note:
                                  A downgrade will only be possible to the release you've upgraded from - so if a
                                  patch set has been applied always apply it before the upgrade starts - otherwise
                                  you'll only be able to downgrade to the release you've patched




    2010 Oracle Corporation                                                                             30
Fallback Strategy: catdwgrd.sql
•         Downgrade with catdwgrd.sql to 10g
           •       Task in 11g environment:
                     SQL>          SPOOL /tmp/downgrade.log
                     SQL>          STARTUP DOWNGRADE
                     SQL>          @catdwgrd.sql
                     SQL>          SPOOL OFF
           •       Switch to your pre-upgrade 10g environment:

                    SQL> STARTUP UPGRADE
                    SQL> SPOOL /tmp/reload.log
                    SQL> @catrelod.sql
                    -- The catrelod.sql script reloads the appropriate version of
                    -- all of the database components in the downgraded database.
                    SQL> SPOOL OFF
                    •         Please note: additional steps are required if EM repository resides in the database -
                              please see chapter 6 Downgrading a Database in the Oracle 11g Upgrade Guide


    2010 Oracle Corporation                                                                               31
Best Practice


• After the upgrade ...




2010 Oracle Corporation   32
Post Upgrade
• Create system statistics during a regular workload period -
  otherwise non-appropriate values for the CBO will be used:
  SQL> exec DBMS_STATS.GATHER_SYSTEM_STATS('start');
  ... -- some time delay while the database is under a typical workload execute
  SQL> exec DBMS_STATS.GATHER_SYSTEM_STATS('stop');

  SQL> select pname NAME, pval1 VALUE, pval2 INFO
       from aux_stats$;

  NAME                      VALUE INFO
  -------------------- ---------- ------------------------------
  STATUS                          COMPLETED
  DSTART                          04-03-2009 12:30
  DSTOP                           05-03-2009 12:30
  FLAGS                         1
  CPUSPEEDNW              1392.39
  IOSEEKTIM                 8.405
  IOTFRSPEED           255945.605
  ...



2010 Oracle Corporation                                                           33
Post Upgrade
• Create fixed table (X$) statistics
   • Directly after catupgrd.sql has been completed
         • This will speed up the job processing for recompilation with
           utlrp.sql DBMS_STATS.GATHER_FIXED_OBJECTS_STATS;
            SQL> exec



   • Again: after a few days regular database workload




2010 Oracle Corporation                                              34
Agenda

               Preparation


               Best Practices


               Performance Testing


               Demos




2010 Oracle Corporation              35
Prevent execution plan changes

• Classical approach:
   • Rule Based Optimizer (RBO desupport since Oracle 10g - Note:189702.1)
   • Hints
   • Stored Outlines
   • Rewriting SQL statements
   • optimizer_features_enabled=n.n.n
   • Change specific optimizer parameters
   • Import and lock object and systems statistics
• Modern, efficient and better resource consumption:
   • SQL Plan Management




2010 Oracle Corporation                                               36
With SQL Plan Management
•   SQL statement is parsed for the first time and a plan is generated
•   Check the log to see if this is a repeatable SQL statement
•   Add SQL statement signature to the log and execute it
•   Plan performance is still “verified by execution”


                                      GB

                              Parse
                                      HJ
                                                Execute                  Plan Acceptable

                                           HJ




     Statement log




    2010 Oracle Corporation                                                          37
With SQL Plan Management
•   SQL statement is parsed again and a plan is generated
•   Check log to see if this is a repeatable SQL statement
•   Create a Plan history and use current plan as SQL plan baseline
•   Plan performance is “verified by execution”


                                       GB

                               Parse             Execute              Plan Acceptable
                                       HJ



                                            HJ




      Statement log
        Plan history

      Plan baseline
           GB

            HJ

                 HJ




     2010 Oracle Corporation                                                      38
With SQL Plan Management
• Something changes in the environment
• SQL statement is parsed again and a new plan is generated
• New plan is not the same as the baseline – new plan is not executed but marked for
  verification


                                     GB

                             Parse
                                     NL


                                          NL




         Statement log
              Plan history
   GB    Plan baseline
    NL
                GB
         NL
                 HJ

                      HJ




   2010 Oracle Corporation                                                      39
With SQL Plan Management
• Something changes in the environment
• SQL statement is parsed again and a new plan is generated
• New plan is not the same as the baseline – new plan is not executed but marked for
  verification
• Execute known plan baseline - plan performance is “verify by history”


                                     GB

                             Parse             Execute
                                     HJ                             Plan Acceptable

                                          HJ




         Statement log
              Plan history
   GB    Plan baseline
    NL
                GB
         NL
                 HJ

                      HJ




   2010 Oracle Corporation                                                      40
Verifying the new plan
 • Non-baseline plans will not be used until verified
 • DBA can verify plan at any time
     Statement log
                                                                                                           Optimizer
          Plan history
                                                                                                           checks if new
GB   Plan baseline                                                     Invoke or schedule                  plan is as good
NL
            GB                                               DBA       verification                        as or better
     NL                                                                                                    than old plan
             HJ

                  HJ



                                               Statement log
                                                Plan
                                                history
          Plans which don’t           GB
                                                Plan baseline
          perform as good as              NL
                                                             GB
                                                   GB
          the original plan          NL    NL
                                                             NL
                                                   HJ
          stay in the plan                                             Plans which perform as good as or
                                                                  NL
          history and are                               HJ             better than original plan are added to
          marked                                                       the plan baseline
          unaccepted


           2010 Oracle Corporation                                                                              41
SQL Plan Management – the details

• Controlled by two init.ora parameter
   • optimizer_capture_sql_plan_baselines
      • Controls auto-capture of SQL plan baselines for repeatable stmts
      • Set to FALSE by default in 11gR1
   • optimizer_use_sql_plan_baselines
      • Controls the use of existing SQL plan baselines by the optimizer
      • Set to TRUE by default in 11gR1
• Monitoring SPM
   • Dictionary view DBA_SQL_PLAN_BASELINE
   • Via the SQL Plan Control in EM DBControl
• Managing SPM
   • PL/SQL package DBMS_SPM or via SQL Plan Control in EM DBControl
   • Requires the ‘administer sql management object’ privilege


    2010 Oracle Corporation                                                42
SPM Plan Capture – Bulk
• From SQL Tuning Set (STS)
    • Captures plan details for a (critical) set of SQL Statement in STS
    • Load these plans into SPM as baseline plans
• From Stored Outlines
    • Migrate previously created Stored Outlines to SQL plan baselines
• From Cursor Cache
    • Load plans from the cursor cache into SPM as baseline plans
       • Filters can be specified (SQL_ID, Module name, schema)
• From staging table
    • SQL plan baselines can be captured on another system
    • Exported via a table (similar to statistics) and imported locally
    • Plan are “unpacked” from the table and loaded into SPM




2010 Oracle Corporation                                               43
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.6
       Available with patch set 10.2.0.4
       Available as single patch for 9.2.0.8 and 10.2.0.2/3
          For patch numbers please see Note:560977.1




2010 Oracle Corporation                                       45
Oracle Real Application Testing

Database Replay                                       SQL Performance Analyzer
• Replay actual production database                   • Enables identification of SQL performance
  workload in test environment                          regressions before end-users can be
• Identify, analyze and fix potential                   impacted
  instabilities before making changes to
  production                                          • SPA can help with any change that impacts
                                                        SQL execution plan
• Capture Workload in Production                          •   DB upgrades
     •   Capture full production workload with real       •   Optimizer statistics refresh
         load, timing & concurrency characteristics       •   New indexes, Materialized Views, Partitions,
     •   Move the captured workload to test system            etc.
• Replay Workload in Test                             • Automates SQL performance tracking of
     •   Make the desired changes in test system        hundreds of thousands of SQL statements
     •   Replay workload with full production
         characteristics
                                                        – impossible to do manually
     •   Honor commit ordering                        • Captures SQL workload with low overhead
• Analyze & Report                                    • Integrated with SQL Tuning Advisor and
     •   Errors                                         SQL Plan Baselines for regression
     •   Data divergence                                remediation
     •   Performance divergence



 2010 Oracle Corporation                                                                                 46
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 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_SQLPA
               Collecting statements works in:
                    9.2.0.x and 10.1. 0.x with sql tracing
                    10.2.0.2/3/4 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 and 11.1.0.x and 11.2.0.x

    • SQL Tuning Sets (STS)
          • Package DBMS_SQLTUNE




 2010 Oracle Corporation                                                                    47
Testing Pre-Upgrade Steps

• Testing on the new Database Release
    •   Use hardware identical to product
    •   Use a copy of the ‘live’ data from product
    •   Ensure all important queries and reports are tested
    •   Capture all necessary performance information during tests
    •   Ensure comparable test results are available for your current
        Oracle release
• Capture current 10g execution plans
    •   Using SQL Performance Analyzer
    •   Using Stored Outlines
    •   Using SQL Tuning Sets
    •   Using exported SQL plan baselines



2010 Oracle Corporation                                             48
Testing on the new database release
 Removing old Optimizer hints
• If there are hints for every aspect of the execution plan
  the plan won’t change between releases (Stored Outline)
• Partial hints that worked in one release may not work in
  another
• Test all SQL stmts with hints on the new release using
  the parameter _optimizer_ignore_hints=TRUE
    • Chance are the SQL stmts will perform better without any hints




2010 Oracle Corporation                                          49
Capturing Plans using SQL Tuning Set
                                     Database Upgrade
                                                      Oracle Database 11g
                                    Plan History
                                                            3. Bulk load plans into
           GB                          GB
                                                            SPM
            HJ                         HJ

                 HJ                         HJ


       No plan
       regressions

     Oracle Database 11g

                                                                          2. Upgrade
                                            DBA                           to 11g


                          GB
            Well tuned
                          HJ
            plan
                               HJ    1. Create STS for
                                     critical statements
                                                           Oracle Database 10gR2



2010 Oracle Corporation                                                               50
Capturing Plans using an 11g test env

   Production Database 11g
                                Plan History       5. Unpack baselines
    GB                                             into SPM
     HJ                            GB

          HJ                        HJ
                                         HJ
     No plan
     regressions
                                                                4. Import staging
                                                                table
                                                     DBA
                                                              3. Export staging
                                  Plan History
                                                              table
   GB                                 GB

   HJ                                    HJ

        HJ     1. Create                      HJ    2. Create staging
Well tuned
               baselines from                       table & pack         Baseline
plan           tuned stmts                          baselines into it    plans
                                                                         staging table

   Development / Test Database 11g



2010 Oracle Corporation                                                                  51
Capturing Plans using SPA


                    Before
                                O_F_E=10                Oracle Database 11g
                    change
                                                                               Plan History

                                                                                      GB         GB
                                                                                      HJ         HJ

                                                                                       HJ         HJ
                                                          Regressing
                                                          statements                          No plan
                                                                                              regressions
                    After
                                O_F_E=11
                    change

                                           optimizer_features_enable




                                                          GB     GB    GB
                                                          HJ     HJ    HJ

                                                           HJ     HJ    HJ    Well
SQL                                                                           tuned
Performance                                                                   plans

Analyzer                          Oracle Database 10g




      2010 Oracle Corporation                                                                      52
SQL Plan Management - general
      upgrade strategy
      1. Set OFE to                     Oracle Database 11g
                       O_F_E=10
      previous release
                                                                       Plan History

   2. Run all SQL in the                    3. Auto Capture 10g
                                                                          GB            GB
   Application and auto                     plans                 GB
                                                                           HJ            HJ
   load SQL Plan Baselines                                        HJ
                                                                            HJ            HJ
   with 10g plan                                                  NL
                                                                                      No plan
                                            5. 11g plan queue                         regressions
        4. After
                        O_F_E=11            for verification
        plans are
        loaded
        change                 optimizer_features_enable
        OFE to 11



• Seeding the SQL Plan Baselines with 10g plans No plan change on upgrade
• After all SQL Plan Baselines are populated switch Optimizer_Features_Enable to 11g
    • new 11g plans will only be used after they have been verified



    2010 Oracle Corporation                                                                54
What to do with statistics after
 upgrade
• Use last known 10g stats until system is stable
• Switch on incremental statistics for partitioned tables
    • DBMS_STATS.SET_GLOBAL_PREFS('INCREMENTAL','TRUE');

• Temporarily switch on pending statistics
    • DBMS_STATS.SET_GLOBAL_PREFS(‘PENDING’,’TRUE’);

• Gather 11g statistics
    • DBMS_STATS.GATHER_TABLE_STATS(‘sh’,’SALES’);

• Test your critical SQL statement with the pending stats
    • Alter session set optimizer_use_pending_statistics=TRUE;

• When proven publish the 11g statistics
    • DBMS_STATS.PUBLISH_PENDING_STATS();




2010 Oracle Corporation                                      55
Agenda

               Preparation


               Best Practices


               External References


               Demos




2010 Oracle Corporation              56
Demo SQL Performance Analyzer
        & DB Replay for Upgrade 10.2 ->11g




2010 Oracle Corporation                  57
2010 Oracle Corporation   58

Weitere ähnliche Inhalte

Was ist angesagt?

Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010
Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010
Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010Arun Gupta
 
Java Summit Chennai: Java EE 7
Java Summit Chennai: Java EE 7Java Summit Chennai: Java EE 7
Java Summit Chennai: Java EE 7Arun Gupta
 
Developer and Fusion Middleware 2 _ Scott Robertson _ SOA, portals and entepr...
Developer and Fusion Middleware 2 _ Scott Robertson _ SOA, portals and entepr...Developer and Fusion Middleware 2 _ Scott Robertson _ SOA, portals and entepr...
Developer and Fusion Middleware 2 _ Scott Robertson _ SOA, portals and entepr...InSync2011
 
The Java EE 7 Platform: Developing for the Cloud
The Java EE 7 Platform: Developing for the CloudThe Java EE 7 Platform: Developing for the Cloud
The Java EE 7 Platform: Developing for the CloudArun Gupta
 
04.egovFrame Runtime Environment Workshop
04.egovFrame Runtime Environment Workshop04.egovFrame Runtime Environment Workshop
04.egovFrame Runtime Environment WorkshopChuong Nguyen
 
Professional sql server 2005 clr programming
Professional sql server 2005 clr programmingProfessional sql server 2005 clr programming
Professional sql server 2005 clr programmingjoeljie
 
Developer & Fusion Middleware 2 _ Scott Robertson _ SOA, Portals and Enterpri...
Developer & Fusion Middleware 2 _ Scott Robertson _ SOA, Portals and Enterpri...Developer & Fusion Middleware 2 _ Scott Robertson _ SOA, Portals and Enterpri...
Developer & Fusion Middleware 2 _ Scott Robertson _ SOA, Portals and Enterpri...InSync2011
 
Java EE Technical Keynote at JavaOne Latin America 2011
Java EE Technical Keynote at JavaOne Latin America 2011Java EE Technical Keynote at JavaOne Latin America 2011
Java EE Technical Keynote at JavaOne Latin America 2011Arun Gupta
 

Was ist angesagt? (9)

Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010
Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010
Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010
 
Java Summit Chennai: Java EE 7
Java Summit Chennai: Java EE 7Java Summit Chennai: Java EE 7
Java Summit Chennai: Java EE 7
 
Developer and Fusion Middleware 2 _ Scott Robertson _ SOA, portals and entepr...
Developer and Fusion Middleware 2 _ Scott Robertson _ SOA, portals and entepr...Developer and Fusion Middleware 2 _ Scott Robertson _ SOA, portals and entepr...
Developer and Fusion Middleware 2 _ Scott Robertson _ SOA, portals and entepr...
 
Java EE 6 and GlassFish portfolio
Java EE 6 and GlassFish portfolioJava EE 6 and GlassFish portfolio
Java EE 6 and GlassFish portfolio
 
The Java EE 7 Platform: Developing for the Cloud
The Java EE 7 Platform: Developing for the CloudThe Java EE 7 Platform: Developing for the Cloud
The Java EE 7 Platform: Developing for the Cloud
 
04.egovFrame Runtime Environment Workshop
04.egovFrame Runtime Environment Workshop04.egovFrame Runtime Environment Workshop
04.egovFrame Runtime Environment Workshop
 
Professional sql server 2005 clr programming
Professional sql server 2005 clr programmingProfessional sql server 2005 clr programming
Professional sql server 2005 clr programming
 
Developer & Fusion Middleware 2 _ Scott Robertson _ SOA, Portals and Enterpri...
Developer & Fusion Middleware 2 _ Scott Robertson _ SOA, Portals and Enterpri...Developer & Fusion Middleware 2 _ Scott Robertson _ SOA, Portals and Enterpri...
Developer & Fusion Middleware 2 _ Scott Robertson _ SOA, Portals and Enterpri...
 
Java EE Technical Keynote at JavaOne Latin America 2011
Java EE Technical Keynote at JavaOne Latin America 2011Java EE Technical Keynote at JavaOne Latin America 2011
Java EE Technical Keynote at JavaOne Latin America 2011
 

Andere mochten auch

Db security vaba information age 2010 v6.ppt [compatibility m
Db security vaba information age 2010 v6.ppt [compatibility mDb security vaba information age 2010 v6.ppt [compatibility m
Db security vaba information age 2010 v6.ppt [compatibility mOracle Hrvatska
 
Oracle Services Day 12.05.2010. Making the most of Oracle Services
Oracle Services Day 12.05.2010. Making the most of Oracle ServicesOracle Services Day 12.05.2010. Making the most of Oracle Services
Oracle Services Day 12.05.2010. Making the most of Oracle ServicesOracle Hrvatska
 
Oracle services day 12.05.2010. pbz oracle iskustva 2010
Oracle services day 12.05.2010. pbz oracle iskustva  2010Oracle services day 12.05.2010. pbz oracle iskustva  2010
Oracle services day 12.05.2010. pbz oracle iskustva 2010Oracle Hrvatska
 
Oracle Services Day 12.05.2010. Customer day services strategy keynote henrik...
Oracle Services Day 12.05.2010. Customer day services strategy keynote henrik...Oracle Services Day 12.05.2010. Customer day services strategy keynote henrik...
Oracle Services Day 12.05.2010. Customer day services strategy keynote henrik...Oracle Hrvatska
 
Oracle services day 12.05.2010. marin services
Oracle services day 12.05.2010. marin servicesOracle services day 12.05.2010. marin services
Oracle services day 12.05.2010. marin servicesOracle Hrvatska
 
Oracle services day 12.05.2010. customer day services strategy ou.
Oracle services day 12.05.2010. customer day services strategy ou.Oracle services day 12.05.2010. customer day services strategy ou.
Oracle services day 12.05.2010. customer day services strategy ou.Oracle Hrvatska
 
Presentation upgrade, migrate &amp; consolidate to oracle database 12c &amp...
Presentation   upgrade, migrate &amp; consolidate to oracle database 12c &amp...Presentation   upgrade, migrate &amp; consolidate to oracle database 12c &amp...
Presentation upgrade, migrate &amp; consolidate to oracle database 12c &amp...solarisyougood
 
السمات الشخصية للمعلم والطالب والمهارات المتطلبة في بيئة
السمات الشخصية للمعلم والطالب والمهارات المتطلبة في بيئةالسمات الشخصية للمعلم والطالب والمهارات المتطلبة في بيئة
السمات الشخصية للمعلم والطالب والمهارات المتطلبة في بيئةmohamed
 
AES, medir para mejorar (Estrategia & Negocios, Agosto 2016)
AES, medir para mejorar (Estrategia & Negocios, Agosto 2016)AES, medir para mejorar (Estrategia & Negocios, Agosto 2016)
AES, medir para mejorar (Estrategia & Negocios, Agosto 2016)AES El Salvador
 
Adam michael digestive
Adam michael digestiveAdam michael digestive
Adam michael digestivejaccalder
 
Operations Research In MCH Programs: Measurement Challenges
Operations Research In MCH Programs: Measurement ChallengesOperations Research In MCH Programs: Measurement Challenges
Operations Research In MCH Programs: Measurement Challengesjehill3
 
Seminar sehari
Seminar sehariSeminar sehari
Seminar seharisibiyanto
 
Space Camp - Barcelona - English
Space Camp - Barcelona - EnglishSpace Camp - Barcelona - English
Space Camp - Barcelona - EnglishXavier Alabart
 
Social Media - tips en de basis
Social Media - tips en de basisSocial Media - tips en de basis
Social Media - tips en de basisWieger Waardenburg
 
Presentatie Google | The company
Presentatie Google | The companyPresentatie Google | The company
Presentatie Google | The companyWieger Waardenburg
 

Andere mochten auch (20)

Db security vaba information age 2010 v6.ppt [compatibility m
Db security vaba information age 2010 v6.ppt [compatibility mDb security vaba information age 2010 v6.ppt [compatibility m
Db security vaba information age 2010 v6.ppt [compatibility m
 
Oracle Services Day 12.05.2010. Making the most of Oracle Services
Oracle Services Day 12.05.2010. Making the most of Oracle ServicesOracle Services Day 12.05.2010. Making the most of Oracle Services
Oracle Services Day 12.05.2010. Making the most of Oracle Services
 
Oracle services day 12.05.2010. pbz oracle iskustva 2010
Oracle services day 12.05.2010. pbz oracle iskustva  2010Oracle services day 12.05.2010. pbz oracle iskustva  2010
Oracle services day 12.05.2010. pbz oracle iskustva 2010
 
Oracle Services Day 12.05.2010. Customer day services strategy keynote henrik...
Oracle Services Day 12.05.2010. Customer day services strategy keynote henrik...Oracle Services Day 12.05.2010. Customer day services strategy keynote henrik...
Oracle Services Day 12.05.2010. Customer day services strategy keynote henrik...
 
Oracle services day 12.05.2010. marin services
Oracle services day 12.05.2010. marin servicesOracle services day 12.05.2010. marin services
Oracle services day 12.05.2010. marin services
 
Oracle services day 12.05.2010. customer day services strategy ou.
Oracle services day 12.05.2010. customer day services strategy ou.Oracle services day 12.05.2010. customer day services strategy ou.
Oracle services day 12.05.2010. customer day services strategy ou.
 
Presentation upgrade, migrate &amp; consolidate to oracle database 12c &amp...
Presentation   upgrade, migrate &amp; consolidate to oracle database 12c &amp...Presentation   upgrade, migrate &amp; consolidate to oracle database 12c &amp...
Presentation upgrade, migrate &amp; consolidate to oracle database 12c &amp...
 
السمات الشخصية للمعلم والطالب والمهارات المتطلبة في بيئة
السمات الشخصية للمعلم والطالب والمهارات المتطلبة في بيئةالسمات الشخصية للمعلم والطالب والمهارات المتطلبة في بيئة
السمات الشخصية للمعلم والطالب والمهارات المتطلبة في بيئة
 
AES, medir para mejorar (Estrategia & Negocios, Agosto 2016)
AES, medir para mejorar (Estrategia & Negocios, Agosto 2016)AES, medir para mejorar (Estrategia & Negocios, Agosto 2016)
AES, medir para mejorar (Estrategia & Negocios, Agosto 2016)
 
Adam michael digestive
Adam michael digestiveAdam michael digestive
Adam michael digestive
 
f
ff
f
 
Como abrir uma empresa no brasil pela amcham
Como abrir uma empresa no brasil pela amcham Como abrir uma empresa no brasil pela amcham
Como abrir uma empresa no brasil pela amcham
 
Operations Research In MCH Programs: Measurement Challenges
Operations Research In MCH Programs: Measurement ChallengesOperations Research In MCH Programs: Measurement Challenges
Operations Research In MCH Programs: Measurement Challenges
 
Seminar sehari
Seminar sehariSeminar sehari
Seminar sehari
 
Space Camp - Barcelona - English
Space Camp - Barcelona - EnglishSpace Camp - Barcelona - English
Space Camp - Barcelona - English
 
Description
DescriptionDescription
Description
 
Agenda learn ponal
Agenda learn ponalAgenda learn ponal
Agenda learn ponal
 
Social Media - tips en de basis
Social Media - tips en de basisSocial Media - tips en de basis
Social Media - tips en de basis
 
Presentatie Google | The company
Presentatie Google | The companyPresentatie Google | The company
Presentatie Google | The company
 
g
gg
g
 

Ähnlich wie Oracle technology day 19.5.2010. best practices for upgrade to 11g r2

Oracle Database 11g Upgrade Cleveland
Oracle Database 11g Upgrade ClevelandOracle Database 11g Upgrade Cleveland
Oracle Database 11g Upgrade ClevelandMark Rabne
 
Oracle Upgrade11gr1 Workshop1
Oracle Upgrade11gr1 Workshop1Oracle Upgrade11gr1 Workshop1
Oracle Upgrade11gr1 Workshop1Hector Martinez
 
Insync 10 session maximize your jd edwards enterprise one investment with t...
Insync 10 session   maximize your jd edwards enterprise one investment with t...Insync 10 session   maximize your jd edwards enterprise one investment with t...
Insync 10 session maximize your jd edwards enterprise one investment with t...InSync Conference
 
Keat Resume 2012b
Keat Resume 2012bKeat Resume 2012b
Keat Resume 2012bmkeating1
 
Running SQL 2005? It’s time to migrate to SQL 2014!
Running SQL 2005? It’s time to migrate to SQL 2014!Running SQL 2005? It’s time to migrate to SQL 2014!
Running SQL 2005? It’s time to migrate to SQL 2014!Dell World
 
2. oracle days sebastiaan vingerhoed_buckarest_november3rd
2. oracle days sebastiaan vingerhoed_buckarest_november3rd2. oracle days sebastiaan vingerhoed_buckarest_november3rd
2. oracle days sebastiaan vingerhoed_buckarest_november3rdDoina Draganescu
 
An overview of Microsoft data mining technology
An overview of Microsoft data mining technologyAn overview of Microsoft data mining technology
An overview of Microsoft data mining technologyMark Tabladillo
 
An overview of microsoft data mining technology
An overview of microsoft data mining technologyAn overview of microsoft data mining technology
An overview of microsoft data mining technologyMark Tabladillo
 
SQL Server 2012 : réussir la migration - Stéphane Haby - Antonio De Santo - d...
SQL Server 2012 : réussir la migration - Stéphane Haby - Antonio De Santo - d...SQL Server 2012 : réussir la migration - Stéphane Haby - Antonio De Santo - d...
SQL Server 2012 : réussir la migration - Stéphane Haby - Antonio De Santo - d...dbi services
 
Secrets of Enterprise Data Mining
Secrets of Enterprise Data Mining Secrets of Enterprise Data Mining
Secrets of Enterprise Data Mining Mark Tabladillo
 
Keat Resume 2012b
Keat Resume 2012bKeat Resume 2012b
Keat Resume 2012bmkeating1
 
Oracle institutes in Hyderabad.
Oracle  institutes in Hyderabad.Oracle  institutes in Hyderabad.
Oracle institutes in Hyderabad.sreehari orienit
 
Resume_Tushar_Kanti_DBA
Resume_Tushar_Kanti_DBAResume_Tushar_Kanti_DBA
Resume_Tushar_Kanti_DBATushar Kanti
 
Virtual dev-day-java7-keynote-1641807
Virtual dev-day-java7-keynote-1641807Virtual dev-day-java7-keynote-1641807
Virtual dev-day-java7-keynote-1641807Vinay H G
 
SQL server 2016 New Features
SQL server 2016 New FeaturesSQL server 2016 New Features
SQL server 2016 New Featuresaminmesbahi
 
Upgrading to Team Foundation Server (TFS) 2012 – What You Need to Know!
Upgrading to Team Foundation Server (TFS) 2012 – What You Need to Know!Upgrading to Team Foundation Server (TFS) 2012 – What You Need to Know!
Upgrading to Team Foundation Server (TFS) 2012 – What You Need to Know!Imaginet
 
SQL Server 2016 AlwaysOn Availability Groups New Features
SQL Server 2016 AlwaysOn Availability Groups New FeaturesSQL Server 2016 AlwaysOn Availability Groups New Features
SQL Server 2016 AlwaysOn Availability Groups New FeaturesJohn Martin
 

Ähnlich wie Oracle technology day 19.5.2010. best practices for upgrade to 11g r2 (20)

Oracle Database 11g Upgrade Cleveland
Oracle Database 11g Upgrade ClevelandOracle Database 11g Upgrade Cleveland
Oracle Database 11g Upgrade Cleveland
 
Oracle 11g R2 Live Part 2
Oracle 11g R2 Live Part 2Oracle 11g R2 Live Part 2
Oracle 11g R2 Live Part 2
 
Oracle Upgrade11gr1 Workshop1
Oracle Upgrade11gr1 Workshop1Oracle Upgrade11gr1 Workshop1
Oracle Upgrade11gr1 Workshop1
 
Insync 10 session maximize your jd edwards enterprise one investment with t...
Insync 10 session   maximize your jd edwards enterprise one investment with t...Insync 10 session   maximize your jd edwards enterprise one investment with t...
Insync 10 session maximize your jd edwards enterprise one investment with t...
 
Keat Resume 2012b
Keat Resume 2012bKeat Resume 2012b
Keat Resume 2012b
 
Running SQL 2005? It’s time to migrate to SQL 2014!
Running SQL 2005? It’s time to migrate to SQL 2014!Running SQL 2005? It’s time to migrate to SQL 2014!
Running SQL 2005? It’s time to migrate to SQL 2014!
 
2. oracle days sebastiaan vingerhoed_buckarest_november3rd
2. oracle days sebastiaan vingerhoed_buckarest_november3rd2. oracle days sebastiaan vingerhoed_buckarest_november3rd
2. oracle days sebastiaan vingerhoed_buckarest_november3rd
 
An overview of Microsoft data mining technology
An overview of Microsoft data mining technologyAn overview of Microsoft data mining technology
An overview of Microsoft data mining technology
 
An overview of microsoft data mining technology
An overview of microsoft data mining technologyAn overview of microsoft data mining technology
An overview of microsoft data mining technology
 
SQL Server 2012 : réussir la migration - Stéphane Haby - Antonio De Santo - d...
SQL Server 2012 : réussir la migration - Stéphane Haby - Antonio De Santo - d...SQL Server 2012 : réussir la migration - Stéphane Haby - Antonio De Santo - d...
SQL Server 2012 : réussir la migration - Stéphane Haby - Antonio De Santo - d...
 
Secrets of Enterprise Data Mining
Secrets of Enterprise Data Mining Secrets of Enterprise Data Mining
Secrets of Enterprise Data Mining
 
Keat Resume 2012b
Keat Resume 2012bKeat Resume 2012b
Keat Resume 2012b
 
Oracle institutes in Hyderabad.
Oracle  institutes in Hyderabad.Oracle  institutes in Hyderabad.
Oracle institutes in Hyderabad.
 
Resume_Tushar_Kanti_DBA
Resume_Tushar_Kanti_DBAResume_Tushar_Kanti_DBA
Resume_Tushar_Kanti_DBA
 
Virtual dev-day-java7-keynote-1641807
Virtual dev-day-java7-keynote-1641807Virtual dev-day-java7-keynote-1641807
Virtual dev-day-java7-keynote-1641807
 
SQL server 2016 New Features
SQL server 2016 New FeaturesSQL server 2016 New Features
SQL server 2016 New Features
 
Upgrading to Team Foundation Server (TFS) 2012 – What You Need to Know!
Upgrading to Team Foundation Server (TFS) 2012 – What You Need to Know!Upgrading to Team Foundation Server (TFS) 2012 – What You Need to Know!
Upgrading to Team Foundation Server (TFS) 2012 – What You Need to Know!
 
What's new in SQL Server Integration Services 2012?
What's new in SQL Server Integration Services 2012?What's new in SQL Server Integration Services 2012?
What's new in SQL Server Integration Services 2012?
 
Confio presentation
Confio presentationConfio presentation
Confio presentation
 
SQL Server 2016 AlwaysOn Availability Groups New Features
SQL Server 2016 AlwaysOn Availability Groups New FeaturesSQL Server 2016 AlwaysOn Availability Groups New Features
SQL Server 2016 AlwaysOn Availability Groups New Features
 

Mehr von Oracle Hrvatska

Oracle technology day 19.5.2010. introduction to the web logic diagnostics f...
Oracle technology day  19.5.2010. introduction to the web logic diagnostics f...Oracle technology day  19.5.2010. introduction to the web logic diagnostics f...
Oracle technology day 19.5.2010. introduction to the web logic diagnostics f...Oracle Hrvatska
 
Oracle Services Day 12. 05. 2010. Consulting Final
Oracle Services Day 12. 05. 2010. Consulting FinalOracle Services Day 12. 05. 2010. Consulting Final
Oracle Services Day 12. 05. 2010. Consulting FinalOracle Hrvatska
 
Hp oracle information age 13.apr.2010.ppt [compatibility m
Hp oracle information age 13.apr.2010.ppt [compatibility mHp oracle information age 13.apr.2010.ppt [compatibility m
Hp oracle information age 13.apr.2010.ppt [compatibility mOracle Hrvatska
 
Frank oracle strategy v2.3 fb.ppt [compatibility m
Frank   oracle strategy v2.3 fb.ppt [compatibility mFrank   oracle strategy v2.3 fb.ppt [compatibility m
Frank oracle strategy v2.3 fb.ppt [compatibility mOracle Hrvatska
 
Alain ozan keynote zagreb.ppt [compatibility m
Alain ozan keynote zagreb.ppt [compatibility mAlain ozan keynote zagreb.ppt [compatibility m
Alain ozan keynote zagreb.ppt [compatibility mOracle Hrvatska
 
Marin information age final2010.
Marin information age final2010.Marin information age final2010.
Marin information age final2010.Oracle Hrvatska
 
Oracle information age co croz-neos v2.2.
Oracle information age co croz-neos v2.2.Oracle information age co croz-neos v2.2.
Oracle information age co croz-neos v2.2.Oracle Hrvatska
 
Oracle information age 2010 infoart black.
Oracle information age 2010   infoart black.Oracle information age 2010   infoart black.
Oracle information age 2010 infoart black.Oracle Hrvatska
 
Hp ra za oracle grid final.
Hp ra za oracle grid   final.Hp ra za oracle grid   final.
Hp ra za oracle grid final.Oracle Hrvatska
 
Db security vaba information age 2010 v5.ppt [compatibility m
Db security vaba information age 2010 v5.ppt [compatibility mDb security vaba information age 2010 v5.ppt [compatibility m
Db security vaba information age 2010 v5.ppt [compatibility mOracle Hrvatska
 
Combis ucm information age 2010 jeste li spremi za e poslovanje v2.
Combis ucm information age 2010 jeste li spremi za e poslovanje v2.Combis ucm information age 2010 jeste li spremi za e poslovanje v2.
Combis ucm information age 2010 jeste li spremi za e poslovanje v2.Oracle Hrvatska
 
Bi publisher ljiljana multicom.ppt [compatibility m
Bi publisher ljiljana  multicom.ppt [compatibility mBi publisher ljiljana  multicom.ppt [compatibility m
Bi publisher ljiljana multicom.ppt [compatibility mOracle Hrvatska
 
Osb studija slucaja sgsb-a.ppt [compatibility m
Osb studija slucaja sgsb-a.ppt [compatibility mOsb studija slucaja sgsb-a.ppt [compatibility m
Osb studija slucaja sgsb-a.ppt [compatibility mOracle Hrvatska
 
Nek e am_overview_2010_1f.ppt [compatibility m
Nek e am_overview_2010_1f.ppt [compatibility mNek e am_overview_2010_1f.ppt [compatibility m
Nek e am_overview_2010_1f.ppt [compatibility mOracle Hrvatska
 
Information age 2010.oracle e business s
Information age 2010.oracle e business sInformation age 2010.oracle e business s
Information age 2010.oracle e business sOracle Hrvatska
 
Infoage crmod-short.ppt [compatibility m
Infoage crmod-short.ppt [compatibility mInfoage crmod-short.ppt [compatibility m
Infoage crmod-short.ppt [compatibility mOracle Hrvatska
 
Info age 2010_financijska_analitika_v1.ppt [compatibility m
Info age 2010_financijska_analitika_v1.ppt [compatibility mInfo age 2010_financijska_analitika_v1.ppt [compatibility m
Info age 2010_financijska_analitika_v1.ppt [compatibility mOracle Hrvatska
 

Mehr von Oracle Hrvatska (20)

Oracle technology day 19.5.2010. introduction to the web logic diagnostics f...
Oracle technology day  19.5.2010. introduction to the web logic diagnostics f...Oracle technology day  19.5.2010. introduction to the web logic diagnostics f...
Oracle technology day 19.5.2010. introduction to the web logic diagnostics f...
 
Oracle Services Day 12. 05. 2010. Consulting Final
Oracle Services Day 12. 05. 2010. Consulting FinalOracle Services Day 12. 05. 2010. Consulting Final
Oracle Services Day 12. 05. 2010. Consulting Final
 
Hp oracle information age 13.apr.2010.ppt [compatibility m
Hp oracle information age 13.apr.2010.ppt [compatibility mHp oracle information age 13.apr.2010.ppt [compatibility m
Hp oracle information age 13.apr.2010.ppt [compatibility m
 
Frank oracle strategy v2.3 fb.ppt [compatibility m
Frank   oracle strategy v2.3 fb.ppt [compatibility mFrank   oracle strategy v2.3 fb.ppt [compatibility m
Frank oracle strategy v2.3 fb.ppt [compatibility m
 
Alain ozan keynote zagreb.ppt [compatibility m
Alain ozan keynote zagreb.ppt [compatibility mAlain ozan keynote zagreb.ppt [compatibility m
Alain ozan keynote zagreb.ppt [compatibility m
 
Marin information age final2010.
Marin information age final2010.Marin information age final2010.
Marin information age final2010.
 
Oracle information age co croz-neos v2.2.
Oracle information age co croz-neos v2.2.Oracle information age co croz-neos v2.2.
Oracle information age co croz-neos v2.2.
 
Oracle information age 2010 infoart black.
Oracle information age 2010   infoart black.Oracle information age 2010   infoart black.
Oracle information age 2010 infoart black.
 
Hp ra za oracle grid final.
Hp ra za oracle grid   final.Hp ra za oracle grid   final.
Hp ra za oracle grid final.
 
Dw allegro alain ozan.
Dw allegro alain ozan.Dw allegro alain ozan.
Dw allegro alain ozan.
 
Db security vaba information age 2010 v5.ppt [compatibility m
Db security vaba information age 2010 v5.ppt [compatibility mDb security vaba information age 2010 v5.ppt [compatibility m
Db security vaba information age 2010 v5.ppt [compatibility m
 
Combis ucm information age 2010 jeste li spremi za e poslovanje v2.
Combis ucm information age 2010 jeste li spremi za e poslovanje v2.Combis ucm information age 2010 jeste li spremi za e poslovanje v2.
Combis ucm information age 2010 jeste li spremi za e poslovanje v2.
 
Bi publisher ljiljana multicom.ppt [compatibility m
Bi publisher ljiljana  multicom.ppt [compatibility mBi publisher ljiljana  multicom.ppt [compatibility m
Bi publisher ljiljana multicom.ppt [compatibility m
 
Osb studija slucaja sgsb-a.ppt [compatibility m
Osb studija slucaja sgsb-a.ppt [compatibility mOsb studija slucaja sgsb-a.ppt [compatibility m
Osb studija slucaja sgsb-a.ppt [compatibility m
 
Nek e am_overview_2010_1f.ppt [compatibility m
Nek e am_overview_2010_1f.ppt [compatibility mNek e am_overview_2010_1f.ppt [compatibility m
Nek e am_overview_2010_1f.ppt [compatibility m
 
Information age 2010.oracle e business s
Information age 2010.oracle e business sInformation age 2010.oracle e business s
Information age 2010.oracle e business s
 
Infoage crmod-short.ppt [compatibility m
Infoage crmod-short.ppt [compatibility mInfoage crmod-short.ppt [compatibility m
Infoage crmod-short.ppt [compatibility m
 
Info age 2010_financijska_analitika_v1.ppt [compatibility m
Info age 2010_financijska_analitika_v1.ppt [compatibility mInfo age 2010_financijska_analitika_v1.ppt [compatibility m
Info age 2010_financijska_analitika_v1.ppt [compatibility m
 
Neos ofsa - info age.
Neos   ofsa - info age.Neos   ofsa - info age.
Neos ofsa - info age.
 
Crm
CrmCrm
Crm
 

Kürzlich hochgeladen

Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterMateoGardella
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfChris Hunter
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 

Kürzlich hochgeladen (20)

Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 

Oracle technology day 19.5.2010. best practices for upgrade to 11g r2

  • 1. <Insert Picture Here> Best Practices for Upgrade to Oracle Database 11g Release 2 Morana Kobal Butković Senior Sales Consultant Oracle Hrvatska
  • 2. Agenda Preparation Best Practices Performance Testing Demos 2010 Oracle Corporation 2
  • 3. Lifetime Support Policy today R2 January 2015 January 2018 August 2012 August 2015 July 2010 July 2011 July 2013 R2 January 2009 January 2012 Sustaining Support Premier Support Extended Support July 2007 July 2008 July 2010 R2 t 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2010 Oracle Corporation 3
  • 4. Upgrade to Oracle Database 11g ≥ 7.3.4 9.2.0.8 R2 ≥ 9.2.0.4 ≥ 8.0.6 R2 ≥ 8.1.7.4 10.1.0.5 ≥ 9.0.1.4 ≥ 10.2.0.2 R2 "Empty" arrows mean: no specific patch release required 2010 Oracle Corporation 4
  • 5. Different Ways To Upgrade UPGRADE Export/Import N Stay on same OS? Y CTAS, COPY N Downtime >30min? SQL Apply Y Oracle Streams DBUA Transportable Tablespaces CLI SQL> @catupgrd Transportable Database Oracle Golden Gate 2010 Oracle Corporation 5
  • 6. Upgrade Length • How long will it take to upgrade? • Usually between 30 and 90 minutes • 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 (upgrade from 9i) • Number of objects in XDB • To a lesser degree, if COMPATIBLE is increased: • Datafile headers are updated • Format of redo logs can change 2010 Oracle Corporation 6
  • 7. Upgrade Length • Speed up your upgrade performance by: • Truncating the auditing table SYS.AUD$ SQL> truncate SYS.AUD$; • Creating dictionary statistics right before the upgrade • Oracle 9i: SQL> exec DBMS_STATS.GATHER_SCHEMA_STATS ('SYS', options => 'GATHER',estimate_percent => DBMS_STATS.AUTO_SAMPLE_SIZE, method_opt => 'FOR ALL COLUMNS SIZE AUTO', cascade => TRUE); • Oracle 10g/11g: SQL> exec DBMS_STATS.GATHER_DICTIONARY_STATS; 2010 Oracle Corporation 7
  • 8. When to Choose Command-Line • Can afford 30-90 minutes average downtime • Manual command-line interface is preferred over GUI • Existing database is at least 9.2.0.4 if upgrading to 11g and 9.2.0.8 if upgrading to 11g R2 • Migrating to a new hardware platform with same OS • Consideration • Cannot upgrade to a system with a different operating system architecture • More manual steps required • Potential for errors due to typos, missed details • Upgrade scripts can be run again and again 2010 Oracle Corporation 8
  • 9. Command Line Upgrade • Step-by-step: 1. Complete online backup of the database 2. Install 11g Oracle software and apply patch set, PSU etc. 3. Analyze the DB using utlu112i.sql and follow all requirements given by the script 4. Create a new 11g listener with NETCA 5. Switch to the new environment, startup the DB (startup upgrade) and create the SYSAUX tablespace (only if source db is an Oracle 9i db) 6. Run upgrade script catupgrd.sql 7. Recompile with utlrp.sql - compare with utluiobj.sql 8. Run catuppst.sql if you are upgrading from ≥10g for AWR 9. Check the post upgrade status: utlu112s.sql 2010 Oracle Corporation 9
  • 10. Upgrade Mode SQL> STARTUP UPGRADE; ALTER SYSTEM SET _system_trig_enabled=FALSE SCOPE=MEMORY; Autotune of undo retention is turned off. ALTER SYSTEM SET _undo_autotune=FALSE SCOPE=MEMORY; ALTER SYSTEM SET undo_retention=900 SCOPE=MEMORY; ALTER SYSTEM SET aq_tm_processes=0 SCOPE=MEMORY; ALTER SYSTEM SET enable_ddl_logging=FALSE SCOPE=MEMORY; Resource Manager disabled during database migration: plan '' not set ALTER SYSTEM SET resource_manager_plan='' SCOPE=MEMORY; ALTER SYSTEM SET recyclebin=‘OFF’ DEFERRED SCOPE=MEMORY; Resource Manager disabled during database migrationTaken from an example alert.log • Supresses unnecessary error messages like ORA-00942: table or view does not exist - thus logfiles will be easier to read and check 2010 Oracle Corporation 10
  • 11. When to Choose the DBUA • Can afford 30 – 90 minutes average downtime • Operating system remains the same • GUI is preferred over manual command line interface • Automatically performs useful pre-upgrade checks • Less error-prone / less manual effort • Existing database is at least 9.2.0.4 if upgrading to 11g or 9.2.0.8 for 11g R2 • Note: especially useful for RAC and ASM installations* • Consideration: • Source and target Oracle Homes must be on the same system • Cannot be re-run if an error is encountered mid-upgrade 2010 Oracle Corporation 11
  • 12. 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 to SE & EE • Patch upgrades • Best Practice: Before you start DBUA • Run $OH_11g/rdbms/admin/utlu112i.sql in your current environment • Logs: • $ORACLE_HOME/cfgtoollogs/dbua • Documented in Chapter 3 of the Oracle® Database Upgrade Guide 2010 Oracle Corporation 12
  • 13. Database Upgrade Assistant (GUI) 2010 Oracle Corporation 13
  • 14. Database Upgrade Assistant (GUI) 2010 Oracle Corporation 14
  • 15. Database Upgrade Assistant (GUI) 2010 Oracle Corporation 15
  • 16. Database Upgrade Assistant (GUI) 2010 Oracle Corporation 16
  • 17. Agenda Preparation Best Practices Performance Testing Upgrade Summary 2010 Oracle Corporation 17
  • 18. Best Practice • Sanity operations: important checks 2010 Oracle Corporation 18
  • 19. Recycle bin • If upgrading from 10g or 11g, purge the recycle bin before the upgrade. SQL> purge DBA_RECYCLEBIN; 2010 Oracle Corporation 19
  • 20. Timezone Patches • Why DST timezone patches? (DST: Daylight Savings Time) • Since 2007 DST definitions and timezone names have been changed several times • Timezone versions by release: • Oracle 9i: TZ V1 • Oracle 10.1: TZ V2 • Oracle 10.2.0.1/2: TZ V2 • Oracle 10.2.0.3: TZ V3 • Oracle 10.2.0.4: TZ V4 • Oracle 11.1: TZ V4 • Source release needs to be patched to TZ V4 – otherwise no upgrade will be possible • Oracle 11.2: TZ V11 • Source release does not have to be patched. Timezone conversion will be done in 11.2 2010 Oracle Corporation 20
  • 21. Timezone Patches - 11g Release 2 R2 • Upgrade to Oracle Database 11g Release 2: • New 11.2-$OH has timezone V11 • No need to patch the source $OH • Database only needs to be adjusted if you are using the datatype TIMESTAMP WITH TIMEZONE • Conversion done after the upgrade • See Note 944122.1 • Package DBMS_DST • DBMS_DST.FIND_AFFECTED_TABLES • DBMS_DST.BEGIN_UPGRADE • DBMS_DST.UPGRADE_DATABASE • DBMS_DST.END_UPGRADE 2010 Oracle Corporation 21
  • 22. Best Practice • Always run the pre-upgrade script: • Upgrade to Oracle Database 11g : utlu111i.sql • Upgrade to Oracle Database 11.2 : utlu112i.sql 2010 Oracle Corporation 22
  • 23. Pre-Upgrade Check • Run utlu112i.sql in your current environment Oracle Database 11.2 Pre-Upgrade Information Tool 09-21-2009 22:33:20 ********************************************************************** Database: ********************************************************************** --> name: ORCL --> version: 10.2.0.3.0 --> compatible: 10.2.0.3.0 --> blocksize: 8192 --> platform: Linux IA (32-bit) --> timezone file: V4 [..] ********************************************************************** Update Parameters: [Update Oracle Database 11.2 init.ora or spfile] ********************************************************************** WARNING: --> "java_pool_size" needs to be increased to at least 64 MB [..] ********************************************************************** Miscellaneous Warnings ********************************************************************** WARNING: --> Database is using a timezone file older than version 11. .... After the release migration, it is recommended that DBMS_DST package .... be used to upgrade the 10.2.0.3.0 database timezone version .... to the latest version which comes with the new release. 2010 Oracle Corporation 23
  • 24. Pre-Upgrade Check • Get the current version of utlu1nmi.sql • Download it • Note:884522.1 2010 Oracle Corporation 24
  • 25. Best Practice • After upgrade leave COMPATIBLE at the original value for a week before changing to 11.1 or 11.2. 2010 Oracle Corporation 25
  • 26. Parameter COMPATIBLE • COMPATIBLE has to be at least 10.1.0 for an 11g database • No way back once ≥11.1.0 has been enabled • Supported release downgrade to 10.1.0.5, ≥10.2.0.2, ≥11.1.0.6 • No ALTER DATABASE RESET COMPATIBILITY command anymore COMPATIBLE = 10.0/1/2.0 COMPATIBLE = 11.0.0 2010 Oracle Corporation 26
  • 27. Parameter COMPATIBLE • DBUA raises COMPATIBLE only for 9i databases • To enable new features after the upgrade: • 11.1: SQL> alter system set compatible='11.1.0' scope=spfile; • 11.2 : SQL> alter system set compatible='11.2.0' scope=spfile; • Afterwards: restart the database • New features will be enabled • Datafile headers will be adjusted • Redologfiles formats will be adjusted during first access 2010 Oracle Corporation 27
  • 28. Best Practice • Do you have a fallback strategy? ... 2010 Oracle Corporation 28
  • 29. Fallback Strategies • Always: • Create a valid and complete online backup with RMAN • Test the restore and the recovery at least once!!! • Downgrade Options: • Back to Oracle Database 10g/11g • Use the downgrade scripts catdwgrd.sql and catrelod.sql • See the Database Upgrade Guide, Chapter 6 and Note:443890.1 • Datapump with VERSION parameter (COMPATIBLE can be raised) • Back to Oracle Database 9i • Export/import • Use 9i exp to extract the data and 9i imp to import the data back • Note:158845.1 2010 Oracle Corporation 29
  • 30. Fallback Strategy: catdwgrd.sql • Downgrade with catdwgrd.sgl • Note:443890.1 • Downgrade to the release you've upgraded from • 10.1.0.5 • 10.2.0.2/3/4 • 11.1.0.6/7 • Only possible if COMPATIBLE hasn't been raised!!! • Please note: A downgrade will only be possible to the release you've upgraded from - so if a patch set has been applied always apply it before the upgrade starts - otherwise you'll only be able to downgrade to the release you've patched 2010 Oracle Corporation 30
  • 31. Fallback Strategy: catdwgrd.sql • Downgrade with catdwgrd.sql to 10g • Task in 11g environment: SQL> SPOOL /tmp/downgrade.log SQL> STARTUP DOWNGRADE SQL> @catdwgrd.sql SQL> SPOOL OFF • Switch to your pre-upgrade 10g environment: SQL> STARTUP UPGRADE SQL> SPOOL /tmp/reload.log SQL> @catrelod.sql -- The catrelod.sql script reloads the appropriate version of -- all of the database components in the downgraded database. SQL> SPOOL OFF • Please note: additional steps are required if EM repository resides in the database - please see chapter 6 Downgrading a Database in the Oracle 11g Upgrade Guide 2010 Oracle Corporation 31
  • 32. Best Practice • After the upgrade ... 2010 Oracle Corporation 32
  • 33. Post Upgrade • Create system statistics during a regular workload period - otherwise non-appropriate values for the CBO will be used: SQL> exec DBMS_STATS.GATHER_SYSTEM_STATS('start'); ... -- some time delay while the database is under a typical workload execute SQL> exec DBMS_STATS.GATHER_SYSTEM_STATS('stop'); SQL> select pname NAME, pval1 VALUE, pval2 INFO from aux_stats$; NAME VALUE INFO -------------------- ---------- ------------------------------ STATUS COMPLETED DSTART 04-03-2009 12:30 DSTOP 05-03-2009 12:30 FLAGS 1 CPUSPEEDNW 1392.39 IOSEEKTIM 8.405 IOTFRSPEED 255945.605 ... 2010 Oracle Corporation 33
  • 34. Post Upgrade • Create fixed table (X$) statistics • Directly after catupgrd.sql has been completed • This will speed up the job processing for recompilation with utlrp.sql DBMS_STATS.GATHER_FIXED_OBJECTS_STATS; SQL> exec • Again: after a few days regular database workload 2010 Oracle Corporation 34
  • 35. Agenda Preparation Best Practices Performance Testing Demos 2010 Oracle Corporation 35
  • 36. Prevent execution plan changes • Classical approach: • Rule Based Optimizer (RBO desupport since Oracle 10g - Note:189702.1) • Hints • Stored Outlines • Rewriting SQL statements • optimizer_features_enabled=n.n.n • Change specific optimizer parameters • Import and lock object and systems statistics • Modern, efficient and better resource consumption: • SQL Plan Management 2010 Oracle Corporation 36
  • 37. With SQL Plan Management • SQL statement is parsed for the first time and a plan is generated • Check the log to see if this is a repeatable SQL statement • Add SQL statement signature to the log and execute it • Plan performance is still “verified by execution” GB Parse HJ Execute Plan Acceptable HJ Statement log 2010 Oracle Corporation 37
  • 38. With SQL Plan Management • SQL statement is parsed again and a plan is generated • Check log to see if this is a repeatable SQL statement • Create a Plan history and use current plan as SQL plan baseline • Plan performance is “verified by execution” GB Parse Execute Plan Acceptable HJ HJ Statement log Plan history Plan baseline GB HJ HJ 2010 Oracle Corporation 38
  • 39. With SQL Plan Management • Something changes in the environment • SQL statement is parsed again and a new plan is generated • New plan is not the same as the baseline – new plan is not executed but marked for verification GB Parse NL NL Statement log Plan history GB Plan baseline NL GB NL HJ HJ 2010 Oracle Corporation 39
  • 40. With SQL Plan Management • Something changes in the environment • SQL statement is parsed again and a new plan is generated • New plan is not the same as the baseline – new plan is not executed but marked for verification • Execute known plan baseline - plan performance is “verify by history” GB Parse Execute HJ Plan Acceptable HJ Statement log Plan history GB Plan baseline NL GB NL HJ HJ 2010 Oracle Corporation 40
  • 41. Verifying the new plan • Non-baseline plans will not be used until verified • DBA can verify plan at any time Statement log Optimizer Plan history checks if new GB Plan baseline Invoke or schedule plan is as good NL GB DBA verification as or better NL than old plan HJ HJ Statement log Plan history Plans which don’t GB Plan baseline perform as good as NL GB GB the original plan NL NL NL HJ stay in the plan Plans which perform as good as or NL history and are HJ better than original plan are added to marked the plan baseline unaccepted 2010 Oracle Corporation 41
  • 42. SQL Plan Management – the details • Controlled by two init.ora parameter • optimizer_capture_sql_plan_baselines • Controls auto-capture of SQL plan baselines for repeatable stmts • Set to FALSE by default in 11gR1 • optimizer_use_sql_plan_baselines • Controls the use of existing SQL plan baselines by the optimizer • Set to TRUE by default in 11gR1 • Monitoring SPM • Dictionary view DBA_SQL_PLAN_BASELINE • Via the SQL Plan Control in EM DBControl • Managing SPM • PL/SQL package DBMS_SPM or via SQL Plan Control in EM DBControl • Requires the ‘administer sql management object’ privilege 2010 Oracle Corporation 42
  • 43. SPM Plan Capture – Bulk • From SQL Tuning Set (STS) • Captures plan details for a (critical) set of SQL Statement in STS • Load these plans into SPM as baseline plans • From Stored Outlines • Migrate previously created Stored Outlines to SQL plan baselines • From Cursor Cache • Load plans from the cursor cache into SPM as baseline plans • Filters can be specified (SQL_ID, Module name, schema) • From staging table • SQL plan baselines can be captured on another system • Exported via a table (similar to statistics) and imported locally • Plan are “unpacked” from the table and loaded into SPM 2010 Oracle Corporation 43
  • 44. 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.6 Available with patch set 10.2.0.4 Available as single patch for 9.2.0.8 and 10.2.0.2/3 For patch numbers please see Note:560977.1 2010 Oracle Corporation 45
  • 45. Oracle Real Application Testing Database Replay SQL Performance Analyzer • Replay actual production database • Enables identification of SQL performance workload in test environment regressions before end-users can be • Identify, analyze and fix potential impacted instabilities before making changes to production • SPA can help with any change that impacts SQL execution plan • Capture Workload in Production • DB upgrades • Capture full production workload with real • Optimizer statistics refresh load, timing & concurrency characteristics • New indexes, Materialized Views, Partitions, • Move the captured workload to test system etc. • Replay Workload in Test • Automates SQL performance tracking of • Make the desired changes in test system hundreds of thousands of SQL statements • Replay workload with full production characteristics – impossible to do manually • Honor commit ordering • Captures SQL workload with low overhead • Analyze & Report • Integrated with SQL Tuning Advisor and • Errors SQL Plan Baselines for regression • Data divergence remediation • Performance divergence 2010 Oracle Corporation 46
  • 46. 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 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_SQLPA Collecting statements works in: 9.2.0.x and 10.1. 0.x with sql tracing 10.2.0.2/3/4 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 and 11.1.0.x and 11.2.0.x • SQL Tuning Sets (STS) • Package DBMS_SQLTUNE 2010 Oracle Corporation 47
  • 47. Testing Pre-Upgrade Steps • Testing on the new Database Release • Use hardware identical to product • Use a copy of the ‘live’ data from product • Ensure all important queries and reports are tested • Capture all necessary performance information during tests • Ensure comparable test results are available for your current Oracle release • Capture current 10g execution plans • Using SQL Performance Analyzer • Using Stored Outlines • Using SQL Tuning Sets • Using exported SQL plan baselines 2010 Oracle Corporation 48
  • 48. Testing on the new database release Removing old Optimizer hints • If there are hints for every aspect of the execution plan the plan won’t change between releases (Stored Outline) • Partial hints that worked in one release may not work in another • Test all SQL stmts with hints on the new release using the parameter _optimizer_ignore_hints=TRUE • Chance are the SQL stmts will perform better without any hints 2010 Oracle Corporation 49
  • 49. Capturing Plans using SQL Tuning Set Database Upgrade Oracle Database 11g Plan History 3. Bulk load plans into GB GB SPM HJ HJ HJ HJ No plan regressions Oracle Database 11g 2. Upgrade DBA to 11g GB Well tuned HJ plan HJ 1. Create STS for critical statements Oracle Database 10gR2 2010 Oracle Corporation 50
  • 50. Capturing Plans using an 11g test env Production Database 11g Plan History 5. Unpack baselines GB into SPM HJ GB HJ HJ HJ No plan regressions 4. Import staging table DBA 3. Export staging Plan History table GB GB HJ HJ HJ 1. Create HJ 2. Create staging Well tuned baselines from table & pack Baseline plan tuned stmts baselines into it plans staging table Development / Test Database 11g 2010 Oracle Corporation 51
  • 51. Capturing Plans using SPA Before O_F_E=10 Oracle Database 11g change Plan History GB GB HJ HJ HJ HJ Regressing statements No plan regressions After O_F_E=11 change optimizer_features_enable GB GB GB HJ HJ HJ HJ HJ HJ Well SQL tuned Performance plans Analyzer Oracle Database 10g 2010 Oracle Corporation 52
  • 52. SQL Plan Management - general upgrade strategy 1. Set OFE to Oracle Database 11g O_F_E=10 previous release Plan History 2. Run all SQL in the 3. Auto Capture 10g GB GB Application and auto plans GB HJ HJ load SQL Plan Baselines HJ HJ HJ with 10g plan NL No plan 5. 11g plan queue regressions 4. After O_F_E=11 for verification plans are loaded change optimizer_features_enable OFE to 11 • Seeding the SQL Plan Baselines with 10g plans No plan change on upgrade • After all SQL Plan Baselines are populated switch Optimizer_Features_Enable to 11g • new 11g plans will only be used after they have been verified 2010 Oracle Corporation 54
  • 53. What to do with statistics after upgrade • Use last known 10g stats until system is stable • Switch on incremental statistics for partitioned tables • DBMS_STATS.SET_GLOBAL_PREFS('INCREMENTAL','TRUE'); • Temporarily switch on pending statistics • DBMS_STATS.SET_GLOBAL_PREFS(‘PENDING’,’TRUE’); • Gather 11g statistics • DBMS_STATS.GATHER_TABLE_STATS(‘sh’,’SALES’); • Test your critical SQL statement with the pending stats • Alter session set optimizer_use_pending_statistics=TRUE; • When proven publish the 11g statistics • DBMS_STATS.PUBLISH_PENDING_STATS(); 2010 Oracle Corporation 55
  • 54. Agenda Preparation Best Practices External References Demos 2010 Oracle Corporation 56
  • 55. Demo SQL Performance Analyzer & DB Replay for Upgrade 10.2 ->11g 2010 Oracle Corporation 57