Database Reference
In-Depth Information
This script creates a script, named coldrest.sql , that generates the copy commands to restore your data files,
temp files, log files, and control files back to their original locations. After you run this shell script, here is a snippet of
the code in the coldrest.sql file:
shutdown abort;
!cp /u01/cbackup/O12C/system01.dbf /u01/dbfile/O12C/system01.dbf
!cp /u01/cbackup/O12C/sysaux01.dbf /u01/dbfile/O12C/sysaux01.dbf
!cp /u01/cbackup/O12C/undotbs01.dbf /u01/dbfile/O12C/undotbs01.dbf
!cp /u01/cbackup/O12C/users01.dbf /u01/dbfile/O12C/users01.dbf
!cp /u01/cbackup/O12C/tools01.dbf /u01/dbfile/O12C/tools01.dbf
...
!cp /u01/cbackup/O12C/redo03b.rdo /u02/oraredo/O12C/redo03b.rdo
!cp /u01/cbackup/O12C/control01.ctl /u01/dbfile/O12C/control01.ctl
!cp /u01/cbackup/O12C/control02.ctl /u01/dbfile/O12C/control02.ctl
startup;
If you need to restore from a cold backup using this script, log in to SQL*Plus as SYS , and execute the script:
$ sqlplus / as sysdba
SQL> @coldrest.sql
Making a Cold Backup of an Archivelog Mode Database
You can use a backup of a database in archivelog mode to restore and recover up to the last committed transaction
prior to a failure. Therefore, unlike a backup of a noarchivelog mode database, this type of backup is not necessarily
intended to be used to reset the database back to a point in time in the past from which no recovery can be applied.
The purpose of a backup of an archivelog mode database is usually to restore the database and roll forward and apply
transactions to fully recover the database.
This has significant implications for the backups. Recall that for a noarchivelog mode database, DBAs sometimes
include the online redo logs as part of the backup. For a backup of an archivelog mode database, you should
never include the online redo logs in the backup. The online redo logs contain the most currently generated redo
transaction information for the database. Any transactions in the current online redo logs that haven't been archived
are required for a complete recovery. In the event of a failure, you don't want to overwrite the online redo logs with
backups of online redo logs taken from a point in time in the past; this would result in the inability to perform a
complete recovery.
The high-level steps for a cold backup of a database in archivelog mode are identical to those for a noarchivelog
mode database:
1.
Determine where to copy the backup files and how much space is required.
2.
Identify the locations and names of the database files to copy.
3.
Shut down the database with the IMMEDIATE , TRANSACTIONAL , or NORMAL clause.
4.
Copy the files (identified in step 2) to the backup location (determined in step 1).
5.
Restart your database.
 
Search WWH ::




Custom Search