Skip Headers
Oracle® Database High Availability Overview
11g Release 2 (11.2)

Part Number E10804-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

4 Oracle Database High Availability Solutions for Planned Downtime

Planned downtime can be just as disruptive to operations as unplanned downtime. This holds especially true for global enterprises that must support users in multiple time zones, or for those that must provide Internet access to customers 24 hours a day, seven days a week.

In the past, planned downtime was necessary to perform periodic maintenance or to upgrade to new deployments including:

Table 4-1 shows the high availability solutions to eliminate or reduce planned downtime.

Table 4-1 High Availability Solutions to Reduce Planned Downtime

Solution Reduces Planned Downtime Due to ...

Online patching, rolling upgrades, and migrations (planned maintenance topics in Section 4.1)

System, clusterware, operating system, and database upgrades

Dynamic Resource Provisioning

System and database changes

Online Reorganization and Redefinition

Data changes

Transportable Technologies

Database migration to a new platform

Online Application Maintenance and Upgrades

Application changes


Section 4.1 summarizes Oracle's high availability solutions that prevent, tolerate, and reduce downtime for all types of planned maintenance.

4.1 Oracle High Availability Solutions and Recovery Times for Planned Downtime

Oracle provides high availability solutions to prevent, tolerate, and reduce downtime for all types of planned maintenance. Table 4-2 describes the various Oracle high availability solutions for planned downtime, along with the outage time that can be attained with each solution. In all cases, Oracle recommends that you extensively test before performing any rolling upgrade.

See Also:

Table 7-5 for a summary of the attainable recovery times for all types of planned downtime for each Oracle high availability architecture

Table 4-2 Oracle High Availability Solutions for Planned Downtime

Maintenance Type Oracle Recommended Solution Solution Description Outage Time

Operating system and hardware upgrades

Oracle Real Application Clusters and Oracle Clusterware

Section 4.1.1

No downtime

Oracle interim patches

Oracle Real Application Clusters (Oracle RAC)

Section 4.1.3

No downtimeFoot 1 

Online patches

Online Patching

Section 4.1.4

No downtime

Oracle Clusterware upgrades and patches

Oracle Clusterware

Section 4.1.5

No downtime

Oracle ASM upgrades

Oracle Automatic Storage Management

Section 4.1.6

No downtime

Storage migrationFoot 2 

Oracle Automatic Storage Management

Section 4.1.7

No downtime

Migrating to Exadata Storage

Oracle MAA best practices discussed in the "Best Practices for Migrating to Oracle Exadata Storage Server" white paper

Section 4.1.8

Outage time depends on solution chosen

Upgrading Exadata Storage

The Exadata Patch Manager

Section 4.1.9

No downtime

Migrating a single-instance database to Oracle RAC

Oracle Clusterware

Section 4.1.1

No downtime

Migrating to Oracle ASM or migrating a single-instance database to Oracle RAC

Oracle Data Guard

Section 4.1.2

Seconds to minutes

Patch set and database upgrades

Oracle Data Guard using SQL Apply

Section 4.1.10

Seconds to minutes

Platform migration across Windows and Linux platforms and other select platformsFoot 3 

Oracle Data Guard

Section 4.1.10

Seconds to minutes

Platform Migration across the same endian format platforms

Transportable database

Section 4.1.11

Minutes to hours

Platform migration across different endian format platforms

Transportable tablespaces

Section 4.1.12

Minutes to hours

Patch set and database upgrades, platform migration, rolling upgrades, and when different character sets are required

Oracle Streams

Section 4.1.10, Section 4.1.11, Section 4.1.12, and Section 4.5

Seconds to minutes

Application upgrades

Online Application Maintenance and Upgrades

Section 4.5

No downtime


Footnote 1 Patches that cannot be applied by performing a rolling upgrade can be applied with the MINIMIZE_DOWNTIME option of the OPatch utility to reduce the availability impact of the patch application.

Footnote 2 An example is migration from traditional storage to low-cost storage.

Footnote 3 See My Oracle Support (formerly OracleMetalink) Note 413484.1 at http://metalink.oracle.com/.

See Also:

4.1.1 Operating System Upgrades and Hardware Upgrades

Using Oracle RAC is the recommended solution for avoiding downtime during system and hardware upgrades.

If you cannot perform the upgrade using Oracle RAC, then the recommended solution is to use Oracle Data Guard and physical standby databases as described in Section 4.1.2. Alternatively, you can use cold cluster failover with Oracle Clusterware as described in Section 4.1.5.

Oracle RAC Solution Description

To perform upgrades using Oracle RAC:

  1. Stop the application service if the application service runs on more than one instance in the cluster. If the application service runs on only the instance being upgraded, then relocate the service to another node in the cluster.

    Stopping the application service implicitly redirects connections off of the destination instance when using fast application notification (FAN).

  2. Shut down destination instance or instances with the IMMEDIATE option.

  3. Shut down and disable Oracle Clusterware.

    Disabling Oracle Clusterware prevents it from starting automatically.

  4. Perform maintenance.

  5. Enable and start Oracle Clusterware.

    This step implicitly starts the database instances.

  6. Start the application service.

    This step implicitly redirects connections to the destination instance when using FAN.

  7. Repeat all steps on the next node.

Additional Considerations

Verify the following:

  • Ensure that the planned maintenance can be done in a rolling fashion from an operating system perspective.

  • Ensure that the database and clusterware versions are certified with the new system and hardware changes.

    See Also:

    Your operating system-specific Oracle Real Application Clusters installation guide

4.1.2 System and Cluster Upgrades and Migrations Using Oracle Data Guard

Oracle Data Guard and physical standby databases are the recommended solution for performing system and cluster upgrades that you cannot upgrade using Oracle RAC rolling upgrades. Oracle Data Guard is also recommended for migrations to Oracle ASM, Oracle RAC, 64-bit systems, Windows to Linux or Linux to Windows, or the same processor architecture platforms. For example:

  • Use Oracle Data Guard for system upgrades that cannot be upgraded using Oracle RAC rolling upgrades due to system restrictions.

  • Use Oracle Data Guard when migrating to Oracle ASM, from a noncluster environment to Oracle RAC, to a different platform with the same endian format, or to a different platform with the same processor architecture.

In general, you first upgrade the physical standby database and then perform an Oracle Data Guard switchover to the physical standby database.

To upgrade the physical standby database and perform a switchover:

  1. Upgrade the system or change the physical standby database system to your destination environment.

    For example, you can convert the standby database from a single-instance database to an Oracle RAC database by using Oracle ASM, without any impact on the primary database. Then, restart the standby database, ensure that it matches your destination environment, and wait for Redo Apply to finish applying all redo data to the standby database.

  2. Perform an Oracle Data Guard switchover. Optimally, the switchover should take only seconds to minutes.

  3. Shut down the original primary database (now the standby database).

  4. Upgrade or make system changes to the original primary database.

  5. Restart the upgraded database as a standby database and allow recovery to automatically synchronize the databases.

  6. Optionally, perform an Oracle Data Guard switchover to return the standby database to the primary database role.

Additional Considerations

  • For fastest switchover, configure the standby database to use real-time apply and, if possible, ensure that the databases are synchronized before the switchover operation.

  • Use Oracle Data Guard and physical standby databases to perform system and cluster upgrades if Oracle RAC rolling upgrade or online patching is not possible. See Oracle Data Guard Concepts and Administration for more information.

  • The conversion from 32-bit to 64-bit is automatic if you are applying an Oracle Database patch set or doing an Oracle Database upgrade at the same time. If you are upgrading only the operating system, then you may need to perform additional post-upgrade steps that are described in support note 414043.1 at http://metalink.oracle.com/. Also, see the Oracle Database Upgrade Guide for more information about upgrades.

4.1.3 Oracle Interim Database Patches

Use Oracle RAC to avoid downtime when applying Oracle interim database patches. You can apply approximately 90% of the new patches using Oracle RAC.

If you cannot apply patches using Oracle RAC, then use Oracle Data Guard and physical standby databases. See Section 4.1.2 for more information.

Solution Description

Oracle interim (one-off) patches to database software are usually applied to implement known fixes for software problems, or to apply diagnostic patches to gather information about a problem. Plan to apply patches during a scheduled maintenance outage.

Oracle provides the capability to do rolling patch upgrades with Oracle RAC with little or no database downtime using the OPatch command-line utility.

An Oracle RAC rolling upgrade enables all but one of the instances of the Oracle RAC installation to be available during the scheduled outage, further reducing the impact on the application downtime required for scheduled outages. The Oracle OPatch utility enables you to apply the patch successively to the different instances in an Oracle RAC installation.

Additional Considerations

Performing a rolling upgrade is possible only for patches that are certified for rolling upgrades. Typically, patches that can be installed in a rolling upgrade include:

  • Patches that do not affect the contents of the database, such as the data dictionary

  • Patches not related to Oracle RAC internode communication

  • Patches related to client-side tools such as SQL*Plus, Oracle Database utilities, development libraries, and Oracle Net

  • Patches that do not change shared database resources, such as data file headers, control files, and common header definitions of kernel modules

Do not use Oracle RAC to perform rolling upgrades of patch sets.

See Also:

Your operating system-specific Oracle Real Application Clusters installation guide

4.1.4 Online Patching

Online patching is the recommended solution for avoiding downtime when an online patch is available for debug patches and interim patches.

Solution Description

Online patches are a special type of interim patch that you can apply while the instance remains online.

Oracle provides the capability to perform online patching with any Oracle database using the OPatch command-line utility.

Additional Considerations

  • Oracle provides combo patches, which are online patches that can also be applied when the instance is offline.

    Thus, you can apply the online patch initially to avoid unplanned downtime. However, because online patches have a memory overhead, you should roll back the online patch and apply the offline patch during schedule downtime.

  • Oracle provides certified online patches for diagnostic patches or various bug fixes.

  • Oracle provides online patches when the patch does not change shared memory structures in the System Global Area (SGA), or other critical internal code structures.

  • Applying an online patch increases memory consumption on the system because each Oracle process uses more memory from the Program Global Area (PGA) during the patch application. Consider memory requirements before you begin applying an online patch. Each online patch is unique, and the memory requirements are patch-specific. Apply the patch on your test system first so that you can assess the effect of the online patch on your production system and estimate any additional memory usage.

See Also:

4.1.5 Upgrading Oracle Clusterware

Performing rolling upgrades of Oracle Clusterware is the recommended solution for avoiding downtime when upgrading Oracle Clusterware.

Solution Description

You can perform all upgrades to Oracle Clusterware in a rolling fashion.

See Also:

Your operating system-specific Oracle Clusterware installation guide

4.1.6 Upgrading Oracle Automatic Storage Management (Oracle ASM)

Performing rolling upgrades is the recommended solution for upgrading Oracle ASM.

Solution Description

You can perform all upgrades starting with Oracle Database 11g (and later releases) in a rolling fashion.

4.1.7 Storage Migration

Using Oracle ASM is the recommended solution for performing storage migrations.

Solution Description

Oracle ASM enables you to add all disks in one storage array and subsequently drop all disks from another array. Oracle ASM automatically rebalances and migrates data to the new storage while the database remains operational.

Additional Considerations

Before removing the source storage array, ensure that the rebalancing is complete.

See Also:

The chapter about performing Oracle ASM Data Migration in the Oracle Database Backup and Recovery User's Guide

4.1.8 Migrating Oracle Exadata Storage Server Software

The guidelines in the MAA white paper "Best Practices for Migrating to Oracle Exadata Storage Server" define best practices for pre-migration, migration, and post migration from legacy storage to Oracle Exadata Storage Server. The best practices help you determine the most appropriate migration strategy given the application service levels and attributes.

The MAA white paper is available at http://www.oracle.com/technology/products/bi/db/exadata/pdf/migration-to-exadata-whitepaper.pdf.

Solution Description

This section summarizes the steps described in the "Best Practices for Migrating to Oracle Exadata Storage Server" MAA white paper.

To migrate Oracle Exadata Cell deployments:

Pre migration:

  1. Perform capacity planning

  2. Employ Exadata configuration automation

  3. Ensure the Infiniband network is used for Oracle Clusterware and Oracle RAC communication

  4. Ensure proper Oracle ASM software and disk group attributes

  5. Ensure proper database software and compatibility

  6. Enable the DB_BLOCK_CHECKSUM initialization parameter

Migration:

  1. Configure the Oracle ASM allocation unit size to 4 MB

  2. Configure optimal database extent sizes

  3. Choose to migrate to Oracle Exadata Storage Server either logically or physically:

    • Logical migrations: database extent size changes

    • Physical migrations: no database extent size change

  4. Create new tablespaces on Oracle Exadata Storage Server

Post-Migration:

  1. Check disk groups for rebalance

  2. Assess index requirements

See Also:

The HP Oracle Exadata Storage Server Web site at http://www.oracle.com/technology/products/bi/db/exadata/index.html

4.1.9 Upgrading Oracle Exadata Storage Server Software

See the Oracle Exadata Storage Server Software documentation to learn about the solutions and tools used to perform upgrades.

See Also:

4.1.10 Patch Set and Database Upgrades

Oracle Data Guard using SQL Apply is the recommended solution for performing patch set and database upgrades with minimal downtime. Section 4.1.10.1 describes this solution. If the source database is using data types not natively supported by SQL Apply, you can use Extended Datatype Support (EDS) to accommodate several more advanced data types.

If the source database is using a software version not supported by SQL Apply rolling upgrade (earlier than Oracle Database release 10.1.0.3) or using EDS cannot sufficiently resolve SQL Apply data type conflicts, then consider using Database Upgrade Assistant (DBUA)Foot 1 , transportable tablespace, or Oracle Streams:

  • DBUA provides a graphical user interface (GUI) utility that guides you through the upgrade process and is the simplest and recommended method of upgrading a database. However, if the time it takes DBUA to upgrade a database does not fit in the defined maintenance window, then consider using transportable tablespaces to perform a database upgrade in less than one hour.

  • Transportable tablespaces is the solution if you cannot use SQL Apply but the maintenance window requires downtime to be less than an hour in duration, and the database being upgraded has a small number of simple schemas and data files that do not need to be transferred as part of the transport process (such as when the data files will be used in place). Section 4.1.10.2 describes the transportable tablespace solution.

  • Oracle Streams is the solution that provides the most flexibility when performing database upgrades and additional data type support. Section 4.1.10.3 describes this solution.

See Also:

Oracle Database High Availability Best Practices for more information and for help choosing the database upgrade method appropriate for your configuration

4.1.10.1 Solution for Database Upgrades Using Data Guard and SQL Apply

To upgrade an Oracle database using SQL Apply:

  1. Upgrade logical standby database to the new release and evaluate the change.

  2. Ensure that SQL Apply has applied all redo data to the logical standby database.

  3. Disconnect applications.

  4. Perform an Oracle Data Guard switchover.

  5. Reconnect applications to the new primary database.

  6. Shut down the original primary database (now the logical standby database).

  7. Execute database software upgrade steps on the new standby database.

  8. Restart the standby database and allow recovery to synchronize.

  9. Optionally, perform an Oracle Data Guard switchover to return to the original database.

Additional Considerations

  • SQL Apply rolling upgrades are only supported for Oracle Database release 10.1.0.3 and later. For complete information, see the chapter about using SQL Apply to upgrade Oracle Database in Oracle Data Guard Concepts and Administration.

  • SQL Apply has some data type restrictions (see Oracle Data Guard Concepts and Administration for a list of the restrictions). If there are data type restrictions, consider implementing Extended Datatype Support (EDS).

    EDS enables SQL Apply to replicate changes to tables that contain some data types not natively supported from one database to another. Beginning with Oracle Database 10g Release 2 (10.2.0.4) Patch Set 3, SQL Apply supports the ability for triggers to fire on the logical standby database, which provides the basis of EDS. For an overview of EDS, see the MAA white paper "Extended Datatype Support" available at http://www.otn.oracle.com/goto/maa.

    For examples using EDS to support data types that are not natively supported by SQL Apply, see support note 559353.1 at http://metalink.oracle.com/.

  • Beginning with Oracle Database 11g release 11.1, you can use a physical standby database to execute a rolling database upgrade using the KEEP IDENTITY clause and a transient logical standby database.

  • Oracle Data Guard is the best approach if performing an Oracle RAC rolling upgrade is not possible and there are no data type restrictions.

See Also:

4.1.10.2 Solution for Database Upgrades Using Transportable Tablespaces

If you cannot use SQL Apply because of data type conflicts, and testing shows that upgrading with DBUA cannot meet uptime requirements, then consider using transportable tablespaces to upgrade your database.

To use the transportable tablespaces feature to upgrade an Oracle database:

  1. Install Oracle Database software on the destination system and perform the initial steps on the source database to prepare for the transport process.

  2. Prepare the source and destination databases:

    1. Gather information from the source database.

    2. Create the destination database with Database Configuration Assistant (DBCA).

    3. Prepare the destination database for Oracle Data Pump usage and to accept the tablespaces being transported.

  3. Transport the user tablespaces:

    1. Ready the source database for transport by disconnecting users and restricting access to the source database, making all user tablespaces READ ONLY, and capturing sequence starting values from the source database.

    2. Stop Redo Apply and shut down the standby database.

    3. Transport the user tablespaces.

  4. Verify that the destination database is complete and functional, and then back up the destination database.

See Also:

The MAA white paper "Database Upgrade Using Transportable Tablespaces" available at http://www.otn.oracle.com/goto/maa

Additional Considerations

  • The transportable tablespace feature is an option for performing a database upgrade in less than one hour for databases that have simple schemas and where the data files do not need to be transferred as part of the transport process (such as when the data files will be used in place). See the MAA white paper "Database Upgrade Using Transportable Tablespaces" available on the MAA Web site at

    http://www.otn.oracle.com/goto/maa

  • Using transportable tablespaces reduces database upgrade time by moving all user tablespaces from a database running an earlier software release to an empty destination database running a current software release. With transportable tablespaces, tablespace data files are plugged in to the database by copying the data files to the destination database, then importing the object metadata into the destination database.

4.1.10.3 Solution Description for Database Upgrades Using Oracle Streams

Oracle Streams is similar in function to Oracle Data Guard SQL Apply. Like SQL Apply, Oracle Streams can use Extended Datatype Support (EDS) to replicate changes to tables that contain some data types not natively supported from one database to another.

To perform a database upgrade using Oracle Streams:

  1. Before you begin the upgrade process, see Oracle Streams Concepts and Administration for information about how to perform a database upgrade on a database that has user-defined types.

  2. Create a duplicate database. (The ideal replica will begin as a physical standby database that is up-to-date.)

  3. Activate and upgrade the database to the later version.

  4. Enable Oracle Streams replication.

  5. During the upgrade of the replica, the source database continues ahead. After the replica is caught up, perform a switchover.

See Also:

4.1.11 Platform Migration Across the Same Endian Format Platforms

Consider the following approaches when you perform platform migrations across the same endian format platforms:

  • Oracle Data Guard (physical standby database) is the recommended solution for performing platform migration across Linux and Windows platforms. Section 4.1.2 describes this solution.

  • If cross-platform physical standby database is not available for the platform combination to be migrated, then use the transportable database feature. Section 4.1.11.1 describes this solution.

  • If the transportable database feature cannot perform the migration quickly enough, then use Oracle Streams. Section 4.1.11.2 describes this solution.

4.1.11.1 Solution Description for Platform Migration Using Transportable Database

Use transportable database for platform migration only when cross-platform physical standby database or logical standby database is not supported for the platform combination in questionFoot 2 .

For example, to move from Windows x86-64 to Linux x86-64, it is best to use a cross-platform standby database instead of transportable database. There is less downtime (only the time it takes to switch over) and it is possible to run the standby database on the new platform temporarily to ensure that everything is working as planned.

To perform a platform migration using transportable database (with destination system conversion):

The high-level steps are as follows:

  1. Place the source database in read-only mode.

  2. Run the RMAN CONVERT DATABASE command.

  3. Move files to the destination system.

  4. Run RMAN generated script to convert data files with undo data to destination platform format.

  5. Run RMAN generated script to complete the migration.

When using transportable database, the downtime required for a platform migration is determined by the time needed to:

  • Place the source database in read-only mode

  • Convert data files that contain UNDO to the new platform format (data files without UNDO do not require conversion)

  • Transfer all data files from the source system to the destination system

    You can significantly minimize this time by using a storage infrastructure that can make the data files available to the destination system without the need to physically move the files.

  • Invalidate and recompile all PL/SQL using SQL scripts utlirp.sql and utlrp.sql

See Also:

The "Platform Migration using Transportable Database" white paper available at http://www.otn.oracle.com/goto/maa

4.1.11.2 Solution Description for Platform Migration Using Oracle Streams

Oracle Streams enables replication of updates between multiple databases, independent of Oracle platform or database release. Therefore, Oracle Streams may provide the fastest approach for database upgrades and platform migration.

Oracle Streams provides database support for a wide variety of datatypes, but does not provide native support for data movement of some advanced datatypes, such as for SDO_GEOMETRY and object types. However, you can work around datatype restrictions as follows:

  • By using Extended Datatype Support (EDS), you can take advantage of the flexibility of Streams to accommodate several more advanced datatypes.

    A PL/SQL package, EXTENDED_DATATYPE_SUPPORT (EDS), is available to generate the appropriate database objects to accomplish this workaround. The EXTENDED_DATATYPE_SUPPORT package is available for download as an attachment to this article. The downloaded file (available from My Oracle Support Note 556742.1:1) contains a Readme file and SQL files to load in the database.

    The EDS package generates workaround scripts to enable Oracle Streams support on tables with the following data types:

    • Object column with simple object types

    • Object column with nested object types

    • Varray

    • Spatial type SDO_GEOMETRY

    • XMLType

    After installing the EDS package, you can query the EDS_SUPPORTED view to identify the list of tables with datatypes unsupported natively by Oracle Streams that can be supported with EDS.

  • By creating shadow tables on the source database.

    You can create a trigger on tables with unsupported data types to capture and propagate changes to tables with supported data types. Those changes are replicated by Oracle Streams to the destination database. You can customize the apply mechanism to apply the changes to the original tables in the destination database.

Oracle Streams implementations are very flexible and can be customized, and thus may require additional effort for configuration, testing, and administration.

To perform a platform migration with Oracle Streams:

  1. Set up the Oracle Streams environment on the source database.

  2. Instantiate the replica database (destination database) using the new destination version or on the destination platform.

  3. Set up the Oracle Streams environment on the destination database.

  4. Enable Oracle Streams to propagate all changes made on the source database to the destination database to completely synchronize the destination database with the source.

  5. Connect users to destination database and shutdown source database.

  6. Remove the Oracle Streams configuration.

See Also:

4.1.12 Platform Migration Across Different Endian Format Platforms

Consider the following approaches when performing platform migrations on different endian format platforms:

Solution Description for Transportable Tablespace

Migrating a database to a new platform using a different endian format with transportable tablespaces requires the following high level steps.

To migrate a database to a new platform using Transportable Tablespace:

  1. Create a new, empty database on the destination platform.

  2. Import objects required for transport operations from the source database into the destination database.

  3. Export transportable metadata for all user tablespaces from the source database.

  4. Transfer data files for user tablespaces to the destination system.

  5. Use RMAN to convert the data files to the destination system's endian format.

  6. Import transportable metadata for all user tablespaces into the destination database.

  7. Import the remaining database objects and metadata (that were not moved by the transport operation) from the source database into the destination database.

If the destination database is being moved to a new location (for example, to a new data center) during the migration, then create a physical standby database from the original primary database co-located with the destination database. After an Oracle Data Guard switchover, transport the tablespaces from the source to the destination without incurring the file transfer time as part of the downtime.

Additional Considerations

Transportable tablespace has limitations and restrictions in regard to character sets, opaque types, and system tablespace objects. Unlike previous solutions, the steps are not automated.

Perform a platform migration using transportable tablespaces if all of the following are true:

  • The source and destination platforms have different endian formats.

  • The time required to perform a full Data Pump Export and Import does not fit in the maintenance window.

See Also:

4.2 Dynamic Resource Provisioning

For system and database changes, use the dynamic resource provisioning features that are discussed in the following sections:

4.2.1 Dynamic Reconfiguration of the Database

Oracle continues to broaden support for dynamic reconfiguration of the database, enabling it to adapt to changes in hardware demands without any service interruptions. Oracle Database dynamically accommodates various changes to hardware and database configurations by providing the ability to:

  • Add and remove processors from a symmetric multiprocessing (SMP) server

  • Add and remove nodes and instances in an Oracle RAC environment

  • Dynamically grow and shrink its shared memory allocation and automatically tune memory online using automatic shared memory management

  • Add and remove database disks online without disturbing database activities using Oracle ASM

  • Add and remove storage arrays or Exadata Cells online without disturbing database activities using Oracle ASMFoot 3 

  • Automatically rebalance the I/O load across the database storage using Oracle ASM

  • Move data files online when adding or dropping disks using Oracle ASM, which automatically rebalances database storage whenever the storage configuration is changed

  • Change almost all initialization parameters without shutting down the instance, by using either of the following SQL*Plus statements:

    • The ALTER SESSION statement changes the value of a parameter during a session.

    • The ALTER SYSTEM statement changes the value of a parameter in all sessions of an instance for the duration of the instance.

These capabilities provide no-cost system changes and capacity on-demand provisioning, both of which are fundamental requirements of enterprise grid computing.

4.2.2 Automatic Tuning of Memory Management

Two memory management initialization parameters, MEMORY_TARGET and MEMORY_MAX_TARGET, enable automatic management of the System Global Area (SGA), Program Global Area (PGA), and other memory required to run Oracle Database.

MEMORY_MAX_TARGET specifies the maximum value to which MEMORY_TARGET can grow dynamically.

Table 4-3 MEMORY_MAX_TARGET and MEMORY_TARGET

IF ... AND ... THEN ...

You omit MEMORY_MAX_TARGET

You omit MEMORY_TARGET

The initialization parameters are left at their default values (0) and Oracle Database does not automatically tune memory

You omit MEMORY_MAX_TARGET

Include a value for MEMORY_TARGET

The database automatically sets MEMORY_MAX_TARGET to the value of MEMORY_TARGET

You omit MEMORY_TARGET

Include a value for MEMORY_MAX_TARGET

The MEMORY_TARGET parameter defaults to zero


Oracle Database uses a noncentralized policy to free and acquire memory in each subcomponent of the SGA and the PGA. Oracle Database automatically tunes memory by prompting the operating system to transfer granules of memory from less needy to more needy components. The granularity of the memory transfer is dependent on the current free memory and the amount of memory the operating system requires to maintain a basic level of service.

Note:

Automatic memory management with the MEMORY_TARGET and MEMORY_MAX_TARGET initialization parameters is supported on Linux, Windows, Solaris, HP-UX, and AIX. See Oracle Database Concepts and the Oracle Database Administrator's Guide for more information about all supported platforms.

4.2.3 Automated Distribution of Data Files, Control Files, and Log Files

Oracle ASM automatically distributes data files, control files, and log files across all available disks. Database storage is rebalanced whenever the storage configuration changes, including adding and removing disks, Exadata Cells, or storage arrays. Oracle ASM provides redundancy through the mirroring of database files, and provides optimal performance by automatically striping database files across available disks.

See Also:

For more information about Oracle ASM:

4.3 Online Reorganization and Redefinition

One way to enhance availability and manageability is to allow user access to the database during a data reorganization operation. The Online Reorganization and Redefinition feature in Oracle Database offers administrators significant flexibility to modify the physical attributes of a table and transform both data and table structure while allowing user access to the database. This capability improves data availability, query performance, response time, and disk space usage. All of these are important in a mission-critical environment and make the application upgrade process easier, safer, and faster.

This online architecture provides the following benefits:

The ability to modify table physical attributes and transform both data and table structure has been available since Oracle8i. Table 4-4 provides a comprehensive table of data reorganization capabilities.

Table 4-4 New Data Reorganization Capabilities by Release

Action Oracle 9i Oracle Database 10g Release 1 Oracle Database 10g Release 2 Oracle Database 11g

Online Reorganization using the package DBMS_REDEFINITION


Modify table storage parameters

Move the table to a different tablespace

Add support for parallel queries

Add or drop partitioning support

Re-create the table to avoid fragmentation

Change from a table to an Index-Organized Table, or vice-versa

Add or drop a column

Transform a column using a function

Clones grants, constraints, and triggers

Convert a LONG to a LOB

Reorganize using a unique key

Specify columns to order table by

Reorganize a single partition

Advanced queue and clustered tables

Table containing an ADT

Retain and clone statistics

Clone check and not null constraints

Copies dependent objects for nested tables

Table with materialized view logs or materialized views

No recompilation of dependent objects when redefinition does not logically affect objects

Reclaiming Unused Space

Not applicable

Use the SHRINK SPACE clause on the following statements:


ALTER TABLE

ALTER INDEX

ALTER MATERIALIZED VIEW

ALTER MATERIALIZED VIEW LOG

Not applicable

Not applicable

Index Create Online

CREATE INDEX emp.ename.idx ON emp(ename) ONLINE;

  • Parallel operations supported

  • Partitions supported

  • All index types except cluster

Not applicable

Not applicable

DML lock-free online index creation, allowing transparent creation with no dependency on workload

Index Coalesce Online

ALTER INDEX emp.ename_idx COALESCE;

  • Parallel operations supported

  • Partitions supported

  • All index types

Not applicable

Not applicable

Not applicable

Index-Organized Table Move Online

ALTER TABLE emp MOVE ONLINE;

  • Parallel operations not supported

  • Partitions supported

  • Index-Organized Table only

Not applicable

Not applicable

Not applicable


4.4 Transportable Technologies

For database migration to a new platform, use the transportable technology features. Transportable technologies provides transportable database and transportable tablespace:

See Also:

4.5 Online Application Maintenance and Upgrades

For application changes, use the features described in the following list that can significantly reduce (or eliminate) the application downtime required to make changes to an application's database objects:

4.5.1 Edition-Based Redefinition

Edition-based redefinition allows you to upgrade the database component of an application while the application is in use, thereby minimizing or eliminating down time. Your changes do not affect users of the application who continue to run the unchanged application until you make the upgraded application available to all users.

In favorable cases, rollover is possible. The pre-upgrade and the post-upgrade editions can be used concurrently so that sessions that were started before the post-upgrade edition was published can continue to use the pre-upgrade edition until they are terminated naturally while new sessions use the post-upgrade edition. In less favorable cases, all pre-upgrade sessions must be terminated before new sessions can be allowed to use the post-upgrade edition. In such cases, the application suffers a small amount of downtime.

The following sections describe the Editions, Editioning Views, and Crossedition Triggers features of edition-based redefinition.

4.5.1.1 Editions

Editions are nonschema objects; as such, they do not have owners. Editions are created in a single namespace, and multiple editions can coexist in the database. The edition feature allows you to copy database objects and redefine the copied objects in isolation.

Editions provide a privacy mechanism for installing new code and for making data changes so that the running production application does not see the changes. When all the required changes have been made in private, they are published in a single atomic operation.

4.5.1.2 Editioning Views

If you change the structure of one or more tables, you must also use the editioning view feature to insulate application code from changes made to the underlying table during online application upgrade. Tables are not editionable.

Columns are added to the underlying table and a new editioning view is created in the post-upgrade edition to expose and to populate them. (Editions do not allow versions of the underlying table.)

Triggers may be created on an editioning view and its columns may be used in SQL hints. The defining SELECT statement for an editioning view has exactly one table in its FROM list and NO WHERE clause. The SELECT list is used to project a subset of the table's columns and, typically, to rename them. It therefore defines a mapping of physical columns to logical columns.

4.5.1.3 Crossedition Triggers

Crossedition triggers are used as part of edition-based redefinition to keep the data in the pre-upgrade and post-upgrade editions in step with each other. The pre-upgrade application remains in use concurrently while changes are applied, redefining the pre-upgrade edition to a post-upgrade edition.

If users must be able to change data in the tables while you are changing the table structure, you also use forward crossedition triggers. If you make the upgraded application available to some users while others continue to use the older version of the application, you also use reverse crossedition triggers. Crossedition triggers are not a permanent part of the application because you drop or disable them after you have made the upgraded application available to all users.

4.5.2 Oracle Streams for Rolling Upgrades

Consider using Oracle Streams for fast rolling upgrades. However, while Oracle Streams upgrades can achieve little or no database down time, your ability to configure this solution will require some operational investment. See Section 3.6, "Oracle Streams" and Oracle Streams Concepts and Administration for more information.

4.5.3 DDL with the WAIT Option

Data definition language (DDL) commands require exclusive locks on internal structures. If DDL commands are issued, then these locks may not be available causing the statement to immediately fail even though the DDL could have possibly succeeded subseconds later. Specifying DDL with the WAIT option (the new default) resolves this issue. You specify the wait time instance-wide (in the initialization parameter file) and modify the wait time on a session level.

Specifying DDL commands with the WAIT option provides more flexibility to define grace periods for such commands to succeed instead of raising an error right away, thus requiring additional application logic to handle such errors.

4.5.4 ENABLE, DISABLE, and FOLLOWS Clauses for CREATE TRIGGER

The states (ENABLE and DISABLE) and ordering (FOLLOWS) are triggers to control the firing of triggers. These additional states allow greater administrative control for triggers. You can use the CREATE TRIGGER statement in a disabled state to validate successful compilation before enabling. In addition, the trigger order can be controlled with the FOLLOWS clause.

4.5.5 Enhanced ADD COLUMN Functionality

Default values of columns are maintained in the data dictionary for columns specified as NOT NULL.

Adding new columns with DEFAULT values and NOT NULL constraint no longer requires the default value to be stored in all existing records. This enhancement not only enables a schema modification in subseconds and works independently of the existing data volume, but it also consumes no space.

4.5.6 Finer-Grained Dependencies

Prior to Oracle Database 11g, metadata would record mutual dependencies between objects with the granularity of the whole object. For example, PL/SQL unit P depends on PL/SQL unit Q, or view V depends on table T. In cases such as these, the dependent objects were sometimes invalidated when there was no logical requirement to do so. For example, if view V depends only on columns C1, C2, and C3 in table T and a new column, C99, is added, the validity of view V is not logically affected. Nevertheless, in earlier releases, V was invalidated by the addition of column C99.

Beginning with Oracle Database 11g release 1 (11.1), dependency metadata is recorded at a finer level of granularity so that the addition of C99 does not invalidate view V. Similarly, if procedure P depends only on elements E1 and E2 in package PKG, then if element E99 is added to PKG, procedure P is not invalidated. (In Oracle Database 10g, this change to PKG would invalidate procedure P.)

By reducing the consequential invalidation of dependent objects in response to changes in the objects they depend upon, application availability is increased. The benefit occurs both in the development environment and when a live application is parsed or upgraded. The benefit occurs when an Oracle Database patch set is applied because changes to schema objects must be compatible and, therefore does not cause consequential invalidations.

4.5.7 Invisible Indexes

An invisible index provides an alternative to making an index unusable or even to dropping the index. An invisible index is maintained for any DML operation but is not used by the optimizer unless you explicitly specify the index with a hint.

Applications often have to be modified without being able to bring the complete application offline. Invisible indexes enable you to use temporary index structures for certain operations or modules of an application without affecting the overall application. Furthermore, you can use invisible indexes to test the removal of an index without dropping it right away, thus enabling a grace period for testing in production environments.

4.5.8 Materialized View Logging Control

Oracle Database includes session-level control for materialized view logs. You can disable the capture of changes for materialized views (materialized view logs) for an individual session while logging continues for changes made by other sessions. This feature reduces application patching downtime.

4.5.9 Dependent PL/SQL Recompilation After Online Table Redefinition

This feature minimizes the need to recompile dependent PL/SQL packages after an online table redefinition. If the redefinition does not logically affect the PL/SQL packages, recompilation is not needed. This optimization is turned on by default.

This feature reduces the time and effort to manually recompile dependent PL/SQL after an online table redefinition. This also includes views, synonyms, and other table dependent objects (with the exception of triggers) that are not logically affected by the redefinition.

See Also:

Oracle Database Administrator's Guide for information about redefining tables online


Footnote Legend

Footnote 1: DBUA incurs downtime. The amount of downtime is dependent on a number of factors. See Oracle Database High Availability Best Practices for additional considerations when choosing DBUA as an upgrade option. See Oracle Database Upgrade Guide for instructions on using DBUA to upgrade Oracle Database software.
Footnote 2: Beginning with Oracle Database 11g, the primary and standby systems in an Oracle Data Guard configuration can have different CPU architectures, operating systems (for example, Windows and Linux), operating system binaries (32-bit and 64-bit), and Oracle Database binaries (32-bit and 64-bit). For the latest capabilities and restrictions, see support note 413484.1 at http://metalink.oracle.com/.
Footnote 3: See the Exadata white paper "Best Practices for Migrating to HP Oracle Exadata Storage Server" at http://www.oracle.com/technology/products/bi/db/exadata/index.html.