The basic example can be extended to provide fast recoverability to a window greater
than 24 hours. Alter the RECOVER COPY… WITH TAG to perform incomplete
recovery of the datafile copies to the point in time in the past where you want your
window of recoverability to begin. This example shows how to maintain a seven day
RECOVER COPY OF DATABASE WITH TAG ‘incr_update’
UNTIL TIME ‘SYSDATE – 7’;
BACKUP INCREMENTAL LEVEL 1 FOR RECOVER OF COPY WITH TAG ‘incr_update’
The effect of the script is as follows:
■ On the first night the RECOVER COPY… UNTIL TIME statement has no effect,
and the BACKUP INCREMENTAL… FOR RECOVER OF COPY statement creates
the incremental level 0 copy.
■ On the second through seventh nights, the RECOVER COPY… UNTIL TIME
statement has no effect because TIME ‘SYSDATE – 7’ is still a time in the
future. The BACKUP INCREMENTAL… FOR RECOVER OF COPY statement
creates differetial incremental level 1 backups containing the block changes for the
■ On the eighth and all subsequent nights night, the RECOVER COPY… UNTIL
TIME statement applies the level 1 incremental from seven days ago to the copy of
the database. The BACKUP INCREMENTAL… FOR RECOVER OF COPY
statement creates an incremental backup containing the changes for the previous
As with the basic example, you have fast recoverability to any point in time between
the SCN of the datafile copies and the present, using block changes from the
incremental backups and individual changes from the redo logs. Because you have the
daily level 1 incrementals, you still never need to apply more than one day of redo.
i get this error when i do a backup online with RMAN. My code is :
RMAN> Backup database plus archivelog delete input;
then i getting the error ORA-01580 :
In this exercise, you will do a point-in-time recovery by restoring the database to a previous SCN.
1. Back up the database. Details on how to do a full online database backup are found in online backup. In summary, follow these steps:
- First put the database in hot backup mode.
- Copy all database datafiles to a backup location.
- Take the database out of hot backup mode.
- Force a log switch. Back up the archived redo logs.
Here is an example of a backup:
[oracle@localhost orcl]$ sqlplus “/ as sysdba”
SQL*Plus: Release 126.96.36.199.0 – Production on Sun Aug 17 15:35:48 2008
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Oracle Database 11g Enterprise Edition Release 188.8.131.52.0 – Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
In this exercise you will be restoring the database with a cold backup. It is assumed the database is in NOARCHIVELOG mode.
1. Make sure the database is shut down.
2. Copy the files on the backup media to the original location. You would copy the following files:
- NN Database datafiles
- NN Database control files
- NN Database online redo logs
If the original location of the database files is not available, copy them to an alternate location. Having copied the files to an alternate location, you will likely need to execute an optional step 3 for the control files and optional step 4 for all database files and/or online redo logs. Here is an example of the copy command:
If all else fails and you do not have a backup control file, don’t worry; you have another option, the create controlfile command. Normally, manually executing the command can be challenging because you need to know a lot of information about your database (like the names and locations of all the database datafiles). However, you can prepare for the possibility of having to use the create controlfile command by creating one in advance.
The alter database backup controlfile to trace command will create a trace file with the create controlfile command in it for you. The trace file is stored in the new diagnostic directory structure in Oracle Database 11g. The diagnostic directory structure is a new standard introduced in Oracle Database 11g that defines where Oracle stores files related to database troubleshooting and diagnostics.The base directory of this structure is defined by the parameter DIAGNOSTIC_DEST. Here is an example of the setting of DIAGNOSTIC_DEST on an Oracle database:
SQL> show parameter diag
NAME TYPE VALUE
———————————— ———– ———
diagnostic_dest string C:\ORACLE
The backup control file is almost the same as a regular control file. It has some areas in it that are marked such that Oracle recognizes that it’s a backup control file. When a backup control file is used, some form of recovery will be required (typically just involving the use of the archived and online redo logs if the database is otherwise intact).To create the backup control file simply issue the alter database backup controlfile to command, indicating at the end of the command where you want the control file to be created.
For example, if you wanted to create a backup control file after the online backup , you would simply need to issue the following command:
SQL> alter database backup controlfile to ‘c:\backup\orcl\backup2\backup_control.ctl’;
The result is the creation of a backup control file called backup_control.ctl found in the c:\backup\orcl\backup2 directory, as you can see here: