- Shopping Bag ( 0 items )
Ships from: Los Angeles, CA
Usually ships in 1-2 business days
You'll also find authoritative coverage of key exam topics, including:
Look to Sybex for the knowledge and skills needed to succeed in today's competitive IT marketplace.
ORACLE DATABASE 10 G: ADMINISTRATION II EXAM OBJECTIVES COVERED IN THIS CHAPTER:
* Configure database parameters that affect RMAN operations.
* Change RMAN default settings with CONFIGURE.
* Manage RMAN's persistent settings.
* Start the RMAN utility and allocate channels.
Exam objectives are subject to change at any time without prior notice and at Oracle's sole discretion. Please visit Oracle's Training and Certification website ( oracle.com/education/certification/) for the most current exam objectives listing.
The Oracle Recovery Manager (RMAN) is the recommended backup and recovery tool provided with the Oracle Database Server 10g software. RMAN was first introduced in Oracle 8, and Oracle has steadily made enhancements and improvements with each new release of Oracle to meet the heavy demands required for database backup and recovery.
RMAN has grown to meet the demands of exponentially larger database sizes and more stringent availability requirements. Database servers have grown in size with technology gains of CPU, bus architectures, and more efficient disk subsystems. Disk costs have steadily decreased to more affordable and acceptable levels and have now become an economic alternative to tape storage.
RMAN has been redesigned in Oracle 10g to support these contemporary database environments. RMAN now places more focus on backing up and recovering the changes to the database instead of the complete database. This allows RMAN to support backups of larger databases and recover in faster timeframes.
This chapter discusses configuring and setting up RMAN. Configuring RMAN is the first step in the RMAN process. RMAN must be set up and configured to each environment's requirements. We will walk through this process in detail through examples and demonstrations.
This chapter walks through the parameters for RMAN that are demonstrated in the configuration settings. You will perform the basics of starting RMAN and configuring or setting up RMAN. The remainder of this chapter focuses on more complex topics such as autobackups using the control file.
This chapter takes you through a review of the common RMAN features. The review will demonstrate these features with examples. Where applicable, you will walk through the new 10g features and capabilities of RMAN.
The next few chapters discuss topics such as "Using RMAN," "Recovering from Non-critical Losses," "Flashback Database," "Recovering from User Errors," and "Database Corruption."
Exploring the Features and Components of RMAN
RMAN has many capabilities to facilitate the backup and recovery process. RMAN comes in both web-based GUI and command-line versions. In general, RMAN performs and standardizes the backup and recovery process, which can reduce mistakes made during this process. Below is a list of some of the existing RMAN features:
* Backup databases, tablespaces, datafiles, control files, and archive logs
* Compressing backups by determining which blocks have changed, and backing up only those blocks
* Performing change-aware incremental backups
* Providing scripting capabilities to combine tasks
* Logging backup operations
* Integrating with third-party tape media software
* Providing reports and lists of catalog information
* Storing information about backups in a catalog in an Oracle database
* Offering performance benefits, such as parallel processing of backups and restores
* Creating duplicate databases for testing and development purposes
* Testing whether backups can be restored successfully
* Determining whether backups are still available in media libraries
RMAN has many improvements to support new functionality and different database failures that were not supported before Oracle 10g. In addition, RMAN can handle larger database backups and recoveries in quicker timeframes. This means less availability impact during the backup and recovery process. Here is a list of new 10g RMAN features:
* Migrating datafiles across operating system platforms
* User error recovery with flashback
* Automated tablespace point-in-time recovery (TSPITR)
* Dropping a database
* Using backup copies and flash recovery
* Creating and using RMAN backup copies
* Configuring default disk backup types
* Recovering datafiles not backed up
* Blocking change tracking
* Unregistering a database from the catalog
* Actual compression of RMAN backups
* Error-reporting improvements
RMAN has a rich feature set that is improving dramatically with each release of Oracle. These features allow you to back up and recover a database in almost any situation. Many of these new features address problems or difficulties that you will encounter in your daily tasks.
Other features such as flash recovery, block change tracking, and actual backup compression are innovations within RMAN that allow a DBA to support evolving database requirements.
The main components of RMAN are GUI or command-line access, the optional recovery catalog, the RMAN commands and scripting, and tape media connectivity. These components enable you to automate and standardize the backup and recovery process. Each component is described as follows:
GUI or command-line interface method The web-enabled GUI or command-line interface (CLI) provides access to Recovery Manager. This process spawns off-server sessions that connect to the target database, which is the database that will be backed up. The GUI access is provided through the Oracle Enterprise Manager's web-based console. The Oracle Enterprise Manager (EM) tool performs backups, exports/imports, data loads, performance monitoring/tuning, job and event scheduling, and standard DBA management, to mention a few. The EM tool is a web-based application and must be run through a browser.
Recovery catalog The recovery catalog is recovery information that is stored inside an Oracle database. This is similar to the RMAN repository stored in the control file, but information stored in the recovery catalog is more extensive. It is a special data dictionary of backup information that is stored in a set of tables, much like the data dictionary stores information about databases. The recovery catalog provides a method for storing information about backups, restores, and recoveries. This information can provide status on the success or failure of backups, operating system backups, datafile copies, tablespace copies, control file copies, archive log copies, full database backups, and the physical structures of a database.
RMAN commands RMAN commands enable different actions to be performed to facilitate the backup and restore of the database. These commands can be organized logically into scripts, which can then be stored in the recovery catalog database. The scripts can be reused for other backups, thus keeping consistency among different target database backups.
Tape media connectivity Tape media connectivity provides a method for interfacing with various third-party tape hardware vendors to store and track backups in automated tape libraries (ATLs). Oracle supports many tape hardware devices. ATLs are tape units that use robotics arms and bar-coded tapes to automate the usage of multiple tapes for backup purposes.
RMAN Usage Considerations
RMAN backup is a physical backup method that was first developed with Oracle 8 and has steadily improved with each Oracle release. If you are going to use RMAN, you can use disk or tape. If you are using tape, a third-party media management library is needed to interface with your tape hardware.
There are two other methods of backup and recovery in the Oracle database: user-managed and the Oracle EXPORT utility. User-managed backups are essentially customized scripts that interact with the operating system capabilities such as copy and compress commands. These types of backups have been the mainstay of Oracle backups prior to and during the initial release of RMAN.
The EXPORT utility executed with the exp executable is essentially a logical backup utility that performs backups only on the logical components of the database. A logical backup consists of backing up the database at the tablespace level or backing up other logical database components such as a table. A physical backup consists of backing up the database files such as the datafiles, control files, and redo logs. This is one of the reasons EXPORT is typically not considered a stand-alone backup method but provides additional backup protection for RMAN or a user-managed backup.
In Oracle 10g, there is a new EXPORT utility, which is different from the standard EXPORT utility that is executed with the exp command. The new Oracle 10g EXPORT utility that supports data pump technology is called expdp. The new expdp EXPORT utility does not have the same functionality as the standard exp EXPORT utility.
RMAN performs many recovery options that are not supported by other available backup and recovery methods. Table 1.1 compares the capabilities of each backup method.
Starting the RMAN utility is a very straightforward process. To start RMAN, you need to be at the command line at the operating system level. In the case of a Windows environment, you would be at the DOS prompt.
RMAN Repository and Control Files
The RMAN utility uses two methods of storing information about the target databases that are backed up. Oracle calls the collection of metadata about the target databases the RMAN repository. There are two methods of storing data in the RMAN repository. The first method is by accessing an RMAN catalog of information about backups. The second method is by accessing the necessary information about backups in the target database's control files.
Oracle recommends that you store RMAN backup data in the catalog database as opposed to the RMAN repository for most medium-sized to enterprise environments. This allows full functionality of the RMAN utility. This catalog is another Oracle database with special RMAN catalog tables that store metadata about backups, much the same way that the data dictionary stores data about objects in the database. When using the recovery catalog, backup scripts can be created and stored in the catalog database for later use, and multiple target database can be backed up from a central source. This catalog database can also be backed up so that the information is made safe.
The RMAN utility enables you to use a target database without utilizing the recovery catalog database. The target database is the database targeted by RMAN for backup or recovery actions. Because most of the recovery catalog information is stored in the target database's control file, RMAN supports the ability to use just the control file to perform backup and recovery operations. This method would be used if the overhead of creating and maintaining a recovery catalog were too great for an organization.
The recovery catalog database will be covered in more detail in the next section "RMAN Using the Recovery Catalog."
If you use RMAN without the recovery catalog, you are storing most of the necessary information about each target database in the target database's control file. In this case, the target database's control file is the repository. Thus, you must manage the target database's control file to support this. The init.ora or spfile.ora parameter CONTROL_FILE_RECORD_KEEP_ TIME determines how long information that can be used by RMAN is kept in the control file. The default value for this parameter is 7 days and can be as many as 365 days. The greater the number, the larger the control file becomes to store more information.
The control file can only be as large as the operating system allows.
The information that is stored within the control file is stored in the reusable sections called circular reuse records and non-circular reuse records. These sections can grow if the value of the parameter CONTROL_FILE_RECORD_KEEP_TIME is 1 or more. The circular reuse records have non-critical information that can be overwritten if needed. Some of the non-circular reusable sections consist of datafiles and redo log information.
In the next section, we will discuss the recovery catalog in detail. The recovery catalog is not the default method of storing data in the RMAN repository. You must set up and configure the recovery catalog and database before you can utilize this capability.
RMAN Using the Recovery Catalog
Before demonstrating how to use the recovery catalog, let's discuss briefly its capabilities and components. The recovery catalog is designed to be a central storage place for multiple databases' RMAN information. Unlike using the control file as a repository, the recovery catalog can support multiple Oracle databases or an enterprise environment. This centralizes the location of the RMAN information instead of having this information dispersed in each target database's control file.
The main components of the RMAN recovery catalog support the logging of the backup and recovery information in the catalog. This information is stored in tables, views, and other databases' objects within an Oracle database. Here is a list of the components contained in a recovery catalog:
* Backup and recovery information that is logged for long-term use from the target databases
* RMAN scripts that can be stored and reused
* Backup information about datafiles and archive logs
* Information about the physical makeup, or schema, of the target database
The recovery catalog is similar to the standard database catalog in that the recovery catalog stores information about the recovery process as the database catalog stores information about the database. The recovery catalog must be stored in its own database, preferably on a server other than the server where the target database resides. To enable the catalog, an account with CONNECT, RESOURCE, and RECOVERY_CATALOG_OWNER privileges must be created to hold the catalog tables. Next, the catalog creation script command must be executed as the user RMAN_USER connected to the RMAN utility.
Let's walk through the creation of the recovery catalog step by step:
This example assumes that you have already built a database called ora101rc to store the recovery catalog. Oracle recommends that the default size of the recovery catalog database be about 115mb including datafiles and redo logs.
1. First, you must point to the database where the recovery catalog will reside. This is not the target database. The RMAN database will be called ora101rc. The oraenv shell script is provided by Oracle to switch to other databases on the same server. Use the following command:
Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\dstuns>set ORACLE_SID=ora101rc
2. Create the user that will store the catalog. Use the name RMAN with the password RMAN. Make DATA the default tablespace and TEMP the temporary tablespace:
C:\Documents and Settings\>sqlplus /nolog SQL*Plus: Release 10.1.0.2.0 - Production on Sun Jun 13 06:17:34 2004 Copyright (c) 1982, 2004, Oracle. All rights reserved.
SQL> SQL> connect /as sysdba SQL> create user rman_user identified by rman_user 2 default tablespace data 3 temporary tablespace temp; User created.
3. Grant the appropriate permissions to the RMAN user:
SQL> grant connect, resource, recovery_catalog_owner to rman_user;
Grant succeeded. SQL>
4. Launch the RMAN tool:
C:\Documents and Settings\>rman Recovery Manager: Release 10.1.0.2.0 - Production Copyright (c) 1995, 2004, Oracle. All rights reserved.
5. Connect to the catalog with the user called RMAN that you created in step 2:
RMAN> connect catalog rman_user/rman_user
connected to recovery catalog database recovery catalog is not installed
6. Finally, create the recovery catalog by executing the following command and specifying the tablespace that you want to store the catalog in:
RMAN> create catalog tablespace data;
recovery catalog created
Once the recovery catalog is created, there are a few steps that must be performed for each target database so that backup and recovery can be stored. The first step is registering the database. Once an incarnation of the database is registered, data may be stored in the recovery catalog for that particular target database. An incarnation of the database is a reference for a database in the recovery catalog.
Excerpted from OCP: Oracle 10g Administration II Study Guide by Doug Stuns Excerpted by permission.
All rights reserved. No part of this excerpt may be reproduced or reprinted without permission in writing from the publisher.
Excerpts are provided by Dial-A-Book Inc. solely for the personal use of visitors to this web site.
Chapter 1: Configuring Recovery Manager.
Chapter 2: Using Recovery Manager.
Chapter 3: Recovering From Non-Critical Losses.
Chapter 4: Database Recovery.
Chapter 5: Understanding the Flashback Database.
Chapter 6: Recovering from User Errors.
Chapter 7: Handling Block Corruption.
Chapter 8: Understanding Automatic Database Management.
Chapter 9: Understanding Automatic Storage Management.
Chapter 10: Understanding Globalization Support.
Chapter 11: Managing Resources.
Chapter 12: Using the Scheduler to Automate Tasks.
Chapter 13: Monitoring and Managing Storage.
Chapter 14: Securing the Oracle Listener, Diagnostic Sources, and Memory.