Backup & Recovery :: How To Get All Archive Logs In Backup Piece
Nov 8, 2008
Is there any way I can get all the archive log files present in a backup piece. I tried following but it always gives me all the log files for each piece:
****
SQL> select s.set_stamp, s.set_count, s.PIECES, s.backup_type,
s.controlfile_included from v$backup_set s, v$backup_piece p where
s.set_stamp=p.set_stamp and s.set_count=p.set_count and
p.handle='5mjv4do0_1_1';
We have a nightly rman backup that was complete and clean.The backup contains a Data File, Control File and a backup Archive Log file.The database server crashed with all the subsequent archive logs lost.
We are trying to recover from the three backup files.We are bumping into the backup piece missing as all the archive logs are done. how to restore with the exising backup files. the lost archive logs are probably salvageable.
We are doing RMAN Duplicate set until time to refresh daily our test database for our developers and it taking long time to finish. We noticed on the restore log that RMAN was using a day old old backup pieces to refresh the test database and don't immediately use the latest backup pieces instead.
For additional details here's the rman duplicate command we are using which we run daily(mon-sat) at 4am once daily full backup on production completed.
RMAN Duplicate commands: run { set until time "to_date(to_char(sysdate,'Mon DD YYYY') || ' 04:00:00', 'Mon DD YYYY HH24:MI:SS')"; allocate auxiliary channel ch1 type disk; duplicate target database to testdb; } exit
Is there a way on how to let RMAN use the latest backup pieces instead?
I am trying to clone a database on another server with different direcory structure. So that path on the source db server are /u04 whereas on on target db server it would be /u03.
Since this I am testing it on small database initially I have kept all datafiles, backup and archivelogs at /u04 and /u03 on the source and target db servers respectively Now I have copied the backups from source db server to target and since path is changed, I cataloged it
However during restore I am getting
Quote:ORA-19870: error reading backup
Here are the session details
RMAN> catalog start with '/u03/oradata/db7fra'; searching for all files that match the pattern /u03/oradata/db7fra List of Files Unknown to the Database ===================================== File Name: /u03/oradata/db7fra/DB7/archivelog/2011_03_15/o1_mf_1_16_6qyvpb3w_.arc File Name: /u03/oradata/db7fra/DB7/backupset/2011_03_15/o1_mf_annnn_TAG20110315T123018_6qypyv5v_.bkp
[code].....
I have altered permissions on the backup files as well but of no use
oracle@dev-biz:/u03/oradata/db7fra/DB7/backupset/2011_03_15 $ls -ltr total 545260 -rwxrwxrwx 1 oracle dba 12419072 Mar 15 13:52 o1_mf_ncsnf_TAG20110315T123008_6qypyrz2_.bkp -rwxrwxrwx 1 oracle dba 3072 Mar 15 13:52 o1_mf_annnn_TAG20110315T125043_6qyr54to_.bkp -rwxrwxrwx 1 oracle dba 426496 Mar 15 13:52 o1_mf_annnn_TAG20110315T125006_6qyr3zk4_.bkp -rwxrwxrwx 1 oracle dba 14336 Mar 15 13:52 o1_mf_annnn_TAG20110315T123018_6qypyv5v_.bkp
I set 'maxopenfiles 4' when allocating channel to sbt in my products env, I got 2 backup pieces in one backup set because that tablespace has 7 datafiles. Other configuration is kept as default, such as no maxsize, no MAXPIECESIZE, and etc setting.
I read document from Oracle. It says:"By default a backup set contains one backup piece. To restrict the size of each backup piece, specify the MAXPIECESIZE option of the CONFIGURE CHANNEL or ALLOCATE CHANNEL commands. " And also, maxopenfiles configure does not force another backup piece generated. So, why do I get another backup piece?
BTW, I tried this on another testing environment. I only get one backup piece even there are more than 2 times maxopnefiles datafiles.
Backup entire database, without archived logs, while the database is open for user activity and also This backup should be the base for an incremental backup strategy.
Actually, i have test database open in read only and i want to apply archive files carry from production database at daily level. When i'm going for recovery, since database is already in consistent state, it is not asking for recovery.
I had a production db with archive logging enabled
SQL> select name,status 2 from v$archived_log;
NAME STATUS ---------------------------------------- - D:ORACLEARCHIVE_ORCL11_13.DBF A D:ORACLEARCHIVE_ORCL11_14.DBF A D:ORACLEARCHIVE_ORCL11_15.DBF A
[code]...
So i need to restore archivelogs by using sequence
RMAN>RESTORE ARCHIVELOG FROM SEQUENCE 20 UNTIL SEQUENCE 28; So the restore is completed successfully So its very hard to monitor archivelog files i feel i should have included all archivelog files while taking RMAN backup
RMAN >backup database plus archivelog all delete input;
but the problem is my RMAN backup is already 360GB in size and it takes 4-5 hrs to complete .so i need to schedule RMAN backup at one time (e.g sunday) ,delete the archivelog files older than sundayand now schedule the archivelog backup at another day (e.g wed &sat)
my question is where i have to change my script to backup all avaialbe archivelog files if old archivelog files are deleted at os level?
RMAN> run { 2> allocate channel c1 type disk; 3> sql 'alter system archive log current'; 4> backup archivelog all format 'D:oracleackuplog_t%t_s%s_p%p' delete input; 5> release channel c1; 6> }
My supervisor wants to remove all the archivelogs since it was just a test for 1 year the DB is not actually YET been used. Problem is they want it to be used as soon as possible w/o recreating again the database and just removing some data on tables and removed archive logs. how to safely removed the existing archived logs and create a full backup with archived fresh to sequence 1.
We are using the following commands to take hot backup of our RAC database. Hot backup is fired by "backup" user on Linux system.
======================= rman target / nocatalog <<EOF CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '$backup_dir/$date/%F'; run { allocate channel oem_backup_disk1 type disk format '$backup_dir/$date/%U'; #--Switch archive logs for all threads [code]...... ======================= Due to which after command (used 2 times) "sql 'alter system archive log current';" I see the following lines in alert log 2 times. Because of this all the online logs are not getting archived (Missing 2 logs per day), the backup taken is unusable when restoring. I am worried about this. I there any to avoid this situation. ======================= Errors in file /u01/oracle/admin/rac/udump/rac1_ora_3546.trc: ORA-19504: failed to create file "+DATA/rac/1_32309_632680691.dbf" ORA-17502: ksfdcre:4 Failed to create file +DATA/rac/1_32309_632680691.dbf ORA-15055: unable to connect to ASM instance ORA-01031: insufficient privileges =======================
We are trying to restore a database to a cold backup DBID.However while our datafiles were backuped up for 6 months retention we found out subsequent delete obsolete command wiped out the Control file related to this backup piece..Now what is left with this backup piece is just datafiles..
Can we still recover the database with a subsequent controlfile autobackup for the same DBID.?
I trying to backup archive logs using rman in standby database. I'm able to backup archive logs using simple command it get's successfully completed. rman > BACKUP ARCHIVELOG ALL When i'm trying to do with keep command it's getting failed.I'm trying to do on physical standby databaseBACKUP ARCHIVELOG ALL KEEP UNTIL TIME 'SYSDATE+100' TAG = 'TEST'.
I'm using database 11g & restore backup from another location.
RMAN> RESTORE CONTROLFILE FROM '/u01/RMAN/forstandby_0acekubq_1_1'; RMAN> catalog start with '/u01/RMAN/'; RMAN> restore database; channel ORA_DISK_1: reading from backup piece /u01/RMAN/forstandby_09ceku8r_1_1 channel ORA_DISK_1: ORA-19870: error while restoring backup piece /u01/RMAN/forstandby_09ceku8r_1_1 ORA-19599: block number 782 is corrupt in backup piece /u01/RMAN/forstandby_09ceku8r_1_1
failover to previous backup
RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of restore command at 10/23/2012 19:24:11 RMAN-06026: some targets not found - aborting restore RMAN-06023: no backup or copy of datafile 4 found to restore RMAN-06023: no backup or copy of datafile 3 found to restore RMAN-06023: no backup or copy of datafile 2 found to restore RMAN-06023: no backup or copy of datafile 1 found to restore
There is a archive log backupset,and the backup set contains many archive log file,and now i want extract to a directory,how can i do?
BS Key Size Device Type Elapsed Time Completion Time ------- ---------- ----------- ------------ --------------- 3 86.20M DISK 00:00:21 02-JUN-12 BP Key: 3 Status: AVAILABLE Compressed: NO Tag: TAG20120602T113622 Piece Name: /u02/rman_bak/20120602/archive_log_t784899382_s4_p1
There is an incident that in production database 1000 archive log files generated.From 1000 files, 100 archive log files have been removed.When i take incremental backup next day , what will happen in database?
Starting restore at 18-AUG-11 released channel: c1 RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of restore command at 08/18/2011 09:20:21 RMAN-06004: ORACLE error from recovery catalog database: RMAN-20242: specification does not match any archive log in the recovery catalog
changing archive mode during DB running.Before in 9.2, 'ALTER SYSTEM ARCHIVE LOG START/STOP' is available for this job. But, after 10g/11g, it cause 'archive log stop has been deprecated'.
However, for my practice, I need to estimate archived logs size before backup them, so I need to stop archive log for a while and enable it later during DB running.
I check Oracle documents, it only mentions changing archive log mode at DB mounted but not open.
this my f drive space is full so i want to change this my archive destination to my another g drive so how can i do this.and if i change this my archive destination does its affect any problem while recover my database in future.
I have 2 seperate rman backup one backup is of only datafile ,spfile and controlfile which i am able to restore and recover without any problem say bkp1 taken at 10 am
other set of backup is of only archive log files of same day but later time than datafile backup say bkp2 taken at 8pm...if i restore and recover bkp1 and try to restore bkp2 it gives error datafile exist (possibly due to fact both backup have control file)
if i just restore bkp1 and try to restore bkp2 so that i can do one recover at time it gives error datafile permission issue (possibly due to fact both backup have control file)
I want to restore database upto 8pm time how can i use both bkp1 and bkp2 to do it(restore datafiles and apply all archive logs on it)
I have Oracle 10gR2 database on a windows server, I have scheduled rman backup for this database from Solaris server
set echo onrun { crosscheck archivelog all; backup check logical database plus archivelog; delete noprompt obsolete device type DISK; } exit;
It is deleting the obsolete backup pieces but it is not deleting old archive logs (obsolete archive logs) and it is not even showing old archives as obsolete when I check thru report obsolete