First time working with RMAN, and I'm having trouble doing a restore following the backup. Here's what I'm doing:
C:\>rman target /
First, let's start with a delete backup
just to clear the slate...
Then I run backup database;
Result:
Starting backup at 02-NOV-16
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00004 name=C:\APP\T4PRO\ORADATA\T4PRO\USERS01.DBF
input datafile file number=00001 name=C:\APP\T4PRO\ORADATA\T4PRO\SYSTEM01.DBF
input datafile file number=00002 name=C:\APP\T4PRO\ORADATA\T4PRO\SYSAUX01.DBF
input datafile file number=00003 name=C:\APP\T4PRO\ORADATA\T4PRO\UNDOTBS01.DBF
channel ORA_DISK_1: starting piece 1 at 02-NOV-16
channel ORA_DISK_1: finished piece 1 at 02-NOV-16
piece handle=C:\APP\T4PRO\FLASH_RECOVERY_AREA\T4PRO\BACKUPSET\2016_11_02\O1_MF_NNNDF_TAG20161102T123933_D1N5P643_.BKP tag=TAG20161102T123933 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:25
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 02-NOV-16
channel ORA_DISK_1: finished piece 1 at 02-NOV-16
piece handle=C:\APP\T4PRO\FLASH_RECOVERY_AREA\T4PRO\BACKUPSET\2016_11_02\O1_MF_NCSNF_TAG20161102T123933_D1N5Q047_.BKP tag=TAG20161102T123933 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 02-NOV-16
So far so good. Do a list backup
and I get this:
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
11 Full 5.28G DISK 00:00:22 02-NOV-16
BP Key: 11 Status: AVAILABLE Compressed: NO Tag: TAG20161102T123933
Piece Name: C:\APP\T4PRO\FLASH_RECOVERY_AREA\T4PRO\BACKUPSET\2016_11_02\O1_MF_NNNDF_TAG20161102T123933_D1N5P643_.BKP
List of Datafiles in backup set 11
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
1 Full 1474154 02-NOV-16 C:\APP\T4PRO\ORADATA\T4PRO\SYSTEM01.DBF
2 Full 1474154 02-NOV-16 C:\APP\T4PRO\ORADATA\T4PRO\SYSAUX01.DBF
3 Full 1474154 02-NOV-16 C:\APP\T4PRO\ORADATA\T4PRO\UNDOTBS01.DBF
4 Full 1474154 02-NOV-16 C:\APP\T4PRO\ORADATA\T4PRO\USERS01.DBF
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
12 Full 9.36M DISK 00:00:01 02-NOV-16
BP Key: 12 Status: AVAILABLE Compressed: NO Tag: TAG20161102T123933
Piece Name: C:\APP\T4PRO\FLASH_RECOVERY_AREA\T4PRO\BACKUPSET\2016_11_02\O1_MF_NCSNF_TAG20161102T123933_D1N5Q047_.BKP
SPFILE Included: Modification time: 02-NOV-16
SPFILE db_unique_name: T4PRO
Control File Included: Ckp SCN: 1474163 Ckp time: 02-NOV-16
So everything here looks fine. My control file as I understand it is this O1_MF_NCSNF_TAG20161102T123933_D1N5Q047_.BKP
file. So next I want to do a restore of the db from RMAN:
RMAN> shutdown immediate
database closed
database dismounted
Oracle instance shut down
RMAN> startup nomount
connected to target database (not started)
Oracle instance started
Total System Global Area 6797832192 bytes
Fixed Size 2188648 bytes
Variable Size 3556772504 bytes
Database Buffers 3221225472 bytes
Redo Buffers 17645568 bytes
And here's where I get the problem:
RMAN> restore controlfile from 'O1_MF_NCSNF_TAG20161102T123933_D1N5Q047_.BKP';
Starting restore at 02-NOV-16
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=63 device type=DISK
channel ORA_DISK_1: no AUTOBACKUP in 7 days found
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 11/02/2016 12:50:25
RMAN-06172: no AUTOBACKUP found or specified handle is not a valid copy or piece
I've tried a few different controlfile parameters but none seem to work.
What am I missing?
Thanks!
RMAN expects you to provide the full path to the specified handle, in your case would be the full path to 'O1_MF_NCSNF_TAG20161102T123933_D1N5Q047_.BKP'.
In your particular case this would be:
C:\APP\T4PRO\FLASH_RECOVERY_AREA\T4PRO\BACKUPSET\2016_11_02\O1_MF_NCSNF_TAG20161102T123933_D1N5Q047_.BKP
By default RMAN would look for the file at the FRA (Fast Recovery Area) which is the same location given by parameter 'db_recovery_file_dest'.