Oracle® Database Recovery Manager Reference 10g Release 1 (10.1) Part Number B10770-01 |
|
|
View PDF |
alterDatabase::=
Text description of alterDatabase
To mount or open a database.
See Also:
Oracle Database SQL Reference for |
RUN
command or at the RMAN prompt.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;
To restore the control file to its default location when connected to a recovery catalog, enter the following:
STARTUP NOMOUNT; RESTORE CONTROLFILE; ALTER DATABASE MOUNT; # you must run the RECOVER command after restoring a control file even if no datafiles # require recovery RECOVER DATABASE; ALTER DATABASE OPEN RESETLOGS; # if the database uses locally-managed temporary tablespaces, then you must add tempfiles # to these tablespaces after restoring a backup control file SQL " ALTER TABLESPACE temp ADD TEMPFILE ''?/oradata/trgt/temp01.dbf'' REUSE";
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; }