Monday, June 2, 2008

Backup the Target Database

For this case study, we will be backing up an Oracle database that is in no-archivelog mode. Keep in mind that the only backups that are allowed are:


Script: backup_cold.rcv
run {
# -----------------------------------------------------------
# The following RMAN commands are run each day.
# The steps are:
# - Re-start the database to perform crash recovery, in
# case the database is not currently open, and was not
# shut down consistently. The database is started in DBA
# mode so that normal users cannot connect.
# - Shut down with the IMMEDIATE option to close the
# database consistently.
# - Startup and mount the database.
# - Backup database.
# - Open database for normal operation.
# -----------------------------------------------------------
startup force dba;
shutdown immediate;
startup mount;
backup database;
alter database open;
}
exit



Taking Backups of Read-Only Tablespaces

The database does not have to be closed to back up a readonly tablespace in no-archivelog mode.

The following command can be used to backup a readonly tablespace:

run {
backup tablespace read_only_tablespace_name;
}
In our example, we can use the following command to backup the read-only tablespace "READ_ONLY_TBS".
run {
backup tablespace read_only_tbs;
}

No comments: