Showing posts with label Performance Tuning. Show all posts
Showing posts with label Performance Tuning. Show all posts

Thursday, July 15, 2021

Repairing SQL Performance Regression with SQL Plan Management

 


Nigel Bayliss
PRODUCT MANAGER

You were hoping for an uneventful day at work when you notice that you have a critical workload query that is taking much longer to execute than usual, and you can see that it is beginning to affect your service levels. You suspect that it has a sub-optimal execution plan and you need to get it sorted out immediately. Is there a quick and easy way to do that?

Automatic SQL plan management can deal with this type of issue without DBA intervention, but what can you do if this feature is not available to you? Fortunately, you can take advantage of enhancements made in SQL plan management (SPM) from Oracle Database 18c onwards (I have a word to say about Oracle Database 12c Release 2 later on). The approach presented here must be initiated by a DBA, but it is nevertheless very easy to use.

The steps are as follows:

  1. Capture the 'problem' SQL statement plan in a SQL plan baseline.
  2. Run the SPM evolve task for this SQL plan baseline (using a particular set of parameters which I'll show you below).
  3. Accept the recommended plan.

In many cases  - that's it! 

SPM evolution will locate and test execute previously-used SQL execution plans and figure out which ones are really the best. It does not rely on optimizer costings alone. It can be configured to search the automatic workload repository (AWR), the Oracle Database cursor cache and SQL tuning sets. In other words, if you have a better plan in a query repository or the cursor cache, SPM can find it and apply it to the problem query.

In broad terms, this is what the procedure looks like:

BEGIN 
   --
   -- Create a SQL plan baseline for the problem query plan
   -- (in this case assuming that it is in the cursor cache)
   -- 
   n := dbms_spm.load_plans_from_cursor_cache(
                  sql_id => '<problem_SQL_ID>', 
                  plan_hash_value=> <problem_plan_hash_value>, 
                  enabled => 'no');
   --
   -- Set up evolve
   --
   tname := DBMS_SPM.CREATE_EVOLVE_TASK(sql_handle=>handle); 

   DBMS_SPM.SET_EVOLVE_TASK_PARAMETER( 
      task_name => tname,
      parameter => 'ALTERNATE_PLAN_BASELINE', 
      value     => 'EXISTING');

   DBMS_SPM.SET_EVOLVE_TASK_PARAMETER( 
      task_name => tname,
      parameter => 'ALTERNATE_PLAN_SOURCE', 
      value     => 'CURSOR_CACHE+AUTOMATIC_WORKLOAD_REPOSITORY+SQL_TUNING_SET');

   DBMS_SPM.SET_EVOLVE_TASK_PARAMETER( 
      task_name => tname,
      parameter => 'ALTERNATE_PLAN_LIMIT', 
      value     => 'UNLIMITED');
   --
   -- Evolve
   --
   ename := DBMS_SPM.EXECUTE_EVOLVE_TASK(tname);
   --
   -- Optionally, choose to implement immediately
   --
   n := DBMS_SPM.IMPLEMENT_EVOLVE_TASK(tname);
END; 
/

There will be cases where a SQL statement was previously performing very well and was never picked up and stored in AWR (and perhaps are no longer in the cursor cache). In this case, SPM might not be able to find the previous good plan. You can mitigate this risk if you periodically capture your workloads in SQL tuning sets or if you enable the automatic SQL tuning set. The 'SQL_TUNING_SET' option shown above will include SQL tuning sets as the source of potential execution plans. This will improve the likelihood that you can repair queries that previously ran very quickly and did not show up in AWR. 

The method described above is available in Oracle Database 18c, but note that SPM internals were enhanced in this area for Oracle Database 19c. It is therefore possible that you will find that the technique will work best in this release. Oracle Database 12c Release 2 includes the parameter settings used above but the task (at the time of writing) will sometimes fail with ORA-01422 due to bug number 29539794.

SQL plan management applies some acceptance criteria and will only accept plans that perform better than the regressed plan by some margin. In the fully-worked example in GitHub you will see that the SPM evolve report is displayed (the primary script is spm.sql). The report clearly indicates whether or not the acceptance criteria is passed and if it is not, then the plan found in AWR will not be accepted.

The use of SQL tuning sets and AWR has licensing implications. Always  check the Database Licence Information User Manual.

You can help to improve the scripts - comments welcome.

How to Gather Optimizer Statistics Fast!

 

How to Gather Optimizer Statistics Fast!

Nigel Bayliss
PRODUCT MANAGER

There are a number of ways to speed up the process of gathering optimizer statistics, but I'm not sure that it's common knowledge just how much of an effect some simple changes can make. If you have been asking yourself, "why is stats gathering taking so long and what can I do about it?", then this post is for you.

If you are already familiar with the different methods of gathering optimizer statistics, you might want to jump to the end of this post where I compare them and make some recommendations.

Overview

The perception that it's difficult to speed up statistics gathering has sometimes motivated DBAs to manipulate the number of rows sampled on a table-by-table basis using the ESTIMATE_PERCENT parameter (or DBMS_STATS preference). For example, large tables may have estimate percent set to 1% and small tables, 100%. Legacy scripts play their part too: some systems are still using procedures established before the performance enhancements available with auto sample size. One of the reasons we recommend ESTIMATE_PERCENT=>AUTO_SAMPLE_SIZE is that it includes number of distinct value (NDV) optimizations that yield high performance and accurate statistics. Gathering statistics using a 1% sample of rows might complete very quickly, but inaccurate statistics are the likely result, along with sub-optimal SQL execution plans.

Instead of manipulating ESTIMATE_PERCENT, the time taken to gather statistics can be reduced by using more machine resources. This post compares some before-and-after scenarios to demonstrate how you can do this. Fully worked examples are available in GitHub.

I will concentrate on using automatic optimizer statistics gathering, but the lessons are broadly applicable to manual statistics gathering too (there's an example at the end of the post). The examples are intended for use on Oracle Database 12c and Oracle Database 18c. The same techniques are applicable to Oracle Database 11g, but note that the resource consumer groups have different names in that release.

Option #1 - Default Statistics Gathering

Consider the following trace of CPU consumption over time: 

CPU, simple gather

It shows my CPU utilization while the automatic statistics gathering job is running and there's not much else happening on the system. Notice that about 75% of the CPU is not utilized. This fact is easy to understand once you know that the environment has a 4-core CPU with one thread per core. By default, statistics gathering uses a single process (with a single worker-thread) and this will utilize the processing power of a single CPU core. In my case, this equates to a utilization of 25% (one quarter of the 4-core chip). For systems with a higher core count, the single process will utilize an even smaller proportion of the available CPU.

Gathering statistics like this is not necessarily a problem. If stats gathering runs to completion most nights and there's no urgent need to have fresh statistics by a certain time, then there's no need to do anything more. Always keep things as simple as possible and only make changes if you need to. If your environment is large and/or volatile, the auto statistics job might regularly fail to run to completion in the batch window. In other words, the window might close before all tables considered stale have fresh statistics. If this is the case, then some tables might remain stale for a long time.

Fortunately, this situation is easy to see. If you view the statistics advisor report available in Oracle Database 12c Release 2, then it will tell you. The data dictionary stored this information too. In the example below, my batch window is 20 minutes long and the auto stats job has sometimes failed to complete (status STOPPED). The JOB_INFO column reveals the reason: auto statistics collection is occasionally taking longer than 20 minutes and terminates when the batch window closes.

Task History

How can we fix this? We could (a) make the batch window longer and/or (b) speed up statistics gathering. I am going to consider option b (because option a is less interesting).

How do you speed up statistics gathering? If you have resources on your database server, then you could dedicate more of it to gather statistics. You can reduce the elapsed time of gathering statistics at the cost of a more fully utilized database server. It is of course necessary to identify a window of time where there's spare system resource, so this solution requires that the system is not running at 100% all of the time.

It is worth noting that other techniques are available to reduce the time required to maintain statistics (such as incremental statistics maintenance), but this is out of scope for the purposes of this blog post.

Option #2 - Gathering Statistics in Parallel – AUTO_DEGREE

Gathering statistics with auto sample size initiates full table scans to inspect table data. We can leverage parallel execution to make these scans complete in less time. To do this you can, for example, identify large tables and define a specific degree of parallelism (DOP):

exec dbms_stats.set_table_prefs(user, 'BIG_TABLE', 'DEGREE', 16)

There is an easier, set-and-forget approach where you can let Oracle to decide on the DOP for you:

exec dbms_stats.set_table_prefs(user, 'BIG_TABLE', 'DEGREE', DBMS_STATS.AUTO_DEGREE)

A clean and simple approach is to set the property at the global level:

exec dbms_stats.set_global_prefs('DEGREE', DBMS_STATS.AUTO_DEGREE)

With parallel execution in play, statistics gathering has the potential to consume lots of system resource, so you need to consider how to control this. When the auto stats gathering job executes it (by default) uses the resource management plan DEFAULT_MAINTENANCE_PLAN and a consumer group called ORA$AUTOTASK. This makes it very easy to make some adjustments and control just how much resource you want to dedicate to gathering statistics.

You first need to decide what priority to attribute to auto stats gathering depending on what other processes are likely to be running at the same time. In the following example, the auto stats job has a minimum of 5% CPU if other tasks running in the database are competing for CPU. However, if the system is not busy, we will allow the job to consume up to 80% of the CPU (this will protect processes that must run outside the control of the database). The maximum degree of parallelism an individual session can use is four in this case. It is useful to control the maximum DOP because you will want to make sure that you do not reach the maximum number of parallel server processes allowed for the system (this will become more relevant later in this post).

RM Plan

For completeness, the example above includes all plan directives for the DEFAULT_MAINTENANCE_PLAN, but it is only necessary to specify the plan directives you want to modify. By default, when the maintenance windows opens, it will activate the DEFAULT_MAINTENANCE_PLAN. If you prefer, you can create your own resource management plan and associate it with any maintenance windows of your choosing. If you also set the resource_management_plan initialization parameter, then you can use the same resource management plan when the batch windows are both open and closed. Here's an example:

Bespoke RM Plan

When AUTO_DEGREE is used the resource utilization can look very different . In this example, the tables are all identical so there's a very regular pattern:

CPU auto DOP

We are now using much more CPU, and consequently the job completes in only 12 minutes and 26 seconds (where, previously, it failed to complete within the 20-minute window):

Job status

Remember that database resource management (DBRM) is in force during the batch window, so it is very easy to adjust CPU utilization even while the job is running. For example - consider what happens when I adjust the utilization limit down from 80% to 40% and then back again:

RM CPU

Let's look at a more realistic AUTO_DEGREE scenario. In the following example we have a schema containing tables that have a wide variation in size. The CPU profile is now less consistent:

Auto DOP

The DOP is changing in response to the size of each individual table. The job runs serially at first (about 25% CPU), then DOP 2 for a while, then DOP 3 and then back to serial. We could micro-manage DOP on a table-by-table basis, but it is much better to avoid approaches like this because we should always aim to avoid too much manual intervention. The global AUTO_DEGREE solution will be good enough in many cases, so there will be no need for any further manual intervention.  

Option #3 - Gathering Statistics Concurrently - CONCURRENT

Parallel statistics gathering has enabled us to increase CPU utilization significantly, but what if we have spare machine resources and want to go even faster? In the previous example, the CPU could be more fully utilized. If you want to achieve that, then how do you go about it?

Firstly, disable parallel execution (we will come back to that later):

exec dbms_stats.set_global_prefs('DEGREE', 1)

The CONCURRENT preference allows DBMS_SCHEDULER to initiate multiple statistics gathering jobs at once, so that the database will gather statistics on multiple tables and partitions concurrently. We can choose to enable this behavior for auto stats gathering only:

exec dbms_stats.set_global_prefs('CONCURRENT','AUTOMATIC')

If you enable a database resource management plan, you can use concurrent for manual stats or for manual and auto:

exec dbms_stats.set_global_prefs('CONCURRENT','MANUAL')
exec dbms_stats.set_global_prefs('CONCURRENT','ALL')

The database will now gather statistics using multiple scheduler jobs. In my case, auto stats initiated 16 job processes and the CPU profile looked like this:

CPU Conc

I am using max_utilization_limit set to 80%, and the job completes in 11 minutes and 39 seconds:

Concurrent Results

Concurrent statistics gathering works very well if tables are of a similar size, but without parallel execution, serial jobs running on very large tables can take a long time and the might not complete before the batch window closes. If this is a problem for you, you can use a combination of concurrent processing and parallel execution.

Option #4 - Gathering Statistics Concurrently and in Parallel - CONCURRENT and AUTO_DEGREE

Care is required when implementing concurrency and parallel execution because there's scope to execute a very large number of concurrent parallel execution servers and generate a very high system load. Multiple jobs will start and each has the potential to initiate a number of parallel query servers. As a very general rule of thumb, you want to have no more than about 2*CPUCoreCount to 4*CPUCoreCount parallel servers executing at any one time.

You can mitigate the risk of initiating too many parallel execution servers as follows:

Concurrent and Auto DOP

There is currently no way to cap the number of job queue processes allocated to concurrent stats gathering, so 'turning down' the job_queue_processes setting is the only way to do this. I have created an enhancement request with respect to this limitation.

Enable concurrent stats gathering for the automatic statistics gathering job:

exec dbms_stats.set_global_prefs('CONCURRENT','AUTOMATIC')

Set AUTO_DEGREE globally:

exec dbms_stats.set_global_prefs('DEGREE', DBMS_STATS.AUTO_DEGREE)

Or, for individual large tables:

exec dbms_stats.set_table_prefs(user, 'BIG_TABLE', 'DEGREE', DBMS_STATS.AUTO_DEGREE)

On my system, the auto stats initiated 16 job processes and the resource management plan I used limited DOP to four. This resulted in 64 parallel execution servers executing concurrently, so a DOP limited to two might have been a better choice in my case. Here is the new CPU profile:

CPU Concurrent and Auto DOP

The job completed in 13 minutes 16 seconds:

Concurrent + Auto DOP results

In this case, why was there no benefit in run time using CONCURRENT and AUTO_DEGREE? It is because CONCURRENT without AUTO_DEGREE consumed CPU up to the 80% limit imposed by DBRM. In the more general case where there is a good mix of table sizes, some very large tables and a faster IO subsystem, then AUTO_DEGREE used in combination with CONCURRENT has the potential to yield the shortest gather stats times.

If you are in a position to be able to decrease job_queue_processes to limit the number of jobs that execute concurrently, then you will be able to increase the DOP limit to a higher values: 

Higher DOP

The same is true if there are only a small number of tables where parallelism is used.

Oracle Multitenant

At the time of writing there's a bug with parallel statistics gathering in a multitenant database when used with CONCURRENT (unpublished bug# 27249531). Parallel execution servers initiated by gather stats are not constrained by max_utilization_limit. This can result in high CPU consumption. Using DEGREE above 1 or AUTO_DEGREE is OK if CONCURRENT is not used.

Until a fix is available for your platform and version, the best solution is to use DEGREE=>1 if you want to use CONCURRENT in multitenant environments.

Manual Statistics Gathering

If you want to initiate stats gathering manually, and still make full use of parallel and concurrent settings, then you can use the following approach:

Manual Example

Performance Comparisons

A small test system was used for the examples above, so it will be useful to see what an enterprise-class system looks like (let's say 72 cores with HT). The Oracle Real World Performance Group ran some tests to check out the different techniques.

The relative performance of the stats gathering methods will be different on every system you try, so treat this as entertainment rather than science. For example, the test tables were all large and all the same size, so this will work in favor of AUTO_DEGREE (used without CONCURRENT) because a high degree of parallism was used for every table.

A large number of CPU cores will make the default method look exceptionally underpowered. In this case the CPU is only 1.5% utilized; a single core in an enterprise-class system:

Performance Test Results

Here are the results plotted:

Plots

Summary

Remember that you will need spare machine capacity to gain benefit from the techniques outlined in this blog post.

Generally speaking, option #2 is most likely to give you a quick and easy win if there are a number of very large tables. Option #3 is great if you have plenty of spare machine resource and a large number of smaller tables.

Option #4 requires more care to avoid initiating too many parallel execution servers.

Options #3 and #4 are particularly useful if you need to get a one-off stats gathering task done very quickly: perhaps when you are commissioning a new deployment or gathering statistics after an upgrade.

Here's a high-level summary:

Summary

I've uploaded self-contained test scripts to GitHub.

Comments welcome!

https://blogs.oracle.com/optimizer/how-to-gather-optimizer-statistics-fast

Thursday, July 8, 2021

Primary Note For Oracle Recovery Manager (RMAN) (Doc ID 1116484.1)

 In this Document

Details
Actions
 Introduction
 Getting started with RMAN
 Backing up Database files using RMAN and Maintaining the backup records.
 Restore and recovery techniques/scenarios using RMAN.
 Tablespace point in time recovery
 Rman Transportable tablespaces and database.
 Rman Performance.
 RMAN and Media managers
 Rman and Dataguard
 Rman and Rac
 Rman and Corruption
 Related Primary Notes
 Using My Oracle Support Effectively
 Generic Links
References

APPLIES TO:

Oracle Database Cloud Service - Version N/A and later
Oracle Database - Enterprise Edition - Version 10.1.0.2 and later
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Gen 1 Exadata Cloud at Customer (Oracle Exadata Database Cloud Machine) - Version N/A and later
Information in this document applies to any platform.

DETAILS

This Primary Note is intended to provide an index and references to the most frequently used My Oracle Support Notes with respect to Oracle Recovery Manager (RMAN).


This Primary Note is subdivided into categories to allow for easy access and reference to notes that are applicable to your area of interest, within RMAN.This includes the following categories:

  •   Getting started with RMAN
  •   Rman compatibility
  •   Flash Recovery Area
  •   Configuring the environment for RMAN backups
  •   Recovery catalog for RMAN backups
  •   Backing up database files using RMAN and maintaining the backup records
  •   Restore and recovery techniques/scenarios using RMAN
  •   Tablespace point in time recovery (TSPITR)
  •   RMAN Transportable tablespaces and database
  •   RMAN Duplicate database
  •   RMAN Performance.
  •   RMAN and Media managers.
  •   RMAN and Dataguard
  •   RMAN and Rac
  •   RMAN and Corruption
  •   Related Primary Notes
  •   Using My Oracle Support Effectively
  •   Generic Links



ACTIONS

Introduction

Recovery Manager is Oracle’s utility to manage the backup, and more importantly the recovery, of the database. It eliminates operational complexity while providing superior performance and availability of the database. Recovery Manager debuted with Oracle8 to provide DBAs an integrated backup and recovery solution.

Recovery Manager determines the most efficient method of executing the requested backup, restore, or recovery operation and then executes these operations in concert with the Oracle database server. Recovery Manager and the server automatically identify modifications to the structure of the database and dynamically adjust the required operation to adapt to the changes.

This note applies to the following versions of these products:

Oracle Server - Enterprise Edition - Version: 10.2.0.1 to 10.2.0.x
Oracle Server - Enterprise Edition - Version: 11.1.0.6 to 11.1.0.x
Oracle Server - Enterprise Edition - Version: 11.2.0.1 to 11.2.0.x
Oracle Server - Enterprise Edition - Version: 12.1.0.1 to 12.2.0.x

Getting started with RMAN

The articles in this section give you a overview of the oracle utility RMAN, the new features of RMAN in Oracle 11 release 1,2,12.1,12.2 and FAQ on RMAN.

Note.360416.1  Getting Started with Recovery Manager (RMAN)
Note.469777.1  RMAN - Frequently Asked Question (FAQ)
Note 809867.1  RMAN 11gR1: New Features
Note 1115423.1 RMAN Enhancements In Oracle 11g.
Note 1534487.1 RMAN Enhancements in Oracle 12c
Note 1521005.1 RMAN Pluggable Database Backup and Recovery in a Multitenant Environment
Note 1521075.1 RMAN Pluggable Database Point in Time Recovery

 

 Rman compatibility

Note.73431.1 RMAN Compatibility Matrix

 

Flash Recovery Area

The flash recovery area is an Oracle-managed directory, file system, or Automatic Storage Management disk group that provides a centralized disk location for backup and recovery files. All the files you need to completely recover a database from a media failure are part of the Flash Recovery Area. Oracle creates archived logs and flashback logs in the flash recovery area. RMAN can store its backup sets and image copies in the flash recovery area, and it uses it when restoring files during media recovery. The flash recovery area also acts as a disk cache for tape.

The articles mentioned in the following section help you in understanding the concepts and working of flash recovery area, RMAN integration with the flash recovery area, troubleshooting flash recovery area issues. 

Note.305648.1 What is a Flash Recovery Area and how to configure it?
Note.305796.1 RMAN and Flash Recovery Area
Note.833663.1 Flash Recovery Area - FAQ
Note.560133.1 Benefits Of Using Flash Recovery Area
Note.315098.1 How is the space pressure managed in the Flash Recovery Area - An Example.
Note.305812.1 Flash Recovery area - Space management Warning & Alerts
Note.829755.1 Space issue in Flash Recovery Area(FRA)
Note.305810.1 Configuring file creation in Flash recovery area and order of Precedence
Note.305651.1 How to change Flash Recovery Area to a new location?
Document 2308215.1 12.2 Perform Flashback at PDB Level
Document 1521524.1 RMAN RECOVER TABLE Feature New to Oracle Database 12c

 

Configuring the Environment for RMAN Backups

To simplify ongoing use of RMAN, you can set a number of persistent configuration settings for each target database. These settings control many aspects of RMAN behavior. For example, you can configure the backup retention policy, default destinations for backups, default backup device type, and so on. You can use the SHOW and CONFIGURE commands to view and change RMAN configurations.

The articles mentioned in the following section help you in configuring the rman persistent configurations, understanding their behavior and troubleshooting them.

Note.462978.1 Rman backup retention policy
Note.463875.1 Frequently asked questions on Rman backup retention policy
Note.351455.1 Oracle Suggested Strategy & Backup Retention

 

Recovery Catalog for Rman backups.

A recovery catalog is a set of tables and views that Recovery Manager (RMAN) uses to store metadata (information about a database structure, archived redo logs, backup sets, and data file copies) about a target database (database that RMAN backups or restores). RMAN uses this metadata to conduct its backup, recovery, and maintenance operations. Recovery catalog is optional, i.e., if a recovery catalog is not created, RMAN uses the target database’s control file to store the metadata about the target database. Although RMAN can conduct all major backup and recovery operations by using the control file, some RMAN commands work only if a recovery catalog exists.

The articles in the following section describe the configuration, management of recovery catalog and some of the known issues related to recovery catalog.

Note.452529.1 Recovery catalog for RMAN backup
Note.467969.1 How To Configure RMAN Recovery Catalog Using Enterprise Manager DB Console.
Note 2039848.1 Known Issues with RMAN Oracle12c Catalog

 

Backing up Database files using RMAN and Maintaining the backup records.

The articles and links in the following section describe the different methods to perform backups and useful rman backup methods.

Oracle Database Backup and Recovery Advanced User's Guide

  • Rman backup concepts - http://download.oracle.com/docs/cd/E11882_01/backup.112/e10642/rcmcncpt.htm#i1006083
  • Backing up database     - http://download.oracle.com/docs/cd/E11882_01/backup.112/e10642/rcmbckba.htm#i1005689
  • Advanced backups       - http://download.oracle.com/docs/cd/E11882_01/backup.112/e10642/rcmbckad.htm#CEGHFJCF
  • Backup maintenance     - http://download.oracle.com/docs/cd/E11882_01/backup.112/e10642/rcmmaint.htm#j1006083
NOTE:388422.1  Top 10 Backup and Recovery best practices
Note 262853.1  10G RMAN Fast Incremental Backups
Note.745798.1  Merged Incremental Backup Strategies
Note.735953.1  How To Configure RMAN Backups To Tape via Oracle Enterprise Manager 
Note.550082.1  How To Catalog Tape Backup Pieces
Note.137181.1  RMAN Backup Shell Script Example

 

Restore and recovery techniques/scenarios using RMAN.

The articles in this section provide various restore and recovery techniques and scenarios what can be achieved using rman.

Note.144911.1  RMAN:  Block-Level Media Recovery - Concept & Example
NOTE:388422.1  Top 10 Backup and Recovery best practices
Note.94114.1   Backup and Recovery Scenarios
Note.372996.1  Using RMAN to Restore and Recover a Database When the Repository and Spfile/Init.ora Files Are Also Lost
Note.223543.1  How to Recover From a DROP / TRUNCATE / DELETE TABLE with RMAN
Note.403883.1  How To Restore Controlfile From A Backupset Without A Catalog Or Autobackup
Note.580414.1  RMAN - How to restore the controlfile using RMAN
Note.419137.1  How To Restore Rman Backups On A Different Node When The Directory Structures Are Different
Note.415579.1  HowTo Restore RMAN Disk backups of RAC Database to Single Instance On Another Node
Note.472536.1  10g RMAN Benefits of Simplified Recovery Through Resetlogs.
Note.358171.1  Oracle10g RMAN will not restore in parallel from tape
Document 2300465.1 12.2 NEW FEATURE : -RECOVER DATABASE UNTIL AVAILABLE REDO

 

Tablespace point in time recovery

Recovery Manager (RMAN) Automatic TSPITR enables quick recovery of one or more tablespaces in a database to an earlier time without affecting the rest of the tablespaces and objects in the database.Here are a few articles which explain the steps involved in performing a TSPITR:

Note 335851.1 Automatic TSPITR in 10G RMAN -A walk Through
Note 1531202.1 RMAN TSPITR Tips and Tricks
Note 304305.1 Limitations of RMAN TSPITR

 

Rman Transportable tablespaces and database.

Rman can be used to create transportable tablespace sets and can be used to convert the datafiles for cross platform transportable tablespace and database. Here are a few articles which provide all the required information to understand the procedures:

Note.371556.1 How move tablespaces across platforms using Transportable Tablespaces with RMAN
Note.455593.1 Creating a transportable tablespace set from RMAN backupsets
Note.831223.1 Using Rman Incremental backups To Update Transportable Tablespaces.
Note.1401921.1 Cross-Platform Database Migration (across same endian) using RMAN Transportable Database
Note.733205.1 Migration of Oracle Database Instances Across OS Platforms
Note 1389592.1 11G - Reduce Transportable Tablespace Downtime using Cross Platform Incremental Backup
Note 2005729.1 12C - Reduce Transportable Tablespace Downtime using Cross Platform Incremental Backup
Document 2307383.1 12.2 RMAN Cross Platform Tablespace Transport Over Network
Document 2307358.1 12.2 RMAN Cross Platform Transport Of TDE-encrypted tablespace


Rman Duplicate Database

Database duplication is the use of the DUPLICATE command to copy all or a subset of the data in a source database. The duplicate database (the copied database) functions entirely independently from the source database (the database being copied).In articles in this section help you in understanding the duplicate procedures and various techniques available for the rman duplicate operation.

Note.228257.1  RMAN 'Duplicate Database' Feature in Oracle9i / 10G and 11G
Note.452868.1  RMAN 'Duplicate Database' Feature in 11G
Note.388431.1  Creating a Duplicate Database on a New Host.
Note.382669.1  Duplicate database from non ASM to ASM (vise versa) to a different host
Note.388424.1  How To Create A Production (Full or Partial) Duplicate On The Same Host
Note.293717.1  How to duplicate a database to previous incarnation
Note.1910175.1 RMAN DUPLICATE / RESTORE including Standby in ASM with OMF / non-OMF / Mixed Name for Datafile / Online Log / Controlfile
Note.1913937.1 RMAN Duplicate Database From RAC ASM To RAC ASM
Note.840647.1  Article on How to do Rman Duplicate on ASM/RAC/OMF/Single Instance
Note.360962.1  Manual Completion of a Failed RMAN Duplicate
Note.369644.1  Answers To FAQ For Restoring Or Duplicating Between Different Versions And Platforms
Note.1079563.1 RMAN DUPLICATE/RESTORE/RECOVER Mixed Platform Support
Note 1375864.1 Perform Backup Based RMAN DUPLICATE Without Connecting To Target Database For Both Disk & Tape Backups
Document 2022820.1 Upgrade to 12c(12.1 /12.2) through RMAN Duplicate using BACKUP LOCATION with NOOPEN clause

 

Rman Performance.

Note.360443.1  RMAN Backup Performance
Note 740911.1  RMAN Restore Performance
Note 247611.1  Known RMAN Performance Problems
Note 579158.1  Advise On How To Improve Rman Performance
Note 463227.1  Oracle10g RMAN Recovery Catalog Known Performance Issues
Note 1487262.1 Script to monitor RMAN Backup and Restore Operations

 

RMAN and Media managers

Oracle designed an architecture that allows RMAN to manage the process of database backup and recovery, yet integrate with industry-leading tape storage management subsystems. The interface between Rman and media management vendor products is keyed on an Oracle design specification. This specification allows Oracle RMAN to use third party media management software to back-up to and restore from tape.

Many organizations rely on Oracle to provide solutions for very large or highly distributed mission critical systems. In addition to needing databases capable of handling large amounts of data and complex queries, these organizations also need robust backup and recovery technology. Recovery of data quickly and reliably is paramount should some aspect of the system fail. To address these needs, Oracle has created the Backup Solutions Program (BSP), a cooperative program designed to facilitate tighter integration between Oracle's backup products and those of third-party media management vendors. Together, Oracle and media management vendors provide robust easy-to-use database backup and recovery solutions to customers with high-end requirements.

The link to access the information regarding backup solutions program is:

http://www.oracle.com/technetwork/database/features/availability/bsp-088814.html


"Under the BSP, vendors are committed to integrating Recovery Manager (RMAN) with their media management software packages and provide first line technical support for the integrated backup and recovery solutions for Oracle RDBMS."

So any issues related to the media manager functionality or configuration has to be addressed only by the vendors and not by Oracle.

Below are a few articles which help you in understanding the most common issues with rman backups to tape, environment variable used for backups to tape and procedure to check if the media manager installation has been done properly.

Note.942418.1  How To Verify A Media Manager Layer Installation?
Note 227517.1  Main Index of Common Causes for ORA-19511
NOTE.312737.1  RMAN and Specific Media Managers Environment Variables.

 

Rman and Dataguard

Data Guard and RMAN were both designed with the Oracle database architecture in mind. Together, they offer the most reliable and tightly integrated solution to achieve superior levels of Oracle database availability supporting your mission critical applications. Data Guard and RMAN are both fully supported features of the Oracle Database Enterprise Edition (RMAN is also provided with Oracle Database Standard Edition).Here are a few articles that help you in effectively using rman with dataguard and some of the known rman issues with dataguard.

Note.848716.1 Using RMAN Effectively In A Dataguard Environment
Note.357759.1 Known RMAN - Dataguard Problems
Note 836986.1 Steps to perform for Rolling forward a standby database using RMAN Incremental Backup.

 

Rman and Rac

Note 243760.1 RMAN: RAC Backup and Recovery using RMAN
Note.415579.1 HowTo Restore RMAN Disk backups of RAC Database to Single Instance On Another Node
Note.1913937.1 RMAN Duplicate Database From RAC ASM To RAC ASM
Note.840647.1 Article on How to do Rman Duplicate on ASM/RAC/OMF/Single Instance

 

Rman and Corruption

Rman is a very effective utility in identifying the database block corruption. Here are are a few article which provides the information about using rman to detect and fix corruption.

Note 836658.1 Identify the corruption extension using RMAN/DBV/ANALYZE etc
Note.561010.1 Which Blocks Will RMAN Check For Corruption Or Include In A Backupset?
Note 428570.1 Best Practices for Avoiding and Detecting Corruption
Note.472231.1 How to identify all the Corrupted Objects in the Database reported by RMAN
Note 471716.1 11g New Feature V$Database_block_corruption Enhancements and Rman Validate Command

 

Related Primary Notes

Note 1199803.1 Primary Note For Oracle Backup And Recovery
Note 1096952.1 Primary Note for Real Application Clusters (RAC) Oracle Clusterware and Oracle Grid Infrastructure
Note 1088018.1 Primary Note for Oracle Database Corruption
Note 1101938.1 Primary Note for Data Guard

 

Using My Oracle Support Effectively

Note 747242.5 My Oracle Support Configuration Management FAQ


Note 166650.1 Working Effectively With Global Customer Support
Note 199389.1 How To Request Management Attention to a Service Request (SR) with Oracle Support Services

 

Generic Links

Note 854428.1  Patch Set Updates for Oracle Products
Note 1061295.1 Patch Set Updates - One-off Patch Conflict Resolution
Note 756671.1  Oracle Recommended Patches -- Oracle Database
Note 268895.1  Oracle Database Patchset Information, Versions 10.2.0 to 12.1.0
Note 161549.1 Oracle Database Server and Networking Patches for Microsoft Platforms
Note 161818.1 Oracle Database (RDBMS) Releases Support Status Summary

 

 

REFERENCES

NOTE:360962.1 - Manual Completion of a Failed RMAN Backup based Duplicate
NOTE:419137.1 - How To Restore Rman Backups On A Different Node When The Directory Structures Are Different
NOTE:428570.1 - Best Practices for Avoiding and Detecting Corruption
NOTE:452529.1 - Recovery catalog for RMAN backup
NOTE:452868.1 - RMAN 'Duplicate From Active Database'
NOTE:455593.1 - Creating a transportable tablespace set from RMAN backupsets
NOTE:472536.1 - 10g RMAN Benefits of Simplified Recovery Through Resetlogs.
NOTE:550082.1 - HOW TO CATALOG TAPE BACKUP PIECES
NOTE:560133.1 - Benefits Of Using Flash Recovery Area
NOTE:561010.1 - Which Blocks Will RMAN Check For Corruption Or Include In A Backupset?

NOTE:382669.1 - DUPLICATE (Backup based) DATABASE from non ASM to ASM (vice versa) to different host
NOTE:388422.1 - Top 10 Backup and Recovery Best Practices
NOTE:351455.1 - Oracle Suggested Strategy & Backup Retention
NOTE:1910175.1 - RMAN DUPLICATE / RESTORE including Standby in ASM with OMF / non-OMF / Mixed Name for Datafile / Online Log / Controlfile
NOTE:848716.1 - Using RMAN Effectively In A Dataguard Environment.
NOTE:854428.1 - Patch Set Updates for Oracle Products
NOTE:809867.1 - RMAN 11gR1 : New Features
NOTE:829755.1 - Space issue in Fast / Flash Recovery Area - FRA Full
NOTE:268895.1 - Oracle Database Patchset Information, Versions 10.2.0 to 12.2.0
NOTE:1531202.1 - RMAN TSPITR Tips and Tricks
NOTE:199389.1 - How To Request Management Attention on a Service Request (SR) with Oracle Support Services
NOTE:304305.1 - Limitations of RMAN TSPITR
NOTE:735953.1 - This document has been replaced with more recent information on this topic. Please refer to more recent documentation.
NOTE:740911.1 - RMAN Restore Performance
NOTE:745798.1 - RMAN: Merged Incremental Backup Strategies
NOTE:360416.1 - Getting Started with Recovery Manager (RMAN)
NOTE:223543.1 - How to Recover From a DROP / TRUNCATE / DELETE TABLE with RMAN
NOTE:1199803.1 - Primary Note For Oracle Backup And Recovery
NOTE:888.1 - Primary Note for Database Proactive Patch Program
NOTE:1101938.1 - Primary Note for Data Guard
NOTE:1389592.1 - 11G - Reduce Transportable Tablespace Downtime using Cross Platform Incremental Backup
NOTE:2005729.1 - 12C - Reduce Transportable Tablespace Downtime using Cross Platform Incremental Backup
NOTE:1375864.1 - Perform Backup Based RMAN DUPLICATE Without Connecting To Target Database For Both Disk & Tape Backups
NOTE:227517.1 - Main Index of Common Causes for ORA-19511
NOTE:360443.1 - RMAN Backup Performance
NOTE:369644.1 - Frequently Asked Questions about Restoring Or Duplicating Between Different Versions And Platforms
NOTE:357759.1 - Known RMAN - Dataguard Problems
NOTE:358171.1 - Oracle10g: RMAN will not restore in parallel from tape
NOTE:472231.1 - How to identify all the Corrupted Objects in the Database with RMAN
NOTE:243760.1 - RMAN: RAC Backup, Restore and Recovery using RMAN
NOTE:1088018.1 - Primary Note for Handling Oracle Database Corruption Issues
NOTE:1115423.1 - Rman Enhancements In Oracle 11g.
NOTE:305812.1 - Flash Recovery area - Space management Warning & Alerts
NOTE:463875.1 - Frequently asked questions on Rman backup retention policy
NOTE:833663.1 - Flash Recovery Area - FAQ
NOTE:262853.1 - RMAN Fast Incremental Backups using BCT = Block Change Tracking file
NOTE:312737.1 - RMAN and Specific Media Managers Environment Variables.
NOTE:315098.1 - How is the space pressure managed in the Flash Recovery Area - An Example.
NOTE:463227.1 - Oracle10g RMAN Recovery Catalog Known Performance Issues
NOTE:305651.1 - How to change Flash Recovery Area to a new location ?
NOTE:371556.1 - How to Migrate to different Endian Platform Using Transportable Tablespaces With RMAN
NOTE:372996.1 - Using RMAN to Restore and Recover a Database When the Repository and Spfile/Init.ora Files Are Also Lost
NOTE:293717.1 - How to duplicate a database to a previous Incarnation
NOTE:1079563.1 - RMAN DUPLICATE/RESTORE/RECOVER Mixed Platform Support
NOTE:247611.1 - Known RMAN Performance Problems
NOTE:305796.1 - RMAN and Flash Recovery Area
NOTE:305810.1 - Configuring file creation in Flash recovery area and order of Precedence
NOTE:467969.1 - How To Configure RMAN Recovery Catalog Using Enterprise Manager DB Console.
NOTE:469777.1 - RMAN -- Frequently Asked Question (FAQ)
NOTE:1913937.1 - STEP BY STEP RMAN DUPLICATE Database From RAC ASM To RAC ASM
NOTE:403883.1 - How To Restore Controlfile From A Backupset Without A Catalog Or Autobackup
NOTE:415579.1 - How To Restore RMAN Disk backups of RAC Database to Single Instance On Another Node
NOTE:137181.1 - RMAN Backup Shell Script Example
NOTE:1401921.1 - Cross-Platform Database Migration (across same endian) using RMAN Transportable Database
NOTE:144911.1 - RMAN : Block-Level Media Recovery - Concept & Example
NOTE:836658.1 - Identify the Corruption Extension for Block Corruption, Table/Index Inconsistency, Data Dictionary and Lost Writes
NOTE:840647.1 - How to use Rman Duplicate on ASM/RAC/OMF/Single Instance
NOTE:335851.1 - Automatic TSPITR in 10G RMAN -A walk Through
NOTE:580414.1 - RMAN - How to restore the controlfile using RMAN
NOTE:161818.1 - Oracle Database (RDBMS) Releases Support Status Summary
NOTE:2039848.1 - Known Issues with RMAN Oracle12c Catalog
NOTE:166650.1 - Working Effectively With Oracle Support - Best Practices
NOTE:747242.5 - My Oracle Support FAQ
NOTE:733205.1 - Migration Of An Oracle Database Across OS Platforms (Generic Platform)
NOTE:388424.1 - How To Create A Production (Full or Partial) Duplicate On The Same Host
NOTE:388431.1 - Creating a Duplicate Database on a New Host (non ASM).
NOTE:1487262.1 - Script to monitor RMAN Backup and Restore Operations
NOTE:305648.1 - What is a Flash / Fast Recovery Area and how to configure it ?
NOTE:1061295.1 - Patch Set Updates - One-off Patch Conflict Resolution
NOTE:94114.1 - Backup and Recovery Scenarios
NOTE:462978.1 - Rman backup retention policy
NOTE:942418.1 - How To Verify A Media Manager Layer Installation ?
NOTE:228257.1 - RMAN 'Duplicate Database' Feature in Oracle9i / 10G and 11G
NOTE:579158.1 - Advise On How To Improve Rman Performance
NOTE:73431.1 - RMAN Compatibility Matrix

Oracle E-Business Suite Release 12.2 System Schema Migration

In This Document Section 1: Overview of the EBS System Schema Section 2: Requirements for Using the EBS System Schema Section 3: Migrating t...