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

A76990-01

Library

Product

Contents

Index

Prev Up Next

Recovery Manager Command Syntax, 4 of 50


alterDatabase

Syntax


Purpose

To mount or open a database.

See Also:

Oracle8i SQL Reference for ALTER DATABASE syntax. 

Requirements

Keywords and Parameters

alter database 

allows you to either mount or open the database. 

 

mount  

mounts the database without opening it. This option is equivalent to the SQL statement ALTER DATABASE MOUNT. 

 

open 

opens the database. If you specify resetlogs, then RMAN opens the database with the RESETLOGS option.

The RMAN resetlogs option is equivalent to the SQL statement ALTER DATABASE OPEN RESETLOGS. If you use a recovery catalog, then RMAN performs an implicit reset database after the database is opened to make this new incarnation the current one in the catalog. 

mount database 

mounts the database without opening it. This option is equivalent to the SQL statement ALTER DATABASE MOUNT. 

open database 

opens the database. If you specify resetlogs, then RMAN opens the database with the RESETLOGS option.

The RMAN resetlogs option is equivalent to the SQL statement ALTER DATABASE OPEN RESETLOGS. If you use a recovery catalog, then RMAN performs an implicit reset database after the database is opened to make this new incarnation the current one in the catalog. 

Examples

Opening the Database after a Backup

This example mounts the database, takes a whole database backup, then opens the database. At the RMAN prompt enter:

startup mount; 
run { 
     allocate channel ch1 type disk; 
     backup database;  
     # now that the backup is complete, open the database. 
     alter database open; 
} 
Mounting the Database after Restoring the Control File

To restore the control file to its default location enter the following:

startup nomount;
run { 
     allocate channel ch1 type 'sbt_tape'; 
     restore controlfile; 
} 
alter database mount;
Performing Incomplete Recovery and Opening with RESETLOGS

This example performs incomplete recovery and then resets the online redo logs:

run { 
     allocate channel ch1 type 'sbt_tape'; 
     set until scn 1024;
     restore database; 
     recover database;
     alter database open resetlogs;
} 

Related Topics

"sql"

"startup"

"shutdown"


Prev Up Next
Oracle
Copyright © 1999 Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index