Oracle9i Recovery Manager Reference
Release 1 (9.0.1)

Part Number A90136-02
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

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

RMAN Commands , 7 of 60


ALTER DATABASE

Syntax


Text description of alterdat.gif follows
Text description of the illustration alterdat.gif

Purpose

To mount or open a database.

See Also:

Oracle9i SQL Reference for ALTER DATABASE syntax 

Restrictions and Usage Notes

Keywords and Parameters

MOUNT 

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

OPEN 

Opens the database. 

 

RESETLOGS 

Resets the online redo logs to log sequence 1. 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. If you execute the SQL statement ALTER DATABASE OPEN RESETLOGS (not the RMAN command of the same name), then you must manually run the RESET DATABASE command. 

Examples

Opening the Database after a Backup: Example

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

STARTUP MOUNT; 
BACKUP DATABASE;  
# now that the backup is complete, open the database. 
ALTER DATABASE OPEN; 

Mounting the Database after Restoring the Control File: Example

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

STARTUP NOMOUNT;
RESTORE CONTROLFILE;
ALTER DATABASE MOUNT;

Performing RESETLOGS after Incomplete Recovery: Example

This example uses a manually allocated channel to perform incomplete recovery and then resets the online redo logs:

RUN
{
  ALLOCATE CHANNEL ch1 DEVICE TYPE sbt; 
  SET UNTIL SCN 1024;
  RESTORE DATABASE; 
  RECOVER DATABASE;
  ALTER DATABASE OPEN RESETLOGS;
} 

Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996-2001, Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback