Using Oracle9i Recovery Manager
 
 

Performing Backups and Recovering your Database using Oracle9i Recovery Manager

Module Objectives

Purpose

In this module, you will learn how to use Oracle9i Recovery Manager to backup and restore a database.

Objectives

After completing this module, you should be able to:

Create a Recovery Manager Backup Configuration

Use Recovery Manager to Recover a database, tablespace, and datafile
Use Recovery Manager Advanced Features

Prerequisites

Before starting this module, you should have complete the following:

Preinstallation Tasks

Install the Oracle9i Database

Postinstallation Tasks

Review the Sample Schema
Enabling Archiving
Downloaded the rman.zip module files and unzipped them into your working directory.

Reference Material

The following is a list of useful reference material if you want additional information about the topics in this module:

Documentation: Oracle9i Recovery Manager User's Guide

 

Recovery Manager Overview

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.

Enhanced Enterprise Manager Support

A Recovery Manager Graphical User Interface is built into Oracle's Enterprise Manager. Enterprise Manager is the central management framework providing
a robust console, a rich set of tools, and the extensibility to detect, solve, and simplify the problems of any managed environment. Enterprise Manager
is included as part of the Oracle Database Server.
Scheduling of backup jobs and RMAN-specific tasks via the Enterprise Manager Job System enhances the Backup and Recovery facility and provides the flexibility in scheduling the backup task at specified intervals, on specified day of the week, or on a specified day of the month. Oracle Enterprise Manager (EM) supports Backup and Recovery features required by users.

  1. Backup Configurations to customize and save commonly used configurations for repeated use
  2. Backup and Recovery wizards to walk the user through the steps of creating a backup script and submitting it as a scheduled job
  3. Backup Job Library to save commonly used backup jobs that can be retrieved and applied to multiple targets
  4. Backup Job Task to submit any RMAN job using a user-defined RMAN script.

Integrated with 3rd Party Media Management Vendors

Organizations rely on Oracle to provide solutions for very large 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.
Why learn two tools to backup your enterprise systems? Use your preferred third-party backup software to backup all of your system files and the Oracle database. Use a product that is integrated with Recovery Manger to ensure your database is precisely backed up; "One tool - One interface". Together, Oracle and media management vendors provide robust easy-to-use database backup and recovery solutions to customers with high-end requirements. To view the current members of the Backup Solutions Program, go to http://otn.oracle.com/deploy/availability.

Module Layout

The RMAN lessons are broken into three parts:

  1. Configuration and Backup
  2. Database Recovery
  3. Advanced Features

Lesson 1 Configuration and Backup must be completed before starting Database Recovery or Advanced Features. After completing the Configuration and Backup lesson you can move to Database Recovery or Advanced Features.

 

1 Configuration and Backup

The Recovery Manager GUI interface is built into Oracle's Enterprise Manager. It provides the capability to backup, recover, and perform catalog maintenance on your Oracle database.

The first step in backing up your database is to create a backup configuration. The backup configuration is used at backup time to determine where the backup will be made.

1.

Open three windows, one for SQL*Plus, two command line windows of which one is for RMAN and the other is for scripts.

 

2.

Verify the ORCL instance is started. Click on the SQL*Plus icon and connect as SYS. If the instance is idle start it.

connect sys/oracle@orcl.world as sysdba

If SQL*Plus returns: 'Connect to an idle instance' then type

startup

Verify that the database is in archive log mode.

archive log list;

 

Starting RMAN

RMAN is a client executable that is installed with the Oracle database server. You can connect it to a target database, and then use server sessions on the target database to back up, restore, and recover files.

The following options can be used to start RMAN:

Specify the database connection information at the command line:

rman TARGET SYS/target_pwd@target_str # connects in NOCATALOG mode

rman TARGET / CATALOG rman/rman@rcat

rman TARGET / CATALOG rman/rman@rcat AUXILIARY sys/aux_pwd@aux_str

Omit the database connection at the command line, and use the CONNECT command in your
RMAN scripts:

rman

In both cases, RMAN displays an RMAN> prompt at which you can enter commands or run a command file.

RMAN can connect to the following types of databases:

Target database

The database that you will use RMAN to back up and restore: RMAN connects to the target database as SYSDBA. If you do not have this privilege, then the connection fails. You can connect with the SYSDBA privilege by using a password file or using operating system authentication.

Recovery catalog database

This database is optional: you can use RMAN with the default NOCATALOG option, in which case RMAN uses the control file as the exclusive repository of metadata. A recovery catalog is a set of tables containing RMAN metadata. RMAN obtains the metadata from the target database control file. If you choose to use a recovery catalog, refer to Oracle9i Recovery Manager User's Guide for complete instructions.

Auxiliary database

The auxiliary instance is only used for duplicate and standby database created with the DUPLICATE command and for tablespace point-in-time-recovery

3.

Connect to RMAN. From RMAN, type the following command to start the
RMAN client and create a server session on the target database ORCL.

rman target sys/oracle@orcl.world

 

Configuring the RMAN Environment

You can configure persistent settings in the RMAN environment. The configuration setting is done once, and used by RMAN to perform all subsequent operations. Display the preconfigured settings by typing the command SHOW ALL.
There are various parameters that can be used to configure RMAN operations to suit your needs. Some of the things that you can configure are:

  • Required number of backups of each datafile
  • Number of server processes that will do backup/restore operations in parallel
  • Directory where on-disk backups will be stored

You can return any CONFIGURE command to its default setting by running the command with the CLEAR option, as in:

CONFIGURE CHANNEL DEVICE TYPE sbt CLEAR;

CONFIGURE RETENTION POLICY CLEAR;

CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK CLEAR;

You will configure the following parameters:

  • 3 backups of each datafile
  • Backups to be stored on disk in the D:\ORACLE\ORCLBACKUP directory
  • 2 server processes to do backup/restore operations in parallel
  • Use the new controlfile autobackup feature
  • Set backup optimization on
4.

If D:\ORACL\ORCLBACKUP does not exist please create is now. From the command prompt, in a windows where you are not connected to RMAN:

D:
cd\ORALCE
mkdir ORCLBACKUP
cd\wkdir

5.

Configure the RMAN environment by typing the following commands from RMAN.

CONFIGURE DEFAULT DEVICE TYPE TO DISK;
CONFIGURE RETENTION POLICY TO REDUNDANCY 3;
CONFIGURE DEVICE TYPE DISK PARALLELISM 2;
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT 
   'd:\oracle\orclbackup\ora_df%t_s%s_s%p';
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO
   'd:\oracle\orclbackup\ora_cf%F';
CONFIGURE BACKUP OPTIMIZATION ON;

 

6.

To view the current configuration settings, type the following command.

SHOW ALL;

 

Backup the Database

Use the BACKUP command to back up files to the configured default device by using the configured channels. For example, use this command to back up the database and all archived logs:

BACKUP DATABASE PLUS ARCHIVELOG;

RMAN stores its backups in backup sets. A backup set is a logical structure that contains one or more backup pieces, which are the physical files containing the data. A backup set usually contains only one backup piece. Only RMAN can create and restore backup sets. You can also back up individual tablespaces, database files, and backup sets.

Incremental Backups

In an incremental backup strategy, you first create a level 0 backup, which is a whole backup of the database. For example:

BACKUP INCREMENTAL LEVEL 0 DATABASE;

Later, you can create backups at a higher "level." In a cumulative incremental backup, RMAN only backs up those blocks that are different between the specified level n and the most recent level n-1.

Restarting Backups

If a backup fails for any reason, backing up some but not all specified files, then you can use the NOT BACKED UP SINCE option on the BACKUP command to continue from the point of failure. This example backs up all files not backed up within the last day:

BACKUP DATABASE NOT BACKED UP SINCE TIME 'SYSDATE-1';

Testing Backups

You can run a test RMAN backup that does not generate any output. The test checks datafiles for physical and logical corruption and that all database files exist and are in the correct locations. For example:

BACKUP VALIDATE DATABASE ARCHIVELOG ALL;

 
7.

Generate archive logs to backup. From the command prompt execute the batch file switch5.bat, location in D:\wkdir, by typing the following:

switch5 orcl.world

 

8.

Backup database files and archive logs. While the backup is going on, we can also monitor the progress.

In RMAN type:

BACKUP DATABASE PLUS ARCHIVELOG;

In SQL*Plus where you have already connected to the ORCL database, type the following command to view the progress of the RMAN job. At first you may receive 'no row returned.'

@monitorjob

The columns from the resulting SQL statement which is run in MONITORJOB, refer to RMAN jobs in this manner:

SOFAR     – number of blocks read/or put into the buffer by 

            the RMAN process

TOTALWORK – total number of blocks to be read and/or put into

            the buffer

%COMPLETE – percentage of SOFAR/TOTALWORK * 100

 

9.

Backup individual datafiles. First, let’s take a look at the schema via RMAN. From RMAN, type the following commands. What does the database schema look like?

REPORT SCHEMA;

 

10.

RMAN can backup at the database, tablespace, and datafile level. First you will backup a datafile. Backup the database file which corresponds to the Example tablespace. In the example below the Example tablespace is datafile 5.

BACKUP DATAFILE 5;

 

11.

Backup at the Tablespace Level. From RMAN, type the following
commands.

BACKUP TABLESPACE EXAMPLE;

 

12.

Incremental backups can be made by RMAN. From RMAN, type the following command to make an incremental level 0 backup of the database.

BACKUP INCREMENTAL LEVEL 0 DATABASE;

In SQL*Plus, you can run the following SQL statement to monitor the work being processed by RMAN.

@monitorjob

 

13.

Not only can you perform an incremental backup at the database level, but you can perform incremental backups on datafiles and tablespaces as well. Let’s perform an incremental backup on a datafile.

Use the same datafile as used previously, the datafile for the Example tablespace.

BACKUP INCREMENTAL LEVEL 1 DATAFILE 5;

 

14.

RMAN can backup the archive logs and database at the same time or separately. Let’s backup just the archive logs. First, generate some logs. From the command prompt type the following:

switch5 orcl.world

Now, backup the archive logs. From RMAN type:

BACKUP ARCHIVELOG ALL;

 

15.

At one time or another, a backup may terminate due to an error or be killed due to system resources. RMAN offers the capability to restart a backup. With the RMAN command NOT BACKED UP SINCE, files that have not been backed up since a specified time will then be backed up. In the following command, we tell RMAN to backup the database files that have not been backed up since yesterday.
From RMAN, type the following command:

BACKUP DATABASE NOT BACKED UP SINCE TIME 'SYSDATE-1';

 

Administrative Commands

The following commands can be used in RMAN to find out if files require a backup, delete backups that are no longer needed, and view backups of files. We refer to this set of commands as RMAN maintenance. From RMAN, type the following commands.

What files need to be backed up based on the configured retention policy?

REPORT NEED BACKUP;

The following 2 commands allow you to view what backups are obsolete and delete them.

REPORT OBSOLETE;

DELETE OBSOLETE;

The validate command can be used to check for corruption or verify that database files are in the correct location.

BACKUP VALIDATE DATABASE ARCHIVELOG ALL;

If you run any batch jobs with the nologging option, the following command will report any files that have not been backed up since the last nolog operation.

REPORT UNRECOVERABLE;

To fee up disk space of archive logs that you know have already been backed up, run this command to delete the archive logs that are older then yesterday.

DELETE ARCHIVELOG UNTIL TIME 'SYSDATE-1';

The crosscheck command is used to verify that backups of the database are in the location known by the repository and to verify that archive logs are still on disk and have not been deleted outside of RMAN.

CROSSCHECK BACKUP OF DATABASE;

The LIST commands allow you to view the backup information of the database, datafile, tablespaces, and controlfiles. Lets view the backups for datafile 4 and the control file.

LIST BACKUP OF DATAFILE 4;

LIST BACKUP OF CONTROLFILE;
16.

Enter the following commands in RMAN:

REPORT NEED BACKUP;
REPORT OBSOLETE;
DELETE OBSOLETE;
BACKUP VALIDATE DATABASE ARCHIVELOG ALL;
REPORT UNRECOVERABLE;
DELETE ARCHIVELOG UNTIL TIME 'SYSDATE-1';
CROSSCHECK BACKUP OF DATABASE;
LIST BACKUP OF DATAFILE 5;
LIST BACKUP OF CONTROLFILE;

 

17.

Clean up.

From RMAN, type the following command to exit RMAN.

Exit

In SQL*Plus, type the following command to exit from SQL*Plus

Exit

2 Database Recovery

The RESTORE and RECOVER commands manage restore and recovery of the database from RMAN.

Complete Recovery

When you perform complete recovery, you recover the backups to the current SCN. You can either recover the whole database at once or recover individual tablespaces or datafiles. Because you do not have to open the database with the RESETLOGS option after complete recovery as you do after incomplete recovery, you have the option of recovering some datafiles at one time and the remaining datafiles later.

Note: Lesson 1 Configuration and Backup, must be completed prior to starting this lesson.

Recovering Datafiles

Take the datafile that needs recovery offline, restore the datafile, recover the datafile, and bring the datafile online.

1.

In SQL*Plus connect as HR and select from the EMPLOYEES table to verify that a table exist.

connect hr/hr@orcl.world

set pagesize 50000

SELECT first_name
FROM   employees;

 

2.

Simulate the loss of employee01.dbf. Run the following script from the command line window.

rmdf orcl.world orcl

 

3.

In SQL*Plus as HR, verify that the file has been deleted.

connect hr/hr@orcl.world;
SELECT * 
FROM employees;

 

4.

Recover example01.dbf. In RMAN, type the following commands.

RMAN TARGET SYS/ORACLE@orcl.world

RESTORE DATAFILE 5;
RECOVER DATAFILE 5;

SQL 'alter tablespace example online';

 

5.

In SQL*Plus as HR, verify the data is there.

SELECT first_name
FROM employees;

 

Recovering the Database

The database must be in MOUNT mode to restore and recover with RMAN.

6.

As HR, select from the EMPLOYEES table to verify that the database is up and running. In SQL*Plus, type the following:

SELECT first_name
FROM employees;

 

7.

Simulate the loss of all datafiles. (This does not include the control files or online logs) From the command prompt, type the following

rmdb orcl.world orcl

 

8.

Recover DATABASE. In RMAN, type the following commands.

RMAN TARGET SYS/ORACLE@orcl.world
RESTORE DATABASE;
RECOVER DATABASE;
ALTER DATABASE OPEN;

 

9.

In SQL*Plus as HR, type the following command to show that the datafile has been successfully restored and recovered.

CONNECT hr/hr@orcl.world
SELECT first_name 
FROM   employees;

 

Recovering Tablespaces

Take the tablespace that needs recovery offline, restore the tablespace, recover the tablespace, and bring the recovered tablespace online.

10.

Select from the EMPLOYEES table to verify that a table exist. In SQL*Plus as HR, type the following command .

CONNECT hr/hr@orcl.world
SELECT first_name 
FROM   employees;

 

11.

Simulate the loss of the EXAMPLE tablespace. Run the following command from the command prompt.

rmts orcl.world orcl

 

12.

Verify that the file has been deleted.

Connect hr/hr@orcl.world
SELECT first_name
FROM   EMPLOYEES;

 

13.

Recover tablespace EXAMPLE. In RMAN, run the following commands

RMAN TARGET SYS/ORACLE@ORCL.WORLD
RESTORE TABLESPACE EXAMPLE;
RECOVER TABLESPACE EXAMPLE;
SQL 'ALTER TABLESPACE EXAMPLE ONLINE';

 

14.

In SQL*Plus, type the following commands.

SELECT first_name 
FROM   employees;

 

Recovering the Database

The database must be in MOUNT mode to restore and recover with RMAN.

15.

In SQL*Plus as HR, select from the EMPLOYEES table to verify that the database is up and running.

SELECT first_name
FROM employees;

 

16.

Simulate the loss of all datafiles (this does not include the control files or online logs). From the command prompt, type the following command.

rmdb orcl.world orcl

 

17.

Verify that the database files have been deleted.

Connect hr/hr@orcl.world
SELECT * 
FROM   employees;

 

18.

Recover DATABASE. In RMAN, type the following commands. Connect to RMAN.

RMAN TARGET SYS/ORACLE@ORCL.WORLD
RESTORE DATABASE;
RECOVER DATABASE;
ALTER DATABASE OPEN;

    

 

19.

From SQL*Plus are HR, type the following commands to verify that the database has been recovered.

Connect hr/hr@orcl.world
SELECT first_name
FROM   employees;

 

Incomplete Recovery

Incomplete recovery uses a backup to produce a noncurrent version of the database. In other words, you
do not apply all of the redo records generated after the most recent backup. You usually perform
incomplete recovery of the whole database in the following situations:

  • Media failure destroys some or all of the online redo logs.
  • A user error causes data loss, for example, a user inadvertently drops a table.
  • You cannot perform complete recovery because an archived redo log is missing.
  • You lose your current control file and must use a backup control file to open the database.

To perform incomplete media recovery, you must restore all datafiles from backups created prior to the time to which you want to recover and then open the database with the RESETLOGS option when recovery completes. The RESETLOGS operation creates a new incarnation of the database—in other words, a database with a new stream of log sequence numbers starting with log sequence 1.

Incomplete Recovery of the Database

20.

In SQL*Plus as HR, select from the EMPLOYEES table to verify that the database is up and running.

Connect hr/hr@orcl
SELECT * 
FROM   employees;

 

21.

Connect as SYS and select the database id from V$DATABASE. Write down the value returned.

Connect SYS/ORACLE@orcl.world as sysdba
SELECT dbid
FROM   v$database;

 

22.

Simulate the loss of all datafiles, control files, online logs and archive logs. Run the following script from the command line.

rmall orcl.world orcl

 

23.

Verify that the database files have been deleted.

Connect hr/hr@orcl.world
SELECT first_name 
FROM   employees;

 

24.

Recover DATABASE. In RMAN, type the following commands. Connect to RMAN without any connect strings

RMAN

 

25.

The following commands are issued within RMAN, using the database id(DBID) returned from the query. You will receive an error message at the end of recover due to the loss of the online redo logs.

SET DBID 1003121815;
CONNECT TARGET SYS/ORACLE@ORCL.WORLD;
STARTUP NOMOUNT;
SET CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 
   'D:\ORACLE\ORCLBACKUP\ora_cf%F';
RESTORE CONTROLFILE FROM AUTOBACKUP;
STARTUP MOUNT;
RESTORE DATABASE;
RECOVER DATABASE;

 

26.

Since the online logs were lost, complete recovery is not possible. Open the database with resetlogs to continue.

ALTER DATABASE OPEN RESETLOGS;
27.

To view the successful recovery of the database, in SQL*Plus type the following commands.

Connect hr/hr@orcl.world
SELECT first_name
FROM   employees;

 

28.

Make a backup of new database incarnation version!! Let's generate some archive logs. From the command prompt, type the following command.

swtich5 orcl.world

 

29.

In RMAN, type the following commands to make a backup and remove obsolete backups and archive logs. What files require a backup now?

RMAN TARGET SYS/ORACLE@ORCL.WORLD
REPORT NEED BACKUP;

 

30.

Make a backup of the database and archive logs.

BACKUP DATABASE PLUS ARCHIVELOG;

 

31.

Remove obsolete backups and archive logs.

DELETE OBSOLETE;

 

32.

Crosscheck Backups.

CROSSCHECK BACKUP OF DATABASE;

 

33.

Delete obsolete again.

DELETE OBSOLETE;

 

3 RMAN Advanced Features

Duplicate Database

You can use the RMAN DUPLICATE command create a duplicate database from target database backups while still retaining the original target database. A duplicate database is a copy of the target database that you can run independently for a variety of purposes. For example, you can use it to:

  • Test backup and recovery procedures
  • Export data such as a table that was inadvertently dropped from the production database, and then importing it back into the production database.

A duplicate database is distinct from a standby database, although both types of databases are created with the DUPLICATE command. A standby database is a copy of the primary database that you can update continually or periodically by using archived logs from the primary database. If the primary database is damaged or destroyed, then you can perform failover to the standby database and effectively transform it into the new primary database. A duplicate database, on the other hand, cannot be used in this way: it is not intended for failover scenarios and does not support the various standby recovery and failover options.

Note: Lesson 1 Configuration and Backup, must be completed prior to starting this lesson.

01.

From the command prompt create a password file for the AUX database.

orapwd file=d:\oracle\ora92\database\PWDaux.ora password=oracle entries=5

 

2.

In SQL*Plus as SYS create a parameter file from the spfile for the AUX database.

connect sys/oracle@orcl.world as sysdba
create pfile='d:\oracle\ora92\database\INITaux.ORA' from spfile;

 

3.

Edit the file INITaux.ORA, found in D:\ORALCE\ORA92\DATABASE; change all occurrences of \orcl\ to \auxorcl\. Next change db_name and instance_name to aux. Then add the following two lines to the parameter file:

db_file_name_convert=('D:\ORACLE\ORADATA\ORCL','D:\ORACLE\ORADATA\AUXORCL')
log_file_name_convert=('D:\ORACLE\ORADATA\ORCL','D:\ORACLE\ORADATA\AUXORCL')

 

4.

Run script cre_dir from the command prompt to create the subdirectories for the duplicate database.

cre_dir

 

5.

Add an entry in the tnsnames.ora and listener.ora for the AUX database. Use Net Manager.

Start > Programs > Oracle - OraHome92 > Configuration and Migration Tools > Net Manager

TNSNAMES.ORA

Select Oracle Net Configuration > Local > Service Name. Then from the menu select Edit > Create. Use the following values to create the entry.

Net Service Name: aux.world

Protocol: TCP/IP (Internet Protocol)

Host: <your computer's name>

Port: 1521

Service Name: aux.world

Since the database has not been created you can not successfully test the configuration.

LISTENER.ORA

Select Oracle Net Configuration > Local > Listeners > LISTENER. From the drop down menu on the right and side change Listener Location to Database Services. Click Add Database at the bottom. Use the following values:

Global Database Name: aux.net

Oracle Home: D:\oracle\ora92

SID: aux

Select from the top menu: File > Save Network Configuration followed by File > Exit.

 

6.

Shutdown and startup the listener.ora. From the command prompt type the follow:

lsnrctl stop

lsnrctl start

 

7.

Create a service for the database. From the command prompt type:

oradim -new -sid AUX -startmode m -pfile d:\oracle\ora92\database\INITaux.ORA

 

8.

From RMAN, type the following commands.

RMAN
CONNECT AUXILIARY SYS/ORACLE@AUX.WORLD
CONNECT TARGET SYS/ORACLE@ORCL.WORLD
STARTUP CLONE NOMOUNT FORCE;
DUPLICATE TARGET DATABASE TO AUX;

 

9.

Connect to the new database

connect hr/hr@aux.world
SELECT first_name
FROM   employees;

 

Module Summary

In this module, you should have learned how to:

Create a Recovery Manager Backup Configuration

Use Recovery Manager to Recover a database, tablespace, and datafile
Use Recovery Manager Advanced Features


Copyright © 2002 Oracle Corporation. All Rights Reserved.

Close Window

Printer View Printer View

Copyright © 2004, Oracle Corporation. All Rights Reserved.

About OTN I Contact Us I About Oracle I Legal Notices and Terms of Use I Privacy Statement

Powered by Oracle Application Server Portal

Practice 17: Restoration and Recovery Using RMAN

 

In this practice you will restore and recover a tablespace to a new location, and an incomplete recovery.

 

ASSUMPTIONS:

·         These practices are written for NT. Alternate solutions for UNIX will be noted but have not been tested.  File names and paths will need to be adjusted for use on UNIX platforms.

·         The database version for these practices is assumed to be 8.1.5 or higher. The solutions have been tested at 8.1.6.

·         These practices assume that two databases are available. A catalog database that will hold the RMAN catalog, and is referred to as CAT in the exercises. And a target database that will be called TGT. Please make the appropriate substitutions in the solutions for your database names.

·         These practices assume the NET8 connectivity to both the CAT and TGT databases is already available.

 

 

INSTRUCTIONS:

 

  1. The database must be ARCHIVELOG mode for these instructions to work properly.  Be sure you have a valid backup using RMAN before executing these commands.
  2.  Update the database. Determine the files associated with a tablespace. Shutdown abort. Remove/Delete the files associated with the chosen tablespace.

 

 

C:\>sqlplus system/manager@db02

 

SQL> Create table new_emp tablespace USER_DATA

      As select * from scott.emp;

 

Table created.

 

SQL> select * from v$tablespace;

 

       TS# NAME

---------- ------------------------------

         0 SYSTEM

         1 RBS

         2 USER_DATA

         3 TEMP

         4 INDX

         5 DATA01

         6 DATA02

         7 DATA

         8 INDX01

         9 QUERY_DATA

        10 FRED

 

11 rows selected.

 

SQL> select name from v$datafile where TS#=2;

 

NAME

-------------------------------------------------------------

 

C:\ORACLASS\DATA\DISK6\USER01.DBF

 

SQL> shutdown abort

ORACLE instance shut down.

SQL>EXIT

 

C:> erase C:\ORACLASS\DATA\DISK6\USER01.DBF

 

  1. Start RMAN, and start the database mount

 

 

C:\>set ORACLE_SID=DB02

 

C:\>rman target / catalog rman/rman@DB01

 

Recovery Manager: Release 8.1.6.0.0 - Production

 

RMAN-06193: connected to target database (not started)

RMAN-06008: connected to recovery catalog database

 

RMAN> startup mount

 

RMAN-06196: Oracle instance started

RMAN-06199: database mounted

 

Total System Global Area      26014988 bytes

 

Fixed Size                       70924 bytes

Variable Size                 24842240 bytes

Database Buffers               1024000 bytes

Redo Buffers                     77824 bytes

 

  1. Restore and recover the missing tablespace to a new location.

 

 

RMAN> run {

2>      allocate channel d1 type disk;

3>      set newname for datafile 'c:\oraclass\data\disk6\user01.dbf' to 'c:\oraclass\data\disk5\user01.dbf';

4>      restore tablespace user_data;

5>      switch datafile all;

6>      recover tablespace USER_DATA;

7>      release CHANNEL d1;}

 

RMAN-03022: compiling command: allocate

RMAN-03023: executing command: allocate

RMAN-08030: allocated channel: d1

RMAN-08500: channel d1: sid=10 devtype=DISK

 

RMAN-03022: compiling command: set

 

RMAN-03022: compiling command: restore

RMAN-03025: performing implicit partial resync of recovery catalog

RMAN-03023: executing command: partial resync

RMAN-08003: starting partial resync of recovery catalog

RMAN-08005: partial resync complete

 

RMAN-03022: compiling command: IRESTORE

RMAN-03023: executing command: IRESTORE

RMAN-08016: channel d1: starting datafile backupset restore

RMAN-08502: set_count=19 set_stamp=426898191 creation_time=12-APR-01

RMAN-08089: channel d1: specifying datafile(s) to restore from backup set

RMAN-08523: restoring datafile 00003 to C:\ORACLASS\DATA\DISK5\USER01.DBF

RMAN-08023: channel d1: restored backup piece 1

RMAN-08511: piece handle=C:\ORACLASS\BACKUP\INCR0_DB02_19_1.BKP tag=null params=NULL

RMAN-08024: channel d1: restore complete

RMAN-03023: executing command: partial resync

RMAN-08003: starting partial resync of recovery catalog

RMAN-08005: partial resync complete

 

RMAN-03022: compiling command: switch

RMAN-03023: executing command: switch

RMAN-08015: datafile 3 switched to datafile copy

RMAN-08507: input datafilecopy recid=23 stamp=427156370 filename=C:\ORACLASS\DATA\DISK5\USER01.DBF

RMAN-03023: executing command: full resync

RMAN-08002: starting full resync of recovery catalog

RMAN-08004: full resync complete

 

RMAN-03022: compiling command: recover

 

RMAN-03022: compiling command: recover(1)

 

RMAN-03022: compiling command: recover(2)

RMAN-03023: executing command: recover(2)

RMAN-08039: channel d1: starting incremental datafile backupset restore

RMAN-08502: set_count=25 set_stamp=426898653 creation_time=12-APR-01

RMAN-08089: channel d1: specifying datafile(s) to restore from backup set

RMAN-08509: destination for restore of datafile 00003: C:\ORACLASS\DATA\DISK5\USER01.DBF

RMAN-08023: channel d1: restored backup piece 1

RMAN-08511: piece handle=C:\ORACLASS\BACKUP\INCR1_DB02_25_1.BKP tag=null params=NULL

RMAN-08024: channel d1: restore complete

 

RMAN-03022: compiling command: recover(3)

RMAN-03023: executing command: recover(3)

RMAN-08054: starting media recovery

 

RMAN-03022: compiling command: recover(4)

RMAN-06050: archivelog thread 1 sequence 3 is already on disk as file C:\ORACLASS\ARCHIVE\ARCH_3.LOG

RMAN-06050: archivelog thread 1 sequence 4 is already on disk as file C:\ORACLASS\ARCHIVE\ARCH_4.LOG

RMAN-06050: archivelog thread 1 sequence 5 is already on disk as file C:\ORACLASS\ARCHIVE\ARCH_5.LOG

RMAN-06050: archivelog thread 1 sequence 6 is already on disk as file C:\ORACLASS\ARCHIVE\ARCH_6.LOG

RMAN-06050: archivelog thread 1 sequence 7 is already on disk as file C:\ORACLASS\ARCHIVE\ARCH_7.LOG

RMAN-06050: archivelog thread 1 sequence 8 is already on disk as file C:\ORACLASS\ARCHIVE\ARCH_8.LOG

RMAN-06050: archivelog thread 1 sequence 9 is already on disk as file C:\ORACLASS\ARCHIVE\ARCH_9.LOG

RMAN-06050: archivelog thread 1 sequence 10 is already on disk as file C:\ORACLASS\ARCHIVE\ARCH_10.LOG

RMAN-06050: archivelog thread 1 sequence 11 is already on disk as file C:\ORACLASS\ARCHIVE\ARCH_11.LOG

RMAN-06050: archivelog thread 1 sequence 12 is already on disk as file C:\ORACLASS\ARCHIVE\ARCH_12.LOG

RMAN-06050: archivelog thread 1 sequence 13 is already on disk as file C:\ORACLASS\ARCHIVE\ARCH_13.LOG

RMAN-06050: archivelog thread 1 sequence 14 is already on disk as file C:\ORACLASS\ARCHIVE\ARCH_14.LOG

RMAN-06050: archivelog thread 1 sequence 15 is already on disk as file C:\ORACLASS\ARCHIVE\ARCH_15.LOG

RMAN-06050: archivelog thread 1 sequence 16 is already on disk as file C:\ORACLASS\ARCHIVE\ARCH_16.LOG

RMAN-06050: archivelog thread 1 sequence 17 is already on disk as file C:\ORACLASS\ARCHIVE\ARCH_17.LOG

RMAN-06050: archivelog thread 1 sequence 18 is already on disk as file C:\ORACLASS\ARCHIVE\ARCH_18.LOG

RMAN-06050: archivelog thread 1 sequence 19 is already on disk as file C:\ORACLASS\ARCHIVE\ARCH_19.LOG

RMAN-06050: archivelog thread 1 sequence 20 is already on disk as file C:\ORACLASS\ARCHIVE\ARCH_20.LOG

RMAN-03023: executing command: recover(4)

RMAN-08515: archivelog filename=C:\ORACLASS\ARCHIVE\ARCH_3.LOG thread=1 sequence=3

RMAN-08515: archivelog filename=C:\ORACLASS\ARCHIVE\ARCH_4.LOG thread=1 sequence=4

RMAN-08515: archivelog filename=C:\ORACLASS\ARCHIVE\ARCH_5.LOG thread=1 sequence=5

RMAN-08515: archivelog filename=C:\ORACLASS\ARCHIVE\ARCH_6.LOG thread=1 sequence=6

RMAN-08515: archivelog filename=C:\ORACLASS\ARCHIVE\ARCH_7.LOG thread=1 sequence=7

RMAN-08515: archivelog filename=C:\ORACLASS\ARCHIVE\ARCH_8.LOG thread=1 sequence=8

RMAN-08515: archivelog filename=C:\ORACLASS\ARCHIVE\ARCH_9.LOG thread=1 sequence=9

RMAN-08515: archivelog filename=C:\ORACLASS\ARCHIVE\ARCH_10.LOG thread=1 sequence=10

RMAN-08515: archivelog filename=C:\ORACLASS\ARCHIVE\ARCH_11.LOG thread=1 sequence=11

RMAN-08515: archivelog filename=C:\ORACLASS\ARCHIVE\ARCH_12.LOG thread=1 sequence=12

RMAN-08515: archivelog filename=C:\ORACLASS\ARCHIVE\ARCH_13.LOG thread=1 sequence=13

RMAN-08515: archivelog filename=C:\ORACLASS\ARCHIVE\ARCH_14.LOG thread=1 sequence=14

RMAN-08515: archivelog filename=C:\ORACLASS\ARCHIVE\ARCH_15.LOG thread=1 sequence=15

RMAN-08515: archivelog filename=C:\ORACLASS\ARCHIVE\ARCH_16.LOG thread=1 sequence=16

RMAN-08515: archivelog filename=C:\ORACLASS\ARCHIVE\ARCH_17.LOG thread=1 sequence=17

RMAN-08515: archivelog filename=C:\ORACLASS\ARCHIVE\ARCH_18.LOG thread=1 sequence=18

RMAN-08515: archivelog filename=C:\ORACLASS\ARCHIVE\ARCH_19.LOG thread=1 sequence=19

RMAN-08055: media recovery complete

 

RMAN-03022: compiling command: release

RMAN-03023: executing command: release

RMAN-08031: released channel: d1

 

  1. Open the database.

 

RMAN> Alter database open;

 

RMAN-03022: compiling command: alter db

RMAN-06400: database opened

 

 

Practice 18: Incomplete Recovery, Recovery To Previous Incarnation

 

In the practice you will restore and recover a database to a point to the end of a selected archive log file.

This will simulate the situation where an archived logfile is missing or corrupt.

 

ASSUMPTIONS:

·         These practices are written for NT; alternate solutions for UNIX will be noted but have not been tested.  File names and paths will need to be adjusted for use on UNIX platforms.

·         The database version for these practices is assumed to be 8.1.5 or higher. The solutions have been tested at 8.1.6.

·         These practices assume that two databases are available. A catalog database that will hold the RMAN catalog, and is referred to as CAT in the exercises. And a target database that will be called TGT. Please make the appropriate substitutions in the solutions for your database names.

·         These practices assume the NET8 connectivity to both the CAT and TGT databases  is already available.

 

 

INSTRUCTIONS:

 

1.       The database must be in archivelog mode.  There must be multiple archive logfiles since the last backup; this may be accomplished by doing a small update and doing several logswitches.

 

SQLPLUS system/manager@TGT

 

SQL> insert into newemp

     Select * from SCOTT.EMP;

 

SQL> ALTER SYSTEM SWITCH LOGFILE;

 

2.       Decide which logfile to recover will be the last.  Pick a log sequence nnumber that is older than the oldest online log sequence.

 

SQL> connect / as sysdba

SQL> archive log list

Database log mode              Archive Mode

Automatic archival             Enabled

Archive destination            c:\oraclass\archive\

Oldest online log sequence     20

Next log sequence to archive   21

Current log sequence           21

 

3.       Shutdown the target database without taking a checkpoint.

 

SQL> CONNECT / AS SYSDBA

 

SQL> SHUTDOWN ABORT

 

 

 

 

4.       Do a restore until log sequence chosen in the step 2.

 

 

C:\>rman target / catalog rman/rman@DB01

 

Recovery Manager: Release 8.1.6.0.0 - Production

 

RMAN-06193: connected to target database (not started)

RMAN-06008: connected to recovery catalog database

 

RMAN> startup mount

 

RMAN-06196: Oracle instance started

RMAN-06199: database mounted

 

Total System Global Area      26014988 bytes

 

Fixed Size                       70924 bytes

Variable Size                 24842240 bytes

Database Buffers               1024000 bytes

Redo Buffers                     77824 bytes

 

RMAN> run {

2>      allocate channel d1 type disk;

3>      set until logseq 18 thread 1;

4>      restore database;

5>      recover database;

6>      alter database open resetlogs;

7>      release channel d1;}

 

RMAN-03022: compiling command: allocate

RMAN-03023: executing command: allocate

RMAN-08030: allocated channel: d1

RMAN-08500: channel d1: sid=10 devtype=DISK

 

RMAN-03022: compiling command: set

 

RMAN-03022: compiling command: restore

RMAN-03025: performing implicit partial resync of recovery catalog

RMAN-03023: executing command: partial resync

RMAN-08003: starting partial resync of recovery catalog

RMAN-08005: partial resync complete

 

RMAN-03022: compiling command: IRESTORE

RMAN-06179: datafile 10 not processed because file is read only

RMAN-03023: executing command: IRESTORE

RMAN-08016: channel d1: starting datafile backupset restore

RMAN-08502: set_count=16 set_stamp=426898183 creation_time=12-APR-01

RMAN-08089: channel d1: specifying datafile(s) to restore from backup set

RMAN-08523: restoring datafile 00005 to C:\ORACLASS\DATA\DISK6\INDX_01.DBF

RMAN-08523: restoring datafile 00006 to C:\ORACLASS\DATA\DISK6\DATA01.DBF

RMAN-08023: channel d1: restored backup piece 1

RMAN-08511: piece handle=C:\ORACLASS\BACKUP\INCR0_DB02_16_1.BKP tag=null params=NULL

RMAN-08024: channel d1: restore complete

RMAN-08016: channel d1: starting datafile backupset restore

RMAN-08502: set_count=17 set_stamp=426898183 creation_time=12-APR-01

RMAN-08089: channel d1: specifying datafile(s) to restore from backup set

RMAN-08523: restoring datafile 00007 to C:\ORACLASS\DATA\DISK5\DATA02.DBF

RMAN-08523: restoring datafile 00008 to C:\ORACLASS\DATA\DISK4\DATA_01.DBF

RMAN-08023: channel d1: restored backup piece 1

RMAN-08511: piece handle=C:\ORACLASS\BACKUP\INCR0_DB02_17_1.BKP tag=null params=NULL

RMAN-08024: channel d1: restore complete

RMAN-08016: channel d1: starting datafile backupset restore

RMAN-08502: set_count=18 set_stamp=426898191 creation_time=12-APR-01

RMAN-08089: channel d1: specifying datafile(s) to restore from backup set

RMAN-08523: restoring datafile 00002 to C:\ORACLASS\DATA\DISK2\RBS01.DBF

RMAN-08523: restoring datafile 00009 to C:\ORACLASS\DATA\DISK2\INDX01.DBF

RMAN-08023: channel d1: restored backup piece 1

RMAN-08511: piece handle=C:\ORACLASS\BACKUP\INCR0_DB02_18_1.BKP tag=null params=NULL

RMAN-08024: channel d1: restore complete

RMAN-08016: channel d1: starting datafile backupset restore

RMAN-08502: set_count=19 set_stamp=426898191 creation_time=12-APR-01

RMAN-08089: channel d1: specifying datafile(s) to restore from backup set

RMAN-08523: restoring datafile 00003 to C:\ORACLASS\DATA\DISK5\USER01.DBF

RMAN-08023: channel d1: restored backup piece 1

RMAN-08511: piece handle=C:\ORACLASS\BACKUP\INCR0_DB02_19_1.BKP tag=null params=NULL

RMAN-08024: channel d1: restore complete

RMAN-08016: channel d1: starting datafile backupset restore

RMAN-08502: set_count=20 set_stamp=426898207 creation_time=12-APR-01

RMAN-08089: channel d1: specifying datafile(s) to restore from backup set

RMAN-08523: restoring datafile 00004 to C:\ORACLASS\DATA\DISK1\TEMP01.DBF

RMAN-08023: channel d1: restored backup piece 1

RMAN-08511: piece handle=C:\ORACLASS\BACKUP\INCR0_DB02_20_1.BKP tag=null params=NULL

RMAN-08024: channel d1: restore complete

RMAN-08016: channel d1: starting datafile backupset restore

RMAN-08502: set_count=21 set_stamp=426898207 creation_time=12-APR-01

RMAN-08089: channel d1: specifying datafile(s) to restore from backup set

RMAN-08523: restoring datafile 00001 to C:\ORACLASS\DATA\DISK1\SYSTEM01.DBF

RMAN-08023: channel d1: restored backup piece 1

RMAN-08511: piece handle=C:\ORACLASS\BACKUP\INCR0_DB02_21_1.BKP tag=null params=NULL

RMAN-08024: channel d1: restore complete

RMAN-03023: executing command: partial resync

RMAN-08003: starting partial resync of recovery catalog

RMAN-08005: partial resync complete

 

RMAN-03022: compiling command: recover

 

RMAN-03022: compiling command: recover(1)

 

RMAN-03022: compiling command: recover(2)

RMAN-06179: datafile 10 not processed because file is read only

RMAN-03023: executing command: recover(2)

RMAN-08039: channel d1: starting incremental datafile backupset restore

RMAN-08502: set_count=22 set_stamp=426898649 creation_time=12-APR-01

RMAN-08089: channel d1: specifying datafile(s) to restore from backup set

RMAN-08509: destination for restore of datafile 00005: C:\ORACLASS\DATA\DISK6\INDX_01.DBF

RMAN-08509: destination for restore of datafile 00006: C:\ORACLASS\DATA\DISK6\DATA01.DBF

RMAN-08023: channel d1: restored backup piece 1

RMAN-08511: piece handle=C:\ORACLASS\BACKUP\INCR1_DB02_22_1.BKP tag=null params=NULL

RMAN-08024: channel d1: restore complete

RMAN-08039: channel d1: starting incremental datafile backupset restore

RMAN-08502: set_count=23 set_stamp=426898649 creation_time=12-APR-01

RMAN-08089: channel d1: specifying datafile(s) to restore from backup set

RMAN-08509: destination for restore of datafile 00007: C:\ORACLASS\DATA\DISK5\DATA02.DBF

RMAN-08509: destination for restore of datafile 00008: C:\ORACLASS\DATA\DISK4\DATA_01.DBF

RMAN-08023: channel d1: restored backup piece 1

RMAN-08511: piece handle=C:\ORACLASS\BACKUP\INCR1_DB02_23_1.BKP tag=null params=NULL

RMAN-08024: channel d1: restore complete

RMAN-08039: channel d1: starting incremental datafile backupset restore

RMAN-08502: set_count=24 set_stamp=426898653 creation_time=12-APR-01

RMAN-08089: channel d1: specifying datafile(s) to restore from backup set

RMAN-08509: destination for restore of datafile 00002: C:\ORACLASS\DATA\DISK2\RBS01.DBF

RMAN-08509: destination for restore of datafile 00009: C:\ORACLASS\DATA\DISK2\INDX01.DBF

RMAN-08023: channel d1: restored backup piece 1

RMAN-08511: piece handle=C:\ORACLASS\BACKUP\INCR1_DB02_24_1.BKP tag=null params=NULL

RMAN-08024: channel d1: restore complete

RMAN-08039: channel d1: starting incremental datafile backupset restore

RMAN-08502: set_count=25 set_stamp=426898653 creation_time=12-APR-01

RMAN-08089: channel d1: specifying datafile(s) to restore from backup set

RMAN-08509: destination for restore of datafile 00003: C:\ORACLASS\DATA\DISK5\USER01.DBF

RMAN-08023: channel d1: restored backup piece 1

RMAN-08511: piece handle=C:\ORACLASS\BACKUP\INCR1_DB02_25_1.BKP tag=null params=NULL

RMAN-08024: channel d1: restore complete

RMAN-08039: channel d1: starting incremental datafile backupset restore

RMAN-08502: set_count=26 set_stamp=426898661 creation_time=12-APR-01

RMAN-08089: channel d1: specifying datafile(s) to restore from backup set

RMAN-08509: destination for restore of datafile 00004: C:\ORACLASS\DATA\DISK1\TEMP01.DBF

RMAN-08023: channel d1: restored backup piece 1

RMAN-08511: piece handle=C:\ORACLASS\BACKUP\INCR1_DB02_26_1.BKP tag=null params=NULL

RMAN-08024: channel d1: restore complete

RMAN-08039: channel d1: starting incremental datafile backupset restore

RMAN-08502: set_count=27 set_stamp=426898661 creation_time=12-APR-01

RMAN-08089: channel d1: specifying datafile(s) to restore from backup set

RMAN-08509: destination for restore of datafile 00001: C:\ORACLASS\DATA\DISK1\SYSTEM01.DBF

RMAN-08023: channel d1: restored backup piece 1

RMAN-08511: piece handle=C:\ORACLASS\BACKUP\INCR1_DB02_27_1.BKP tag=null params=NULL

RMAN-08024: channel d1: restore complete

 

RMAN-03022: compiling command: recover(3)

RMAN-03023: executing command: recover(3)

RMAN-08054: starting media recovery

 

RMAN-03022: compiling command: recover(4)

RMAN-06050: archivelog thread 1 sequence 3 is already on disk as file C:\ORACLASS\ARCHIVE\ARCH_3.LOG

RMAN-06050: archivelog thread 1 sequence 4 is already on disk as file C:\ORACLASS\ARCHIVE\ARCH_4.LOG

RMAN-06050: archivelog thread 1 sequence 5 is already on disk as file C:\ORACLASS\ARCHIVE\ARCH_5.LOG

RMAN-06050: archivelog thread 1 sequence 6 is already on disk as file C:\ORACLASS\ARCHIVE\ARCH_6.LOG

RMAN-06050: archivelog thread 1 sequence 7 is already on disk as file C:\ORACLASS\ARCHIVE\ARCH_7.LOG

RMAN-06050: archivelog thread 1 sequence 8 is already on disk as file C:\ORACLASS\ARCHIVE\ARCH_8.LOG

RMAN-06050: archivelog thread 1 sequence 9 is already on disk as file C:\ORACLASS\ARCHIVE\ARCH_9.LOG

RMAN-06050: archivelog thread 1 sequence 10 is already on disk as file C:\ORACLASS\ARCHIVE\ARCH_10.LOG

RMAN-06050: archivelog thread 1 sequence 11 is already on disk as file C:\ORACLASS\ARCHIVE\ARCH_11.LOG

RMAN-06050: archivelog thread 1 sequence 12 is already on disk as file C:\ORACLASS\ARCHIVE\ARCH_12.LOG

RMAN-06050: archivelog thread 1 sequence 13 is already on disk as file C:\ORACLASS\ARCHIVE\ARCH_13.LOG

RMAN-06050: archivelog thread 1 sequence 14 is already on disk as file C:\ORACLASS\ARCHIVE\ARCH_14.LOG

RMAN-06050: archivelog thread 1 sequence 15 is already on disk as file C:\ORACLASS\ARCHIVE\ARCH_15.LOG

RMAN-06050: archivelog thread 1 sequence 16 is already on disk as file C:\ORACLASS\ARCHIVE\ARCH_16.LOG

RMAN-06050: archivelog thread 1 sequence 17 is already on disk as file C:\ORACLASS\ARCHIVE\ARCH_17.LOG

RMAN-03023: executing command: recover(4)

RMAN-08515: archivelog filename=C:\ORACLASS\ARCHIVE\ARCH_3.LOG thread=1 sequence=3

RMAN-08515: archivelog filename=C:\ORACLASS\ARCHIVE\ARCH_4.LOG thread=1 sequence=4

RMAN-08515: archivelog filename=C:\ORACLASS\ARCHIVE\ARCH_5.LOG thread=1 sequence=5

RMAN-08515: archivelog filename=C:\ORACLASS\ARCHIVE\ARCH_6.LOG thread=1 sequence=6

RMAN-08515: archivelog filename=C:\ORACLASS\ARCHIVE\ARCH_7.LOG thread=1 sequence=7

RMAN-08515: archivelog filename=C:\ORACLASS\ARCHIVE\ARCH_8.LOG thread=1 sequence=8

RMAN-08515: archivelog filename=C:\ORACLASS\ARCHIVE\ARCH_9.LOG thread=1 sequence=9

RMAN-08515: archivelog filename=C:\ORACLASS\ARCHIVE\ARCH_10.LOG thread=1 sequence=10

RMAN-08515: archivelog filename=C:\ORACLASS\ARCHIVE\ARCH_11.LOG thread=1 sequence=11

RMAN-08515: archivelog filename=C:\ORACLASS\ARCHIVE\ARCH_12.LOG thread=1 sequence=12

RMAN-08515: archivelog filename=C:\ORACLASS\ARCHIVE\ARCH_13.LOG thread=1 sequence=13

RMAN-08515: archivelog filename=C:\ORACLASS\ARCHIVE\ARCH_14.LOG thread=1 sequence=14

RMAN-08515: archivelog filename=C:\ORACLASS\ARCHIVE\ARCH_15.LOG thread=1 sequence=15

RMAN-08515: archivelog filename=C:\ORACLASS\ARCHIVE\ARCH_16.LOG thread=1 sequence=16

RMAN-08515: archivelog filename=C:\ORACLASS\ARCHIVE\ARCH_17.LOG thread=1 sequence=17

RMAN-08055: media recovery complete

 

RMAN-03022: compiling command: alter db

RMAN-06400: database opened

RMAN-03023: executing command: alter db

RMAN-08006: database registered in recovery catalog

RMAN-03023: executing command: full resync

RMAN-08002: starting full resync of recovery catalog

RMAN-08004: full resync complete

 

RMAN-03022: compiling command: release

RMAN-03023: executing command: release

RMAN-08031: released channel: d1

 

5.       List the incarnations of the Target database.

 

RMAN> list incarnation of database;

 

RMAN-03022: compiling command: list

 

List of Database Incarnations

DB Key  Inc Key DB Name  DB ID            CUR Reset SCN  Reset Time

------- ------- -------- ---------------- --- ---------- ----------

1       2       DB02     1171165975       NO  102768     16-MAR-01

1       261     DB02     1171165975       YES 163253     15-APR-01

 

RMAN>

 

1