Crosscheck backup
hi,
Where we can see the files which are expired, it is showing available when I have physically deleted the files from 2012_02_28 folder , it is also showing in EM database control in manage current backup....
RMAN> CROSSCHECK BACKUP;
using channel ORA_DISK_1
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=F:\ORACLE\FLASH_RECOVERY_AREA\DEMO\AUTOBACKUP\2012_02_28\O1_
MF_S_776427849_7NS3S9M1_.BKP recid=35 stamp=776427849
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=F:\ORACLE\FLASH_RECOVERY_AREA\DEMO\AUTOBACKUP\2012_02_28\O1_
MF_S_776427858_7NS3SLWS_.BKP recid=37 stamp=776427858
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=F:\ORACLE\FLASH_RECOVERY_AREA\DEMO\AUTOBACKUP\2012_02_28\O1_
MF_S_776433205_7NS90OY8_.BKP recid=46 stamp=776433205
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=F:\ORACLE\FLASH_RECOVERY_AREA\DEMO\AUTOBACKUP\2012_02_28\O1_
MF_S_776435770_7NSCJV2G_.BKP recid=55 stamp=776435771
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=F:\ORACLE\FLASH_RECOVERY_AREA\DEMO\AUTOBACKUP\2012_02_28\O1_
MF_S_776454258_7NSXLM4W_.BKP recid=57 stamp=776454259
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=F:\ORACLE\FLASH_RECOVERY_AREA\DEMO\AUTOBACKUP\2012_02_28\O1_
MF_S_776455528_7NSYTB4D_.BKP recid=64 stamp=776455530
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=F:\ORACLE\FLASH_RECOVERY_AREA\DEMO\AUTOBACKUP\2012_02_28\O1_
MF_S_776455550_7NSYTZFO_.BKP recid=66 stamp=776455551
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=F:\ORACLE\FLASH_RECOVERY_AREA\DEMO\AUTOBACKUP\2012_02_28\O1_
MF_S_776466943_7NT9Z08G_.BKP recid=76 stamp=776466944
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=F:\ORACLE\FLASH_RECOVERY_AREA\DEMO\BACKUPSET\2012_02_29\O1_M
F_ANNNN_TAG20120229T070142_7NVD9R2X_.BKP recid=77 stamp=776502104
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=F:\ORACLE\FLASH_RECOVERY_AREA\DEMO\BACKUPSET\2012_02_29\O1_M
F_NNNDF_TAG20120229T070145_7NVD9SVT_.BKP recid=78 stamp=776502105
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=F:\ORACLE\FLASH_RECOVERY_AREA\DEMO\BACKUPSET\2012_02_29\O1_M
F_NNNDF_TAG20120229T070145_7NVDB8J3_.BKP recid=79 stamp=776502120
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=F:\ORACLE\FLASH_RECOVERY_AREA\DEMO\BACKUPSET\2012_02_29\O1_M
F_NNNDF_TAG20120229T070145_7NVDBHJM_.BKP recid=80 stamp=776502127
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=F:\ORACLE\FLASH_RECOVERY_AREA\DEMO\BACKUPSET\2012_02_29\O1_M
F_NNNDF_TAG20120229T070145_7NVDBPL2_.BKP recid=81 stamp=776502134
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=F:\ORACLE\FLASH_RECOVERY_AREA\DEMO\BACKUPSET\2012_02_29\O1_M
F_NNNDF_TAG20120229T070145_7NVDBXL2_.BKP recid=82 stamp=776502141
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=F:\ORACLE\FLASH_RECOVERY_AREA\DEMO\BACKUPSET\2012_02_29\O1_M
F_NNNDF_TAG20120229T070145_7NVDC0NZ_.BKP recid=83 stamp=776502144
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=F:\ORACLE\FLASH_RECOVERY_AREA\DEMO\BACKUPSET\2012_02_29\O1_M
F_ANNNN_TAG20120229T070228_7NVDC56T_.BKP recid=84 stamp=776502149
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=F:\ORACLE\FLASH_RECOVERY_AREA\DEMO\AUTOBACKUP\2012_02_29\O1_
MF_S_776502150_7NVDC6VT_.BKP recid=85 stamp=776502150
Crosschecked 17 objects
RMAN> delete expired backup;
using channel ORA_DISK_1
RMAN>
what is the difference between F:\oracle\flash_recovery_area\DEMO\autobackup and F:\oracle\flash_recovery_area\DEMO\backupset
Backupset will actually holds actual backup pieces of database backup.
Autobackup contains like below , If you enable controlfile autoabckup & so on.
RMAN> show controlfile autobackup;
RMAN configuration parameters for database with db_unique_name ORCL are:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
RMAN>
Similar Messages
-
RMAN Problem -- Crosscheck backup & list backup showing different results
Pls Help !!!
I'm using RMAN for backup policy is to recovery window of 7 days
but even on thired day after incremental 0 backup ... if run 'crosscheck backup'
it shows the previous as expired but when i issue 'list backup' it says available
what may be the problem.......
Backup volume is on RAID10 (ZFS on SOLARIS 10)
Thanks in advance !!
Regds
Gyanendra Singhif run 'crosscheck backup'
it shows the previous as expired but when i issueHave u deleted the previous backup...........because according to my knowledge crosscheck command is used to validate any inconsistency between the logical and physical backup files.
'list backup' it says available
what may be the problem.......
List backup will show the previous backup because of the recovery window
Try this
crosscheck database
delete expired
list backup
and then see the result
Regards
Amit Raghuvanshi -
Crosscheck backup in RMAN - Oracle 9i
Hi,
I have scheduled RMAN backup in oracle 9i and it completed successfully.
After backup, if i list backup, its status is available.
#list backup by file;
Then i ran a crosscheck to crosccheck the backup files and backup sets.
#crosscheck backup;
Again, if i list the backup (l#ist backup), the status of latest backup which executed successfully today becomes "EXPIRED".
Could someone please guide me on the same. Its not possible to recover the database through RMAN if the backup is expired.
Will crosscheck command in oracle 9i, change the status of backup to expired??
Kindly suggest!
Thanks,
VidhyaVidhya.V wrote:
Hi,
I will zip the backup copies for reclaiming more space. So, since files are not present there is it displaying as expired.
Once I unzip the files and try for a crosscheck, will it work??I've never tested trying to "unexpire" a backup piece once it is marked as 'expired', but it sounds reasonable. It would be easy enough for you test for yourself. If that is going to be your strategy, then you need to make sure you never do a 'delete expired'. That command will cause rman to remove the entries of the 'expired' backups from its repository. Then if you tried to 'unexpire' by restoring your backups and re-running 'crosscheck', the entries in the repository are no longer there to BE crosschecked. And since you are running the very obsolete 9i, you can't recatalog them. And since that strategy means never issuing a 'delete expired', your control file will continue to grow ad infinitum because you will NEVER be able to clean up old entries.
SO, while you can probably make your strategy work, it is very weak on several counts:
1) you are running a totally unsupported version of oracle. Is your OS and hardware equally old and unsupported, or does your organization believe that only the rdbms software is "expendable"? I would not want to be around when your database goes belly-up, putting your company's survival on the line, and Oracle support says "xin loi".
2) your strategy is based on trying to save disk space, but disk is astoundingly cheap. Just how big are your backups and what is your business requirement for retention/recovery? -
Do I need put VALIDATE DATABASE in RMAN? I have crosscheck backup
Does the Crosscheck backup tell if a database has corruption? do I need run command validate database?
Hello,
This is the Berkeley DB forum. One of the forums found via the "Forum Home" link in the upper left of this page might be more helpful.
Thanks,
Sandra -
How to crosscheck backup after Netbackup backup has finished
Hello,
I would like some help with the following issue.
We make database backups with Netbackup, using the rman catalog during the backup.
I want to do a crosscheck after the backup finished.
What is the method of implementing this in Netbackup?
Can this be done, or do i need to schedule separate scripts myself?
Any help is appreciated.
Regards,
HarryWith "crosscheck" i mean running the following RMAN commands
allocate channel for maintenance device type 'SBT_TAPE';
crosscheck archivelog all;
crosscheck backup;
delete noprompt expired archivelog all device type 'SBT_TAPE';
delete noprompt expired backup device type 'SBT_TAPE';
release channel;
You run these commands to remove old records out of the rman catalog
I want to run these commands after the regular backup is finished by de Netbackup job.
regards,
Harry
Edited by: 947596 on 22-aug-2012 6:23 -
Crosscheck backup and delete obsolete;
Hi,
on 10g R2 on a Win 2003. Connected to catalog and Target database I issue :
RMAN>crosscheck backup
RMAN>delete obsolete;
FILE 1
FILE 2
Do you want to delet the above file ? Y/N :YES
Then again :
RMAN>crosscheck backup
RMAN>delete obsolete;
FILE 1
FILE 2
Do you want to delet the above file ? Y/N
I can not understand. If the first time I answered YES and the obsolete files where deleted why they appear again and again ?
Can any one be kind to explain me ?
Thank you.'crosscheck' has nothing to do with obsolete backups, this command checks for backups,which are still recorded in the controlfile/recovery catalog,but don't exist physically on disk/tape. The correct command after a 'crosscheck' is 'delete expired', 'obsolete' are backups no longer needed due to the defined retention policy.
I guess your backups are both , obsolete and expired, but 'delete obsolete' does not work, because these backups were removed outside RMAN. It could also be a permission problem, RMAN is not allowed to remove the backups on OS level. That happens on Windows, when shared drives are used.
Werner -
Difference Between Crosscheck Backup and Crosscheck Backupset
I am using 10gR2 on Solaris 5.10
I have a following RMAN script:
run
backup database;
crosscheck backupset;
crosscheck backup;
}What is the difference between Crosscheck Backup and Crosscheck Backupset? Can we just specify crosscheck backup?
regardsCROSSCHECK BACKUP - this command check all backup set and image copies
but CROSSCHECK BACKUPSET check only backupsets -
Please review my backup plan and give me any instruction
Hi every one.
I set up a database and plant a backup strategy with RMAN that is:
- Backup incremental level 0 on every Sunday
- Backup incremental level 1 on other days.
My database is Oracle Enterprise 11gR2 - Linux amd64
The backup task scheduled with crontab on Linux CentOS 5.3. My RMAN commands are bellow. Please help me to review and show any risks may happen with my strategy.
The Incremental Level 0 RMAN:
RUN {
allocate channel bkp device type disk;
backup as compressed backupset incremental level 0 tag 'DB_BKP_FULL' database include current controlfile;
backup as compressed backupset tag 'ARCL_BKP_FULL' archivelog all delete input;
crosscheck archivelog all;
crosscheck backup;
delete noprompt obsolete;
release channel bkp;
}The incremental level 1 RMAN:
RUN {
allocate channel bkp device type disk;
backup as compressed backupset incremental level 1 tag 'DB_BKP_FULL' database include current controlfile;
backup as compressed backupset tag 'ARCL_BKP_INCR' archivelog all delete input;
crosscheck archivelog all;
crosscheck backup;
delete noprompt obsolete;
release channel bkp;
}And this is my RMAN repository configuration:
RMAN> show all;
RMAN configuration parameters for database with db_unique_name OFM are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 3 DAYS;
CONFIGURE BACKUP OPTIMIZATION ON;
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F_myautobackup_ctrlfile';
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0/db_1/dbs/snapcf_ofm.f'; # defaultAny suggestion is appreciated.
Regards
Edited by: Cuong Pham on Dec 13, 2012 11:13 AM
Edited by: Cuong Pham on Dec 13, 2012 11:15 AMIt might be similiar to the way Amazon does it - if you set the eBook price higher at one store than every other store, that store has the right to lower the price and collect the lower price for it (price matching).
So you sell your book at Amazon, Barnes and Noble, and Apple.
At Amazon it's $5.
At Barnes and Noble it's $5.
At Apple it's $10.
Apple has the right to lower the price to $5 and collect the commission on $5 and only remit you your commission on the $5.
That's my GUESS. I don't actually know, I just know what's how Amazon does it. -
Restore from OSB. RMAN-06024: no backup or copy of the control file found
I backed up controlfile for standby on production server to OSB media:
-bash-3.00$ rman target / catalog rman/rman@emgc
Recovery Manager: Release 10.2.0.5.0 - Production on Tue Jan 25 15:15:33 2011
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: EMGC (DBID=1838014073)
connected to recovery catalog database
RMAN>
RMAN> CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 2 BACKUP TYPE TO COMPRESSED BACKUPSET;
RUN
ALLOCATE CHANNEL ch1 DEVICE TYPE 'SBT_TAPE';
BACKUP CURRENT CONTROLFILE FOR STANDBY tag 'stb_ctl';
RELEASE CHANNEL ch1;
CONFIGURE DEVICE TYPE 'SBT_TAPE' CLEAR;
new RMAN configuration parameters:
CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 2 BACKUP TYPE TO COMPRESSED BACKUPSET;
new RMAN configuration parameters are successfully stored
starting full resync of recovery catalog
full resync complete
RMAN> 2> 3> 4> 5> 6>
allocated channel: ch1
channel ch1: sid=1085 devtype=SBT_TAPE
channel ch1: Oracle Secure Backup
Starting backup at 25-JAN-11
channel ch1: starting compressed full datafile backupset
channel ch1: specifying datafile(s) in backupset
including standby control file in backupset
channel ch1: starting piece 1 at 25-JAN-11
channel ch1: finished piece 1 at 25-JAN-11
piece handle=1em30ngu_1_1 tag=STB_CTL comment=API Version 2.0,MMS Version 10.3.0.2
channel ch1: backup set complete, elapsed time: 00:00:27
Finished backup at 25-JAN-11
released channel: ch1
RMAN> list backup of controlfile;
old RMAN configuration parameters:
CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 2 BACKUP TYPE TO COMPRESSED BACKUPSET;
RMAN configuration parameters are successfully reset to default value
starting full resync of recovery catalog
full resync complete
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
1479 Full 512.00K SBT_TAPE 00:00:18 25-JAN-11
BP Key: 1480 Status: AVAILABLE Compressed: YES Tag: STB_CTL
Handle: 1em30ngu_1_1 Media: mf_rman-000003
Standby Control File Included: Ckp SCN: 33567224 Ckp time: 25-JAN-11
RMAN>
On standby server I try to restore this control file but there is some trouble with restore... By the way I can delete that backup piece...
-bash-3.00$ rman target / catalog rman/rman@emgc
Recovery Manager: Release 10.2.0.5.0 - Production on Tue Jan 25 15:34:32 2011
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: emgc (not mounted)
connected to recovery catalog database
RMAN> set DBID=1838014073;
executing command: SET DBID
database name is "EMGC" and DBID is 1838014073
RMAN> RUN
ALLOCATE CHANNEL ch1 DEVICE TYPE 'SBT_TAPE';
crosscheck backup of controlfile;
2> 3> 4> 5>
allocated channel: ch1
channel ch1: sid=1093 devtype=SBT_TAPE
channel ch1: Oracle Secure Backup
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=1em30ngu_1_1 recid=40 stamp=741367328
Crosschecked 1 objects
released channel: ch1
RMAN> list backup of controlfile;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
1479 Full 512.00K SBT_TAPE 00:00:18 25-JAN-11
BP Key: 1480 Status: AVAILABLE Compressed: YES Tag: STB_CTL
Handle: 1em30ngu_1_1 Media: mf_rman-000003
Standby Control File Included: Ckp SCN: 33567224 Ckp time: 25-JAN-11
RMAN> RUN
ALLOCATE CHANNEL ch1 DEVICE TYPE 'SBT_TAPE';
RESTORE CONTROLFILE FROM TAG 'STB_CTL';
2> 3> 4> 5>
allocated channel: ch1
channel ch1: sid=1093 devtype=SBT_TAPE
channel ch1: Oracle Secure Backup
Starting restore at 25-JAN-11
released channel: ch1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 01/25/2011 15:35:20
RMAN-06026: some targets not found - aborting restore
RMAN-06024: no backup or copy of the control file found to restore
RMAN> RUN
ALLOCATE CHANNEL ch1 DEVICE TYPE 'SBT_TAPE';
delete noprompt backup of controlfile;
2> 3> 4> 5>
allocated channel: ch1
channel ch1: sid=1093 devtype=SBT_TAPE
channel ch1: Oracle Secure Backup
List of Backup Pieces
BP Key BS Key Pc# Cp# Status Device Type Piece Name
1480 1479 1 1 AVAILABLE SBT_TAPE 1em30ngu_1_1
deleted backup piece
backup piece handle=1em30ngu_1_1 recid=40 stamp=741367328
Deleted 1 objects
released channel: ch1
RMAN>You cannot specify a tag for a standby control file.
read here
http://download.oracle.com/docs/cd/B10501_01/server.920/a96566/rcmstand.htm#1002594
Edited by: Adigozalov Gurban on Jan 25, 2011 2:14 PM -
Error ORA-01152: file 1 was not restored from a sufficiently old backup
Its also not thread just to share info with oracle gurus here.If my findings for the below workaround is wrong then please do correct me.
Sometime you get the error after performing restoring controlfile when you don't have autobackup controlfile on
error ORA-01152: file 1 was not restored from a sufficiently old backup
why?
Cause When you shutdown the database with using the normal,transactional or immediate options not abort a full checkpoint occurs.A full checkpoint ensures that all of the dirty blocks contained in the buffer cache are written to the data files,the database comes into synchronized state at this time i.e controlfile CKPT SCN=databasefile CKPT.
Like in this demo i am not taking backup the database in opened mode
Demo 1
SQL> archive log list
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 9
Current log sequence 11
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
Total System Global Area 171966464 bytes
Fixed Size 787988 bytes
Variable Size 145488364 bytes
Database Buffers 25165824 bytes
Redo Buffers 524288 bytes
Database mounted.
SQL> alter database archivelog
2 /
Database altered.
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 9
Next log sequence to archive 11
Current log sequence 11
Recovery Manager: Release 10.1.0.2.0 - Production
Copyright (c) 1995, 2004, Oracle. All rights reserved.
RMAN> connect target sys/sys
connected to target database: ORCL1 (DBID=1024798223)
RMAN> list backup
2> ;
using target database controlfile instead of recovery catalog
RMAN> backup database
2> ;
Starting backup at 08-DEC-07
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=C:\ORACLE10G\ORACLE\ORADATA\ORCL1\ORCL1\SYSTEM01.DBF
input datafile fno=00003 name=C:\ORACLE10G\ORACLE\ORADATA\ORCL1\ORCL1\SYSAUX01.DBF
input datafile fno=00002 name=C:\ORACLE10G\ORACLE\ORADATA\ORCL1\ORCL1\UNDOTBS01.DBF
input datafile fno=00004 name=C:\ORACLE10G\ORACLE\ORADATA\ORCL1\ORCL1\USERS01.DBF
channel ORA_DISK_1: starting piece 1 at 08-DEC-07
channel ORA_DISK_1: finished piece 1 at 08-DEC-07
piece handle=C:\ORACLE\FLASH_RECOVERY_AREA\ORCL1\ORCL1\BACKUPSET\2007_12_08\O1_MF_NNNDF_TAG20071208T143558_3ONSCZBY_.BKP
comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:45
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current controlfile in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 08-DEC-07
channel ORA_DISK_1: finished piece 1 at 08-DEC-07
piece handle=C:\ORACLE\FLASH_RECOVERY_AREA\ORCL1\ORCL1\BACKUPSET\2007_12_08\O1_MF_NCSNF_TAG20071208T143558_3ONSFGN7_.BKP
comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:05
Finished backup at 08-DEC-07
SQL> shutdown immediate
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.Now i delete the controlfile from OS command.
SQL> startup
ORACLE instance started.
Total System Global Area 171966464 bytes
Fixed Size 787988 bytes
Variable Size 145488364 bytes
Database Buffers 25165824 bytes
Redo Buffers 524288 bytes
ORA-00205: error in identifying controlfile, check alert log for more infoi don't have automatized control file backup neither i have control file copy.What i will do
to recover control file i will restore controlfile from backup.Before doing it that i will bring
the database in mount state.
SQL> shutdown immediate
ORA-01507: database not mounted
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
Total System Global Area 171966464 bytes
Fixed Size 787988 bytes
Variable Size 145488364 bytes
Database Buffers 25165824 bytes
Redo Buffers 524288 bytes
ORA-00205: error in identifying controlfile, check alert log for more infoi have two backup piece in my backupset folder you cant check control file backup
existence with list backup controlfile at RMAN prompt cause it needs database in
mount state.You will have to test both backup set pieces.
RMAN> restore controlfile from
'C:\oracle\flash_recovery_area\orcl1\ORCL1\BACKUPSET\2007_12_08\O1_MF_NCSNF_TAG20071208T143558_3ONSFGN7_.BKP';
Starting restore at 08-DEC-07
using channel ORA_DISK_1
channel ORA_DISK_1: restoring controlfile
channel ORA_DISK_1: restore complete
output filename=C:\ORACLE10G\ORACLE\ORADATA\ORCL1\ORCL1\CONTROL01.CTL
output filename=C:\ORACLE10G\ORACLE\ORADATA\ORCL1\ORCL1\CONTROL02.CTL
output filename=C:\ORACLE10G\ORACLE\ORADATA\ORCL1\ORCL1\CONTROL03.CTL
Finished restore at 08-DEC-07
SQL> startup
ORACLE instance started.
Total System Global Area 171966464 bytes
Fixed Size 787988 bytes
Variable Size 145488364 bytes
Database Buffers 25165824 bytes
Redo Buffers 524288 bytes
Database mounted.
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open
SQL> alter database open resetlogs
2 /
Database altered.You can see database now comes into open mode without raising error error
ORA-01152: file 1 was not restored from a sufficiently old backup,you can see that
database shutdown with immediate which synchronized the control file with database
file.
Demo 2
------------Now in this demo i am taking backup the database in opened mode before backup
database i have deleted alls previous backup.
Database is in opened moder if i take the backup in database opened mode
(i.e full checkpoint will not occur controlfile CKPT SCN<>datafile CKPT SCN)
you will get the error when you will restore controlfile from backup set.
error ORA-01152: file 1 was not restored from a sufficiently old backup
Reason is that CKPT SCN in the datafiles will be ahead of the backupset control file no
full checkpoint occuring. You are not taking backup in consistent state and the
backupset will not be in consistent state.When you will restore the control file from
backupset then yours restored control file SCN will be lesser then yours datafile
checkpoint SCN.
SQL> startup
ORACLE instance started.
Total System Global Area 171966464 bytes
Fixed Size 787988 bytes
Variable Size 145488364 bytes
Database Buffers 25165824 bytes
Redo Buffers 524288 bytes
Database mounted.
Database opened.
RMAN> backup database
2> ;
Starting backup at 11-DEC-07
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=C:\ORACLE10G\ORACLE\ORADATA\ORCL1\ORCL1\SYSTEM01.D
BF
input datafile fno=00003 name=C:\ORACLE10G\ORACLE\ORADATA\ORCL1\ORCL1\SYSAUX01.D
BF
input datafile fno=00002 name=C:\ORACLE10G\ORACLE\ORADATA\ORCL1\ORCL1\UNDOTBS01.
DBF
input datafile fno=00004 name=C:\ORACLE10G\ORACLE\ORADATA\ORCL1\ORCL1\USERS01.DB
F
channel ORA_DISK_1: starting piece 1 at 11-DEC-07
channel ORA_DISK_1: finished piece 1 at 11-DEC-07
piece handle=C:\ORACLE\FLASH_RECOVERY_AREA\ORCL1\ORCL1\BACKUPSET\2007_12_11\O1_M
F_NNNDF_TAG20071211T125123_3OWJD0V5_.BKP comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:56
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current controlfile in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 11-DEC-07
channel ORA_DISK_1: finished piece 1 at 11-DEC-07
piece handle=C:\ORACLE\FLASH_RECOVERY_AREA\ORCL1\ORCL1\BACKUPSET\2007_12_11\O1_M
F_NCSNF_TAG20071211T125123_3OWJFT97_.BKP comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:09
Finished backup at 11-DEC-07now i shut down the database in order to delete the control file from os command
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> deleting the controlfile from oradata folder
SQL> startup
ORACLE instance started.
Total System Global Area 171966464 bytes
Fixed Size 787988 bytes
Variable Size 145488364 bytes
Database Buffers 25165824 bytes
Redo Buffers 524288 bytes
ORA-00205: error in identifying controlfile, check alert log for more infonow i would restore the controlfile from backupset.
RMAN> restore controlfile from 'C:\oracle\flash_recovery_area\orcl1\ORCL1\BACKUP
SET\2007_12_11\O1_MF_NCSNF_TAG20071211T125123_3OWJFT97_.BKP'
2> ;
Starting restore at 11-DEC-07
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=159 devtype=DISK
channel ORA_DISK_1: restoring controlfile
channel ORA_DISK_1: restore complete
output filename=C:\ORACLE10G\ORACLE\ORADATA\ORCL1\ORCL1\CONTROL01.CTL
output filename=C:\ORACLE10G\ORACLE\ORADATA\ORCL1\ORCL1\CONTROL02.CTL
output filename=C:\ORACLE10G\ORACLE\ORADATA\ORCL1\ORCL1\CONTROL03.CTL
Finished restore at 11-DEC-07
SQL> shutdown immediate
ORA-01507: database not mounted
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 171966464 bytes
Fixed Size 787988 bytes
Variable Size 145488364 bytes
Database Buffers 25165824 bytes
Redo Buffers 524288 bytes
Database mounted.
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open
SQL> alter database open resetlogs
2 /
alter database open resetlogs
ERROR at line 1:
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: 'C:\ORACLE10G\ORACLE\ORADATA\ORCL1\ORCL1\SYSTEM01.DBF'what would you do that now you have lost controlfile ,you dont have copy either you dont
have autobackup on for controlfile,you need to create the control file
SQL> shutdown immediate
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup nomount
ORACLE instance started.
Total System Global Area 171966464 bytes
Fixed Size 787988 bytes
Variable Size 145488364 bytes
Database Buffers 25165824 bytes
Redo Buffers 524288 bytes
SQL> create controlfile reuse database orcl1 noresetlogs archivelog
2 MAXLOGFILES 50
3 MAXLOGMEMBERS 3
4 MAXDATAFILES 300
5 MAXINSTANCES 8
6 MAXLOGHISTORY 500
7 LOGFILE
8 GROUP 1 'C:\oracle10g\oracle\oradata\orcl1\orcl1\redo01.LOG',
9 GROUP 2 'C:\oracle10g\oracle\oradata\orcl1\orcl1\redo02.LOG',
10 GROUP 3 'C:\oracle10g\oracle\oradata\orcl1\orcl1\redo03.LOG'
11 DATAFILE
12 'C:\oracle10g\oracle\oradata\orcl1\orcl1\SYSAUX01.DBF',
13 'C:\oracle10g\oracle\oradata\orcl1\orcl1\SYSTEM01.DBF',
14 'C:\oracle10g\oracle\oradata\orcl1\orcl1\UNDOTBS01.DBF',
15 'C:\oracle10g\oracle\oradata\orcl1\orcl1\USERS01.DBF'
16
SQL> /
Control file created.
SQL> alter database open
2 /
Database altered.KhurramNo need to manually recreate the controlfile. Simply issue RECOVER DATABASE prior to opening database.
E:\>rman target /
Recovery Manager: Release 10.2.0.1.0 - Production on Sun Dec 30 01:22:34 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database (not started)
RMAN> startup
Oracle instance started
database mounted
database opened
Total System Global Area 612368384 bytes
Fixed Size 2006192 bytes
Variable Size 239076176 bytes
Database Buffers 364904448 bytes
Redo Buffers 6381568 bytes
RMAN> backup database;
Starting backup at 30-DEC-07
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=148 devtype=DISK
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=E:\ORACLE\ORADATA\ORA10G\SYSTEM01.DBF
input datafile fno=00002 name=E:\ORACLE\ORADATA\ORA10G\UNDOTBS01.DBF
input datafile fno=00003 name=E:\ORACLE\ORADATA\ORA10G\SYSAUX01.DBF
input datafile fno=00004 name=E:\ORACLE\ORADATA\ORA10G\USERS01.DBF
channel ORA_DISK_1: starting piece 1 at 30-DEC-07
channel ORA_DISK_1: finished piece 1 at 30-DEC-07
piece handle=D:\DB_BACKUPS\12J4S23M_1_1.BKP tag=TAG20071230T012302 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:35
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 30-DEC-07
channel ORA_DISK_1: finished piece 1 at 30-DEC-07
piece handle=D:\DB_BACKUPS\13J4S26L_1_1.BKP tag=TAG20071230T012302 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 30-DEC-07
RMAN> shutdown immediate
database closed
database dismounted
Oracle instance shut down
RMAN> exit
Recovery Manager complete.
E:\>del e:\oracle\oradata\ora10g\*.ctl
E:\>rman target /
Recovery Manager: Release 10.2.0.1.0 - Production on Sun Dec 30 01:25:39 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database (not started)
RMAN> startup
Oracle instance started
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of startup command at 12/30/2007 01:25:56
ORA-00205: error in identifying control file, check alert log for more info
RMAN> restore controlfile from 'D:\DB_BACKUPS\13J4S26L_1_1.BKP';
Starting restore at 30-DEC-07
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=157 devtype=DISK
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
output filename=E:\ORACLE\ORADATA\ORA10G\CONTROL01.CTL
output filename=E:\ORACLE\ORADATA\ORA10G\CONTROL02.CTL
output filename=E:\ORACLE\ORADATA\ORA10G\CONTROL03.CTL
Finished restore at 30-DEC-07
RMAN> alter database mount;
database mounted
released channel: ORA_DISK_1
RMAN> alter database open resetlogs;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 12/30/2007 01:27:33
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: 'E:\ORACLE\ORADATA\ORA10G\SYSTEM01.DBF'
RMAN> recover database;
Starting recover at 30-DEC-07
Starting implicit crosscheck backup at 30-DEC-07
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
Crosschecked 1 objects
Finished implicit crosscheck backup at 30-DEC-07
Starting implicit crosscheck copy at 30-DEC-07
using channel ORA_DISK_1
Finished implicit crosscheck copy at 30-DEC-07
searching for all files in the recovery area
cataloging files...
no files cataloged
using channel ORA_DISK_1
starting media recovery
archive log thread 1 sequence 1 is already on disk as file E:\ORACLE\ORADATA\ORA10G\REDO03.LOG
archive log filename=E:\ORACLE\ORADATA\ORA10G\REDO03.LOG thread=1 sequence=1
media recovery complete, elapsed time: 00:00:02
Finished recover at 30-DEC-07
RMAN> alter database open resetlogs;
database opened
RMAN> shutdown immediate
database closed
database dismounted
Oracle instance shut down
RMAN> startup
connected to target database (not started)
Oracle instance started
database mounted
database opened
Total System Global Area 612368384 bytes
Fixed Size 2006192 bytes
Variable Size 247464784 bytes
Database Buffers 356515840 bytes
Redo Buffers 6381568 bytes
RMAN> -
Recovery window retention policy deletes archive logs before a backup?
Hi All,
Oracle 11G on Windows 2008 R2
This afternoon, I changed my RMAN retention policy from 'RETENTION POLICY REDUNDANCY 3' to RETENTION POLICY RECOVERY WINDOW OF 3 DAYS'
However, i checked tonight and after my daily backup ran, all the archive logs prior to the backup had been deleted! Thus meaning i dont think i can restore to any point in time, prior to my daily backup. All the .arc logs were there after the backup. So i tried another test and kicked off the daily backup again. During the backup process, the archive logs got deleted again! Now i don't have any archive logs..
Is this proper behaviour of RETENTION POLICY RECOVERY WINDOW?? I thought it would keep all the files needed for me to restore to any point in time for the previous 3 days. When i used REDUNDANCY, with my daily backups, it kept 3 days worth of backups+ archive logs so i could restore point-in-time to any point. How can i use RECOVERY WINDOW so that i can actually restore to any point-in-time for the 3 days??
I wanted to change to RECOVERY WINDOW since i read that by using REDUNDANCY it only keeps X copies of a backup (so if i ran the backup 3 times in a day, i would only have those 3).
Thanks in advance.Hi All,
Here is the SHOW ALL output:
RMAN> show all;
RMAN configuration parameters for database with db_unique_name MMSPRD7 are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 3 DAYS;
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOA
D TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO 'D:\ORACLE\DATABASE\ORA11G\DATABASE\SNCFM
MSPRD7.ORA'; # default
Here is the RMAN script:
Recovery Manager: Release 11.2.0.3.0 - Production on Mon Jan 20 23:03:12 2014
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: XXX (DBID=)
RMAN> CROSSCHECK ARCHIVELOG ALL;
2> CROSSCHECK BACKUPSET;
3> CROSSCHECK BACKUP;
4> CROSSCHECK COPY;
5> DELETE NOPROMPT EXPIRED ARCHIVELOG ALL;
6> DELETE NOPROMPT EXPIRED BACKUPSET;
7> DELETE NOPROMPT OBSOLETE;
8> BACKUP CURRENT CONTROLFILE;
9> BACKUP AS COMPRESSED BACKUPSET DATABASE PLUS ARCHIVELOG DELETE INPUT;
Also, not sure if you needed the whole RMAN output, but here is the deletion part:
RMAN retention policy will be applied to the command
RMAN retention policy is set to recovery window of 3 days
using channel ORA_DISK_1
Deleting the following obsolete backups and copies:
Type Key Completion Time Filename/Handle
Backup Set 1392 15-JAN-14
Backup Piece 1392 15-JAN-14 F:\ORAFRA\MMSPRD7\BACKUPSET\2014_01_15\O1_MF_NNNDF_TAG20140115T190054_9FG89R8N_.BKP
Backup Set 1393 15-JAN-14
Backup Piece 1393 15-JAN-14 F:\ORAFRA\MMSPRD7\BACKUPSET\2014_01_15\O1_MF_ANNNN_TAG20140115T192204_9FG9KDHX_.BKP
Backup Set 1397 16-JAN-14
Backup Piece 1397 16-JAN-14 F:\ORAFRA\MMSPRD7\BACKUPSET\2014_01_16\O1_MF_ANNNN_TAG20140116T190027_9FJWNW6L_.BKP
Backup Set 1400 17-JAN-14
Backup Piece 1400 17-JAN-14 F:\ORAFRA\MMSPRD7\BACKUPSET\2014_01_17\O1_MF_ANNNN_TAG20140117T190138_9FMK349M_.BKP
deleted backup piece
backup piece handle=F:\ORAFRA\MMSPRD7\BACKUPSET\2014_01_15\O1_MF_NNNDF_TAG20140115T190054_9FG89R8N_.BKP RECID=1392 STAMP=836938856
deleted backup piece
backup piece handle=F:\ORAFRA\MMSPRD7\BACKUPSET\2014_01_15\O1_MF_ANNNN_TAG20140115T192204_9FG9KDHX_.BKP RECID=1393 STAMP=836940124
deleted backup piece
backup piece handle=F:\ORAFRA\MMSPRD7\BACKUPSET\2014_01_16\O1_MF_ANNNN_TAG20140116T190027_9FJWNW6L_.BKP RECID=1397 STAMP=837025228
deleted backup piece
backup piece handle=F:\ORAFRA\MMSPRD7\BACKUPSET\2014_01_17\O1_MF_ANNNN_TAG20140117T190138_9FMK349M_.BKP RECID=1400 STAMP=837111700
Deleted 4 objects -
RMAN never deletes archive log backups
Hi all,
I have same problem as some of you have already faced.
I have some instances 10.2.0.4 running un archive log mode.
I take full hot backup daily.
I setup a rman script to backup and delete obsolete backups according to the following policy:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 2 DAYS;
CONFIGURE RETENTION POLICY TO REDUNDANCY 2;
and then:
run {
ALLOCATE CHANNEL RMAN_BACK_CH01 TYPE DISK;
BACKUP AS COMPRESSED BACKUPSET DATABASE FORMAT '/mnt/rman_202/pnetpres/db_pres_%U';
CROSSCHECK ARCHIVELOG ALL;
BACKUP AS COMPRESSED BACKUPSET ARCHIVELOG ALL FORMAT '/mnt/rman_202/pnetpres/al_pres_%U';
CROSSCHECK BACKUP;
DELETE NOPROMPT OBSOLETE;
DELETE NOPROMPT EXPIRED BACKUP;
RELEASE CHANNEL RMAN_BACK_CH01;
crosscheck archivelog all;
delete noprompt archivelog all completed before 'sysdate -2';
DB full backups are being deleted, however archive logs backups are not deleted.
There are no tablespaces in backup or offline mode.
How can I know the reason why some archive log backups are kept ?
Even I clear the policy and perform a crosscheck and delete, those are not marked as obsolete neither deleted from disk.
Thanks in advance.Hi Fernando,
This are the ouputpus of the commands:
RMAN> REPORT OBSOLETE;
RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 1
no obsolete backups found
RMAN> LIST BACKUP OF ARCHIVELOG ALL;
List of Backup Sets
===================
BS Key Size Device Type Elapsed Time Completion Time
1090 69.65M DISK 00:00:16 23-FEB-11
BP Key: 1093 Status: AVAILABLE Compressed: YES Tag: TAG20110223T061511
Piece Name: /mnt/rman_202/pnetproy/al_pres_0jm5c6bf_1_1
List of Archived Logs in backup set 1090
Thrd Seq Low SCN Low Time Next SCN Next Time
1 13 2173025156 21-FEB-11 2173028010 21-FEB-11
1 14 2173028010 21-FEB-11 2173041730 21-FEB-11
1 15 2173041730 21-FEB-11 2173041813 21-FEB-11
1 16 2173041813 21-FEB-11 2173106066 22-FEB-11
1 17 2173106066 22-FEB-11 2173108831 22-FEB-11
1 18 2173108831 22-FEB-11 2173116745 22-FEB-11
1 19 2173116745 22-FEB-11 2173117735 22-FEB-11
1 20 2173117735 22-FEB-11 2173117739 22-FEB-11
1 21 2173117739 22-FEB-11 2173117753 22-FEB-11
1 22 2173117753 22-FEB-11 2173165783 23-FEB-11
1 23 2173165783 23-FEB-11 2173168857 23-FEB-11
BS Key Size Device Type Elapsed Time Completion Time
1411 125.43M DISK 00:00:28 24-FEB-11
BP Key: 1414 Status: AVAILABLE Compressed: YES Tag: TAG20110224T061643
Piece Name: /mnt/rman_202/pnetproy/al_pres_0mm5eqqb_1_1
List of Archived Logs in backup set 1411
Thrd Seq Low SCN Low Time Next SCN Next Time
1 18 2173108831 22-FEB-11 2173116745 22-FEB-11
1 19 2173116745 22-FEB-11 2173117735 22-FEB-11
1 20 2173117735 22-FEB-11 2173117739 22-FEB-11
1 21 2173117739 22-FEB-11 2173117753 22-FEB-11
1 22 2173117753 22-FEB-11 2173165783 23-FEB-11
1 23 2173165783 23-FEB-11 2173168857 23-FEB-11
1 24 2173168857 23-FEB-11 2173221907 23-FEB-11
1 25 2173221907 23-FEB-11 2173246002 24-FEB-11
1 26 2173246002 24-FEB-11 2173249177 24-FEB-11
BS Key Size Device Type Elapsed Time Completion Time
1600 164.40M DISK 00:00:37 25-FEB-11
BP Key: 1603 Status: AVAILABLE Compressed: YES Tag: TAG20110225T061643
Piece Name: /mnt/rman_202/pnetproy/al_pres_0pm5hf6b_1_1
List of Archived Logs in backup set 1600
Thrd Seq Low SCN Low Time Next SCN Next Time
1 22 2173117753 22-FEB-11 2173165783 23-FEB-11
1 23 2173165783 23-FEB-11 2173168857 23-FEB-11
1 24 2173168857 23-FEB-11 2173221907 23-FEB-11
1 25 2173221907 23-FEB-11 2173246002 24-FEB-11
1 26 2173246002 24-FEB-11 2173249177 24-FEB-11
1 27 2173249177 24-FEB-11 2173313111 25-FEB-11
1 28 2173313111 25-FEB-11 2173316259 25-FEB-11
BS Key Size Device Type Elapsed Time Completion Time
1829 132.24M DISK 00:00:30 26-FEB-11
BP Key: 1832 Status: AVAILABLE Compressed: YES Tag: TAG20110226T061627
Piece Name: /mnt/rman_202/pnetproy/al_pres_0sm5k3hr_1_1
List of Archived Logs in backup set 1829
Thrd Seq Low SCN Low Time Next SCN Next Time
1 25 2173221907 23-FEB-11 2173246002 24-FEB-11
1 26 2173246002 24-FEB-11 2173249177 24-FEB-11
1 27 2173249177 24-FEB-11 2173313111 25-FEB-11
1 28 2173313111 25-FEB-11 2173316259 25-FEB-11
1 29 2173316259 25-FEB-11 2173380316 26-FEB-11
1 30 2173380316 26-FEB-11 2173388686 26-FEB-11
BS Key Size Device Type Elapsed Time Completion Time
2058 218.03M DISK 00:00:48 27-FEB-11
BP Key: 2061 Status: AVAILABLE Compressed: YES Tag: TAG20110227T061628
Piece Name: /mnt/rman_202/pnetproy/al_pres_0vm5mnts_1_1
List of Archived Logs in backup set 2058
Thrd Seq Low SCN Low Time Next SCN Next Time
1 28 2173313111 25-FEB-11 2173316259 25-FEB-11
1 29 2173316259 25-FEB-11 2173380316 26-FEB-11
1 30 2173380316 26-FEB-11 2173388686 26-FEB-11
1 31 2173388686 26-FEB-11 2173465280 27-FEB-11
1 32 2173465280 27-FEB-11 2173499757 27-FEB-11
1 33 2173499757 27-FEB-11 2173527280 27-FEB-11
1 34 2173527280 27-FEB-11 2173530545 27-FEB-11
BS Key Size Device Type Elapsed Time Completion Time
2298 205.39M DISK 00:00:45 28-FEB-11
BP Key: 2301 Status: AVAILABLE Compressed: YES Tag: TAG20110228T061620
Piece Name: /mnt/rman_202/pnetproy/al_pres_12m5pc9l_1_1
List of Archived Logs in backup set 2298
Thrd Seq Low SCN Low Time Next SCN Next Time
1 30 2173380316 26-FEB-11 2173388686 26-FEB-11
1 31 2173388686 26-FEB-11 2173465280 27-FEB-11
1 32 2173465280 27-FEB-11 2173499757 27-FEB-11
1 33 2173499757 27-FEB-11 2173527280 27-FEB-11
1 34 2173527280 27-FEB-11 2173530545 27-FEB-11
1 35 2173530545 27-FEB-11 2173589000 28-FEB-11
1 36 2173589000 28-FEB-11 2173592018 28-FEB-11
BS Key Size Device Type Elapsed Time Completion Time
2546 180.29M DISK 00:00:39 01-MAR-11
BP Key: 2549 Status: AVAILABLE Compressed: YES Tag: TAG20110301T061533
Piece Name: /mnt/rman_202/pnetproy/al_pres_15m63to5_1_1
List of Archived Logs in backup set 2546
Thrd Seq Low SCN Low Time Next SCN Next Time
1 32 2173465280 27-FEB-11 2173499757 27-FEB-11
1 33 2173499757 27-FEB-11 2173527280 27-FEB-11
1 34 2173527280 27-FEB-11 2173530545 27-FEB-11
1 35 2173530545 27-FEB-11 2173589000 28-FEB-11
1 36 2173589000 28-FEB-11 2173592018 28-FEB-11
1 37 2173592018 28-FEB-11 2173671730 01-MAR-11
1 38 2173671730 01-MAR-11 2173674751 01-MAR-11
BS Key Size Device Type Elapsed Time Completion Time
2801 85.40M DISK 00:00:19 02-MAR-11
BP Key: 2804 Status: AVAILABLE Compressed: YES Tag: TAG20110302T061613
Piece Name: /mnt/rman_202/pnetproy/al_pres_18m66i5d_1_1
List of Archived Logs in backup set 2801
Thrd Seq Low SCN Low Time Next SCN Next Time
1 36 2173589000 28-FEB-11 2173592018 28-FEB-11
1 37 2173592018 28-FEB-11 2173671730 01-MAR-11
1 38 2173671730 01-MAR-11 2173674751 01-MAR-11
1 39 2173674751 01-MAR-11 2173736248 02-MAR-11
1 40 2173736248 02-MAR-11 2173739307 02-MAR-11
BS Key Size Device Type Elapsed Time Completion Time
3058 137.93M DISK 00:00:30 03-MAR-11
BP Key: 3061 Status: AVAILABLE Compressed: YES Tag: TAG20110303T061548
Piece Name: /mnt/rman_202/pnetproy/al_pres_1bm696gk_1_1
List of Archived Logs in backup set 3058
Thrd Seq Low SCN Low Time Next SCN Next Time
1 38 2173671730 01-MAR-11 2173674751 01-MAR-11
1 39 2173674751 01-MAR-11 2173736248 02-MAR-11
1 40 2173736248 02-MAR-11 2173739307 02-MAR-11
1 41 2173739307 02-MAR-11 2173784198 02-MAR-11
1 42 2173784198 02-MAR-11 2173816111 03-MAR-11
1 43 2173816111 03-MAR-11 2173819171 03-MAR-11
BS Key Size Device Type Elapsed Time Completion Time
3324 138.96M DISK 00:00:31 04-MAR-11
BP Key: 3327 Status: AVAILABLE Compressed: YES Tag: TAG20110304T061559
Piece Name: /mnt/rman_202/pnetproy/al_pres_1em6bqsv_1_1
List of Archived Logs in backup set 3324
Thrd Seq Low SCN Low Time Next SCN Next Time
1 40 2173736248 02-MAR-11 2173739307 02-MAR-11
1 41 2173739307 02-MAR-11 2173784198 02-MAR-11
1 42 2173784198 02-MAR-11 2173816111 03-MAR-11
1 43 2173816111 03-MAR-11 2173819171 03-MAR-11
1 44 2173819171 03-MAR-11 2173882472 04-MAR-11
1 45 2173882472 04-MAR-11 2173885557 04-MAR-11
BS Key Size Device Type Elapsed Time Completion Time
3597 178.07M DISK 00:00:39 05-MAR-11
BP Key: 3600 Status: AVAILABLE Compressed: YES Tag: TAG20110305T061543
Piece Name: /mnt/rman_202/pnetproy/al_pres_1hm6ef8f_1_1
List of Archived Logs in backup set 3597
Thrd Seq Low SCN Low Time Next SCN Next Time
1 41 2173739307 02-MAR-11 2173784198 02-MAR-11
1 42 2173784198 02-MAR-11 2173816111 03-MAR-11
1 43 2173816111 03-MAR-11 2173819171 03-MAR-11
1 44 2173819171 03-MAR-11 2173882472 04-MAR-11
1 45 2173882472 04-MAR-11 2173885557 04-MAR-11
1 46 2173885557 04-MAR-11 2173947612 05-MAR-11
1 47 2173947612 05-MAR-11 2173951657 05-MAR-11
BS Key Size Device Type Elapsed Time Completion Time
3835 198.44M DISK 00:00:43 06-MAR-11
BP Key: 3838 Status: AVAILABLE Compressed: YES Tag: TAG20110306T061548
Piece Name: /mnt/rman_202/pnetproy/al_pres_1km6h3kk_1_1
List of Archived Logs in backup set 3835
Thrd Seq Low SCN Low Time Next SCN Next Time
1 45 2173882472 04-MAR-11 2173885557 04-MAR-11
1 46 2173885557 04-MAR-11 2173947612 05-MAR-11
1 47 2173947612 05-MAR-11 2173951657 05-MAR-11
1 48 2173951657 05-MAR-11 2174026607 06-MAR-11
1 49 2174026607 06-MAR-11 2174062014 06-MAR-11
1 50 2174062014 06-MAR-11 2174087203 06-MAR-11
1 51 2174087203 06-MAR-11 2174090299 06-MAR-11
BS Key Size Device Type Elapsed Time Completion Time
4131 185.94M DISK 00:00:40 07-MAR-11
BP Key: 4134 Status: AVAILABLE Compressed: YES Tag: TAG20110307T061546
Piece Name: /mnt/rman_202/pnetproy/al_pres_1nm6jo0i_1_1
List of Archived Logs in backup set 4131
Thrd Seq Low SCN Low Time Next SCN Next Time
1 47 2173947612 05-MAR-11 2173951657 05-MAR-11
1 48 2173951657 05-MAR-11 2174026607 06-MAR-11
1 49 2174026607 06-MAR-11 2174062014 06-MAR-11
1 50 2174062014 06-MAR-11 2174087203 06-MAR-11
1 51 2174087203 06-MAR-11 2174090299 06-MAR-11
1 52 2174090299 06-MAR-11 2174147018 07-MAR-11
1 53 2174147018 07-MAR-11 2174149955 07-MAR-11
BS Key Size Device Type Elapsed Time Completion Time
4435 161.37M DISK 00:00:35 08-MAR-11
BP Key: 4438 Status: AVAILABLE Compressed: YES Tag: TAG20110308T061540
Piece Name: /mnt/rman_202/pnetproy/al_pres_1qm6mccc_1_1
List of Archived Logs in backup set 4435
Thrd Seq Low SCN Low Time Next SCN Next Time
1 49 2174026607 06-MAR-11 2174062014 06-MAR-11
1 50 2174062014 06-MAR-11 2174087203 06-MAR-11
1 51 2174087203 06-MAR-11 2174090299 06-MAR-11
1 52 2174090299 06-MAR-11 2174147018 07-MAR-11
1 53 2174147018 07-MAR-11 2174149955 07-MAR-11
1 54 2174149955 07-MAR-11 2174239915 08-MAR-11
1 55 2174239915 08-MAR-11 2174242816 08-MAR-11
BS Key Size Device Type Elapsed Time Completion Time
4745 79.24M DISK 00:00:18 09-MAR-11
BP Key: 4748 Status: AVAILABLE Compressed: YES Tag: TAG20110309T061555
Piece Name: /mnt/rman_202/pnetproy/al_pres_1tm6p0os_1_1
List of Archived Logs in backup set 4745
Thrd Seq Low SCN Low Time Next SCN Next Time
1 53 2174147018 07-MAR-11 2174149955 07-MAR-11
1 54 2174149955 07-MAR-11 2174239915 08-MAR-11
1 55 2174239915 08-MAR-11 2174242816 08-MAR-11
1 56 2174242816 08-MAR-11 2174304682 09-MAR-11
1 57 2174304682 09-MAR-11 2174307679 09-MAR-11
BS Key Size Device Type Elapsed Time Completion Time
5270 135.13M DISK 00:00:31 10-MAR-11
BP Key: 5273 Status: AVAILABLE Compressed: YES Tag: TAG20110310T061603
Piece Name: /mnt/rman_202/pnetproy/al_proy_20m6rl53_1_1
List of Archived Logs in backup set 5270
Thrd Seq Low SCN Low Time Next SCN Next Time
1 55 2174239915 08-MAR-11 2174242816 08-MAR-11
1 56 2174242816 08-MAR-11 2174304682 09-MAR-11
1 57 2174304682 09-MAR-11 2174307679 09-MAR-11
1 58 2174307679 09-MAR-11 2174353241 09-MAR-11
1 59 2174353241 09-MAR-11 2174384330 10-MAR-11
1 60 2174384330 10-MAR-11 2174387259 10-MAR-11
RMAN>
For example the backups of archivelog from Feb 21st will never be deleted unless I force the delete.
I'd like to understand why it happens :-)
Thanks a lot,
Regards,
Diego. -
Report obsolete returns diff results when backups are UNAVAIL vs AVAIL
Hello from Nova Scotia, Canada:
I'm wondering if someone out there who lives and breaths rman (10gR2) for a living can shed some light...
We are finding that report obsolete (as well as delete obsolete) are returning different results depending on if our backups
are AVAILABLE or UNAVAILABLE.
In our shop, our backups are changed to UNAVAILABLE because they get moved to a different location later, but delete
obsolete doesn't seem to work as expected unless the backups are AVAILABLE.
I am pasting some output below to demonstrate my point. Basically, in the output you are about to see, I'm showing you
my retention policy and I'm listing the backups that I have (and you can see their status is "A" for available). Then I do a
'report obsolete' command to show you what is considered obsolete (3 files are - which is what I expected). Then I change
all my backups to unavailable. Then I list all my backups again and show you that their status has changed to "U" for unavailable.
Then I do 'report obsolete' again and as you can see, I get different results! Can someone explain this to me?? I have RTFManuals
and no where does it say that availability is a factor that can impact determining what is obsolete. You also see in the output
below what version we're using (10.2.0.4.0) and that we are using a recovery catalog.
If someone would like to see additional information, feel free to ask, I'm more than happy to help you help me.
I should also mention this is a 2 node rac on linux.
Many Thanks.
========================================================
$ rman target / catalog rrc/rg@RRC
Recovery Manager: Release 10.2.0.4.0 - Production on Tue May 11 22:06:21 2010
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: IPCSD (DBID=1703825384)
connected to recovery catalog database
RMAN> show retention policy;
RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 1 DAYS;
RMAN> list backup summary;
List of Backups
===============
Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
64093 B F A DISK 05/10/2010 03:06:52 2 1 NO HOTBKUP201005100300_DB
64122 B A A DISK 05/10/2010 03:08:41 1 1 NO HOTBKUP201005100300_ARCHLOGS
64361 B F A DISK 05/10/2010 21:56:33 2 1 NO HOTBKUP201005102149_DB
64362 B F A DISK 05/10/2010 21:56:37 1 1 NO HOTBKUP201005102149_DB
64390 B A A DISK 05/10/2010 21:58:02 1 1 NO HOTBKUP201005102149_ARCHLOGS
64508 B F A DISK 05/11/2010 03:07:01 2 1 NO HOTBKUP201005110300_DB
64509 B F A DISK 05/11/2010 03:07:10 1 1 NO HOTBKUP201005110300_DB
64544 B A A DISK 05/11/2010 03:07:47 1 1 NO HOTBKUP201005110300_ARCHLOGS
RMAN> report obsolete;
RMAN retention policy will be applied to the command
RMAN retention policy is set to recovery window of 1 days
Report of obsolete backups and copies
Type Key Completion Time Filename/Handle
Backup Set 64093 05/10/2010 03:06:51
Backup Piece 64097 05/10/2010 03:06:51 /oracle_admin/rman_backups/201005100300/RMAN_HOTBKUP_IPCSD_201005100300_BS_1349_PC_2_CP_1_DB
Backup Set 64093 05/10/2010 03:04:01
Backup Piece 64096 05/10/2010 03:04:01 /oracle_admin/rman_backups/201005100300/RMAN_HOTBKUP_IPCSD_201005100300_BS_1349_PC_1_CP_1_DB
Backup Set 64122 05/10/2010 03:08:41
Backup Piece 64125 05/10/2010 03:08:41 /oracle_admin/rman_backups/201005100300/RMAN_HOTBKUP_IPCSD_201005100300_BS_1351_PC_1_CP_1_ARCHLOGS
RMAN> change backup unavailable;
changed backup piece unavailable
backup piece handle=/oracle_admin/rman_backups/201005100300/RMAN_HOTBKUP_IPCSD_201005100300_BS_1349_PC_1_CP_1_DB recid=1533 stamp=718599624
changed backup piece unavailable
backup piece handle=/oracle_admin/rman_backups/201005100300/RMAN_HOTBKUP_IPCSD_201005100300_BS_1349_PC_2_CP_1_DB recid=1534 stamp=718599846
changed backup piece unavailable
backup piece handle=/oracle_admin/rman_backups/201005100300/RMAN_HOTBKUP_IPCSD_201005100300_BS_1351_PC_1_CP_1_ARCHLOGS recid=1536 stamp=718600043
changed backup piece unavailable
backup piece handle=/oracle_admin/rman_backups/201005102149/RMAN_HOTBKUP_IPCSD_201005102149_BS_1354_PC_1_CP_1_DB recid=1539 stamp=718667376
changed backup piece unavailable
backup piece handle=/oracle_admin/rman_backups/201005102149/RMAN_HOTBKUP_IPCSD_201005102149_BS_1354_PC_2_CP_1_DB recid=1540 stamp=718667600
changed backup piece unavailable
backup piece handle=/oracle_admin/rman_backups/201005102149/RMAN_HOTBKUP_IPCSD_201005102149_BS_1355_PC_1_CP_1_DB recid=1541 stamp=718667797
changed backup piece unavailable
backup piece handle=/oracle_admin/rman_backups/201005102149/RMAN_HOTBKUP_IPCSD_201005102149_BS_1356_PC_1_CP_1_ARCHLOGS recid=1542 stamp=718667821
changed backup piece unavailable
backup piece handle=/oracle_admin/rman_backups/201005110300/RMAN_HOTBKUP_IPCSD_201005110300_BS_1357_PC_1_CP_1_DB recid=1543 stamp=718686020
changed backup piece unavailable
backup piece handle=/oracle_admin/rman_backups/201005110300/RMAN_HOTBKUP_IPCSD_201005110300_BS_1357_PC_2_CP_1_DB recid=1544 stamp=718686253
changed backup piece unavailable
backup piece handle=/oracle_admin/rman_backups/201005110300/RMAN_HOTBKUP_IPCSD_201005110300_BS_1358_PC_1_CP_1_DB recid=1545 stamp=718686430
changed backup piece unavailable
backup piece handle=/oracle_admin/rman_backups/201005110300/RMAN_HOTBKUP_IPCSD_201005110300_BS_1359_PC_1_CP_1_ARCHLOGS recid=1546 stamp=718686452
Changed 11 objects to UNAVAILABLE status
RMAN> list backup summary;
List of Backups
===============
Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
64093 B F U DISK 05/10/2010 03:06:52 2 1 NO HOTBKUP201005100300_DB
64122 B A U DISK 05/10/2010 03:08:41 1 1 NO HOTBKUP201005100300_ARCHLOGS
64361 B F U DISK 05/10/2010 21:56:33 2 1 NO HOTBKUP201005102149_DB
64362 B F U DISK 05/10/2010 21:56:37 1 1 NO HOTBKUP201005102149_DB
64390 B A U DISK 05/10/2010 21:58:02 1 1 NO HOTBKUP201005102149_ARCHLOGS
64508 B F U DISK 05/11/2010 03:07:01 2 1 NO HOTBKUP201005110300_DB
64509 B F U DISK 05/11/2010 03:07:10 1 1 NO HOTBKUP201005110300_DB
64544 B A U DISK 05/11/2010 03:07:47 1 1 NO HOTBKUP201005110300_ARCHLOGS
RMAN> report obsolete;
RMAN retention policy will be applied to the command
RMAN retention policy is set to recovery window of 1 days
Report of obsolete backups and copies
Type Key Completion Time Filename/Handle
Backup Set 64362 05/10/2010 21:56:37
Backup Piece 64366 05/10/2010 21:56:37 /oracle_admin/rman_backups/201005102149/RMAN_HOTBKUP_IPCSD_201005102149_BS_1355_PC_1_CP_1_DB
RMAN>I just want to point out that the one obsolete file just contains a Control File and a SPFILE, as shown below:
BS Key Type LV Size Device Type Elapsed Time Completion Time
64362 Full 17.64M DISK 00:00:02 05/10/2010 21:56:37
BP Key: 64366 Status: UNAVAILABLE Compressed: NO Tag: HOTBKUP201005102149_DB
Piece Name: /oracle_admin/rman_backups/201005102149/RMAN_HOTBKUP_IPCSD_201005102149_BS_1355_PC_1_CP_1_DB
Control File Included: Ckp SCN: 15213106404 Ckp time: 05/10/2010 21:56:35
SPFILE Included: Modification time: 05/09/2010 18:00:42---------------
**** END *****
Edited by: user478914 on May 12, 2010 3:03 AM
Edited by: user478914 on May 12, 2010 3:24 AMThanks for reading my post. Here is the result of doing the crosscheck command.
Problem still exists. Someone correct me if I'm wrong but I believe crosscheck does
nothing because all my backups are listed as unavailable, so there is nothing for it to do.
Any other thoughts or suggestions?
This problem is driving me bonkers. I have read the Backup and Recovery Basic Guide and Advanced Guide,
googled the web, searched OTN, searched Metalink and I can't find anything on the topic of backup
piece availability affecting obsolescence. Many thanks.
RMAN> list backup summary;
List of Backups
===============
Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
64361 B F U DISK 05/10/2010 21:56:33 2 1 NO HOTBKUP201005102149_DB
64362 B F U DISK 05/10/2010 21:56:37 1 1 NO HOTBKUP201005102149_DB
64390 B A U DISK 05/10/2010 21:58:02 1 1 NO HOTBKUP201005102149_ARCHLOGS
64508 B F U DISK 05/11/2010 03:07:01 2 1 NO HOTBKUP201005110300_DB
64509 B F U DISK 05/11/2010 03:07:10 1 1 NO HOTBKUP201005110300_DB
64544 B A U DISK 05/11/2010 03:07:47 1 1 NO HOTBKUP201005110300_ARCHLOGS
64761 B F U DISK 05/12/2010 03:06:23 2 1 NO HOTBKUP201005120300_DB
64762 B F U DISK 05/12/2010 03:06:30 1 1 NO HOTBKUP201005120300_DB
64792 B A U DISK 05/12/2010 03:08:13 1 1 NO HOTBKUP201005120300_ARCHLOGS
RMAN> crosscheck backup;
using channel ORA_DISK_1
RMAN> report obsolete recovery window of 1 days;
Report of obsolete backups and copies
Type Key Completion Time Filename/Handle
Backup Set 64362 05/10/2010 21:56:37
Backup Piece 64366 05/10/2010 21:56:37 /oracle_admin/rman_backups/201005102149/RMAN_HOTBKUP_IPCSD_201005102149_BS_1355_PC_1_CP_1_DB
Backup Set 64509 05/11/2010 03:07:10
Backup Piece 64520 05/11/2010 03:07:10 /oracle_admin/rman_backups/201005110300/RMAN_HOTBKUP_IPCSD_201005110300_BS_1358_PC_1_CP_1_DB
RMAN> -
RMAN-05556: not all datafiles have backups that can be recovered to SCN
Oracle 11.2.0.2 SE-One
Oracle Linux 5.6 x86-64
Weekly refresh of a test db from prod, using rman DUPLICATE DATABASE, failed with “RMAN-05556: not all datafiles have backups that can be recovered to SCN”
Background Summary:
Weekly inc 0 backup of production starts on Sunday at 0100, normally completes around 1050. Includes backups of archivelogs
Another backup of just archivelogs runs on Sunday at 1200, normally completes NLT 1201.
On the test server, the refresh job starts on Sunday at 1325. In the past this script used a set until time \"to_date('`date +%Y-%m-%d` 11:55:00','YYYY-MM-DD hh24:mi:ss')\"; -- hard-coded for ‘today at 11:55’.
For a variety of reasons I decided to replace this semi-hard coding of the UNTIL with a value determined by querying the rman catalog, getting the completion time of the inc 0 backup. This tested out just fine in my vbox lab, even when I deliberately drove some updates and log switches during the period the backup was running. But the first time to go live I got the above reported error.
Details:
The key part of the inc 0 backup is this (run from a shell script)
export BACKUP_LOC=/u01/backup/dbprod
$ORACLE_HOME/bin/rman target=/ catalog rman/***@rmcat<<EOF
configure backup optimization on;
configure default device type to disk;
configure retention policy to recovery window of 2 days;
crosscheck backup;
crosscheck archivelog all;
delete noprompt force obsolete;
delete noprompt force expired backup;
delete noprompt force expired archivelog all;
configure controlfile autobackup on;
configure controlfile autobackup format for device type disk to '$BACKUP_LOC/%d_%F_ctl.backup';
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '$BACKUP_LOC/%U.rman' MAXPIECESIZE 4096 M;
sql "alter system archive log current";
show all;
backup as compressed backupset archivelog all delete all input format "$BACKUP_LOC/%U.alog";
backup as compressed backupset incremental level 0 database tag tag_dbprod;
sql "alter system archive log current";
backup as compressed backupset archivelog all delete all input format "$BACKUP_LOC/%U.alog";
list recoverable backup;
EOF
The archivelog-only backup (runs at noon) looks like this:
export BACKUP_LOC=/u01/backup/dbprod
$ORACLE_HOME/bin/rman target=/ catalog rman/***@rmcat<<EOF
configure backup optimization on;
configure default device type to disk;
configure retention policy to recovery window of 2 days;
crosscheck backup;
crosscheck archivelog all;
delete noprompt force obsolete;
delete noprompt force expired backup;
delete noprompt force expired archivelog all;
configure controlfile autobackup on;
configure controlfile autobackup format for device type disk to '$BACKUP_LOC/%d_%F_ctl.backup';
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '$BACKUP_LOC/%U.rman' MAXPIECESIZE 4096 M;
sql "alter system archive log current";
show all;
backup as compressed backupset archivelog all delete all input format "$BACKUP_LOC/%U.alog";
list recoverable backup;
EOF
And the original refresh looked like this:
>> a step to ftp the backups from the prod server to the test server, and some other housekeeping <<, then
cd /backup/dbtest
echo "connect catalog rman/***@rmcat" > /backup/dbtest/dbtest_refresh.rman
echo "connect target sys/*******@dbprod" >> /backup/dbtest/dbtest_refresh.rman
echo "connect auxiliary /" >> /backup/dbtest/dbtest_refresh.rman
echo "run {" >> /backup/dbtest/dbtest_refresh.rman
echo "set until time \"to_date('`date +%Y-%m-%d` 11:55:00','YYYY-MM-DD hh24:mi:ss')\";" >> /backup/dbtest/dbtest_refresh.rman
echo "duplicate target database to DBTEST;" >> /backup/dbtest/dbtest_refresh.rman
echo "}" >> /backup/dbtest/dbtest_refresh.rman
So, my mod to the refresh was
bkup_point=`sqlplus -s rman/***@rmcat <<EOF1
set echo off verify off feedback off head off pages 0 trimsp on
select to_char(max(completion_time),'yyyy-mm-dd hh24:mi:ss')
from rc_backup_set_details
where db_name='DBPROD'
and backup_type='D'
and incremental_level=0
exit
EOF1`
cd /backup/dbtest
echo "connect catalog rman/***@rmcat" > /backup/dbtest/dbtest_refresh.rman
echo "connect target sys/*******@dbprod" >> /backup/dbtest/dbtest_refresh.rman
echo "connect auxiliary /" >> /backup/dbtest/dbtest_refresh.rman
echo "run {" >> /backup/dbtest/dbtest_refresh.rman
echo "set until time \"to_date('${bkup_point}','YYYY-MM-DD hh24:mi:ss')\";" >> /backup/dbtest/dbtest_refresh.rman
echo "duplicate target database to DBTEST;" >> /backup/dbtest/dbtest_refresh.rman
echo "}" >> /backup/dbtest/dbtest_refresh.rman
Now the fun begins.
First, an echo in the refresh script confirmed the ‘bkup_point’:
=======================================================
We will restore to 2013-08-25 10:41:38
=======================================================
Internally, rman reset the ‘until’ as follows:
executing command: SET until clause
Starting Duplicate Db at 25-Aug-2013 15:35:44
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=162 device type=DISK
contents of Memory Script:
set until scn 45633141350;
Examining the result of LIST BACKUP (the last step of all of my rman scripts) the full backup shows this:
BS Key Type LV Size Device Type Elapsed Time Completion Time
5506664 Full 61.89M DISK 00:00:03 25-Aug-2013 02:11:32
BP Key: 5506678 Status: AVAILABLE Compressed: NO Tag: TAG20130825T021129
Piece Name: /u01/backup/dbprod/DBPROD_c-3960114099-20130825-00_ctl.backup
SPFILE Included: Modification time: 24-Aug-2013 22:33:08
SPFILE db_unique_name: DBPROD
Control File Included: Ckp SCN: 45628880455 Ckp time: 25-Aug-2013 02:11:29
BS Key Type LV Size Device Type Elapsed Time Completion Time
5507388 Incr 0 206.03G DISK 08:30:00 25-Aug-2013 10:41:30
List of Datafiles in backup set 5507388
File LV Type Ckp SCN Ckp Time Name
1 0 Incr 45628880495 25-Aug-2013 02:11:38 +SMALL/dbprod/datafile/system.258.713574775
>>>>>>>>> snip lengthy list <<<<<<<<<
74 0 Incr 45628880495 25-Aug-2013 02:11:38 +SMALL/dbprod/event_i2.dbf
Backup Set Copy #1 of backup set 5507388
Device Type Elapsed Time Completion Time Compressed Tag
DISK 08:30:00 25-Aug-2013 10:41:36 YES TAG_DBPROD
List of Backup Pieces for backup set 5507388 Copy #1
BP Key Pc# Status Piece Name
5507391 1 AVAILABLE /u01/backup/dbprod/eeoi55iq_1_1.rman
>>>>>>>>>>>>> snip lengthy list <<<<<<<<<<<
5507442 52 AVAILABLE /u01/backup/dbprod/eeoi55iq_52_1.rman
Notice the slight difference in time between what is reported in the LIST BACKUP and what was reported by my query to the catalog.
Continuing with the backup list, the second archivelog backup in the script generated six backupsets. The fifth set showed:
BS Key Size Device Type Elapsed Time Completion Time
5507687 650.19M DISK 00:02:18 25-Aug-2013 10:54:53
BP Key: 5507694 Status: AVAILABLE Compressed: YES Tag: TAG20130825T104156
Piece Name: /u01/backup/dbprod/ekoi643j_1_1.alog
List of Archived Logs in backup set 5507687
Thrd Seq Low SCN Low Time Next SCN Next Time
1 1338518 45632944587 25-Aug-2013 05:58:18 45632947563 25-Aug-2013 05:58:20
>>>>>>>>>>>>> snip lengthy list <<<<<<<<<<<
1 1338572 45633135750 25-Aug-2013 10:08:21 45633140240 25-Aug-2013 10:08:24
1 1338573 45633140240 25-Aug-2013 10:08:24 45633141350 25-Aug-2013 10:30:06
1 1338574 45633141350 25-Aug-2013 10:30:06 45633141705 25-Aug-2013 10:41:51
1 1338575 45633141705 25-Aug-2013 10:41:51 45633141725 25-Aug-2013 10:41:55
Notice the availability of the archivelogs including the referenced scn.
Investigation of the ftp portion of the refresh script confirmed that all backup pieces were copied from the prod server.
So what am I overlooking? Having reverted back to the original script to get the refresh completed,HemantKChitale wrote:
So, technically, you only need the database and archivelogs backed up by the database script and not the noon run of the archivelog backup.
backup as compressed backupset archivelog all delete all input format "$BACKUP_LOC/%U.alog";
backup as compressed backupset incremental level 0 database tag tag_dbprod;
sql "alter system archive log current";
backup as compressed backupset archivelog all delete all input format "$BACKUP_LOC/%U.alog";
Yet, why does backupset 5 of the noon archivelog backup show archivelogs from 10:30 to 10:40 if they had been deleted by the database backup script which has a delete input ? It is as if the database backup script did NOT delete the archivelogs and the noon run was the one to backup the archivelogs (again ?)
No, that is from the morning full backup. Note the 'Completion Time" of 25-Aug-2013 10:54:53
However, the error message seems to point to a datafile. Why would reverting the recovery point to 11:55 make a difference, I wonder.
As do I.
Also puzzling to me are the times associated with the completion of the backups. I don't recall ever having to scrutinize a backup listing this closely so I'm sure it's just a matter of filling in some gaps in my understanding, but I noticed this. The backup report (list backup;) shows this for the inc 0 backup:
BS Key Type LV Size
Device Type Elapsed Time Completion Time
5507388 Incr 0 206.03G
DISK
08:30:00
25-Aug-2013 10:41:30 ------- NOTE THE COMPLETION TIME ----
List of Datafiles in backup set 5507388
File LV Type Ckp SCN
Ckp Time
Name
1
0 Incr 45628880495 25-Aug-2013 02:11:38 +SMALL/dbprod/datafile/system.258.713574775
------ SNIP ------
74 0 Incr 45628880495 25-Aug-2013 02:11:38 +SMALL/dbprod/event_i2.dbf
Backup Set Copy #1 of backup set 5507388
Device Type Elapsed Time Completion Time
Compressed Tag
DISK
08:30:00
25-Aug-2013 10:41:36 YES
TAG_DBPROD ------- NOTE THE COMPLETION TIME ----
List of Backup Pieces for backup set 5507388 Copy #1
BP Key Pc# Status
Piece Name
5507391 1 AVAILABLE /u01/backup/dbprod/eeoi55iq_1_1.rman
------ SNIP ------
5507442 52 AVAILABLE /u01/backup/dbprod/eeoi55iq_52_1.rman
Then the autobackup of the control file immediatly following:
BS Key Type LV Size
Device Type Elapsed Time Completion Time
5507523 Full
61.89M
DISK
00:00:03
25-Aug-2013 10:41:47 ------- NOTE THE COMPLETION TIME ----
BP Key: 5507587 Status: AVAILABLE Compressed: NO Tag: TAG20130825T104144
Piece Name: /u01/backup/dbprod/DBPROD_c-3960114099-20130825-01_ctl.backup
SPFILE Included: Modification time: 25-Aug-2013 05:57:15
SPFILE db_unique_name: DBPROD
Control File Included: Ckp SCN: 45633141671 Ckp time: 25-Aug-2013 10:41:44
Then the archivelog backup immediately following (remember, this created a total of 5 backupset, I'm showing number 4)
BS Key Size
Device Type Elapsed Time Completion Time
5507687 650.19M
DISK
00:02:18
25-Aug-2013 10:54:53 ------- NOTE THE COMPLETION TIME ----
BP Key: 5507694 Status: AVAILABLE Compressed: YES Tag: TAG20130825T104156
Piece Name: /u01/backup/dbprod/ekoi643j_1_1.alog
List of Archived Logs in backup set 5507687
Thrd Seq
Low SCN
Low Time
Next SCN Next Time
1
1338518 45632944587 25-Aug-2013 05:58:18 45632947563 25-Aug-2013 05:58:20
------ SNIP ------
1
1338572 45633135750 25-Aug-2013 10:08:21 45633140240 25-Aug-2013 10:08:24
1
1338573 45633140240 25-Aug-2013 10:08:24 45633141350 25-Aug-2013 10:30:06
1
1338574 45633141350 25-Aug-2013 10:30:06 45633141705 25-Aug-2013 10:41:51
1
1338575 45633141705 25-Aug-2013 10:41:51 45633141725 25-Aug-2013 10:41:55
and the controlfile autobackup immediately following:
BS Key Type LV Size
Device Type Elapsed Time Completion Time
5507984 Full
61.89M
DISK
00:00:03
25-Aug-2013 10:55:07 ------- NOTE THE COMPLETION TIME ----
BP Key: 5508043 Status: AVAILABLE Compressed: NO Tag: TAG20130825T105504
Piece Name: /u01/backup/dbprod/DBPROD_c-3960114099-20130825-02_ctl.backup
SPFILE Included: Modification time: 25-Aug-2013 05:57:15
SPFILE db_unique_name: DBPROD
Control File Included: Ckp SCN: 45633142131 Ckp time: 25-Aug-2013 10:55:04
and yet, querying the rman catalog
SQL> select to_char(max(completion_time),'yyyy-mm-dd hh24:mi:ss')
2 from rc_backup_set_details
3 where db_name='DBPROD'
4 and backup_type='D'
5 and incremental_level=0
6 ;
TO_CHAR(MAX(COMPLET
2013-08-25 10:41:38
SQL>
which doesn't match (to the second) the completion time of either the full backup or the associated controlfile autobackp.
Hemant K Chitale
I hope this posts in a readable, understandable manner. I really struggeled with the 'enhanced editor', which I normally use. When I pasted in blocks from the rman report, it kept trying to make some sort of table structure out of it .... guess I'll have to follow that up with a question in the Community forum .... -
Difference in o/p in CROSSCHECK & RESTORE ARCHIVELOG VALIDATE
hi,
i m planning to restore and recovery from a backup(full hot Level 0) taken between '24.05.2012 11:41:00' AND '24.05.2012 12:03:07'; But when i run the crosscheck and restore archivelog validate there seems to be an extra archivelog backup piece reported in restore archivelog validate command.
Also there was 2 backups taken on same day but different time
LEVEL 0 ======> between '24.05.2012 11:41:00' AND '24.05.2012 12:03:07'
LEVEL 1 CUMMULATIVE =======> between '24.05.2012 12:29:46' AND '24.05.2012 12:35:59'
below the difference in o/p when i run the crosscheck and restore archivelog validate
CROSSCHECK BACKUP OF ARCHIVELOG ALL command :
RMAN> ALLOCATE CHANNEL FOR MAINTENANCE DEVICE TYPE sbt;
allocated channel: ORA_MAINT_SBT_TAPE_1
channel ORA_MAINT_SBT_TAPE_1: sid=1859 devtype=SBT_TAPE
channel ORA_MAINT_SBT_TAPE_1: Veritas NetBackup for Oracle - Release 7.0 (2010010419)
RMAN> sql "alter session set nls_date_format = ''dd.mm.yyyy hh24:mi:ss''";
sql statement: alter session set nls_date_format = ''dd.mm.yyyy hh24:mi:ss''
RMAN> CROSSCHECK BACKUP OF ARCHIVELOG ALL DEVICE TYPE sbt completed between '24.05.2012 11:41:00' AND '24.05.2012 12:03:07';
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=PRTUXDB_al_0dnbphae_1_1 RECID=10 STAMP=784123214
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=PRTUXDB_al_0cnbphae_1_1 RECID=11 STAMP=784123214
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=PRTUXDB_al_0fnbphae_1_1 RECID=12 STAMP=784123214
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=PRTUXDB_al_0enbphae_1_1 RECID=13 STAMP=784123214
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=PRTUXDB_al_0bnbphae_1_1 RECID=14 STAMP=784123214
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=PRTUXDB_al_0anbphae_1_1 RECID=15 STAMP=784123214
Crosschecked 6 objectsRestore archive log validate command :
[oratux@DMXCK5 ~]$ rman target / nocatalog
Recovery Manager: Release 11.2.0.3.0 - Production on Fri May 25 08:16:08 2012
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: PRTUXDB (DBID=329945109)
using target database control file instead of recovery catalog
RMAN> run {
allocate channel t1 type 'SBT_TAPE';
restore archivelog UNTIL TIME "TO_DATE('24.05.2012 12:03:07','dd.mm.yyyy hh24:mi:ss')" validate;
release channel t1;
2> 3> 4> 5>
allocated channel: t1
channel t1: SID=35 device type=SBT_TAPE
channel t1: Veritas NetBackup for Oracle - Release 7.0 (2010010419)
Starting restore at 25-MAY-12
channel t1: starting validation of archived log backup set
channel t1: reading from backup piece PRTUXDB_al_0dnbphae_1_1
channel t1: piece handle=PRTUXDB_al_0dnbphae_1_1 tag=PRIMARY_HOT_DB_BK_LEVEL0
channel t1: restored backup piece 1
channel t1: validation complete, elapsed time: 00:01:15
channel t1: starting validation of archived log backup set
channel t1: reading from backup piece PRTUXDB_al_0cnbphae_1_1
channel t1: piece handle=PRTUXDB_al_0cnbphae_1_1 tag=PRIMARY_HOT_DB_BK_LEVEL0
channel t1: restored backup piece 1
channel t1: validation complete, elapsed time: 00:01:15
channel t1: starting validation of archived log backup set
channel t1: reading from backup piece PRTUXDB_al_0fnbphae_1_1
channel t1: piece handle=PRTUXDB_al_0fnbphae_1_1 tag=PRIMARY_HOT_DB_BK_LEVEL0
channel t1: restored backup piece 1
channel t1: validation complete, elapsed time: 00:01:15
channel t1: starting validation of archived log backup set
channel t1: reading from backup piece PRTUXDB_al_0enbphae_1_1
channel t1: piece handle=PRTUXDB_al_0enbphae_1_1 tag=PRIMARY_HOT_DB_BK_LEVEL0
channel t1: restored backup piece 1
channel t1: validation complete, elapsed time: 00:01:15
channel t1: starting validation of archived log backup set
channel t1: reading from backup piece PRTUXDB_al_0bnbphae_1_1
channel t1: piece handle=PRTUXDB_al_0bnbphae_1_1 tag=PRIMARY_HOT_DB_BK_LEVEL0
channel t1: restored backup piece 1
channel t1: validation complete, elapsed time: 00:01:25
channel t1: starting validation of archived log backup set
channel t1: reading from backup piece PRTUXDB_al_0anbphae_1_1
channel t1: piece handle=PRTUXDB_al_0anbphae_1_1 tag=PRIMARY_HOT_DB_BK_LEVEL0
channel t1: restored backup piece 1
channel t1: validation complete, elapsed time: 00:01:15
channel t1: starting validation of archived log backup set
channel t1: reading from backup piece PRTUXDB_al_0qnbpj8c_1_1
channel t1: piece handle=PRTUXDB_al_0qnbpj8c_1_1 tag=HOT_DB_BK_LEVEL1
channel t1: restored backup piece 1
channel t1: validation complete, elapsed time: 00:01:05
Finished restore at 25-MAY-12
released channel: t1As you can see one extra archivelog backup piece is reported and that too from HOT_DB_BK_LEVEL1(LEVEL 1 CUMMULATIVE BACKUP) which was between '24.05.2012 12:29:46' AND '24.05.2012 12:35:59'.
I m afraid if i execute the real restore command it will apply this extra archivelog from LEVEL 1 CUMMULATIVE BACKUPYes that is true,but my question is when i run crosscheck i have all the required archivelogs availiable (6 archivelogs) but when i execute restore archivelog validate why it give (6+1) archivelogs why not only those 6 from LEVEL 0 hot backup
i have clearly specified UNTIL TIME "TO_DATE('24.05.2012 12:03:07','dd.mm.yyyy hh24:mi:ss')" in restore archivelog validate but still it also give me extra archive log backup piece from LEVEL 1 backup taken way after TO_DATE('24.05.2012 12:03:07','dd.mm.yyyy hh24:mi:ss').
Maybe you are looking for
-
How many simultaneous users can a CAP3503E AP accomodate
Hello, I am doing right now a site survey using CAP3502E (downgrade to autonomous). I have a certain section with 12 users and the client wants 5 users per AP. Can the CAP3502E accomodaet 12 users at a time? Thanks,
-
F110 issue with multiple users - unable to create DME output
Hi I have an issue, when i have multiple users executing F110 using the payment programs for DME output. program SAPPAYM that when a user tries to create DME output, that nothing is created. it is as if the first person who creates a payment proposal
-
EXIF camera metadata in filmstrip
Hi, I'm working on macro insect photography, and I used to find it really useful to be able to hover my cursor over an image in the filmstrip and see the aperture, shutter speed and ISO pop up. It was great to be able to see at a glance what sort of
-
How do I get the iMac to display thumbnails and not an icon of jpeg photos?
Hi folks, I just purchased my first Mac, an Imac. I was browsing through a folder, using Finder, containing photos files from my latest trip. Under Windows, I used to tell Windows Explorer to show thumbnails of the photos. How do I get the iMac and F
-
Display Arabic Character in NetScape Navigator
Hi I am using Oracle Forms & Reports 10g R2. I call a report through a button in that report there are English and Arabic Character. When i see report in Netscape Navigator 9 English character show fine but Arabic Character does not showing properly.