Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: reset database

Re: reset database

From: Peter Gram <peter.gram_at_miracleas.dk>
Date: Thu, 16 May 2002 02:09:07 -0800
Message-ID: <F001.004620FF.20020516020907@fatcity.com>






pls. next time read the manual. if the manual gives problem then describe the problem !

Oracle8i Recovery Manager User's Guide and Reference
Release 2 (8.1.6)

Part Number A76990-01

Library

Product

Contents

Index

Go to previous page Go to beginning of chapter Go to next page

Recovery Manager Command Syntax, 36 of 50


reset

Syntax


Purpose

To create a new database incarnation record in the recovery catalog. RMAN considers the new incarnation as the current incarnation of the database. All subsequent backups and redo log archiving operations performed by the target database will be associated with the new database incarnation.

Requirements

Keywords and Parameters

to incarnation primary_key 

changes the incarnation that RMAN considers to be current to an older incarnation. This option is useful in the rare circumstance in which you want to undo the effects of a RESETLOGS by restoring backups of a prior incarnation of the database.

Specify the primary key of the DBINC record for the database incarnation. Obtain the key value using the list incarnation of databasecommand. After you issue the reset database to incarnation command, issue restore and recover commands to restore the database files from the prior incarnation and recover them. 


Examples

Resetting a Database After RESETLOGS

The following example resets a database after performing incomplete media recovery:

run {  
     allocate channel dev1 type disk;  
     set until logseq 1234 thread 1;
     restore database skip tablespace readonly;  
     recover database;  
     sql "ALTER DATABASE OPEN RESETLOGS";
     release channel dev1;
}
reset database;

Resetting an Old Incarnation

The following command makes an old incarnation of database PROD1 current again:

# obtain primary key of old incarnation
list incarnation of database prod1;

List of Database Incarnations
DB Key  Inc Key   DB Name   DB ID       CUR    Reset SCN    Reset Time
------- -------   -------   ------      ---    ----------   ----------
1       2         PROD1     1224038686  NO     1            02-JUL-98
1       582       PROD1     1224038686  YES    59727        10-JUL-98

shutdown immediate;
# reset database to old incarnation
reset database to incarnation 2;
# recover it
run {  
     allocate channel dev1 type disk;
     restore controlfile;
     startup mount;
     restore database;
     recover database;
     sql "ALTER DATABASE OPEN RESETLOGS";
     release channel dev1;
}

Related Topics

"list"

"restore"

"recover"



Malik, Fawzia wrote:
          Hi,
 
Please can someone explain the consequences of "reset database" in rman?? Does this mean all the previous backups are lost??Is there a way around ??
 
Any help/advice would be greatly appreciated...
 
 
Rgds
 
Fawzia


**********************************************************************
Information in this email is confidential and may be privileged.
It is intended for the addressee only. If you have received it in error,
please notify the sender immediately and delete it from your system.
You should not otherwise copy it, retransmit it or use or disclose its
contents to anyone.
Thank you for your co-operation.
**********************************************************************

-- 

/regards

Peter Gram

Mobil : +45 2527 7107
Fax   : +45 4466 8856

Miracle A/S
Kratvej 2
2760 Måløv
http://miracleas.dk

/*
The process of preparing programs for a digital computer is especially
attractive, not only because it can be economically and scientifically
rewarding, but also because it can be an aesthetic experience much like 
composing poetry or music

Donald Knuth
*/ 



The previous attachment was filtered out by the ListGuru mailing software at fatcity.com because binary attachments are not appropriate for mailing lists. If you want a copy of the attachment which was removed, contact the sender directly and ask for it to be sent to you by private E-mail.

This warning is inserted into all messages containing binary attachments which have been removed by ListGuru. If you have questions about this message, contact Postmaster_at_fatcity.com for clarification.









Oracle Documentation Library, Release 8.1.7


Please select a product from the list of documentation available on this system:

Contacting Oracle Support Services and Ordering Printed Books

Please visit the following web addresses for Oracle product support and ordering information:


We Want to Hear From You

We are always trying to improve the content and delivery of our online documentation, so we invite you to tell us what you think. Each document in this distribution includes a reader's comment form, with an appropriate e-mail address for submitting comments on that document.

If you have general comments about the documentation library or this CD-ROM, please send them to doc_talk@us.oracle.com. Please note that this address is only for documentation feedback. For assistance with installation or software problems, please contact Oracle Support Services using the URLs listed above.


Oracle Corporation
Copyright © 1996-2000 Oracle Corporation
500 Oracle Parkway, Redwood City, CA 94065


The previous attachment was filtered out by the ListGuru mailing software at fatcity.com because binary attachments are not appropriate for mailing lists. If you want a copy of the attachment which was removed, contact the sender directly and ask for it to be sent to you by private E-mail.

This warning is inserted into all messages containing binary attachments which have been removed by ListGuru. If you have questions about this message, contact Postmaster_at_fatcity.com for clarification.





   Oracle8i Server and SQL*Plus
   
   



Oracle8i Server and SQL*Plus Go to Product Documentation Library
Library


Not all manuals in the library have been updated for this release. The header
at the top of each HTML page indicates the most recent revision for that document.
An asterisk (*) by a title indicates that a manual is from Release 8.1.6 and that
some updated information can be found in the Oracle8i Documentation Addendum.

This library also includes Windows-specific Server and SQL*Plus documentation.



Administration, Concepts, and Reference

Getting to Know Oracle8i
HTML PDF
Oracle8i Administrator's Guide
HTML PDF
Oracle8i Concepts
HTML PDF
Oracle8i Designing and Tuning for Performance *
HTML PDF
Oracle8i Error Messages *
HTML PDF
Oracle8i Migration
HTML PDF
Oracle8i National Language Support Guide *
HTML PDF
Oracle8i Reference *
HTML PDF
Oracle8i SQL Reference
HTML PDF
Oracle8i Supplied Java Packages Reference
HTML PDF
Oracle8i Supplied PL/SQL Packages Reference *
HTML PDF
Oracle8i Utilities
HTML PDF

Backup and Recovery

Oracle8i Backup and Recovery Guide
HTML PDF
Oracle8i Recovery Manager User's Guide and Reference *
HTML PDF
Oracle8i Standby Database Concepts and Administration *
HTML PDF
Legato Storage Manager Administrator's Guide
HTML PDF

SQL*Plus

SQL*Plus User's Guide and Reference
HTML PDF
SQL*Plus Quick Reference
HTML PDF
SQL*Plus Accessibility Guide for Windows
HTML PDF

Data Warehousing

Oracle8i Data Warehousing Guide
HTML PDF

Distributed Databases and Replication

Oracle8i Distributed Database Systems
HTML PDF
Oracle8i Replication *
HTML PDF
Oracle8i Replication Management API Reference *
HTML PDF


The previous attachment was filtered out by the ListGuru mailing software at fatcity.com because binary attachments are not appropriate for mailing lists. If you want a copy of the attachment which was removed, contact the sender directly and ask for it to be sent to you by private E-mail.

This warning is inserted into all messages containing binary attachments which have been removed by ListGuru. If you have questions about this message, contact Postmaster_at_fatcity.com for clarification.











Oracle8i Recovery Manager User's Guide and Reference -- Contents
	   










       




Oracle8i Recovery Manager User's Guide and Reference
Release 2 (8.1.6)

Part Number A76990-01

Library

Product

Index

Updated information for Release 8.1.7 can be found in the Oracle8i Documentation Addendum.
Go to next page

Contents

Title and Copyright Information

Send Us Your Comments

Preface

What's New in Oracle8i?
Release 8.1.6
Release 8.1.5
Structure
Changes to This Book
Audience
Knowledge Assumed of the Reader
Conventions
Text
Recovery Manager Syntax Diagrams and Notation
Code Examples
How to Use This Guide
Your Comments Are Welcome

Part I Using Recovery Manager

1 Recovery Manager Concepts

Overview of Recovery Manager
Recovery Manager Features
What Recovery Manager Is Not
Recovery Manager Commands
Recovery Manager PL/SQL Packages
How Recovery Manager Compiles and Executes Commands
Types of Recovery Manager Commands
User Execution of Recovery Manager Commands
User Termination of Recovery Manager Commands
Recovery Manager Command Errors
Recovery Manager Repository
Storage of the RMAN Repository in the Recovery Catalog
Storage of the RMAN Repository Exclusively in the Control File
Media Management
Backup and Restore Operations Using a Media Manager
Media Manager Crosschecks
Proxy Copy
Media Manager Testing
Backup Solutions Program
Lists and Reports
Lists of Backups and Copies
Reports on Backups, Copies, and Database Schema
Channel Allocation
Channel Control Options
Channel Parallelization
Backup Sets
Storage of Backup Sets
Backup Set Compression
Filenames for Backup Pieces
Number and Size of Backup Sets
Size of Backup Pieces
Multiplexed Backup Sets
Duplexed Backup Sets
Parallelization of Backups
Backup Errors
Backup Types
Full Backups
Incremental Backups
Backup Constraints
Image Copies
RMAN Image Copies
O/S Image Copies
Tags for Backups and Image Copies
Restoring Files
Mechanics of Restore Operations
File Selection in Restore Operations
Restore Constraints
Media Recovery
Application of Incremental Backups and Redo Records
Incomplete Recovery
Tablespace Point-in-Time Recovery
Database Duplication
Integrity Checks
Detection of Physical Block Corruption
Detection of Logical Block Corruption
Detection of Fractured Blocks During Open Backups

2 Getting Started with Recovery Manager

Setting Up Recovery Manager
Using Password Files
Setting NLS Environment Variables
Determining the Snapshot Control File Location
Using RMAN with a Multi-Threaded Server
Deciding Whether to Use a Recovery Catalog
Consequences of Using the Recovery Catalog as the RMAN Repository
Consequences of Using the Control File as the RMAN Repository
Connecting to RMAN
Connecting to RMAN Without a Recovery Catalog
Connecting to RMAN with a Recovery Catalog
Connecting to an Auxiliary Database
Hiding Passwords When Connecting to RMAN
Disconnecting from RMAN
Using Basic RMAN Commands
Connecting to RMAN
Mounting the Database
Reporting the Current Schema
Copying a Datafile
Backing Up a Tablespace
Listing Backups and Copies
Validating a Restore
Configuring a Media Manager
Linking with a Media Manager
Generating Unique Filenames
Limiting File Size
Sending Device-Specific Strings to the Media Manager
Troubleshooting the Media Manager
Using Sample Scripts and Scenarios

3 Managing the Recovery Manager Repository

Creating the Recovery Catalog
Setting Recovery Catalog Compatibility
Maintaining the RMAN Repository
Registering a Database with the Recovery Catalog
Unregistering a Database from the Recovery Catalog
Resetting the Recovery Catalog
Changing the Availability of a Backup or File Copy
Crosschecking the RMAN Repository
Deleting Backups and Copies and Updating Their Status in the RMAN Repository
Validating the Restore of Backups and Copies
Storing Scripts in the Recovery Catalog
Resynchronizing the Recovery Catalog
Managing Records in the Control File
Cataloging Operating System Backups
Backing Up and Recovering the Recovery Catalog
Backing Up the Recovery Catalog
Recovering the Recovery Catalog
Re-Creating the Recovery Catalog
Upgrading the Recovery Catalog
Dropping the Recovery Catalog
Managing the RMAN Repository Without a Recovery Catalog
Understanding Catalog-Only Command Restrictions
Monitoring the Overwriting of Control File Records
Maintaining the Control File Repository
Backing Up the Control File

4 Generating Lists and Reports with Recovery Manager

Using Lists and Reports in Your Backup and Recovery Strategy
Generating Lists
Generating Reports
List and Report Scenarios
Makings Lists of Backups and Copies
Using Lists to Determine Obsolete Backups and Copies
Reporting Datafiles Needing Backups
Reporting Unrecoverable Datafiles
Reporting Obsolete Backups and Copies
Manually Deleting Obsolete Backups and Copies
Deleting Obsolete Backups and Copies Using a UNIX Shell Script
Generating Historical Reports of Database Schema
Listing Database Incarnations
Reporting Deleted Backups and Copies

5 Making Backups and Copies with Recovery Manager

Making Backups
Making Consistent and Inconsistent Backups
Making Whole Database Backups
Backing Up Tablespaces and Datafiles
Backing Up Control Files
Backing Up Archived Redo Logs
Making Incremental Backups
Making Split Mirror Backups
Making Image Copies
Backup and Copy Scenarios
Reporting Datafiles Needing Backups
Skipping Files when Backing Up a Database
Spreading a Backup Across Multiple Disk Drives
Backing Up a Large Database to Multiple Filesystems
Specifying the Size of Backup Sets
Specifying the Size of Backup Pieces
Multiplexing Datafiles in a Backup
Backing Up Archived Redo Logs
Backing Up and Deleting Multiple Copies of an Archived Redo Log
Performing Differential Incremental Backups
Performing Cumulative Incremental Backups
Duplexing Backup Sets
Determining How Channels Distribute a Backup Workload
Backing Up in NOARCHIVELOG Mode
Backing Up in a Parallel Server Environment
Cataloging Operating System Copies
Maintaining Backups and Copies
Handling Errors During Backups and Copies

6 Restoring and Recovering with Recovery Manager

Restoring Datafiles, Control Files, and Archived Redo Logs
Restoring a Database
Restoring Tablespaces and Datafiles
Restoring Control Files
Restoring Archived Redo Logs
Restoring in Preparation for Incomplete Recovery
Restoring in an OPS Configuration
Recovering Datafiles
Preparing for Media Recovery
Performing Complete Recovery
Performing Incomplete Recovery
Restore and Recovery Scenarios
Restoring Datafile Copies to a New Host
Restoring When Multiple Databases Share the Same Name
Restoring the Control File from a Backup Set Without Using RMAN
Recovering an Inaccessible Datafile in an Open Database
Recovering an Inaccessible Datafile Using Backups from Disk and Tape
Performing Recovery After a Total Media Failure
Recovering a Pre-RESETLOGS Backup
Recovering a Database in NOARCHIVELOG Mode
Recovering a Lost Datafile Without a Backup

7 Creating a Duplicate Database with Recovery Manager

Creating a Duplicate Database: Overview
Obeying Restrictions
Generating Files for the Duplicate Database
Preparing the Auxiliary Instance for Duplication
Creating a Duplicate Database on a Local or Remote Host
Duplicating a Database on a Remote Host with the Same Directory Structure
Duplicating a Database on a Remote Host with a Different Directory Structure
Creating a Duplicate Database on the Local Host
Duplication Scenarios
Setting New Filenames Manually
Resynchronizing the Duplicate Database with the Target Database
Creating a Non-Current Duplicate Database

8 Performing Point-in-Time Recovery with Recovery Manager

Introduction to RMAN TSPITR
Planning for TSPITR
Performing TSPITR Without a Recovery Catalog
Understanding General Restrictions
Researching and Resolving Inconsistencies
Managing Data Relationships
Preparing the Auxiliary Instance for TSPITR
Performing TSPITR
Preparing the Target Database for Use After TSPITR
Responding to Unsuccessful TSPITR
Tuning TSPITR Performance
Specify a New Name for Datafiles in Auxiliary Set Tablespaces
Set the Auxiliary Name and Use a Datafile Copy for Recovery Manager TSPITR
Use the Converted Filename in the Auxiliary Control File
Summary: Datafile Naming Methods

9 Recovery Manager Troubleshooting

Interpreting Message Output
Identifying Types of Message Output
Identifying Error Codes
Interpreting RMAN Error Stacks
Interpreting Debugging Output
Testing the Media Management API
Obtaining the Utility
Obtaining Online Documentation
Using the Utility
Monitoring RMAN Jobs
Correlating Server Sessions with Channels
Monitoring Job Progress
Monitoring Job Performance
Terminating an RMAN Session
Components of an RMAN Session
Process Behavior During a Hung Job
Terminating an RMAN Session
Troubleshooting Scenarios
After Linking to the Media Manager on UNIX, RMAN Fails to Back Up to Tape
After Installing the Media Manager on NT, RMAN Fails to Back Up to Tape
Backup Job Is Hanging
RMAN Fails to Start RPC Call
Backup Fails with Invalid RECID Error
Backup Fails Because of Control File Enqueue
RMAN Fails to Delete All Archived Logs
Backup Fails Because RMAN Cannot Locate an Archived Log
RMAN Issues Character Set Errors When You Attempt to Connect to the Target
RMAN Denies Logon to Target Database
Database Duplication Fails with RMAN-20240
UNKNOWN Database Name Appears in Recovery Catalog

Part II Recovery Manager Reference

10 Recovery Manager Command Syntax

Conventions Used in this Reference
Command Entries
Summary of RMAN Commands
allocate
allocateForMaint
alterDatabase
archivelogRecordSpecifier
backup
catalog
change
cmdLine
completedTimeSpec
configure
connect
connectStringSpec
copy
createCatalog
createScript
crosscheck
datafileSpec
debug
deleteExpired
deleteScript
deviceSpecifier
dropCatalog
duplicate
host
list
listObjList
printScript
recover
register
release
releaseForMaint
replaceScript
replicate
report
reset
restore
resync
rmanCommand
run
send
set
set_run_option
shutdown
sql
startup
switch
untilClause
upgradeCatalog
validate

11 Recovery Catalog Views

RC_ARCHIVED_LOG
RC_BACKUP_CONTROLFILE
RC_BACKUP_CORRUPTION
RC_BACKUP_DATAFILE
RC_BACKUP_PIECE
RC_BACKUP_REDOLOG
RC_BACKUP_SET
RC_CHECKPOINT
RC_CONTROLFILE_COPY
RC_COPY_CORRUPTION
RC_DATABASE
RC_DATABASE_INCARNATION
RC_DATAFILE
RC_DATAFILE_COPY
RC_LOG_HISTORY
RC_OFFLINE_RANGE
RC_PROXY_CONTROLFILE
RC_PROXY_DATAFILE
RC_REDO_LOG
RC_REDO_THREAD
RC_RESYNC
RC_STORED_SCRIPT
RC_STORED_SCRIPT_LINE
RC_TABLESPACE

Glossary

Index


The previous attachment was filtered out by the ListGuru mailing software at fatcity.com because binary attachments are not appropriate for mailing lists. If you want a copy of the attachment which was removed, contact the sender directly and ask for it to be sent to you by private E-mail.

This warning is inserted into all messages containing binary attachments which have been removed by ListGuru. If you have questions about this message, contact Postmaster_at_fatcity.com for clarification.











Oracle8i Recovery Manager User's Guide and Reference -- Index
	   










       




Oracle8i Recovery Manager User's Guide and Reference
Release 2 (8.1.6)

Part Number A76990-01

Library

Product

Contents

Go to previous page

Index

A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W 


A

alert log
control file record messages, 3-47
monitoring overwriting of control file records, 3-48
useful for RMAN, 9-2
allocate channel command (RMAN), 10-10
and multi-threaded server, 10-11, 10-15
for delete option, 5-27, 10-14
for maintenance option, 10-14
alter database command (RMAN), 10-16
ALTER DATABASE statement
OPEN RESETLOGS clause, 3-12
RENAME DATABASE clause, 6-10
ALTER TABLESPACE statement
BEGIN/END BACKUP clause, 3-35
archived redo logs
backing up, 5-20
using RMAN, 5-9, 5-10
cataloging, 3-9
copies, listing, 4-2
restoring using RMAN, 6-14
RMAN fails to delete, 9-30
archivelogRecoverSpecifier clause (RMAN), 10-18
auxiliary databases
for RMAN TSPITR
converted filenames, 8-15
using datafile copies, 8-14
auxiliary sets
for RMAN TSPITR, 8-4
naming datafiles in tablespaces, 8-13
available option (RMAN)
change command, 3-13

B

backup command (RMAN), 1-33, 5-2, 5-28, 10-22
proxy only option, 1-22
proxy option, 1-22
skip offline option, 5-16
backup pieces
restricting size, 1-41, 10-145
backup sets
creating using backup command, 1-39
crosschecking, 3-15
duplexing, 5-23
errors during creation, 1-47
listing, 4-2
multiplexing, 1-42
naming, 1-35
organizing, 1-33
parallelizing creating of, 1-45
restoring without RMAN, 6-37
restricting piece size, 1-41
specifying maximum size (in bytes), 1-39, 1-41
specifying number of, 1-35
testing restore of, 3-24
Backup Solutions Program (BSP), 1-23
Legato Storage Manager (LSM), 1-23
BACKUP_TAPE_IO_SLAVES initialization parameter, 5-24
backups
archived redo logs, 5-20
backing up using RMAN, 5-10
using RMAN, 5-9
automatic location using RMAN, 6-17
backup command (RMAN), 5-2
backup sets, 1-32
control file
using for recovery, 6-22
using RMAN, 5-7
correlating RMAN channels with, 9-14
cumulative incremental, 1-53, 1-54, 1-62, 1-65, 5-23
datafile
using RMAN, 5-5, 5-6
duplexing, 5-23
failed RMAN, 9-31
full, 1-49
generating reports for, 4-2
hung, 9-23
image copies, 1-32, 1-57
incremental, 1-50, 5-22
differential, 1-51
using RMAN, 5-11
keeping, 5-27
NOARCHIVELOG mode, in, 5-25
noncumulative incremental, 1-52
Parallel Server Environment, 5-26
parallelization, 1-45, 5-24
recovering pre-RESETLOGS, 6-42
recovery catalog, 1-16
using control file as repository, 3-39
reporting objects needing backups, 4-5
RMAN error handling, 5-28
specifying number of files per set, 1-36
split mirror
using RMAN, 5-12
stored scripts, 3-27
tablespace
using RMAN, 5-5, 5-6
tags, 1-58
troubleshooting failed RMAN, 9-19, 9-22, 9-26, 9-29
types, 1-32
user-created, cataloging, 3-35
using RMAN, 5-2
whole database
using RMAN, 5-3
BEGIN/END clause
ALTER TABLESPACE statement, 3-35
BSP. See Backup Solutions Program

C

cancelling RMAN commands, 1-12
CASE1.RCV sample script
setting size limits for backup pieces, 2-21
catalog command (RMAN), 3-9, 3-34, 10-35
cataloging
archived redo logs, 3-9
datafiles, 3-9
cataloging operating system copies, 5-27
CATALOG.SQL script, 3-2
CATPROC.SQL script, 3-2
CATRMAN.SQL script, 3-10
change command (RMAN), 3-15, 10-38
available option, 3-13
delete option, 3-20, 3-36
unavailable option, 3-13
channels
allocating, 1-28
allocating to MTS sessions, 10-11, 10-15
controlling RMAN, 1-28
managing RMAN, 1-28
parellelization of, 1-31
character sets
RMAN errors, 9-32
setting for use with RMAN, 2-3
code examples
description of, 10-5
command files
Recovery Manager, 1-10
command line
arguments for RMAN, 1-10, 10-42
commands, Recovery Manager
allocate channel, 10-10
allocate channel for delete, 5-27
allocate channel for maintenance/delete, 10-14
alter database, 10-16
archivelogRecoverSpecifier clause (RMAN), 10-18
backup, 1-33, 5-2, 5-28, 10-22
proxy only option, 1-22
proxy option, 1-22
skip offline option, 5-16
catalog, 3-9, 3-34, 10-35
change, 3-15, 10-38
delete option, 3-36
configure, 10-47
connect, 10-51, 10-53
copy, 10-55
create catalog, 10-59
create script, 10-61
crosscheck, 10-64
debug, 10-68
delete expired backup, 10-69
delete script, 10-71, 10-72
drop catalog, 3-44, 10-74
duplicate, 1-64, 10-76
execute script, 3-27
host, 10-81
list, 1-24, 10-83
incarnation of database option, 3-13
listObjList clause, 10-92
overview, 1-5
print script, 10-94
recover, 1-61, 6-18, 10-96
register, 3-10, 10-101
release channel, 10-103
release channel (of type maintenance), 10-104
replace script, 10-105
replicate, 6-12, 10-108
replicate controlfile, 6-12
report, 1-26, 10-110
need backup option, 4-5
reset database, 3-12, 10-118
incarnation option, 3-13
restore, 6-19, 10-120
resync catalog, 1-15, 3-29, 10-127
from controlfilecopy option, 3-43
rman, 10-130
run, 10-133
send, 2-22, 10-136
set, 10-138
duplex parameter, 5-24
maxcorrupt for datafile option, 5-28
newname for datafile option, 6-10
set (within run command), 10-142
shutdown, 10-147
sql, 10-150
startup, 10-152
summary, 10-6
switch, 10-154
terminating, 1-12
until, 10-45, 10-156
upgrade catalog, 3-43, 10-158
validate, 10-160
compatibility
level of recovery catalog, 1-16
recovery catalog
viewing parameter setting, 3-6
Recovery Manager. See Oracle8i Migration
compilation and execution of RMAN commands, 1-6
complete recovery
using RMAN, 6-20
configuration of RMAN
for use with MTS, 2-4
configure compatible command (RMAN), 1-16, 3-4
connect command (RMAN), 10-51, 10-53
connection options
Recovery Manager, 2-9
auxiliary database, 2-12
hiding passwords, 2-13
with a catalog, 2-10
without a catalog, 2-9
constraints
restore, 1-60
control file records
overwriting, 3-47
control files
backing up
using RMAN, 5-7
backup and recovery, 6-22
overwriting records, 3-47
restoring, 6-12
using dbid, 6-36
using RMAN, 6-12, 6-13
snapshot
specifying location of, 2-3
using instead of a recovery catalog, 1-17
CONTROL_FILE_RECORD_KEEP_TIME initialization parameter, 3-47
preventing overwrite of RMAN records, 3-47
CONTROL_FILES initialization parameter, 6-12, 8-8
copy command (RMAN), 10-55
corrupt datafile blocks
detecting, 1-66, 1-67
maximum acceptable number, 10-143
records in control file, 1-48
RMAN and, 1-47
setting maximum for backup, 5-28
corruption detection, 1-66, 1-67
using set maxcorrupt command, 10-143
create catalog command (RMAN), 10-59
CREATE CONTROLFILE statement
and recovery, 6-18
create script command (RMAN), 10-61
creating
duplicate databases, 7-2
on a remote host, 7-10
recovery catalog, 3-2
test databases, 1-64
crosscheck command (RMAN), 10-64
crosschecking
definition, 1-21
recovery catalog with the media manager, 3-14
cumulative incremental backups, 1-53, 5-23

D

database schema
generating reports, 4-8
databases
backing up
using Recovery Manager, 1-33
creating duplicate, 7-2
on a remote host, 7-10
creating test, 7-2
db identifier, 3-10
registering in recovery catalog, 3-9
unregistering in recovery catalog, 3-11
datafiles
backing up
using Recovery Manager, 1-33, 5-5, 5-6
backups needed, listing, 4-10, 4-11, 4-13, 5-16
backups, listing, 4-2
cataloging, 3-9
copies, listing, 4-2
listing
unrecoverable, 4-5
recovery
guidelines, 1-61, 6-18
using RMAN, 6-18
restoring, 1-59, 6-2, 6-10
dates
specifying in RMAN commands, 2-3
db identifier, 3-10
obtaining, 6-35
problems registering copied database, 3-10
DB_FILE_NAME_CONVERT initialization parameter, 1-65, 8-8
using with RMAN duplicate command, 7-7
DB_NAME initialization parameter, 8-8
debug command (RMAN), 9-8, 10-68
debugging RMAN, 9-8
delete expired backup command (RMAN), 3-21, 10-69
delete script command (RMAN), 10-71, 10-72
deleting
backups and image copies, 3-20
obsolete backups and copies, 3-21
differential incremental backups, 1-51
disconnecting
from Recovery Manager, 2-13
disk API, 9-19
disk buffers
tuning for RMAN backups. See Oracle8i Tuning, 1-35
diskratio parameter
backup command (RMAN), 10-29
drop catalog command (RMAN), 10-74
dropping the recovery catalog, 3-44
dummy API, 9-19
duplex parameter (RMAN)
set command, 5-24
duplexing backup sets, 1-44, 5-23
duplicate command (RMAN), 1-64, 10-76
duplicate databases
creating, 1-64, 7-2
non-current, 7-19
on a remote host with same filesystem, 7-11
on local host, 7-17
on remote host with different filesystem, 7-12
DB_FILE_NAME_CONVERT initialization parameter, 7-5
failed creation, 9-33
generating filenames, 7-3
nofilenamecheck option, 7-6
restrictions, 7-3
set auxname command (RMAN), 7-5
set newname command (RMAN), 7-5
skipping offline normal tablespaces, 7-6
skipping read-only tablespaces, 7-5
duplicating a database, 1-64
troubleshooting, 9-33

E

environment variables
NLS_DATE_FORMAT, 2-2
NLS_LANG, 2-2
error codes
media manager, 9-4
RMAN, 9-2, 9-3
error stacks
interpreting, 9-6
errors
during RMAN backups, 5-28
Recovery Manager, 1-13
expired records
removing from recovery catalog, 3-21

F

features, new
autolocate option, xv
configure compatible command, xvi
create catalog command, xvii
crosscheck commands, xvi
drop catalog command, xvii
duplexed backup sets, xvii
duplicate command, xvii
media management API 2.0, xvi
remove records from recovery catalog, xvi
report need backup redundancy command, xvii
resetlogs option in RMAN, xvi
RMAN disk affinity, xvii
RMAN TSPITR without catalog, xviii
startup, shutdown, and alter database in RMAN, xvii
unique names for backup pieces by default, xvii
upgrade catalog command, xvii
V$BACKUP_SYNC_IO and V$BACKUP_ASYNC_IO, xviii
filesperset parameter
backup command (RMAN), 10-27
specifying number of files in a backup set, 1-36
fractured block detection, 1-67
full backups, 1-49

G

generating lists using RMAN, 1-24
generating reports, 1-24, 4-5

H

host command (RMAN), 10-81

I

image copies, 1-57
crosschecking, 3-17
testing restore of, 3-24
incarnation of database option (RMAN)
list command, 3-13
incarnation option (RMAN)
reset database command, 3-13
incomplete recovery
change-based (RMAN), 6-27
log sequence-based (RMAN), 6-28
restoring in preparation for, 6-16
time-based (RMAN), 6-26
using RMAN, 6-25
with a recovery catalog, 6-26
without a recovery catalog, 6-29, 6-31
incremental backups, 5-22
differential, 1-51
using RMAN, 5-11
initialization parameter file, 1-61, 6-18
initialization parameters
BACKUP_TAPE_IO_SLAVES, 5-24
CONTROL_FILES, 6-12
integrity checking, 1-66
interpreting RMAN error stacks, 9-6
I/O errors
effect on backups, 1-47

J

jobs
RMAN, 1-9
monitoring performance, 9-17
monitoring progress, 9-14

K

kbytes parameter
set command (RMAN), 1-41, 2-21
keywords
in syntax diagrams, 10-3

L

level 0 incremental backups, 1-50
list command (RMAN), 1-24, 10-83
incarnation of database option, 3-13
listObjList clause (RMAN), 10-92
lists (RMAN), 4-2 to 4-4
backups and copies, 4-3, 4-10
backups and copies made before specified date, 4-10
scenarios, 4-10
LOCK_NAME_SPACE initialization parameter, 8-8
log switches
recovery catalog records, 3-34
LOG_FILE_NAME_CONVERT initialization parameter, 8-8

M

managing RMAN metadata, 3-1, 7-1
maxcorrupt parameter
set command (RMAN), 10-143
media management
backing up files, 1-20
Backup Solutions Program, 1-23
Legato Storage Manager (LSM), 1-23
crosschecking, 1-21
error codes, 9-4
linking to software, 2-20
maximum file size, 2-21
proxy copy, 1-22
relinking to the API, 9-21
requirements, 2-20
restoring files, 1-21
sbttest program, 1-23, 9-10
sending device-specific strings, 2-22
testing the API, 9-10
troubleshooting, 2-22
unique filenames, generating, 2-21
Media Management Library (MML), 1-20
media recovery
datafiles
guidelines for, 1-61, 6-18
using Recovery Manager, 1-61, 6-18
metadata
managing RMAN, 1-13, 3-1, 7-1
storing in control file, 1-17
mirrored files
splitting
using RMAN, 5-12
mirroring
backups using, 5-12
monitoring RMAN, 9-12
multiplexing
datafiles with Recovery Manager, 1-42
multi-threaded server
allocating channels, 10-11, 10-15
configuring for use with RMAN, 2-4

N

name translation
for RMAN commands, 1-7
naming backup sets, 1-35
new features
autolocate option, xv
configure compatible command, xvi
create catalog command, xvii
crosscheck commands, xvi
drop catalog command, xvii
duplexed backup sets, xvii
duplicate command, xvii
media management API 2.0, xvi
remove records from recovery catalog, xvi
report need backup redundancy command, xvii
resetlogs option in RMAN, xvi
RMAN disk affinity, xvii
RMAN TSPITR without catalog, xviii
startup, shutdown, and alter database in RMAN, xvii
unique names for backup pieces by default, xvii
upgrade catalog command, xvii
V$BACKUP_SYNC_IO and V$BACKUP_ASYNC_IO, xviii
newname for datafile option (RMAN)
set command, 6-10
NLS_DATE_FORMAT environment variable, 2-2, 5-21, 6-26
NLS_LANG environment variable, 2-2, 5-21, 6-26
NOARCHIVELOG mode
backing up, 5-25
noncumulative incremental backups, 1-52
normalization
of pre-8.1.6 control file on NT, 10-123

O

objects owned by SYS
and TSPITR using RMAN, 8-6
open database backups
fractured block detection during, 1-67
open database recovery
using RMAN, 6-24
OPEN RESETLOGS clause
ALTER DATABASE statement, 3-12
operating system utilities
copying files with, 5-27
OPS. See Oracle Parallel Server
Oracle Parallel Server
backups and, 5-26
restoring using RMAN, 6-16
overwriting control file records, 3-47

P

Parallel Server. See Oracle Parallel Server
parallelization
channels, 1-31
factors affecting degree of, 1-31
of backups using RMAN, 1-45, 5-24
RMAN backups, 1-45, 5-24
parameters
in syntax diagrams, 10-3
password files
connecting to Recovery Manager with, 2-10, 2-11
connecting to Recovery Manager without, 2-11
Recovery Manager, 2-2
passwords
hiding in RMAN, 2-13
point-in-time recovery
tablespace, 8-2 to 8-15
PRGRMANC.SQL script, 3-19
print script command (RMAN), 10-94
proxy copy
overview, 1-22
proxy only option (RMAN)
backup command, 1-22
proxy option (RMAN)
backup command, 1-22
purging recovery catalog
obsolete records, 3-19
records with DELETED status, 3-19

Q

querying
recovery catalog, 4-2

R

RC_ARCHIVED_LOG view, 11-2
RC_BACKUP_CONTROLFILE view, 11-3
RC_BACKUP_CORRUPTION view, 11-5
RC_BACKUP_DATAFILE view, 11-6
RC_BACKUP_PIECE view, 11-8
RC_BACKUP_REDOLOG view, 11-9
RC_BACKUP_SET view, 11-11
RC_CHECKPOINT_VIEW, 11-12
RC_CONTROLFILE_COPY view, 11-13
RC_COPY_CORRUPTION view, 11-14
RC_DATABASE view, 11-15
RC_DATABASE_INCARNATION view, 11-15
RC_DATAFILE view, 11-16
RC_DATAFILE_COPY view, 11-17
RC_LOG_HISTORY view, 11-18
RC_OFFLINE_RANGE view, 11-19
RC_PROXY_CONTROLFILE view, 11-20
RC_PROXY_DATAFILE view, 11-22
RC_REDO_LOG view, 11-24
RC_REDO_THREAD view, 11-24
RC_RESYNC view, 11-25
RC_STORED_SCRIPT view, 11-25
RC_STORED_SCRIPT_LINE view, 11-26
RC_TABLESPACE view, 11-26
read-only tablespaces
backing up, 5-16
recover command (RMAN), 1-61, 6-18, 10-96
recovery
complete using RMAN, 6-20
database
in NOARCHIVELOG mode, 6-43
disaster using RMAN, 6-39
inaccessible datafiles
in open database, 6-38
using disk and tape backups, 6-39
incomplete, 6-25
without a recovery catalog, 6-31
without recovery catalog, 6-29
of lost or damaged recovery catalog, 3-42
open database using RMAN, 6-24
preparing for, 6-19
skipping tablespaces during, 6-20
tablespace, 6-23
to log sequence number, 6-28
to SCN, 6-27
to time, 6-26
using backup control file (RMAN), 6-22
using RMAN, 6-18
whole database
using backup control file, 6-22
when control file is intact, 6-21
recovery catalog, 1-14, 2-6 to 3-43
and incomplete recovery, 6-26
backing up, 1-16
using control file as repository, 3-39
cataloging
O/S backups, 3-34
changing availability of backup, 3-13
changing status of backups to DELETED, 3-18
compatibility, 1-16
viewing, 3-6
compatibility. See Oracle8i Migration
connecting to Recovery Manager with, 2-10, 2-12
connecting to Recovery Manager without, 2-9, 2-11
consequences of using, 2-6
creating, 3-2
8.1.6 catalog usable with pre-8.1.6 RMAN, 3-6
in separate database, 2-6
crosschecking, 3-14
db identifier problems, 3-10
deleting records, 3-20
dropping, 3-44
log switch record, 3-34
managing size of, 3-33
operating with, 1-14
operating without, 1-17
overview, 1-14
purging all records with DELETED status, 3-19
querying, 1-24, 4-2
recovery of lost or damaged, 3-42
refreshing, 3-29
registering databases, 3-9
registering target databases, 3-9
in two catalogs, 3-39
removing records, 3-23
expired, 3-21
obsolete, 3-19, 3-21
resynchronizing, 1-15, 3-29
schema, 2-6
setting up, 3-2
setting compatibility level, 3-4
snapshot control file, 1-15
stored scripts
creating, 3-27
executing, 3-28
UNKNOWN database name, 9-35
unregistering databases, 3-11
updating
after operating system deletions, 3-20
after schema changes, 3-32
upgrading, 3-43
views, 11-1
Recovery Manager
advantages to using, 1-4
allocate channel for maintenance, 10-14
backup sets, 1-39
backup types, 1-32
duplexed backup sets, 1-44
backups, 5-2
archived redo logs, 5-9, 5-10
control file, 5-7
datafile, 5-5, 5-6
fractured block detection, 1-67
image copy, 1-57
incremental, 5-11
tablespace, 5-5, 5-6
using tags, 1-58
whole database, 5-3
channel control
overview, 1-28
channels
managing, 1-28
command line arguments, 1-10
commands
allocate channel, 10-10
allocate channel for delete, 5-27
alter database, 10-16
backup, 1-22, 1-33, 5-2, 5-28
catalog, 3-9, 3-34
change, 3-15, 3-36
configure, 10-47
connect, 10-51
copy, 10-55
create catalog, 10-59
create script, 10-61
crosscheck, 10-64
debug, 10-68
delete expired backup, 10-69
delete script, 10-71
drop catalog, 10-74
duplicate, 10-76
execute script, 3-27
host, 10-81
interactive use of, 1-10
job, 1-9
job commands, 1-9
list, 3-13
overview, 1-5
print script, 10-94
recover, 1-61, 6-18
register, 3-10
release channel, 10-103
replace script, 10-105
replicate controlfile, 6-12
report, 4-5
reset database, 3-12
restore, 6-19
resync catalog, 3-43
rman, 10-130
run, 10-133
send, 2-22
set, 5-24, 6-10
shutdown, 10-147
sql, 10-150
stand-alone, 1-9
stand-alone commands, 1-8
startup, 10-152
switch, 10-154
upgrade catalog, 10-158
using command files, 1-10
validate, 10-160
compatibility. See Oracle8i Migration
compilation and execution of commands, 1-6
connecting
duplicate database, 2-12
with password files, 2-10, 2-11
with recovery catalog, 2-10, 2-12
without password files, 2-11
without recovery catalog, 2-9, 2-11
connection options, 2-9
auxiliary database, 2-12
hiding passwords, 2-13
with a catalog, 2-10
without a catalog, 2-9
constraints
backup, 1-56
restore, 1-60
corrupt datafile blocks, 1-66, 1-67
handling I/O errors and, 1-47
creating duplicate databases, 7-2
crosschecking recovery catalog, 3-14
database character set, 2-3
dates in commands, 2-3
debugging, 9-8
disconnecting from, 2-13
error codes, 9-3
error messages, 9-2
error stacks
interpreting, 9-6
errors, 1-13
fractured block detection in, 1-67
hanging backups, 9-23
image copy backups, 1-57
incomplete recovery
with a recovery catalog, 6-26
without a recovery catalog, 6-29
incremental backups
cumulative, 1-53
differential, 1-51
level 0, 1-50
integrity checking, 1-66
interactive use of commands, 1-10
introduction, 1-2
jobs
monitoring progress, 9-14
lists, 4-2
media management
backing up files, 1-20
Backup Solutions Program (BSP), 1-23
crosschecking, 1-21
maximum file size, 2-21
media manager, linking with a, 2-20
proxy copy, 1-22
requirements, 2-20
restoring files, 1-21
testing, 1-23
unique filenames, 2-21
metadata, 1-13, 3-1, 7-1
storing in control file, 1-17
monitoring, 9-12, 9-17
multiplexing
datafiles, 1-42
name translation, 1-7
overview, 1-4
parallelization of backups, 1-45
password files, 2-2
PL/SQL job steps, 1-7
recovery, 6-18
after total media failure, 6-39
complete, 6-20
incomplete, 6-25
open database, 6-24
using backup control file, 6-22
recovery catalog, 1-14
backing up, 3-37
changing availability of backups and copies, 3-13
creating a separate database, 2-6
crosschecking, 3-14
deciding whether to use, 2-6
losing control files when not using a, 1-18
managing the size of, 3-33
operating with, 1-14
operating without, 1-17
querying, 1-24, 4-2
recovering lost or damaged, 3-42
registering databases, 3-9
removing records, 3-23
resynchronizing, 3-29
schema, 3-2
snapshot control file, 1-15
updating after schema changes, 3-32
upgrading, 3-43
registering databases, 3-10
reports, 4-5
database schema, 4-8
objects needing a backup, 4-5
obsolete backups, 4-6, 4-8
resetting database information, 3-12
restoring, 6-2
archived redo logs, 6-14
control files to default location using recovery catalog, 6-12
control files to new location without recovery catalog, 6-13
database to default location, 6-3
datafiles, 1-59
RPC calls and, 9-25
sample scripts, 2-22
sbttest program, 1-23, 2-22
security, 2-13
setting time parameters, 2-2
snapshot control file location, 2-3
stored scripts, 1-11
symbolic links for filenames, 10-123
syntax conventions, 10-2
tablespace point-in-time recovery, 1-63
tags for backups, 1-58
terminating commands, 1-12
test disk API, 9-19
tuning backups and restores. See Oracle8i Tuning
types of backups, 1-57
using RMAN commands, 1-5
recovery sets
containing whole tables, 8-6
for RMAN TSPITR, 8-4
register command (RMAN), 3-9, 3-10, 10-101
release channel command (RMAN), 10-103
releasing a maintenance channel, 10-104
relinking to the media management API, 9-21
removing records from the recovery catalog, 3-23
RENAME DATABASE clause
ALTER DATABASE statement, 6-10
replace script command (RMAN), 10-105
replicate command (RMAN), 6-12, 10-108
report command (RMAN), 1-26, 10-110
need backup option, 4-5
reports (RMAN)
database incarnations, 4-13
database schema, 4-13
datafiles needing backups, 4-10
deleted backups and copies, 4-13
obsolete backups and copies, 4-11, 4-12
unrecoverable datafiles, 4-11
reports, generating, 4-2, 4-5
database schema, 4-8
objects needing a backup, 4-5
obsolete backups, 4-6, 4-8
scenarios, 4-10, 4-11, 4-13
unrecoverable backups, 4-6, 4-8
reset database command (RMAN), 3-12, 10-118
incarnation option, 3-13
restore command (RMAN), 6-19, 10-120
restore constraints, 1-60
restore validation, 3-24
restoring
backup control file
using dbid, 6-36
backup set without using RMAN, 6-37
control files, 6-12
database to default location, 6-3
database to new host with same file system, 6-4
using recovery catalog, 6-5
without recovery catalog, 6-6
datafiles, 1-59, 6-2, 6-10
files
how RMAN chooses, 1-60
in an OPS configuration using RMAN, 6-16
tablespaces, 6-10
testing, 3-24
resync catalog command (RMAN), 1-15, 3-29, 10-127
from controlfilecopy option, 3-43
resynchronizing the recovery catalog, 1-15, 3-29
rman command (RMAN), 10-130
RMAN. See Recovery Manager
RMAN1.SH script, 3-19, 3-21
rollback segments
and RMAN TSPITR, 8-6
run command (RMAN), 10-130, 10-133

S

sample scripts
RMAN, 2-22
sbtio.log
and RMAN, 9-3
sbttest program, 1-23, 2-22, 9-10
scenarios, Recovery Manager
backing up archived redo logs, 5-20
cataloging operating system copies, 5-27
deleting obsolete backups and copies, 4-11
duplexing backup sets, 5-23
handling backup errors, 5-28
incremental backups, 5-22
incremental cumulative backups, 5-23
listing backups and copies, 4-10
listing obsolete backups and copies, 4-10
maintaining backups and copies, 5-27
NOARCHIVELOG backups, 5-25
OPS backups, 5-26
parallelization of backups, 5-24
recovering pre-resetlogs backup, 6-42, 6-43
recovery after total media failure, 6-39
reporting database schema, 4-13
reporting datafiles needing backups, 4-10, 5-16
reporting obsolete backups, 4-11
reporting unrecoverable datafiles, 4-11
restoring when databases share name, 6-35
setting size of backup sets, 5-18
schemas
changes
updating recovery catalog, 3-32
scripts, Recovery Manager
CATRMAN.SQL, 3-10
security
Recovery Manager, 2-13
send command (RMAN), 2-22, 10-136
set archivelog destination command (RMAN), 6-14
set command (RMAN), 10-138
autolocate option
using in OPS configuration, 6-17
duplex parameter, 5-24
executed within run, 10-142
maxcorrupt for datafile option, 5-28
newname parameter, 1-65, 6-10
set newname command (RMAN)
during database restore, 6-3
setsize parameter
backup command (RMAN), 1-40, 10-29
shutdown command (RMAN), 10-147
size of backup sets, setting, 1-41
skip offline option (RMAN)
backup command, 5-16
skip readonly option (RMAN)
backup command, 5-16
snapshot control files, 1-15
specifying location, 2-3
split mirrors
using as backups, 5-12
sql command (RMAN), 10-150
stand-alone Recovery Manager commands, 1-8
startup command (RMAN), 10-152
stored scripts
creating, 3-27
creating RMAN, 3-27
deleting, 3-28
executing, 3-28
executing RMAN, 3-28
listing all, 3-29
managing, 3-27
printing, 3-29
Recovery Manager, 1-11
replacing, 3-28
switch command (RMAN), 10-154
symbolic links
and RMAN, 10-123
syntax conventions
Recovery Manager, 10-2
syntax diagrams
explanation of, 10-2
keywords, 10-3
parameters, 10-3
SYSDBA option
not needed for RMAN, 2-10

T

tablespace backups
using RMAN, 5-5, 5-6
tablespace point-in-time recovery
using RMAN, 1-63
introduction, 8-2
performing, 8-10
planning for, 8-4
preparing the auxiliary instance, 8-7
recovery sets containing whole tables, 8-6
restrictions, 8-4
tuning considerations, 8-13
tablespaces
read-only
backing up, 5-16
recovering accessible
when database is closed, 6-23
when database is open, 6-24
recovering inaccessible
when database is closed, 6-23
when database is open, 6-24
restoring, 6-10
tags, 1-58
tape buffers
tuning for RMAN backups. See Oracle8i Tuning, 1-35
target database
definition, 1-2
terminating RMAN commands, 1-12
test databases, creating, 1-64
test disk API, 9-19
testing
media manager, 1-23
testing the media management API, 9-10
time parameters
setting for Recovery Manager use, 2-2
trace files
and RMAN, 9-2
troubleshooting
media manager configurations, 2-22
TS_PITR_CHECK view, 8-6
TSPITR. See tablespace point-in-time recovery.
tuning
Recovery Manager performance. See Oracle8i Tuning

U

unavailable option (RMAN)
change command, 3-13
unregistering a database from the recovery catalog, 3-11
until clause (RMAN), 10-45, 10-156
updating records in recovery catalog, 3-18
upgrade catalog command (RMAN), 10-158
upgrading the recovery catalog, 3-43
user-created backup files
cataloging, 3-35
utilities
operating system, using to make copies, 5-27

V

V$BACKUP_CORRUPTION view, 1-48, 10-27
V$LONGOPS view, 1-48
V$PROCESS view, 9-13
V$PROXY_ARCHIVEDLOG view, 1-22
V$PROXY_DATAFILE view, 1-22
V$SESSION view, 9-13
V$SESSION_LONGOPS view, 9-13
V$SESSION_WAIT view, 9-13
validate command (RMAN), 10-160
validation of restore, 3-24
views
recovery catalog, 11-1

W

whole database backups
using RMAN, 5-3

The previous attachment was filtered out by the ListGuru mailing software at fatcity.com because binary attachments are not appropriate for mailing lists. If you want a copy of the attachment which was removed, contact the sender directly and ask for it to be sent to you by private E-mail.

This warning is inserted into all messages containing binary attachments which have been removed by ListGuru. If you have questions about this message, contact Postmaster_at_fatcity.com for clarification.











 Recovery Manager Command Syntax, 35 of 50
	   










       




Oracle8i Recovery Manager User's Guide and Reference
Release 2 (8.1.6)

Part Number A76990-01

Library

Product

Contents

Index

Go to previous page Go to beginning of chapter Go to next page

Recovery Manager Command Syntax, 35 of 50


report

Syntax


atClause::=

reportObject::=

Purpose

To perform detailed analyses of the RMAN repository. Oracle writes the output from the report command to standard output or the message log file (see "connect").

Use the report command to answer questions such as the following:

Requirements

  • Execute this command only at the RMAN prompt.

  • You must use a recovery catalog when issuing a report schema command with the at time, at scn, or at logseq options. Otherwise, a recovery catalog is not required for the report command.

Keywords and Parameters

need backup 

lists all datafiles in need of a new backup. The report assumes that you will use the most recent backup for restore operations. 

 

incremental integer  

specifies a threshold number of incremental backups. If complete recovery of a datafile requires more than the specified number of incremental backups, then the datafile requires a new full backup. The report command, like the recover command, uses the lowest level of incremental backup whenever there is a choice. This is the same strategy that RMAN would use if the file were actually being recovered by the recover command.

Note: Files for which no backups exist will not appear in this list: issue the report need backup redundancy command to display them. 

 

days integer 

specifies a threshold number of days of redo log files that need application during recovery of this file. For example, report need backup days 7 database shows the datafiles whose recovery requires more than one week's worth of archived redo logs.

If the target database control file is mounted and current, RMAN makes the following optimizations to this report:

  • Files that are offline and whose most recent backup contains all changes to the file will not be included.

  • Files that were offline and are now online, and whose most recent backup contains all changes up to the offline time, will only be reported if they have been online for more than the specified number of days.

 

 

redundancy integer 

specifies the minimum number of backups or copies that must exist for a datafile to be considered not in need of a backup. In other words, a datafile needs a backup if there are fewer than integer backups or copies of this file. For example, redundancy 2 means that if there are fewer than two copies or backups of a datafile, then it needs a new backup. 

unrecoverable 

lists all unrecoverable datafiles. A datafile is considered unrecoverable if an unrecoverable operation has been performed against an object residing in the datafile since the last backup of the datafile.

Note: The non-existence of any backup of a datafile is not sufficient reason to consider it unrecoverable. Such datafiles can be recovered through the use of the CREATE DATAFILE command, provided that redo logs starting from when the file was created still exist. 

reportObject clause 

specifies the datafiles to be included in the report. The report can include the entire database (optionally skipping certain tablespaces), a list of tablespaces, or a list of datafiles. 

 

datafile datafileSpec 

lists the specified datafiles. RMAN reports on backups or datafile copies that contain at least one of the specified datafiles. 

 

tablespace tablespace_name 

lists datafiles in the specified tablespace. RMAN reports on backups or datafile copies that include at least one datafile from a specified tablespace. 

 

database 

lists backups or datafile copies of all files in the current database.  

 

skip tablespace tablespace_name 

excludes the specified tablespaces from the database specification. 

obsolete 

lists full backups and datafile copies recorded in the RMAN repository that can be deleted because they are no longer needed. If you do not specify further parameters, redundancy defaults to 1. If you use this option in conjunction with device type, RMAN only considers backups and copies on the specified type. 

 

redundancy integer 

specifies the minimum level of redundancy considered necessary for a backup or copy to be obsolete. A datafile copy is obsolete if there are at least integer more recent backups or image copies of this file; a datafile backup set is obsolete if there are at least integer more recent backups or image copies of each file contained in the backup set. For example, redundancy 2 means that there must be at least two more recent backups or copies of a datafile for any other backup or copy to be obsolete. 

 

untilClause 

specifies that no backup or copy will be considered obsolete if there are at least n (where n is the value for redundancy) backups or copies that are more recent but do not contain changes later than the specified time, SCN, or log sequence number. For example, obsolete redundancy 2 until 'SYSDATE-7' means that a backup or copy is obsolete if there are at least two backups or copies that are more recent and those copies were checkpointed more than a week ago.

This clause is useful if the database must be recoverable to non-current time, SCN, or log sequence number. See "untilClause"

 

orphan 

specifies as obsolete those backups and copies that are unusable because they belong to incarnations of the database that are not direct ancestors of the current incarnation. Note that report obsolete orphan displays orphaned backups in addition to the normal display of obsolete backups. For an explanation of orphaned backups, see "Reporting on Orphaned Backups".  

schema 

lists the names of all datafiles and tablespaces at the specified point in time. 

atClause 

specifies a point in time as a time, an SCN, or a log sequence number. 

 

at time date_string 

specifies a date. The NLS_LANG and NLS_DATE_FORMAT environment variables specify the format for the time. 

 

at scn integer 

specifies an SCN. 

 

at logseq integer  

specifies a log sequence number for a specified redo thread. The integer indicates the time when the specified log and thread were first opened. 

device type deviceSpecifier 

specifies the type of storage device. RMAN only considers backups and copies available on the specified device for its report. See "deviceSpecifier"

Report Output

The fields in each report are described below:

Table 10-11 Report of Database Schema 
Column  Indicates 

FILE 

the absolute datafile number. 

K-BYTES 

the size of the file in kilobytes.  

TABLESPACE 

the tablespace name. 

RB SEGS 

YES if rollback segments exist in the tablespace and NO if they do not (only if connected to the recovery catalog). If RMAN is not connected to the catalog, then '***' is displayed. 

NAME 

the filename of the datafile. 

Table 10-12 Report of Obsolete Backups and Copies 
Column  Indicates 

TYPE 

whether the object is a backup set, backup piece, proxy copy, or datafile copy.  

KEY 

a unique key that identifies this backup in the target database control file.  

COMPLETION TIME 

the time that the backup or copy completed.  

FILENAME/HANDLE 

the filename or media handle of the backup or datafile copy. 

Table 10-13 Report of Files that Need Backup Due to Unrecoverable Operations (Page 1 of 2)
Column  Indicates 

FILE 

the absolute number of the datafile that needs a new backup due to unrecoverable operations. 

TYPE OF BACKUP REQUIRED 

FULL or INCREMENTAL, depending on which type of backup is necessary to ensure the recoverability of all of the data in this file. If FULL, then create a full backup, level-0 backup, or a datafile copy. If INCREMENTAL, then a full or incremental backup will also suffice.  

NAME 

the name of the datafile. 

Table 10-14 Report of Files with Less Than n Redundant Backups 
Column  Indicates 

FILE 

the absolute datafile number of a datafile with less than n redundant backups. 

#BKPS 

the number of backups that exist for this file. 

NAME 

the name of the file. 

Table 10-15 Report of Files Whose Recovery Needs More Than n Days of Archived Logs 
Column  Indicates 

FILE 

the absolute file number of a datafile that requires more than n days of archived redo logs for recovery. 

DAYS 

the number of days of archived redo data required for recovery. 

NAME 

the name of the datafile. 

Table 10-16 Report of Files That Need More than n Incrementals During Recovery 
Column  Indicates 

FILE 

the absolute file number of a datafile that requires more than n incrementals for complete recovery. 

INCREMENTALS 

the number of incremental backups required for complete recovery. 

NAME 

the name of the datafile. 

Examples

Reporting Database Schema

This example reports the names of all datafiles and tablespaces in the database one week ago:

report schema at time 'SYSDATE-7';

Report of database schema
File K-bytes    Tablespace           RB segs Name
---- ---------- -------------------- ------- -------------------
1         47104 SYSTEM               YES     /vobs/oracle/dbs/tbs_01.f
2           978 SYSTEM               YES     /vobs/oracle/dbs/tbs_02.f
3           978 TBS_1                NO      /vobs/oracle/dbs/tbs_11.f
4           978 TBS_1                NO      /vobs/oracle/dbs/tbs_12.f
5           978 TBS_2                NO      /vobs/oracle/dbs/tbs_21.f
6           978 TBS_2                NO      /vobs/oracle/dbs/tbs_22.f
7           500 TBS_3                NO      /vobs/oracle/dbs/tbs_31.f
8           500 TBS_3                NO      /vobs/oracle/dbs/tbs_32.f
9          5120 SYSTEM               YES     /vobs/oracle/dbs/tbs_03.f
Reporting Datafiles Needing Incremental Backups

This example reports all datafiles in the database that require the application of five or more incremental backups to be recovered to their current state:

report need backup incremental 5 database;

Report of files that need more than 5 incrementals during recovery
File Incrementals Name
---- ------------ ----------------------------------------------
1    9            /vobs/oracle/dbs/tbs_01.f
2    9            /vobs/oracle/dbs/tbs_02.f
3    9            /vobs/oracle/dbs/tbs_11.f
4    9            /vobs/oracle/dbs/tbs_12.f
5    9            /vobs/oracle/dbs/tbs_21.f
6    9            /vobs/oracle/dbs/tbs_22.f
7    9            /vobs/oracle/dbs/tbs_23.f
8    9            /vobs/oracle/dbs/tbs_03.f
Reporting Datafiles Needing Backups

The following example reports all datafiles from tablespace SYSTEM that will need more than two days of archived redo logs to be applied during recovery after being restored from the most recent backup:

report need backup days 2 tablespace system; 

Report of files whose recovery needs more than 2 days of archived logs
File Days  Name
---- ----- -----------------------------------------------------
1    3     /vobs/oracle/dbs/tbs_01.f
2    3     /vobs/oracle/dbs/tbs_02.f
16   3     /vobs/oracle/dbs/tbs_03.f
Reporting Unrecoverable Datafiles

The following example reports all datafiles that cannot be recovered from existing backups because redo may be missing:

report unrecoverable;

Report of files that need backup due to unrecoverable operations
File Type of Backup Required Name
---- ----------------------- -----------------------------------
4     FULL                   /vobs/oracle/dbs/tbs_12.f
Reporting Obsolete Backups and Copies

The following example reports obsolete backups and copies with a redundancy of 1:

report obsolete;

Report of obsolete backups and copies
Type                 Key    Completion Time    Filename/Handle
-------------------- ------ ------------------ --------------------
Backup Set           836    04-DEC-98         
Backup Piece         839    04-DEC-98          /vobs/oracle/dbs/05aetj6b_1_1
Backup Set           807    04-DEC-98         
Backup Piece         810    04-DEC-98          /vobs/oracle/dbs/03aetj1f_1_1
Backup Set           835    04-DEC-98         
Backup Piece         838    04-DEC-98          /vobs/oracle/dbs/04aetj6b_1_1

Related Topics

"list"

"untilClause"

"validate"


The previous attachment was filtered out by the ListGuru mailing software at fatcity.com because binary attachments are not appropriate for mailing lists. If you want a copy of the attachment which was removed, contact the sender directly and ask for it to be sent to you by private E-mail.

This warning is inserted into all messages containing binary attachments which have been removed by ListGuru. If you have questions about this message, contact Postmaster_at_fatcity.com for clarification.











 Recovery Manager Command Syntax, 1 of 50
	   










       




Oracle8i Recovery Manager User's Guide and Reference
Release 2 (8.1.6)

Part Number A76990-01

Library

Product

Contents

Index

Go to previous page Go to next page

10
Recovery Manager Command Syntax

This chapter describes, in alphabetical order, Recovery Manager commands and sub-clauses.

Conventions Used in this Reference

This section explains the conventions used in this book including:

Text

The text in this reference adheres to the following conventions:

UPPERCASE 

Uppercase text calls attention to SQL commands and keywords, filenames, column headings in tables and views, and initialization parameters.  

bold 

Bold text calls attention to Recovery Manager keywords.  

italics 

Italicized text calls attention to definitions of terms, the names for Recovery Manager parameters and options that are not keywords (for example, integer), and sample values for Recovery Manager parameters (for example, datafile tbs_01.f). 

Syntax Diagrams and Notation

Syntax Diagrams

This reference uses syntax diagrams to show Recovery Manager commands. These syntax diagrams use lines and arrows to show syntactic structure, as shown here:


This section describes the components of syntax diagrams and gives examples of how to write Recovery Manager commands. Syntax diagrams are made up of these items:

Keywords

Keywords have special meanings in Recovery Manager syntax. In the syntax diagrams, keywords appear in square boxes and an uppercase font. When described in text, RMAN keywords appear in lowercase bold, for example, backup database. You must use keywords in your RMAN statements exactly as they appear in the syntax diagram, except that they can be either uppercase or lowercase.

The RMAN language is free-form. Keywords must be separated by at least one white-space character, but otherwise there are no restrictions. A command may span multiple lines.

Parameters

Parameters act as placeholders in syntax diagrams. In the syntax diagrams, they appear in ovals. When described in text, RMAN parameters appear in lowercase italics, for example, 'filename'. Parameters are usually:

  • Names of database objects (tablespace_name)

  • Oracle data type names (date_string)

  • Sub-clauses (datafileSpec)

When you see a parameter in a syntax diagram, substitute an object or expression of the appropriate type in your RMAN statement. For example, to write a duplicate target database to command, use the name of the duplicate database you want to create, such as dupdb, in place of the database_name parameter in the syntax diagram.

Some parameter values are enclosed in required or optional quotes. The syntax diagrams show single quotes, though in all cases double quotes are also legal. For example, you specify either 'filename' or "filename". For the sql command, it is recommended that you use double quotes.

This lists shows parameters that appear in the syntax diagrams and provides examples of the values you might substitute for them in your statements:

quoted strings such as 'filename', 'tablespace_name', 'channel_name', 'channel_parms' 

A string of characters contained in either single or double quotes, for example, 'filename' or "filename". A quoted string may contain whitespace, punctuation, and RMAN and SQL keywords. 

"?/dbs/cf.f"

'dev1' 

non-quoted strings such as channel_id, tag_name, date_string 

A sequence of characters containing no white-space and no punctuation characters and starting with an alphabetic character. 

ch1 

integer 

Any sequence of characters containing only number characters. 

67843 

Reserved Words

Table 10-1 is a list of RMAN reserved words. If you use one of these words by itself without surrounding it in quotes, then RMAN generates an error. These are examples of correct and incorrect entries:

allocate channel backup type disk;         # incorrect
allocate channel 'backup' type disk;       # correct
backup database tag full;                  # incorrect
backup database tag 'full';                # correct
Table 10-1 RMAN Reserved Words (Page 1 of 2)

abort  

affinity  

after  

all  

allocate 

alter 

and 

append 

archivelog 

at 

auxiliary 

auxname 

available 

backslash  

backup 

backuppiece 

backupset 

before 

beginline 

between 

cancel 

catalog 

change 

channel 

channel_id 

check 

clone 

clone_cf 

clonename 

cmdfile 

check 

clone 

clone_cf 

clonename 

cmdfile 

command 

completed 

connect 

controlfile 

controlfilecopy 

copy 

create 

crosscheck 

cumulative 

current 

database 

datafile 

datafilecopy 

days 

dba 

dbid 

debug 

define 

delete 

destination 

device 

disk 

diskratio 

drop 

dump 

duplex 

duplicate 

echo 

equal 

execute 

exit 

expired 

filesperset 

for 

force 

forever 

format 

from 

full 

group 

high 

host 

id 

inaccessible 

incarnation 

include 

incremental 

input 

integer 

immediate 

job 

kbytes 

level 

libparm 

library 

like 

limit 

list 

log 

logfile 

logical 

logseq 

low 

maxcorrupt 

maxopenfiles 

msglog 

mask 

msgno 

maintenance 

mount 

name 

need 

newname 

nochecksum 

nocatalog 

newline 

noredo 

normal 

nomount 

nofilenamecheck 

null 

of 

offline 

orphan 

obsolete 

open 

on 

off 

only 

parms 

plsql 

print 

pfile 

proxy 

pool 

pipe 

rcvcat 

release 

reload 

replace 

replicate 

report 

recoverable 

reset 

restart 

restore 

resync 

rman 

rpctestrun 

readonly 

readrate 

recover 

redundancy 

register 

reuse 

schema 

scn 

script 

send 

set 

setlimit 

setsize 

shutdown 

size 

skip 

slaxdebug 

sql 

startup 

step 

tablespace 

tag 

target 

test 

thread 

time 

timeout 

to 

trace 

transactional 

type 

unavailable 

uncatalog 

underscore 

unrecoverable 

until 

upgrade 

validate 

 

 

 

 

 

Code Examples

This reference contains many examples of RMAN commands. These examples show you how to use elements of RMAN. The following example shows a backup command:

run {
     allocate channel ch1 type disk;
     backup database;
} 

Note that examples appear in a different font from the text.

Command Entries

The description of each command or sub-clause contains the following sections:

Syntax 

shows the keywords and parameters that make up the statement.  

 

Note: Not all keywords and parameters are valid in all circumstances. Be sure to refer to the "Keywords and Parameters" section of each statement to learn about any restrictions on the syntax. 

Purpose 

describes the basic uses of the statement.  

Requirements 

lists any requirements and restrictions for proper use of the command. 

Keywords and Parameters 

describes the purpose of each keyword and parameter. Restrictions and usage notes also appear in this section. 

Examples 

shows how to use various clauses and options of the statement. 

 

Usage notes: Optional sections following the examples provide more information on how and when to use the statement.  

Summary of RMAN Commands

The following table provides a functional summary of RMAN commands. Note that all release 8.0 commands still work with the release 8.1 RMAN executable.

Table 10-2 Recovery Manager Commands
Command  Purpose 

"allocate" 

Establish a channel, which is a connection between RMAN and a database instance. 

"allocateForMaint" 

Allocate a channel in preparation for issuing maintenance commands such as change

"alterDatabase" 

Mount or open a database. 

"archivelogRecordSpecifier" 

Specify a range of archived redo logs files for use in backup, restore, and maintenance operations as well as queries to the recovery catalog.  

"backup" 

Back up a database, tablespace, datafile, or archived redo log file.  

"catalog" 

Add information about a datafile copy, archived redo log, or control file copy to the recovery catalog and control file.

Catalog a datafile copy as a level 0 backup, which enables you to use it as part of an incremental backup strategy.

Record the existence of file copies created before RMAN was installed or generated through means other than RMAN. 

"change" 

Mark a backup piece, image copy, or archived redo log as having the status UNAVAILABLE or AVAILABLE.

Delete a backup piece, image copy, or archived redo log from the operating system and remove its recovery catalog record.

Check whether backup pieces, datafile copies, or archived redo logs are available and, if they are not, mark them as EXPIRED. 

"cmdLine" 

Connect to the target, recovery catalog, or auxiliary database.

Specify that you are using RMAN without a recovery catalog.

Specify a command file, which is a user-defined file containing RMAN commands.

Specify the file in which RMAN records the results of processed commands.

Add to rather than overwrite the contents of the command file.

Generate debugging output and specify its location. 

"completedTimeSpec" 

A sub-clause that specifies a time range during which the backup or copy completed. 

"configure" 

Set the compatibility level of the recovery catalog. 

"connect" 

Establish a connection between RMAN and a target, auxiliary (duplicated or auxiliary instance used for TSPITR), or recovery catalog database. 

"connectStringSpec" 

Specify the username, password, and net service name for connecting to a target, recovery catalog, or auxiliary database. The connection is necessary to authenticate the user and identify the database. 

"copy" 

Create an image copy of a file.  

"createCatalog" 

Create a schema for the recovery catalog. 

"createScript" 

Create a stored script and store it in the recovery catalog for future reference. 

"crosscheck" 

Determine whether backup sets stored on disk or tape still exist. 

"datafileSpec" 

Specify a datafile by filename or absolute file number. 

"debug" 

Turn RMAN's debugging feature off and on. 

"deleteExpired" 

Delete backup sets marked EXPIRED by the crosscheck command and remove references to them from the recovery catalog and control file.  

"deleteScript" 

Delete a stored script from the recovery catalog. 

"deviceSpecifier" 

Specify the type of storage for a backup or copy. 

"dropCatalog" 

Remove the schema from the recovery catalog. 

"duplicate" 

Use backups of the target database to create a duplicate database that you can use for testing purposes. 

"host" 

Invoke an operating system command-line sub-shell from within RMAN. 

"list" 

Produce a detailed report about a specified group of backup sets or copies recorded in the recovery catalog or target control file. 

"listObjList" 

Specify a database or one or more tablespaces, control files, datafiles, or archived redo logs. 

"printScript" 

Print a stored script to the RMAN message log file. Specify the log filename with the log argument at the command line (see "connect"). 

"recover" 

Apply redo logs or incremental backups to a restored backup set or copy in order to update it to a specified time. 

"register" 

Register the target database in the recovery catalog so that RMAN can access it. 

"release" 

Release a sequential I/O device while maintaining the connection to the target database instance. 

"releaseForMaint" 

Release a sequential I/O device specified in an allocate channel command with the for delete or for maintenance option. 

"replaceScript" 

Replace an existing script stored in the recovery catalog. If the script does not exist, replace script creates it. 

"replicate" 

Copy the control file to multiple destinations. 

"report" 

Perform detailed analyses of the content of the recovery catalog. 

"reset" 

Create a new database incarnation record in the recovery catalog. 

"restore" 

Restore files from backup sets or from copies on disk to the current location, overwriting the files with the same name. 

"resync" 

Perform a full resynchronization, which creates a snapshot control file and then compares the recovery catalog to either the current control file of the target database or the snapshot control file and updates it with information that is missing or changed. 

"rmanCommand" 

Execute stand-alone commands, which are commands you run from the command-line interpreter (CLI), that is, the RMAN prompt. 

"run" 

Compile and execute job commands, which are one or more statements executed within the braces of run

"send" 

Send a vendor-specific quoted string to one or more specific channels. 

"set" 

Specify the auxiliary filenames for target datafiles. This operation is useful when performing TSPITR.

Display executed RMAN commands in the message log.

Specify a database's db identifier.

Set the filename of the snapshot control file. 

"set_run_option" 

Specify new filenames for datafiles.

Specify a limit for the number of permissible block corruptions.

Override default archived redo log destinations.

Specify that backups should be duplexed.

Determine which server process corresponds to which channel.

Limit the number of buffers that will be read from each input datafile on a specified channel.

Limit the number of input files that a backup operation can have open at any given time for a specified channel.

Limit the size of the backup pieces for a specified channel. 

"shutdown" 

Shut down the target database without exiting RMAN. This command is equivalent to the SQL*Plus SHUTDOWN command. 

"sql" 

Execute a SQL statement from within Recovery Manager. 

"startup" 

Start up the database from within the RMAN environment. This command is equivalent to the SQL*Plus STARTUP command. 

"switch" 

Specify that a datafile copy is now the current datafile, that is, the datafile pointed to by the control file. 

"upgradeCatalog" 

Upgrade the recovery catalog schema from an older version to the version required by the RMAN executable. 

"validate" 

Examine a backup set and report whether its data is intact. RMAN scans all of the backup pieces in the specified backup sets and looks at the checksums to verify that the contents can be successfully restored if necessary. 


The previous attachment was filtered out by the ListGuru mailing software at fatcity.com because binary attachments are not appropriate for mailing lists. If you want a copy of the attachment which was removed, contact the sender directly and ask for it to be sent to you by private E-mail.

This warning is inserted into all messages containing binary attachments which have been removed by ListGuru. If you have questions about this message, contact Postmaster_at_fatcity.com for clarification.











 Recovery Manager Command Syntax, 37 of 50
	   










       




Oracle8i Recovery Manager User's Guide and Reference
Release 2 (8.1.6)

Part Number A76990-01

Library

Product

Contents

Index

Go to previous page Go to beginning of chapter Go to next page

Recovery Manager Command Syntax, 37 of 50


restore

Syntax


restoreObject::=

restoreSpecOperand::=

Purpose

To restore files from backups or image copies to the current location, overwriting the files with the same name. You can use set newname command to restore files to non-default locations. RMAN restores backups from disk or tape and restores images copies from disk only.

RMAN considers restored files as datafile copies. If you restore to the default location, RMAN creates records for the datafile copies in the repository and immediately updates them to status DELETED. If you restore to a new location, issue set newname commands to rename the files, and issue a switch command to make the restored files current, RMAN also updates the records to DELETED. If you do not issue switch commands, then RMAN considers the restored files as valid copies for use in future restore operations.

Typically, you restore when a media failure has damaged a current datafile, control file, or archived redo log or prior to performing a point-in-time recovery. This command restores full backups, incremental backups (level 0 only), or copies of:

Note that when you perform a restore operation using a backup control file and use a recovery catalog, RMAN automatically adjusts the control file to reflect the structure of the restored backup.

See Also:

Chapter 6, "Restoring and Recovering with Recovery Manager" to learn how to restore files. 

Requirements

  • Execute restore only within the braces of a run command.

  • To restore datafiles to their current location, the database must be either:

    • Mounted

    • Open with the datafiles offline

    If the entire database is to be restored, then it must be mounted.

  • To restore to a new location, use the set newname commands to rename the datafiles and use switch commands to make the restored files into the current database files.

  • At least one allocate channel command must precede a restore.

  • If you use the from datafilecopy option, then the allocated channels must be of type disk.

  • If you use the from backupset operand, then the appropriate type of storage devices must be allocated for the backup sets that need to be restored. If the appropriate device is not allocated, then you may not be able to find a candidate backup set or copy to restore, and the restore command fails.

  • RMAN only restores backups that were created on the same type of channels that are allocated for the restore command.

    For example, if you made some backups of a datafile to disk channels and others to 'sbt_tape' channels, and only a disk channel is allocated for the restore command, then RMAN will not restore from any backups that were created on 'sbt_tape' channels.

  • If datafile filenames are symbolic links, that is, files that point to other files, then the control file contains the filenames of the link files but RMAN performs I/O on the datafiles pointed to by the link files. If a link file is lost and you restore a datafile without first re-creating the symbolic link, however, then RMAN restores the datafile to the location of the link file rather than to the location pointed to by the link.

  • Open the database with the RESETLOGS option after restoring with a backup control file.

  • You can only restore from a previous incarnation when restoring the whole database. For example, you cannot restore one datafile of a previous incarnation while the current database is in a different incarnation.

  • Do not specify a datafile more than once in a restore job. For example, the following command is illegal because datafile 1 is both specified explicitly and implied by the SYSTEM tablespace:

    restore 
      tablespace system 
      datafile 1;
    
    
  • If you restore a pre-8.1.6 control file on Windows NT that has not been normalized, you must normalize it before mounting the database by following the procedure described in Oracle8i Migration. A flawed mechanism in releases prior to release 8.1.6 on Windows NT could allow two different filenames to refer to the same physical file.

Keywords and Parameters

restoreObject  

specifies the objects to be restored. 

 

controlfile 

restores the current control file and automatically replicates it to all CONTROL_FILES locations in the parameter file. If you specify a new pathname with the to 'filename' option, RMAN restores the control file to the new location: you must replicate it manually using the replicate command. 

 

database 

restores all datafiles in the database except those that are offline or read-only. Unlike backup database, restore database does not automatically include the control file--you must issue an additional restore command to perform this operation.

If you specify the check readonly option, then RMAN examines the headers of all read-only files and restores any that need restoring.

Use an optional skip ... tablespace argument to avoid restoring specified tablespaces, which is useful when you want to avoid restoring tablespaces containing temporary data. 

 

datafile datafileSpec 

restores the datafiles specified by filename or absolute datafile number. See "datafileSpec"

 

tablespace tablespace_name 

restores all datafiles in the specified tablespaces. 

 

archivelogRecord- Specifier clause 

restores the specified range of archived redo logs. See "archivelogRecordSpecifier"

restoreSpec- Operand 

specifies options for the restoreObject clause.

Note: These parameters override the parameters with the same name at the restore command level. 

 

channel channel_id 

specifies the name of a channel to use for this restore operation. If you do not specify a channel, restore uses any available channel allocated with the correct device type. 

 

from tag tag_name 

overrides the default selection of the most recent backups or file copy available. The tag restricts the automatic selection to backup sets or file copies that have the specified tag. If multiple backup sets or file copies have a matching tag, then RMAN selects the most recent one. 

 

parms channel_parms 

specifies a quoted string containing operating system-specific information. The string is passed to the OSD layer each time a backup piece is restored. 

channel channel_id 

See the restoreSpecOperand clause. 

from tag tag_name 

See the restoreSpecOperand clause. 

parms channel_parms 

See the restoreSpecOperand clause. 

from 

specifies whether RMAN should restore from a datafilecopy on disk or a backupset. By default restore chooses the most recent backup set or file copy, that is, the file copy or backup set that needs the least media recovery. 

untilClause 

limits the selection to those backup sets or file copies that would be suitable for performing a point-in-time recovery. In the absence of any other criteria, RMAN selects the most current file copy or backup set to restore. See "untilClause"

validate 

causes RMAN to decide which backup sets, datafile copies, and archived logs need to be restored and then scans them to verify their contents. This operation creates no output files. Specify this option periodically to verify that the copies and backup sets required to restore the specified files are intact and usable. 

check logical 

tests data and index blocks that pass physical corruption checks for logical corruption, for example, corruption of a row piece or index entry. If RMAN finds logical corruption, it logs the block in the alert.log and server session trace file.

Provided the sum of physical and logical corruptions detected for a file remain below its maxcorrupt setting, the RMAN command completes and Oracle populates V$BACKUP_CORRUPTION and V$COPY_CORRUPTION with corrupt block ranges. If maxcorrupt is exceeded, the command terminates without populating the views.

Note: The maxcorrupt setting represents the total number of physical and logical corruptions permitted on a file. 

check readonly 

checks the datafiles to make sure they exist, are readable, and have the appropriate checkpoint. If any of these conditions is not met, then RMAN restores the files--whether or not they are read-only. By default, RMAN does not restore read-only files when you issue the restore database command. 

Examples

Restoring a Tablespace

This example takes a tablespace offline, restores it, then performs media recovery:

run {  
     # recover tablespace tbs_1 while the database is open  
     allocate channel ch1 type 'sbt_tape';  
     sql "ALTER TABLESPACE tbs_1 OFFLINE IMMEDIATE" ; 
     restore tablespace tbs_1 ; 
     recover tablespace tbs_1 ;  
     sql "ALTER TABLESPACE tbs_1 ONLINE" ; 
     release channel ch1 ;  
} 
Restoring the Control File

This example restores the control file to its default location, replicates it to all CONTROL_FILES locations, and mounts the database:

startup nomount;
run { 
     allocate channel ch1 type 'sbt_tape'; 
     restore controlfile; 
     alter database mount; 
} 
Restoring the Control File Using a Tag

This example restores the control file specified by a tag, replicates it to all CONTROL_FILES locations, and then mounts the database:

startup nomount;
run { 
     allocate channel ch1 type 'sbt_tape'; 
     restore controlfile from tag 'monday_cf_backup'; 
     alter database mount; 
} 
Restoring the Database Using a Backup Control File

This example restores the control file to a new location, replicates it to all control file locations specified in the parameter file, and then mounts the control file in order to restore the database:

startup nomount;
run { 
     allocate channel ch1 type 'sbt_tape';
     restore controlfile to '/oracle/dbs/cf1.ctl';
     replicate controlfile from '/oracle/dbs/cf1.ctl';
     alter database mount;
     restore database;
}
Restoring Archived Redo Logs to a New Location

This example restores all archived redo logs to the /oracle/temp_restore directory:

run { 
      set archivelog destination to '/oracle/temp_restore';
      allocate channel ch1 type disk;
      restore archivelog all;
}

Related Topics

"allocate"

"recover"

"untilClause"


The previous attachment was filtered out by the ListGuru mailing software at fatcity.com because binary attachments are not appropriate for mailing lists. If you want a copy of the attachment which was removed, contact the sender directly and ask for it to be sent to you by private E-mail.

This warning is inserted into all messages containing binary attachments which have been removed by ListGuru. If you have questions about this message, contact Postmaster_at_fatcity.com for clarification.











 Recovery Manager Command Syntax, 26 of 50
	   










       




Oracle8i Recovery Manager User's Guide and Reference
Release 2 (8.1.6)

Part Number A76990-01

Library

Product

Contents

Index

Go to previous page Go to beginning of chapter Go to next page

Recovery Manager Command Syntax, 26 of 50


list

Syntax


Purpose

To produce a detailed listing of specified backups (either backup sets or media-managed proxy copies) or image copies recorded in the recovery catalog or target control file. RMAN records the output to either standard output or the message log (see "cmdLine"), but not to both at the same time. Use this command to list:

Requirements

  • Execute list only at the RMAN prompt.

  • The incarnation option requires the use of a recovery catalog.

  • You must be connected to the target database. If you use a recovery catalog, you must also be connected to it.

  • The list command will not show any records with DELETED status. To see the records with DELETED status, query the recovery catalog views. See Chapter 11, "Recovery Catalog Views".

  • If you generate a list of backups and copies limited by time, SCN, or log sequence number, you must specify the completedTimeSpec rather than the untilClause. The untilClause no longer works with the list command for release 8.1.5 and higher.

  • You cannot use the like option with the list ... archivelog command.

Keywords and Parameters

incarnation 

displays information about the incarnations of a database. See Table 10-10 for an explanation of the column headings of the list incarnation output table.

The listing includes the primary keys of all database incarnation records for the specified database name. Use the key in a reset database command to change the incarnation that RMAN considers to be current to a previous incarnation. If you do not specify the of database option, then the command lists all databases registered in the recovery catalog. 

 

of database database_name 

specifies the name of the database. 

copy 

displays information about datafile copies, archived redo logs, and image copies of archived redo logs. By default, list will display copies of all files in the database. Both usable and unusable image copies are included in the output, even those that cannot be restored or are expired or unavailable.

See Also: Table 10-8 and Table 10-9 for an explanation of the column headings of the list copy output tables. 

backup 

displays information about backups: backup sets, backup pieces, and proxy copies. The output displays a unique key for each. By default, backups of the whole database are listed. Both usable and unusable backups are included in the output, even those that cannot be restored, are expired or unavailable, or are incremental backups that cannot be restored because their parent full backup or copy no longer exists.

See Also: Table 10-4, Table 10-5, Table 10-6, and Table 10-7 for an explanation of the column headings of the list backup output tables. Use the KEY column of the output to obtain the primary key usable in the change and delete expired backupset commands. 

of listObjList 

restricts the list of objects operated on to the object type specified in the listObjList clause. See "listObjList". If you do not specify an object, list defaults to of database

completedTimeSpec 

specifies a range of time for completion of the backup or copy. See "completedTimeSpec"

tag tag_name 

restricts the datafile copies and backups by specifying the tag of the copy or backup. If you specify tag, only copies or backups with the specified tag will be listed. 

recoverable 

specifies only backups or copies of datafiles that are available and can possibly be used in a restore operation. To be a candidate for restore operations a backup must meet these criteria. If the backup is:

  • Incremental, then a valid parent must exist to which this incremental can be applied.

  • In a prior incarnation, then there must be no further changes to the files in that incarnation. In other words, the files must be offline and must not have come online again in that incarnation.

 

 

untilClause 

specifies an end time, SCN, or log sequence number. See "untilClause"

device type deviceSpecifier 

lists only backup sets residing on one of the specified device types (see "deviceSpecifier"). If not specified, all available backup sets will be listed. This option applies only to the list backup command. 

like string_pattern 

restricts datafile copies by specifying a filename pattern. The pattern can contain Oracle pattern matching characters '%' and '_'. RMAN lists only files whose name matches the pattern.

Note: You cannot use the like option with the list ... archivelog command. 

List Output

The status information that appears in the output is shown in Table 10-4:

Table 10-4 List of Backup Sets (Page 1 of 2)
Column  Indicates 

KEY 

a unique key identifying this backup set.

Note: If the target database control file is used instead of the recovery catalog, then this field is a unique identifier that specifies this backup set in the target database control file (and is equal to the RECID, which serves this purpose when a recovery catalog is not used). Use this key in a change ... backupset statement to change the status of the backup set. 

RECID 

when combined with the STAMP column, a unique key that identifies this backup set in the target database control file. The RECID will be invalid when a new control file record occupies the space used by the old record. For this reason, issue resync commands often so that the new records are copied to the recovery catalog as soon as possible.  

STAMP 

when combined with the RECID column, a unique key that identifies this backup set in the target database control file.  

LV 

the level of the backup: NULL for non-incrementals, level 0-4 for incrementals.  

SET STAMP 

when combined with the SET COUNT column, a unique key that identifies this backup set in the target database control file. Use these values to access the control file records in the V$BACKUP_SET, V$BACKUP_PIECE, V$BACKUP_DATAFILE, and V$BACKUP_REDOLOG views.

The SET STAMP value is valid at all times, both in the control file (when not using a recovery catalog) and when using a recovery catalog. SET STAMP values are never entered by a user because they are part of a two-value key. Oracle World Wide Support may request this value if your database requires recovery when no recovery catalog exists and control file records are gone.

See Also: Oracle8i Reference for more information about data dictionary views. 

SET COUNT 

when combined with the SET STAMP column, a unique key that identifies this backup set in the target database control file. Use these values to access the control file records in the V$BACKUP_SET, V$BACKUP_PIECE, V$BACKUP_DATAFILE, and V$BACKUP_REDOLOG views.

The SET COUNT value is valid at all times, both in the control file (when not using a recovery catalog) and when using a recovery catalog. SET COUNT values are never entered by a user because they are part of a two-value key. Oracle World Wide Support may request this value if your database requires recovery when no recovery catalog exists and control file records are gone.  

COMPLETION TIME 

the date and time that the backup set completed. Note that the format of this field depends on the NLS_LANG and NLS_DATE_FORMAT environment settings.  

Table 10-5 List of Backup Pieces 
Column  Indicates 

KEY 

a unique identifier for this backup piece in the recovery catalog or target database control file.

Note: The values for KEY in the recovery catalog and the control file are different. 

PC#  

the piece number of this backup piece within the backup set.  

CP# 

the copy number of this backup piece in a duplexed backup. For example, if set duplex = 4, then CP# will range from 1 to 4.

Note: If the backup is not duplexed, then CP# = 1.  

STATUS 

the backup piece status: AVAILABLE, UNAVAILABLE, or EXPIRED (see the change command for an explanation of each status). 

COMPLETION TIME 

the date and time when the piece was created. 

PIECE NAME 

the name of the backup piece. 

Table 10-6 Controlfile Included 
Column  Indicates 

CKP SCN 

the SCN of the backup control file checkpoint. All database changes recorded in the redo records before the specified SCN are reflected in this control file.  

CKP TIME 

the time of the backup control file checkpoint. All database changes recorded in the redo records before the specified time are reflected in this control file.  

Table 10-7 List of Datafiles Included 
Column  Indicates 

FILE 

the number of the file that was backed up. 

NAME 

the location where this file would be restored now if it were restored from this backup set and no set newname command (see "set_run_option") was entered.  

LV 

the level of the backup: NULL for non-incrementals, level 0-4 for incrementals.  

TYPE 

whether the backup was FULL or INCR (incremental). 

CKP SCN 

the checkpoint of the datafile at the time it was backed up. All database changes prior to the SCN have been written to the file; changes after the specified SCN have not been written to the file. 

CKP TIME 

the checkpoint of the datafile at the time it was backed up. All database changes prior to the time have been written to the file; changes after the specified time have not been written to the file. 

Table 10-8 List of Datafile Copies (Page 1 of 2)
Column  Indicates 

KEY 

the unique identifier for the datafile copy. Use this value in a change command to alter the status of the datafile copy.

Note: The values for KEY in the recovery catalog and the control file are different. 

FILE 

the file number of the original datafile from which this copy was made.  

the backup piece status: AVAILABLE, UNAVAILABLE, or EXPIRED (see the change command for an explanation of each status).  

COMPLETION TIME 

the date and time that the copy completed. Note that the value of this field is sensitive to the NLS_LANG and NLS_DATE_FORMAT environment variables.  

CKP SCN 

the checkpoint of this datafile when it was copied. All database changes prior to the SCN have been written to this file.  

CKP TIME 

the checkpoint of this datafile when it was copied. All database changes prior to the time have been written to this file.  

NAME 

the filename of the datafile copy. 

Table 10-9 List of Archived Log Copies 
Column  Indicates 

KEY 

the unique identifier for this archived redo log copy. Use this value in a change command to alter the status of the copy.

Note: The values for KEY in the recovery catalog and the control file are different. 

THRD 

the redo log thread number. 

SEQ 

the log sequence number.  

COMPLETION TIME 

the date and time that the copy completed. Note that the value of this field is sensitive to the NLS_LANG and NLS_DATE_FORMAT environment variables.  

NAME 

the filename of the archived redo log copy. 

Table 10-10 List of Database Incarnations (Page 1 of 2)
Column  Indicates 

DB KEY 

when combined with the INC KEY, the unique key by which RMAN identifies the database incarnation in the recovery catalog. Use this key to unregister a database, that is, delete all the rows associated with that database from the recovery catalog.  

INC KEY 

when combined with DB KEY, the unique key by which RMAN identifies the database incarnation in the recovery catalog. Use this key in the reset database to incarnation command, which you must use if you want to recover your database to a time prior to the most recent RESETLOGS.  

DB NAME 

the database name as listed in the DB_NAME parameter. 

DB ID 

the database identification number, which Oracle generates automatically at database creation. 

CUR 

whether the incarnation is the current incarnation of the database. 

RESET SCN 

the SCN at which the incarnation was created. 

RESET TIME 

the time at which the incarnation was created. 

Examples

Listing Copies

The following example lists datafile copies and archived redo logs recorded in the recovery catalog:

list copy of database archivelog all;

List of Datafile Copies
Key     File S Completion time Ckp SCN    Ckp time    Name
------- ---- - --------------- ---------- ----------  ------
1262    1    A 18-AUG-98       219859     14-AUG-98   /vobs/oracle/dbs/copy/tbs_01.f
 
List of Archived Log Copies
Key     Thrd Seq     S Completion time Name
------- ---- ------- - --------------- ------------------------------------
789     1    1       A 14-JUL-98       /vobs/oracle/work/arc_dest/arcr_1_1.arc
790     1    2       A 11-AUG-98       /vobs/oracle/work/arc_dest/arcr_1_2.arc
791     1    3       A 12-AUG-98       /vobs/oracle/work/arc_dest/arcr_1_3.arc
Listing Backups

The following example lists backups of two datafiles recorded in the recovery catalog:

list backup of datafile '/oracle/dbs/tbs_01.f', '/oracle/dbs/tbs_02.f';

List of Backup Sets
Key     Recid      Stamp      LV Set Stamp  Set Count  Completion Time
------- ---------- ---------- -- ---------- ---------- ----------------------
1174    12         341344528  0  341344502  16         14-SEP-98

List of Backup Pieces
Key     Pc# Cp# Status     Completion Time    Piece Name
------- --- --- ---------- ------------------ -----------------------------
1176    1   1   AVAILABLE  14-AUG-98          /vobs/oracle/dbs/0ga5h07m_1_1
 
Controlfile Included
Ckp SCN    Ckp time
---------- ---------------
219857     14-AUG-98
 
List of Datafiles Included
File Name                                  LV Type Ckp SCN    Ckp Time
---- ------------------------------------- -- ---- ---------- -------------
1    /oracle/dbs/tbs_01.f                  0  Full 199843     14-AUG-98
2    /oracle/dbs/tbs_02.f                  0  Full 199843     14-AUG-98
Listing Database Incarnations

The following example lists all database incarnations recorded in the recovery catalog:

list incarnation;

List of Database Incarnations
DB Key  Inc Key   DB Name   DB ID       CUR    Reset SCN    Reset Time
------- -------   -------   ------      ---    ----------   ----------
1       2         PROD1     1224038686  NO     1            02-JUL-98
1       582       PROD1     1224038686  YES    59727        10-JUL-98

Related Topics

"crosscheck"

"listObjList"

"report"

"validate"











 Recovery Manager Command Syntax, 37 of 50
	   










       




Oracle8i Recovery Manager User's Guide and Reference
Release 2 (8.1.6)

Part Number A76990-01

Library

Product

Contents

Index

Go to previous page Go to beginning of chapter Go to next page

Recovery Manager Command Syntax, 37 of 50


restore

Syntax


restoreObject::=

restoreSpecOperand::=

Purpose

To restore files from backups or image copies to the current location, overwriting the files with the same name. You can use set newname command to restore files to non-default locations. RMAN restores backups from disk or tape and restores images copies from disk only.

RMAN considers restored files as datafile copies. If you restore to the default location, RMAN creates records for the datafile copies in the repository and immediately updates them to status DELETED. If you restore to a new location, issue set newname commands to rename the files, and issue a switch command to make the restored files current, RMAN also updates the records to DELETED. If you do not issue switch commands, then RMAN considers the restored files as valid copies for use in future restore operations.

Typically, you restore when a media failure has damaged a current datafile, control file, or archived redo log or prior to performing a point-in-time recovery. This command restores full backups, incremental backups (level 0 only), or copies of:

Note that when you perform a restore operation using a backup control file and use a recovery catalog, RMAN automatically adjusts the control file to reflect the structure of the restored backup.

See Also:

Chapter 6, "Restoring and Recovering with Recovery Manager" to learn how to restore files. 

Requirements

  • Execute restore only within the braces of a run command.

  • To restore datafiles to their current location, the database must be either:

    • Mounted

    • Open with the datafiles offline

    If the entire database is to be restored, then it must be mounted.

  • To restore to a new location, use the set newname commands to rename the datafiles and use switch commands to make the restored files into the current database files.

  • At least one allocate channel command must precede a restore.

  • If you use the from datafilecopy option, then the allocated channels must be of type disk.

  • If you use the from backupset operand, then the appropriate type of storage devices must be allocated for the backup sets that need to be restored. If the appropriate device is not allocated, then you may not be able to find a candidate backup set or copy to restore, and the restore command fails.

  • RMAN only restores backups that were created on the same type of channels that are allocated for the restore command.

    For example, if you made some backups of a datafile to disk channels and others to 'sbt_tape' channels, and only a disk channel is allocated for the restore command, then RMAN will not restore from any backups that were created on 'sbt_tape' channels.

  • If datafile filenames are symbolic links, that is, files that point to other files, then the control file contains the filenames of the link files but RMAN performs I/O on the datafiles pointed to by the link files. If a link file is lost and you restore a datafile without first re-creating the symbolic link, however, then RMAN restores the datafile to the location of the link file rather than to the location pointed to by the link.

  • Open the database with the RESETLOGS option after restoring with a backup control file.

  • You can only restore from a previous incarnation when restoring the whole database. For example, you cannot restore one datafile of a previous incarnation while the current database is in a different incarnation.

  • Do not specify a datafile more than once in a restore job. For example, the following command is illegal because datafile 1 is both specified explicitly and implied by the SYSTEM tablespace:

    restore 
      tablespace system 
      datafile 1;
    
    
  • If you restore a pre-8.1.6 control file on Windows NT that has not been normalized, you must normalize it before mounting the database by following the procedure described in Oracle8i Migration. A flawed mechanism in releases prior to release 8.1.6 on Windows NT could allow two different filenames to refer to the same physical file.

Keywords and Parameters

restoreObject  

specifies the objects to be restored. 

 

controlfile 

restores the current control file and automatically replicates it to all CONTROL_FILES locations in the parameter file. If you specify a new pathname with the to 'filename' option, RMAN restores the control file to the new location: you must replicate it manually using the replicate command. 

 

database 

restores all datafiles in the database except those that are offline or read-only. Unlike backup database, restore database does not automatically include the control file--you must issue an additional restore command to perform this operation.

If you specify the check readonly option, then RMAN examines the headers of all read-only files and restores any that need restoring.

Use an optional skip ... tablespace argument to avoid restoring specified tablespaces, which is useful when you want to avoid restoring tablespaces containing temporary data. 

 

datafile datafileSpec 

restores the datafiles specified by filename or absolute datafile number. See "datafileSpec"

 

tablespace tablespace_name 

restores all datafiles in the specified tablespaces. 

 

archivelogRecord- Specifier clause 

restores the specified range of archived redo logs. See "archivelogRecordSpecifier"

restoreSpec- Operand 

specifies options for the restoreObject clause.

Note: These parameters override the parameters with the same name at the restore command level. 

 

channel channel_id 

specifies the name of a channel to use for this restore operation. If you do not specify a channel, restore uses any available channel allocated with the correct device type. 

 

from tag tag_name 

overrides the default selection of the most recent backups or file copy available. The tag restricts the automatic selection to backup sets or file copies that have the specified tag. If multiple backup sets or file copies have a matching tag, then RMAN selects the most recent one. 

 

parms channel_parms 

specifies a quoted string containing operating system-specific information. The string is passed to the OSD layer each time a backup piece is restored. 

channel channel_id 

See the restoreSpecOperand clause. 

from tag tag_name 

See the restoreSpecOperand clause. 

parms channel_parms 

See the restoreSpecOperand clause. 

from 

specifies whether RMAN should restore from a datafilecopy on disk or a backupset. By default restore chooses the most recent backup set or file copy, that is, the file copy or backup set that needs the least media recovery. 

untilClause 

limits the selection to those backup sets or file copies that would be suitable for performing a point-in-time recovery. In the absence of any other criteria, RMAN selects the most current file copy or backup set to restore. See "untilClause"

validate 

causes RMAN to decide which backup sets, datafile copies, and archived logs need to be restored and then scans them to verify their contents. This operation creates no output files. Specify this option periodically to verify that the copies and backup sets required to restore the specified files are intact and usable. 

check logical 

tests data and index blocks that pass physical corruption checks for logical corruption, for example, corruption of a row piece or index entry. If RMAN finds logical corruption, it logs the block in the alert.log and server session trace file.

Provided the sum of physical and logical corruptions detected for a file remain below its maxcorrupt setting, the RMAN command completes and Oracle populates V$BACKUP_CORRUPTION and V$COPY_CORRUPTION with corrupt block ranges. If maxcorrupt is exceeded, the command terminates without populating the views.

Note: The maxcorrupt setting represents the total number of physical and logical corruptions permitted on a file. 

check readonly 

checks the datafiles to make sure they exist, are readable, and have the appropriate checkpoint. If any of these conditions is not met, then RMAN restores the files--whether or not they are read-only. By default, RMAN does not restore read-only files when you issue the restore database command. 

Examples

Restoring a Tablespace

This example takes a tablespace offline, restores it, then performs media recovery:

run {  
     # recover tablespace tbs_1 while the database is open  
     allocate channel ch1 type 'sbt_tape';  
     sql "ALTER TABLESPACE tbs_1 OFFLINE IMMEDIATE" ; 
     restore tablespace tbs_1 ; 
     recover tablespace tbs_1 ;  
     sql "ALTER TABLESPACE tbs_1 ONLINE" ; 
     release channel ch1 ;  
} 
Restoring the Control File

This example restores the control file to its default location, replicates it to all CONTROL_FILES locations, and mounts the database:

startup nomount;
run { 
     allocate channel ch1 type 'sbt_tape'; 
     restore controlfile; 
     alter database mount; 
} 
Restoring the Control File Using a Tag

This example restores the control file specified by a tag, replicates it to all CONTROL_FILES locations, and then mounts the database:

startup nomount;
run { 
     allocate channel ch1 type 'sbt_tape'; 
     restore controlfile from tag 'monday_cf_backup'; 
     alter database mount; 
} 
Restoring the Database Using a Backup Control File

This example restores the control file to a new location, replicates it to all control file locations specified in the parameter file, and then mounts the control file in order to restore the database:

startup nomount;
run { 
     allocate channel ch1 type 'sbt_tape';
     restore controlfile to '/oracle/dbs/cf1.ctl';
     replicate controlfile from '/oracle/dbs/cf1.ctl';
     alter database mount;
     restore database;
}
Restoring Archived Redo Logs to a New Location

This example restores all archived redo logs to the /oracle/temp_restore directory:

run { 
      set archivelog destination to '/oracle/temp_restore';
      allocate channel ch1 type disk;
      restore archivelog all;
}

Related Topics

"allocate"

"recover"

"untilClause"











 Recovery Manager Command Syntax, 29 of 50
	   










       




Oracle8i Recovery Manager User's Guide and Reference
Release 2 (8.1.6)

Part Number A76990-01

Library

Product

Contents

Index

Go to previous page Go to beginning of chapter Go to next page

Recovery Manager Command Syntax, 29 of 50


recover

Syntax


Purpose

To apply redo logs or incremental backups to one or more restored datafiles in order to update them to a specified time.

RMAN uses online redo records and restores backup sets of archived redo logs as needed to perform the media recovery. RMAN first looks for the original archived logs or image copies, and if none are available, restores backups.

If RMAN has a choice between applying an incremental backup or applying redo, then it always chooses the incremental backup. If overlapping levels of incremental backup are available, RMAN automatically chooses the one covering the longest period of time.


Note:

When RMAN applies incremental backups, it recovers changes to objects created with the NOLOGGING option. Applying archived redo logs to datafiles does not recover these changes. 


See Also:

Chapter 6, "Restoring and Recovering with Recovery Manager" to learn how to recover datafiles. 

Requirements

  • Execute this command only within the braces of a run command.

  • You can use this command without a recovery catalog, but only if control file recovery is not required. RMAN cannot operate when neither the recovery catalog nor the target database control file are available.

  • For datafile and tablespace recovery, the target database must be mounted. If it is open, then the datafiles or tablespaces to be recovered must be offline. For database recovery, the database must be mounted but not open.

  • At least one allocate channel command must precede recover unless you do not need to restore archived redo log or incremental datafile backup sets.

  • Allocate the appropriate type of device for the backups that you need to restore. If the appropriate type of device is not available, then the recover command aborts.

  • Only the current datafiles may be recovered or have incremental backups applied to them.

  • Typically, you should enter a set until command before both the restore and recover command. If you specify a set until command after a restore and before a recover, you may not be able to perform media recovery on the database to the time required because the restored files may have timestamps later than the specified time.

  • The recover database command will not recover any files that are offline normal or read-only at the point in time to which the files are being recovered. RMAN omits offline normal files with no further checking. If check readonly is specified, then RMAN checks each read-only file on disk to ensure that it is already current at the desired point in time. If check readonly is not specified, then RMAN omits read-only files.

  • Open with the RESETLOGS option after incomplete recovery or recovery with a backup control file.

Keywords and Parameters

database 

specifies that the entire database is to be recovered. You can specify an optional untilClause that causes the recovery to stop when the specified condition has been reached. 

untilClause 

specifies a non-current time, SCN, or log sequence number for the recover command. See "untilClause"

skip [forever] tablespace tablespace_name 

lists tablespaces that should not be recovered, which is useful for avoiding recovery of tablespaces containing only temporary data or for postponing recovery of some tablespaces. The skip clause takes the datafiles in the specified tablespaces offline before starting media recovery. These files are left offline after the media recovery is complete.

If you perform incomplete recovery, then skip is not allowed. Instead, use skip forever, with the intention of dropping the skipped tablespaces after opening the database with the RESETLOGS option. The skip forever clause causes RMAN to take the datafiles offline using the DROP option. Only use skip forever when the specified tablespaces will be dropped after opening the database. 

tablespace tablespace_name 

specifies tablespaces by tablespace name. 

datafile datafileSpec 

specifies a list of one or more datafiles to recover. Specify datafiles by filename using a quoted string or absolute datafile number using an integer (see "datafileSpec").

If you are using the control file as the exclusive repository for RMAN metadata, then the filename must be the name of the datafile as known in the control file.

If you are using a recovery catalog, then the filename of the datafile must be the most recent name recorded in the catalog. For example, assume that a datafile was renamed in the control file. The database then crashes before you can resynchronize the catalog. Specify the old name of the datafile in the recover command, since this is the name recorded in the catalog. 

delete archivelog 

deletes restored archived logs that are no longer needed. RMAN does not delete archived logs that were already on disk before the restore command started. 

check readonly 

checks the headers of read-only files to ensure that they are current before omitting them from the recovery.  

noredo 

suppresses the application of redo logs--only incremental backups are applied. This option is intended for recovery of NOARCHIVELOG databases using incremental backups. If you do not specify noredo when recovering a NOARCHIVELOG database, Oracle aborts a recovery and issues an error. 

Examples

Recovering a Tablespace in an Open Database

The following example takes tablespace TBS_1 offline, restores and recovers it, then brings it back online:

run {  
     allocate channel dev1 type 'sbt_tape';  
     sql "ALTER TABLESPACE tbs_1 OFFLINE IMMEDIATE"; 
     restore tablespace tbs_1; 
     recover tablespace tbs_1;  
     sql "ALTER TABLESPACE tbs_1 ONLINE"; 
} 
Recovering Datafiles Restored to New Locations

The following example allocates one disk channel and one media management channel to use datafile copies on disk and backups on tape, and restores one of the datafiles in tablespace TBS_1 to a different location:

run {  
     allocate channel dev1 type disk;  
     allocate channel dev2 type 'sbt_tape';  
     sql "ALTER TABLESPACE tbs_1 OFFLINE IMMEDIATE";  
     set newname for datafile 'disk7/oracle/tbs11.f' 
       to 'disk9/oracle/tbs11.f';  
     restore tablespace tbs_1;  
     switch datafile all;  
     recover tablespace tbs_1;  
     sql "ALTER TABLESPACE tbs_1 ONLINE";  
}  
Performing Incomplete Recovery Using a Backup Control File

Assume that both the database and archived redo log 1234 were lost due to a disk crash. Because you do not have incremental backups, you need to recover the database using available archived redo logs. There is no need to restore tablespace READONLY1 because it has not changed since log 1234.

run {  
     # Recover database until log sequence 1234 
     allocate channel dev1 type disk;  
     allocate channel dev2 type 'sbt_tape';  
     set until logseq 1234 thread 1; 
     restore controlfile to '/vobs/oracle/dbs/cf1.f' ;  
     # Because you specified a restore destination, you must manually replicate the
     # control file. The restore command replicates automatically when no destination is
     # specified.
     replicate controlfile from '/vobs/oracle/dbs/cf1.f';
     alter database mount;
     restore database skip tablespace temp1, readonly1;
     recover database skip forever tablespace temp1;
     sql "ALTER DATABASE OPEN RESETLOGS";
     sql "DROP TABLESPACE temp1";
     sql "CREATE TABLESPACE temp1 DATAFILE '/vobs/oracle/dbs/temp1.f' SIZE 10M";
     release channel dev1;  
     release channel dev2;
}

Related Topics

"allocate"

"set_run_option"

"restore"

"untilClause"











 Recovery Manager Command Syntax, 26 of 50
	   










       




Oracle8i Recovery Manager User's Guide and Reference
Release 2 (8.1.6)

Part Number A76990-01

Library

Product

Contents

Index

Go to previous page Go to beginning of chapter Go to next page

Recovery Manager Command Syntax, 26 of 50


list

Syntax


Purpose

To produce a detailed listing of specified backups (either backup sets or media-managed proxy copies) or image copies recorded in the recovery catalog or target control file. RMAN records the output to either standard output or the message log (see "cmdLine"), but not to both at the same time. Use this command to list:

Requirements

  • Execute list only at the RMAN prompt.

  • The incarnation option requires the use of a recovery catalog.

  • You must be connected to the target database. If you use a recovery catalog, you must also be connected to it.

  • The list command will not show any records with DELETED status. To see the records with DELETED status, query the recovery catalog views. See Chapter 11, "Recovery Catalog Views".

  • If you generate a list of backups and copies limited by time, SCN, or log sequence number, you must specify the completedTimeSpec rather than the untilClause. The untilClause no longer works with the list command for release 8.1.5 and higher.

  • You cannot use the like option with the list ... archivelog command.

Keywords and Parameters

incarnation 

displays information about the incarnations of a database. See Table 10-10 for an explanation of the column headings of the list incarnation output table.

The listing includes the primary keys of all database incarnation records for the specified database name. Use the key in a reset database command to change the incarnation that RMAN considers to be current to a previous incarnation. If you do not specify the of database option, then the command lists all databases registered in the recovery catalog. 

 

of database database_name 

specifies the name of the database. 

copy 

displays information about datafile copies, archived redo logs, and image copies of archived redo logs. By default, list will display copies of all files in the database. Both usable and unusable image copies are included in the output, even those that cannot be restored or are expired or unavailable.

See Also: Table 10-8 and Table 10-9 for an explanation of the column headings of the list copy output tables. 

backup 

displays information about backups: backup sets, backup pieces, and proxy copies. The output displays a unique key for each. By default, backups of the whole database are listed. Both usable and unusable backups are included in the output, even those that cannot be restored, are expired or unavailable, or are incremental backups that cannot be restored because their parent full backup or copy no longer exists.

See Also: Table 10-4, Table 10-5, Table 10-6, and Table 10-7 for an explanation of the column headings of the list backup output tables. Use the KEY column of the output to obtain the primary key usable in the change and delete expired backupset commands. 

of listObjList 

restricts the list of objects operated on to the object type specified in the listObjList clause. See "listObjList". If you do not specify an object, list defaults to of database

completedTimeSpec 

specifies a range of time for completion of the backup or copy. See "completedTimeSpec"

tag tag_name 

restricts the datafile copies and backups by specifying the tag of the copy or backup. If you specify tag, only copies or backups with the specified tag will be listed. 

recoverable 

specifies only backups or copies of datafiles that are available and can possibly be used in a restore operation. To be a candidate for restore operations a backup must meet these criteria. If the backup is:

  • Incremental, then a valid parent must exist to which this incremental can be applied.

  • In a prior incarnation, then there must be no further changes to the files in that incarnation. In other words, the files must be offline and must not have come online again in that incarnation.

 

 

untilClause 

specifies an end time, SCN, or log sequence number. See "untilClause"

device type deviceSpecifier 

lists only backup sets residing on one of the specified device types (see "deviceSpecifier"). If not specified, all available backup sets will be listed. This option applies only to the list backup command. 

like string_pattern 

restricts datafile copies by specifying a filename pattern. The pattern can contain Oracle pattern matching characters '%' and '_'. RMAN lists only files whose name matches the pattern.

Note: You cannot use the like option with the list ... archivelog command. 

List Output

The status information that appears in the output is shown in Table 10-4:

Table 10-4 List of Backup Sets (Page 1 of 2)
Column  Indicates 

KEY 

a unique key identifying this backup set.

Note: If the target database control file is used instead of the recovery catalog, then this field is a unique identifier that specifies this backup set in the target database control file (and is equal to the RECID, which serves this purpose when a recovery catalog is not used). Use this key in a change ... backupset statement to change the status of the backup set. 

RECID 

when combined with the STAMP column, a unique key that identifies this backup set in the target database control file. The RECID will be invalid when a new control file record occupies the space used by the old record. For this reason, issue resync commands often so that the new records are copied to the recovery catalog as soon as possible.  

STAMP 

when combined with the RECID column, a unique key that identifies this backup set in the target database control file.  

LV 

the level of the backup: NULL for non-incrementals, level 0-4 for incrementals.  

SET STAMP 

when combined with the SET COUNT column, a unique key that identifies this backup set in the target database control file. Use these values to access the control file records in the V$BACKUP_SET, V$BACKUP_PIECE, V$BACKUP_DATAFILE, and V$BACKUP_REDOLOG views.

The SET STAMP value is valid at all times, both in the control file (when not using a recovery catalog) and when using a recovery catalog. SET STAMP values are never entered by a user because they are part of a two-value key. Oracle World Wide Support may request this value if your database requires recovery when no recovery catalog exists and control file records are gone.

See Also: Oracle8i Reference for more information about data dictionary views. 

SET COUNT 

when combined with the SET STAMP column, a unique key that identifies this backup set in the target database control file. Use these values to access the control file records in the V$BACKUP_SET, V$BACKUP_PIECE, V$BACKUP_DATAFILE, and V$BACKUP_REDOLOG views.

The SET COUNT value is valid at all times, both in the control file (when not using a recovery catalog) and when using a recovery catalog. SET COUNT values are never entered by a user because they are part of a two-value key. Oracle World Wide Support may request this value if your database requires recovery when no recovery catalog exists and control file records are gone.  

COMPLETION TIME 

the date and time that the backup set completed. Note that the format of this field depends on the NLS_LANG and NLS_DATE_FORMAT environment settings.  

Table 10-5 List of Backup Pieces 
Column  Indicates 

KEY 

a unique identifier for this backup piece in the recovery catalog or target database control file.

Note: The values for KEY in the recovery catalog and the control file are different. 

PC#  

the piece number of this backup piece within the backup set.  

CP# 

the copy number of this backup piece in a duplexed backup. For example, if set duplex = 4, then CP# will range from 1 to 4.

Note: If the backup is not duplexed, then CP# = 1.  

STATUS 

the backup piece status: AVAILABLE, UNAVAILABLE, or EXPIRED (see the change command for an explanation of each status). 

COMPLETION TIME 

the date and time when the piece was created. 

PIECE NAME 

the name of the backup piece. 

Table 10-6 Controlfile Included 
Column  Indicates 

CKP SCN 

the SCN of the backup control file checkpoint. All database changes recorded in the redo records before the specified SCN are reflected in this control file.  

CKP TIME 

the time of the backup control file checkpoint. All database changes recorded in the redo records before the specified time are reflected in this control file.  

Table 10-7 List of Datafiles Included 
Column  Indicates 

FILE 

the number of the file that was backed up. 

NAME 

the location where this file would be restored now if it were restored from this backup set and no set newname command (see "set_run_option") was entered.  

LV 

the level of the backup: NULL for non-incrementals, level 0-4 for incrementals.  

TYPE 

whether the backup was FULL or INCR (incremental). 

CKP SCN 

the checkpoint of the datafile at the time it was backed up. All database changes prior to the SCN have been written to the file; changes after the specified SCN have not been written to the file. 

CKP TIME 

the checkpoint of the datafile at the time it was backed up. All database changes prior to the time have been written to the file; changes after the specified time have not been written to the file. 

Table 10-8 List of Datafile Copies (Page 1 of 2)
Column  Indicates 

KEY 

the unique identifier for the datafile copy. Use this value in a change command to alter the status of the datafile copy.

Note: The values for KEY in the recovery catalog and the control file are different. 

FILE 

the file number of the original datafile from which this copy was made.  

the backup piece status: AVAILABLE, UNAVAILABLE, or EXPIRED (see the change command for an explanation of each status).  

COMPLETION TIME 

the date and time that the copy completed. Note that the value of this field is sensitive to the NLS_LANG and NLS_DATE_FORMAT environment variables.  

CKP SCN 

the checkpoint of this datafile when it was copied. All database changes prior to the SCN have been written to this file.  

CKP TIME 

the checkpoint of this datafile when it was copied. All database changes prior to the time have been written to this file.  

NAME 

the filename of the datafile copy. 

Table 10-9 List of Archived Log Copies 
Column  Indicates 

KEY 

the unique identifier for this archived redo log copy. Use this value in a change command to alter the status of the copy.

Note: The values for KEY in the recovery catalog and the control file are different. 

THRD 

the redo log thread number. 

SEQ 

the log sequence number.  

COMPLETION TIME 

the date and time that the copy completed. Note that the value of this field is sensitive to the NLS_LANG and NLS_DATE_FORMAT environment variables.  

NAME 

the filename of the archived redo log copy. 

Table 10-10 List of Database Incarnations (Page 1 of 2)
Column  Indicates 

DB KEY 

when combined with the INC KEY, the unique key by which RMAN identifies the database incarnation in the recovery catalog. Use this key to unregister a database, that is, delete all the rows associated with that database from the recovery catalog.  

INC KEY 

when combined with DB KEY, the unique key by which RMAN identifies the database incarnation in the recovery catalog. Use this key in the reset database to incarnation command, which you must use if you want to recover your database to a time prior to the most recent RESETLOGS.  

DB NAME 

the database name as listed in the DB_NAME parameter. 

DB ID 

the database identification number, which Oracle generates automatically at database creation. 

CUR 

whether the incarnation is the current incarnation of the database. 

RESET SCN 

the SCN at which the incarnation was created. 

RESET TIME 

the time at which the incarnation was created. 

Examples

Listing Copies

The following example lists datafile copies and archived redo logs recorded in the recovery catalog:

list copy of database archivelog all;

List of Datafile Copies
Key     File S Completion time Ckp SCN    Ckp time    Name
------- ---- - --------------- ---------- ----------  ------
1262    1    A 18-AUG-98       219859     14-AUG-98   /vobs/oracle/dbs/copy/tbs_01.f
 
List of Archived Log Copies
Key     Thrd Seq     S Completion time Name
------- ---- ------- - --------------- ------------------------------------
789     1    1       A 14-JUL-98       /vobs/oracle/work/arc_dest/arcr_1_1.arc
790     1    2       A 11-AUG-98       /vobs/oracle/work/arc_dest/arcr_1_2.arc
791     1    3       A 12-AUG-98       /vobs/oracle/work/arc_dest/arcr_1_3.arc
Listing Backups

The following example lists backups of two datafiles recorded in the recovery catalog:

list backup of datafile '/oracle/dbs/tbs_01.f', '/oracle/dbs/tbs_02.f';

List of Backup Sets
Key     Recid      Stamp      LV Set Stamp  Set Count  Completion Time
------- ---------- ---------- -- ---------- ---------- ----------------------
1174    12         341344528  0  341344502  16         14-SEP-98

List of Backup Pieces
Key     Pc# Cp# Status     Completion Time    Piece Name
------- --- --- ---------- ------------------ -----------------------------
1176    1   1   AVAILABLE  14-AUG-98          /vobs/oracle/dbs/0ga5h07m_1_1
 
Controlfile Included
Ckp SCN    Ckp time
---------- ---------------
219857     14-AUG-98
 
List of Datafiles Included
File Name                                  LV Type Ckp SCN    Ckp Time
---- ------------------------------------- -- ---- ---------- -------------
1    /oracle/dbs/tbs_01.f                  0  Full 199843     14-AUG-98
2    /oracle/dbs/tbs_02.f                  0  Full 199843     14-AUG-98
Listing Database Incarnations

The following example lists all database incarnations recorded in the recovery catalog:

list incarnation;

List of Database Incarnations
DB Key  Inc Key   DB Name   DB ID       CUR    Reset SCN    Reset Time
------- -------   -------   ------      ---    ----------   ----------
1       2         PROD1     1224038686  NO     1            02-JUL-98
1       582       PROD1     1224038686  YES    59727        10-JUL-98

Related Topics

"crosscheck"

"listObjList"

"report"

"validate"











 Recovery Manager Command Syntax, 37 of 50
	   










       




Oracle8i Recovery Manager User's Guide and Reference
Release 2 (8.1.6)

Part Number A76990-01

Library

Product

Contents

Index

Go to previous page Go to beginning of chapter Go to next page

Recovery Manager Command Syntax, 37 of 50


restore

Syntax


restoreObject::=

restoreSpecOperand::=

Purpose

To restore files from backups or image copies to the current location, overwriting the files with the same name. You can use set newname command to restore files to non-default locations. RMAN restores backups from disk or tape and restores images copies from disk only.

RMAN considers restored files as datafile copies. If you restore to the default location, RMAN creates records for the datafile copies in the repository and immediately updates them to status DELETED. If you restore to a new location, issue set newname commands to rename the files, and issue a switch command to make the restored files current, RMAN also updates the records to DELETED. If you do not issue switch commands, then RMAN considers the restored files as valid copies for use in future restore operations.

Typically, you restore when a media failure has damaged a current datafile, control file, or archived redo log or prior to performing a point-in-time recovery. This command restores full backups, incremental backups (level 0 only), or copies of:

Note that when you perform a restore operation using a backup control file and use a recovery catalog, RMAN automatically adjusts the control file to reflect the structure of the restored backup.

See Also:

Chapter 6, "Restoring and Recovering with Recovery Manager" to learn how to restore files. 

Requirements

  • Execute restore only within the braces of a run command.

  • To restore datafiles to their current location, the database must be either:

    • Mounted

    • Open with the datafiles offline

    If the entire database is to be restored, then it must be mounted.

  • To restore to a new location, use the set newname commands to rename the datafiles and use switch commands to make the restored files into the current database files.

  • At least one allocate channel command must precede a restore.

  • If you use the from datafilecopy option, then the allocated channels must be of type disk.

  • If you use the from backupset operand, then the appropriate type of storage devices must be allocated for the backup sets that need to be restored. If the appropriate device is not allocated, then you may not be able to find a candidate backup set or copy to restore, and the restore command fails.

  • RMAN only restores backups that were created on the same type of channels that are allocated for the restore command.

    For example, if you made some backups of a datafile to disk channels and others to 'sbt_tape' channels, and only a disk channel is allocated for the restore command, then RMAN will not restore from any backups that were created on 'sbt_tape' channels.

  • If datafile filenames are symbolic links, that is, files that point to other files, then the control file contains the filenames of the link files but RMAN performs I/O on the datafiles pointed to by the link files. If a link file is lost and you restore a datafile without first re-creating the symbolic link, however, then RMAN restores the datafile to the location of the link file rather than to the location pointed to by the link.

  • Open the database with the RESETLOGS option after restoring with a backup control file.

  • You can only restore from a previous incarnation when restoring the whole database. For example, you cannot restore one datafile of a previous incarnation while the current database is in a different incarnation.

  • Do not specify a datafile more than once in a restore job. For example, the following command is illegal because datafile 1 is both specified explicitly and implied by the SYSTEM tablespace:

    restore 
      tablespace system 
      datafile 1;
    
    
  • If you restore a pre-8.1.6 control file on Windows NT that has not been normalized, you must normalize it before mounting the database by following the procedure described in Oracle8i Migration. A flawed mechanism in releases prior to release 8.1.6 on Windows NT could allow two different filenames to refer to the same physical file.

Keywords and Parameters

restoreObject  

specifies the objects to be restored. 

 

controlfile 

restores the current control file and automatically replicates it to all CONTROL_FILES locations in the parameter file. If you specify a new pathname with the to 'filename' option, RMAN restores the control file to the new location: you must replicate it manually using the replicate command. 

 

database 

restores all datafiles in the database except those that are offline or read-only. Unlike backup database, restore database does not automatically include the control file--you must issue an additional restore command to perform this operation.

If you specify the check readonly option, then RMAN examines the headers of all read-only files and restores any that need restoring.

Use an optional skip ... tablespace argument to avoid restoring specified tablespaces, which is useful when you want to avoid restoring tablespaces containing temporary data. 

 

datafile datafileSpec 

restores the datafiles specified by filename or absolute datafile number. See "datafileSpec"

 

tablespace tablespace_name 

restores all datafiles in the specified tablespaces. 

 

archivelogRecord- Specifier clause 

restores the specified range of archived redo logs. See "archivelogRecordSpecifier"

restoreSpec- Operand 

specifies options for the restoreObject clause.

Note: These parameters override the parameters with the same name at the restore command level. 

 

channel channel_id 

specifies the name of a channel to use for this restore operation. If you do not specify a channel, restore uses any available channel allocated with the correct device type. 

 

from tag tag_name 

overrides the default selection of the most recent backups or file copy available. The tag restricts the automatic selection to backup sets or file copies that have the specified tag. If multiple backup sets or file copies have a matching tag, then RMAN selects the most recent one. 

 

parms channel_parms 

specifies a quoted string containing operating system-specific information. The string is passed to the OSD layer each time a backup piece is restored. 

channel channel_id 

See the restoreSpecOperand clause. 

from tag tag_name 

See the restoreSpecOperand clause. 

parms channel_parms 

See the restoreSpecOperand clause. 

from 

specifies whether RMAN should restore from a datafilecopy on disk or a backupset. By default restore chooses the most recent backup set or file copy, that is, the file copy or backup set that needs the least media recovery. 

untilClause 

limits the selection to those backup sets or file copies that would be suitable for performing a point-in-time recovery. In the absence of any other criteria, RMAN selects the most current file copy or backup set to restore. See "untilClause"

validate 

causes RMAN to decide which backup sets, datafile copies, and archived logs need to be restored and then scans them to verify their contents. This operation creates no output files. Specify this option periodically to verify that the copies and backup sets required to restore the specified files are intact and usable. 

check logical 

tests data and index blocks that pass physical corruption checks for logical corruption, for example, corruption of a row piece or index entry. If RMAN finds logical corruption, it logs the block in the alert.log and server session trace file.

Provided the sum of physical and logical corruptions detected for a file remain below its maxcorrupt setting, the RMAN command completes and Oracle populates V$BACKUP_CORRUPTION and V$COPY_CORRUPTION with corrupt block ranges. If maxcorrupt is exceeded, the command terminates without populating the views.

Note: The maxcorrupt setting represents the total number of physical and logical corruptions permitted on a file. 

check readonly 

checks the datafiles to make sure they exist, are readable, and have the appropriate checkpoint. If any of these conditions is not met, then RMAN restores the files--whether or not they are read-only. By default, RMAN does not restore read-only files when you issue the restore database command. 

Examples

Restoring a Tablespace

This example takes a tablespace offline, restores it, then performs media recovery:

run {  
     # recover tablespace tbs_1 while the database is open  
     allocate channel ch1 type 'sbt_tape';  
     sql "ALTER TABLESPACE tbs_1 OFFLINE IMMEDIATE" ; 
     restore tablespace tbs_1 ; 
     recover tablespace tbs_1 ;  
     sql "ALTER TABLESPACE tbs_1 ONLINE" ; 
     release channel ch1 ;  
} 
Restoring the Control File

This example restores the control file to its default location, replicates it to all CONTROL_FILES locations, and mounts the database:

startup nomount;
run { 
     allocate channel ch1 type 'sbt_tape'; 
     restore controlfile; 
     alter database mount; 
} 
Restoring the Control File Using a Tag

This example restores the control file specified by a tag, replicates it to all CONTROL_FILES locations, and then mounts the database:

startup nomount;
run { 
     allocate channel ch1 type 'sbt_tape'; 
     restore controlfile from tag 'monday_cf_backup'; 
     alter database mount; 
} 
Restoring the Database Using a Backup Control File

This example restores the control file to a new location, replicates it to all control file locations specified in the parameter file, and then mounts the control file in order to restore the database:

startup nomount;
run { 
     allocate channel ch1 type 'sbt_tape';
     restore controlfile to '/oracle/dbs/cf1.ctl';
     replicate controlfile from '/oracle/dbs/cf1.ctl';
     alter database mount;
     restore database;
}
Restoring Archived Redo Logs to a New Location

This example restores all archived redo logs to the /oracle/temp_restore directory:

run { 
      set archivelog destination to '/oracle/temp_restore';
      allocate channel ch1 type disk;
      restore archivelog all;
}

Related Topics

"allocate"

"recover"

"untilClause"











 Recovery Manager Command Syntax, 29 of 50
	   










       




Oracle8i Recovery Manager User's Guide and Reference
Release 2 (8.1.6)

Part Number A76990-01

Library

Product

Contents

Index

Go to previous page Go to beginning of chapter Go to next page

Recovery Manager Command Syntax, 29 of 50


recover

Syntax


Purpose

To apply redo logs or incremental backups to one or more restored datafiles in order to update them to a specified time.

RMAN uses online redo records and restores backup sets of archived redo logs as needed to perform the media recovery. RMAN first looks for the original archived logs or image copies, and if none are available, restores backups.

If RMAN has a choice between applying an incremental backup or applying redo, then it always chooses the incremental backup. If overlapping levels of incremental backup are available, RMAN automatically chooses the one covering the longest period of time.


Note:

When RMAN applies incremental backups, it recovers changes to objects created with the NOLOGGING option. Applying archived redo logs to datafiles does not recover these changes. 


See Also:

Chapter 6, "Restoring and Recovering with Recovery Manager" to learn how to recover datafiles. 

Requirements

  • Execute this command only within the braces of a run command.

  • You can use this command without a recovery catalog, but only if control file recovery is not required. RMAN cannot operate when neither the recovery catalog nor the target database control file are available.

  • For datafile and tablespace recovery, the target database must be mounted. If it is open, then the datafiles or tablespaces to be recovered must be offline. For database recovery, the database must be mounted but not open.

  • At least one allocate channel command must precede recover unless you do not need to restore archived redo log or incremental datafile backup sets.

  • Allocate the appropriate type of device for the backups that you need to restore. If the appropriate type of device is not available, then the recover command aborts.

  • Only the current datafiles may be recovered or have incremental backups applied to them.

  • Typically, you should enter a set until command before both the restore and recover command. If you specify a set until command after a restore and before a recover, you may not be able to perform media recovery on the database to the time required because the restored files may have timestamps later than the specified time.

  • The recover database command will not recover any files that are offline normal or read-only at the point in time to which the files are being recovered. RMAN omits offline normal files with no further checking. If check readonly is specified, then RMAN checks each read-only file on disk to ensure that it is already current at the desired point in time. If check readonly is not specified, then RMAN omits read-only files.

  • Open with the RESETLOGS option after incomplete recovery or recovery with a backup control file.

Keywords and Parameters

database 

specifies that the entire database is to be recovered. You can specify an optional untilClause that causes the recovery to stop when the specified condition has been reached. 

untilClause 

specifies a non-current time, SCN, or log sequence number for the recover command. See "untilClause"

skip [forever] tablespace tablespace_name 

lists tablespaces that should not be recovered, which is useful for avoiding recovery of tablespaces containing only temporary data or for postponing recovery of some tablespaces. The skip clause takes the datafiles in the specified tablespaces offline before starting media recovery. These files are left offline after the media recovery is complete.

If you perform incomplete recovery, then skip is not allowed. Instead, use skip forever, with the intention of dropping the skipped tablespaces after opening the database with the RESETLOGS option. The skip forever clause causes RMAN to take the datafiles offline using the DROP option. Only use skip forever when the specified tablespaces will be dropped after opening the database. 

tablespace tablespace_name 

specifies tablespaces by tablespace name. 

datafile datafileSpec 

specifies a list of one or more datafiles to recover. Specify datafiles by filename using a quoted string or absolute datafile number using an integer (see "datafileSpec").

If you are using the control file as the exclusive repository for RMAN metadata, then the filename must be the name of the datafile as known in the control file.

If you are using a recovery catalog, then the filename of the datafile must be the most recent name recorded in the catalog. For example, assume that a datafile was renamed in the control file. The database then crashes before you can resynchronize the catalog. Specify the old name of the datafile in the recover command, since this is the name recorded in the catalog. 

delete archivelog 

deletes restored archived logs that are no longer needed. RMAN does not delete archived logs that were already on disk before the restore command started. 

check readonly 

checks the headers of read-only files to ensure that they are current before omitting them from the recovery.  

noredo 

suppresses the application of redo logs--only incremental backups are applied. This option is intended for recovery of NOARCHIVELOG databases using incremental backups. If you do not specify noredo when recovering a NOARCHIVELOG database, Oracle aborts a recovery and issues an error. 

Examples

Recovering a Tablespace in an Open Database

The following example takes tablespace TBS_1 offline, restores and recovers it, then brings it back online:

run {  
     allocate channel dev1 type 'sbt_tape';  
     sql "ALTER TABLESPACE tbs_1 OFFLINE IMMEDIATE"; 
     restore tablespace tbs_1; 
     recover tablespace tbs_1;  
     sql "ALTER TABLESPACE tbs_1 ONLINE"; 
} 
Recovering Datafiles Restored to New Locations

The following example allocates one disk channel and one media management channel to use datafile copies on disk and backups on tape, and restores one of the datafiles in tablespace TBS_1 to a different location:

run {  
     allocate channel dev1 type disk;  
     allocate channel dev2 type 'sbt_tape';  
     sql "ALTER TABLESPACE tbs_1 OFFLINE IMMEDIATE";  
     set newname for datafile 'disk7/oracle/tbs11.f' 
       to 'disk9/oracle/tbs11.f';  
     restore tablespace tbs_1;  
     switch datafile all;  
     recover tablespace tbs_1;  
     sql "ALTER TABLESPACE tbs_1 ONLINE";  
}  
Performing Incomplete Recovery Using a Backup Control File

Assume that both the database and archived redo log 1234 were lost due to a disk crash. Because you do not have incremental backups, you need to recover the database using available archived redo logs. There is no need to restore tablespace READONLY1 because it has not changed since log 1234.

run {  
     # Recover database until log sequence 1234 
     allocate channel dev1 type disk;  
     allocate channel dev2 type 'sbt_tape';  
     set until logseq 1234 thread 1; 
     restore controlfile to '/vobs/oracle/dbs/cf1.f' ;  
     # Because you specified a restore destination, you must manually replicate the
     # control file. The restore command replicates automatically when no destination is
     # specified.
     replicate controlfile from '/vobs/oracle/dbs/cf1.f';
     alter database mount;
     restore database skip tablespace temp1, readonly1;
     recover database skip forever tablespace temp1;
     sql "ALTER DATABASE OPEN RESETLOGS";
     sql "DROP TABLESPACE temp1";
     sql "CREATE TABLESPACE temp1 DATAFILE '/vobs/oracle/dbs/temp1.f' SIZE 10M";
     release channel dev1;  
     release channel dev2;
}

Related Topics

"allocate"

"set_run_option"

"restore"

"untilClause"

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Peter Gram
  INET: peter.gram_at_miracleas.dk

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

prodicon.gif bookicon.gif conticon.gif indxicon.gif larrow.gif uarrow.gif rarrow.gif rmans34a.gif
Received on Thu May 16 2002 - 05:09:07 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US