I started learning Oracle since 2002 but no end of Oracle, Hence keep learning it.
Wednesday, July 28, 2010
Maximum Availability Architecture Minimal Downtime Migration to ASM Oracle 10g Release 2
INTRODUCTION :
This paper describes procedures to dramatically reduce downtime during the process of migrating Oracle databases residing on raw partitions, volumes or conventional file systems to Automatic Storage Management (ASM) by using Oracle Recovery Manager (RMAN) and Oracle Data Guard. This paper is equally relevant to existing Data Guard users who want to migrate to ASM, and users who do not currently use Data Guard, but who seek to minimize downtime during migration to ASM.
There are several alternative approaches to performing ASM migration. Oracle recommends using one of the following methods:
• ASM migration using Oracle Data Guard physical standby: Use this method if your requirement is to minimize downtime during the migration. It is possible to reduce total downtime to just seconds by using the best practices described in this white paper.
• ASM migration using Oracle RMAN: A simpler approach, but one that can result in downtime measured in minutes to hours, depending on the method used for migration. This RMAN procedures for migrating your database to ASM are documented in the Oracle Database Backup and Recovery Advance User’s Guide 10g Release 2, Chapter 16
ORACLE AUTOMATIC STORAGE MANAGEMENT :
Oracle Database 10g Automatic Storage Management (ASM) is an integrated volume manager and file system for Oracle database files. ASM simplifies database storage administration by automating the layout of Oracle database files, such as datafiles, control files, redo log files, and backup files. ASM brings significant key values to Oracle Database platforms at no additional cost. ASM improves manageability by simplifying storage provisioning, storage array migration, and storage consolidation. ASM provides flexible easy-to-manage interfaces including the SQL*Plus, Oracle Enterprise Manager GUIs and a UNIX-like command line interface.
ASM provides sustained best-in-class performance because of its MAA Best Practices - Minimal Downtime Migration to ASM Page 3
Maximum Availability Architecture innovative rebalancing feature that distributes data evenly across all storage resources, providing for an even distribution of I/O and optimal performance. ASM is the preferred file system and volume manager for Oracle database files because ASM:
• Simplifies and automates storage management
• Increases storage utilization, uptime, and agility
• Delivers predictable performance and availability service level agreements
ORACLE DATA GUARD :
Data Guard is a central component of an integrated Oracle Database High Availability (HA) solution set that helps organizations ensure business continuity by minimizing the various kinds of planned and unplanned downtime that can affect the business. Data Guard provides the management, monitoring, and automation software infrastructure to create, maintain, and monitor one or more standby databases, to protect enterprise data from failures, disasters, errors, and data corruptions. Going beyond traditional Disaster Recovery (DR) solutions, you can configure Data Guard to automatically fail over the production database to a standby system if the primary database fails, thus achieving a level of high availability required for mission critical applications. In addition to providing HA/DR, Data Guard standby databases also support production functions for reporting, queries, backups and testing, while in a standby database role. The procedures described in this paper provide an example of how Data Guard can also help reduce planned downtime. The following list summarizes the procedures described in this paper:
1. Create a Data Guard standby database.
2. Migrate the standby database to ASM and test until you are satisfied that the migration has been successful.
3. Execute a planned switchover, transforming the standby database into the new primary database. The switchover can be executed in seconds. This is the only downtime required for the migration.
4. If you are using Data Guard as an HA/DR solution, you can then migrate the new standby (old primary database) into ASM, resulting in all databases in your Data Guard configuration having been migrated to ASM.
ASM MIGRATION STEPS USING ORACLE DATA GUARD :
The steps described in this section assume you create a physical standby database for the sole purpose of minimizing downtime during your migration to ASM.
Maximum Availability Architecture Note: If you have an existing Data Guard configuration with a physical standby database that you can use to perform the migration to ASM, use the procedures described in Chapter 16 of the Oracle Database Backup and Recovery Advance User’s Guide 10g Release 2 to perform the migration. Of course, when following this procedure it is always recommended that you convert standby databases first, then perform a switchover to minimize the downtime required to convert your primary database.
For clarity (and because this paper assumes you will use Data Guard for a one-time migration), the instructions use SQL*Plus commands to create the standby database, enable the Data Guard configuration, and perform a Data Guard switchover. However, if you plan to use Data Guard on an ongoing basis, consider using the Data Guard Broker management interface (DGMGRL) or Enterprise Manager, to greatly simplify creation and management of your Data Guard configuration [2]. These steps have been verified on a configuration running Oracle Database 10g Release 2 (10.2).
Migration to ASM can occur on either the same or a different server or cluster. The steps differ slightly depending on if the target is on a different server or cluster. The differences are highlighted, where necessary. The high-level steps include:
• Prepare the Source database
• Prepare the Data Guard standby database
• Instantiate the Standby database in ASM
• Enable Oracle Data Guard 10g
• Move production to ASM with Data Guard switchover
• Perform post ASM migration steps
The Appendix contains a copy of the database parameter files used to migrate a database called sales for two scenarios where:
To prepare the source database for migration, run the following steps:
1. Using RMAN, create a backup of the database including a copy of the current controlfile that you will use for the standby database.
RMAN> connect target /
RMAN> backup database include current controlfile for standby;
MAA Best Practices - Minimal Downtime Migration to ASM Page 5
Maximum Availability Architecture :
2. Make the backups accessible to the target system. The path to the backup files on the source and standby system must be the same for these procedures to work.
3. Using SQL*Plus, create a copy of the source database parameter file, which you will use as a template for the standby database parameter file.
SQL> create pfile=’/tmp/pfile.ora’ from spfile;
Copy the parameter file you created to the standby system
4. Using the Oracle Network Configuration Assistant (NETCA) utility create an Oracle Net Service name on the source system that connects back to the standby database.
Prepare the Data Guard Standby Database :
The following steps assume that the ASM instance is running and the ASM disk group has already been created
[4]. To prepare the standby database, perform the following steps:
1. Edit the parameter file you copied from the source database to make the following changes.
a. Remove the current reference to the CONTROL_FILES parameter.
b. Edit or Add the DB_CREATE_FILE_DEST parameter to point to the ASM disk group for the data files.
c. Edit or Add the DB_RECOVERY_FILE_DEST and DB_RECOVERY_FILE_DEST_SIZE parameters to point to the ASM disk group and define the size for the flash recovery area.
d. Optionally, if the online redo log files should be located in a specific ASM disk group other than what was specified by DB_CREATE_FILE_DEST and DB_RECOVERY_FILE_DEST, Edit or Add the DB_CREATE_ONLINE_LOG_DEST_n parameter to point to the ASM disk group for the redo log files.
e. Add the FAL_SERVER parameter that refers to a net service name that points to the source database.
f. Add the FAL_CLIENT parameter that refers to a net service name that points to the standby database.
The FAL_SERVER and FAL_CLIENT parameters should be prefixed with the Oracle SID of the standby database.
Note: If you create the standby database locally on the same resources, then you also need to set the following parameters.
Maximum Availability Architecture :
g. Edit the DB_UNIQUE_NAME parameter to be unique. This parameter is referenced in the file names created in the ASM Disk Group.
h. Edit or Add the LOG_ARCHIVE_CONFIG parameter to reference the two DB_UNIQUE_NAME that will be in the configuration. The LOG_ARCHIVE_CONFIG parameter will be: ‘dg_config=(,)’;
2. Create the Oracle Password file using the orapwd utility. For example: $ orapwd file=${ORACLE_HOME}/dbs/orapw${ORACLE_SID} password=sys password
3. Create a net service name on the standby system that connects back to the source database and a net service name on the standby system that refers to the standby database.
Instantiate the Standby Database in ASM :
RMAN provides a single command that instantiates the standby database using the information from the source database. In RMAN, you connect to the source database using the CONNECT TARGET command, and you connect to the standby database using the CONNECT AUXILIARY command. Before you can instantiate the database, you must create the server parameter file for the standby database.
1. Create the server parameter file using the parameter file you edited above:
SQL> create spfile from pfile=’/tmp/pfile.ora’;
2. Start the standby instance and instantiate the standby database:
No comments:
Post a Comment