Database Reference
In-Depth Information
BaCKING Up ONLINe reDO LOGS (Or NOt)
do you need to back up the online redo logs? no; you never need to back up the online redo logs as part of any
type of backup. then, why do dBas back up the online redo logs as part of a cold backup? one reason is that it
makes the restore process for the noarchivelog mode scenario slightly easier. the online redo logs are required to
open the database in a normal manner.
If you back up all files (including the online redo logs), then to get your database back to the state it was in at the
time of the backup, you restore all files (including the online redo logs) and start up your database.
Step 3. Shut Down the Database
Connect to your database as the SYS (or as a SYSDBA -privileged user), and shut down your database, using IMMEDIATE ,
TRANSACTIONAL , or NORMAL . In almost every situation, using IMMEDIATE is the preferred method. This mode disconnects
users, rolls back incomplete transactions, and shuts down the database:
$ sqlplus / as sysdba
SQL> shutdown immediate;
Step 4. Create Backup Copies of the Files
For every file identified in step 2, use an OS utility to copy the files to a backup directory (identified in step 1). In this
simple example all the data files, control files, temporary database files, and online redo logs are in the same directory.
In production environments, you'll most likely have files spread out in several different directories. This example uses
the Linux/Unix cp command to copy the database files from /u01/dbfile/O12C to the / u01/cbackup/O12C directory:
$ cp /u01/dbfile/O12C/*.* /u01/cbackup/O12C
Step 5. Restart Your Database
After all the files are copied, you can start up your database:
$ sqlplus / as sysdba
SQL> startup;
Restoring a Cold Backup in Noarchivelog Mode with Online Redo Logs
The next example explains how to restore from a cold backup of a database in noarchivelog mode. If you included
the online redo logs as part of the cold backup, you can include them when you restore the files. Here are the steps
involved in this procedure:
1.
Shut down the instance.
2.
Copy the data files, online redo logs, temporary files, and control files back from the
backup to the live database data file locations.
3.
Start up your database.
These steps are detailed in the following sections.
 
Search WWH ::




Custom Search