How To Restore Controlfile From Particular Backupiece Out Of Many Backuppieces Created By Autobackup In A Single Day

(Doc ID 272502.1)

Last updated on OCTOBER 27, 2016

Applies to:

Oracle Server - Enterprise Edition - Version: 9.2.0.1
Information in this document applies to any platform.

Goal

Once we enable the controlfile autoback feature, the autobackup pieces are created once we make any changes to the database structure or any backup of datfiles using RMAN

We have many backuppieces created for controfile autobackup for a particular day.

eg:

Date/Time Backup piece name
===================================================
2004-04-20 14:27 C-1821778886-20040420-00
2004-04-20 14:29 C-1821778886-20040420-01
2004-04-20 14:31 C-1821778886-20040420-02
2004-04-20 14:37 C-1821778886-20040420-03
2004-04-20 14:58 C-1821778886-20040420-04
2004-04-20 15:01 C-1821778886-20040420-05
2004-04-20 15:10 C-1821778886-20040420-06
2004-04-20 15:20 C-1821778886-20040420-07


In the above example if we try to extract controlfile from backup piece " C-1821778886-20040420-06 "
with following rman script,then rman will extract controlfile from "C-1821778886-20040420-07"
This is because the rman searched the autobackup by day and not by time.


run{
SET CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'E:\bak\%F';
SET UNTIL TIME "TO_DATE('20040420:15:12','YYYYMMDD:HH24:MI')";
RESTORE CONTROLFILE to 'E:\tem.ctl' FROM AUTOBACKUP;
}
executing command: SET CONTROLFILE AUTOBACKUP FORMAT
executing command: SET until clause
Starting restore at 20-APR-04
using channel ORA_DISK_1
channel ORA_DISK_1: looking for autobackup on day: 20040420
channel ORA_DISK_1: autobackup found: E:\bak\c-1821778886-20040420-07
channel ORA_DISK_1: controlfile restore from autobackup complete
Finished restore at 20-APR-04

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms