Home » RDBMS Server » Backup & Recovery » Confusion of Archive log generation and RMAN backup (Oracle 11gR2, 11.2.01.0, RHEL 5.0)
Confusion of Archive log generation and RMAN backup [message #487442] Mon, 27 December 2010 02:12 Go to next message
jimit_shaili
Messages: 237
Registered: June 2006
Location: India, Ahmedabad
Senior Member
Dear Friends

I've configure two destination's for my archive log file. One of them is mandatory and the other one is optional.
I'm taking backup of archive log files through my following RMAN script. While taking backup i switch the current
redo log file for consistancy and during backup i used 'delete input' which should delete the backed up archive log
files.During script it generates new archive log, but it is not generated on both the location. So please guide me
why it is not generating new archive log on both locaitons? Here below are my try and rman scripts.


SQL> show parameter log_archive_dest_1

NAME                                 TYPE        VALUE
------------------------------------ ----------- ---------------------------------------------------------------------------------
log_archive_dest_1                   string      location=/ora11gsoft/odb/flash_recovery_area/wbdata/archivedata/ mandatory reopen

SQL> show parameter log_archive_dest_2

NAME                                 TYPE        VALUE
------------------------------------ ----------- ----------------------------------------------------------------------------------
log_archive_dest_2                   string      location=/multiplex/wbdata/archivedata/ optional


Position of archive logs on mandatory location before backup
[oracle1@WBH-DB1 ~]$ ll -ltrh /ora11gsoft/odb/flash_recovery_area/wbdata/archivedata/
total 4.0K
-rw-r----- 1 oracle1 oinstall 1.5K Dec 27 12:45 ARCH_1_194_738686968.arc


Position of archive logs on optional location before backup
[oracle1@WBH-DB1 ~]$ ll -ltrh /multiplex/wbdata/archivedata/
total 16K
-rw-r----- 1 oracle1 oinstall 14K Dec 27 12:45 ARCH_1_193_738686968.arc


Connect to RMAN with Catalog datbase and create scripts for backup
RMAN> #Allocation all channel
replace script allocate_channel {
allocate channel d11 type disk maxpiecesize 2g;
allocate channel d12 type disk maxpiecesize 2g;
allocate channel d13 type disk maxpiecesize 2g;
}

replaced script allocate_channel

RMAN> # Releases all channels
replace script release_channel {
release channel d11;
release channel d12;
release channel d13;
}

replaced script release_channel

RMAN> # Back up the archived log files.
replace script backup_archivelog {
sql 'alter system archive log current';
execute script allocate_channel;
backup
filesperset 20
format '$BACKUP_DIR/rman_ARC_%d.%U.bak'
(archivelog all delete input);
execute script release_channel;
}

replaced script backup_archivelog

RMAN> run {
execute script backup_archivelog;
}

executing script: backup_archivelog

sql statement: alter system archive log current

executing script: allocate_channel

allocated channel: d11
channel d11: SID=136 device type=DISK

allocated channel: d12
channel d12: SID=10 device type=DISK

allocated channel: d13
channel d13: SID=137 device type=DISK

Starting backup at 27-DEC-10
current log archived
channel d11: starting archived log backup set
channel d11: specifying archived log(s) in backup set
input archived log thread=1 sequence=193 RECID=374 STAMP=738852312
input archived log thread=1 sequence=194 RECID=375 STAMP=738852315
channel d11: starting piece 1 at 27-DEC-10
channel d12: starting archived log backup set
channel d12: specifying archived log(s) in backup set
input archived log thread=1 sequence=195 RECID=377 STAMP=738853191
channel d12: starting piece 1 at 27-DEC-10
channel d13: starting archived log backup set
channel d13: specifying archived log(s) in backup set
input archived log thread=1 sequence=196 RECID=380 STAMP=738853193
channel d13: starting piece 1 at 27-DEC-10
channel d11: finished piece 1 at 27-DEC-10
piece handle=/backup/wbdata/rman/rman_ARC_WBDATA.52m0k0aa_1_1.bak tag=TAG20101227T125954 comment=NONE
channel d11: backup set complete, elapsed time: 00:00:01
channel d11: deleting archived log(s)
archived log file name=/multiplex/wbdata/archivedata/ARCH_1_193_738686968.arc RECID=374 STAMP=738852312
archived log file name=/ora11gsoft/odb/flash_recovery_area/wbdata/archivedata/ARCH_1_194_738686968.arc RECID=375 STAMP=738852315
channel d12: finished piece 1 at 27-DEC-10
piece handle=/backup/wbdata/rman/rman_ARC_WBDATA.53m0k0aa_1_1.bak tag=TAG20101227T125954 comment=NONE
channel d12: backup set complete, elapsed time: 00:00:02
channel d12: deleting archived log(s)
archived log file name=/ora11gsoft/odb/flash_recovery_area/wbdata/archivedata/ARCH_1_195_738686968.arc RECID=377 STAMP=738853191
channel d13: finished piece 1 at 27-DEC-10
piece handle=/backup/wbdata/rman/rman_ARC_WBDATA.54m0k0ab_1_1.bak tag=TAG20101227T125954 comment=NONE
channel d13: backup set complete, elapsed time: 00:00:01
channel d13: deleting archived log(s)
archived log file name=/multiplex/wbdata/archivedata/ARCH_1_196_738686968.arc RECID=380 STAMP=738853193
Finished backup at 27-DEC-10

executing script: release_channel

released channel: d11

released channel: d12

released channel: d13


Position of archive log files after backup on mandatory location
[oracle1@WBH-DB1 ~]$ ll -ltrh /ora11gsoft/odb/flash_recovery_area/wbdata/archivedata/
total 4.0K
-rw-r----- 1 oracle1 oinstall 1.0K Dec 27 12:59 ARCH_1_196_738686968.arc


Position of archive log files after backup on optional location
[oracle1@WBH-DB1 ~]$ ll -ltrh /multiplex/wbdata/archivedata/
total 1.1M
-rw-r----- 1 oracle1 oinstall 1.1M Dec 27 12:59 ARCH_1_195_738686968.arc


Here during rman backup archive serial no 195 and 196 generated.
Why it is not generated on both the location.

Regards

Jimit
Re: Confusion of Archive log generation and RMAN backup [message #487444 is a reply to message #487442] Mon, 27 December 2010 02:17 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Anything in alert.log file?

Regards
Michel
Re: Confusion of Archive log generation and RMAN backup [message #487446 is a reply to message #487444] Mon, 27 December 2010 02:34 Go to previous messageGo to next message
jimit_shaili
Messages: 237
Registered: June 2006
Location: India, Ahmedabad
Senior Member
Dear Michel

Here is my output of alert.log file.
Mon Dec 27 12:59:50 2010
ALTER SYSTEM ARCHIVE LOG
Mon Dec 27 12:59:50 2010
[b]Thread 1 cannot allocate new log, sequence 196[/b]
Private strand flush not complete
  Current log# 3 seq# 195 mem# 0: /ora11gdb/odb/OH1/oradata/wbdata/redo03a.log
  Current log# 3 seq# 195 mem# 1: /multiplex/wbdata/redolog/redo03b.log
Thread 1 advanced to log sequence 196 (LGWR switch)
  Current log# 1 seq# 196 mem# 0: /ora11gdb/odb/OH1/oradata/wbdata/redo01a.log
  Current log# 1 seq# 196 mem# 1: /multiplex/wbdata/redolog/redo01b.log
Archived Log entry 377 added for thread 1 sequence 195 ID 0xab4b4bb8 dest 1:
Archived Log entry 378 added for thread 1 sequence 195 ID 0xab4b4bb8 dest 2:
ALTER SYSTEM ARCHIVE LOG
Thread 1 advanced to log sequence 197 (LGWR switch)
  Current log# 2 seq# 197 mem# 0: /ora11gdb/odb/OH1/oradata/wbdata/redo02a.log
  Current log# 2 seq# 197 mem# 1: /multiplex/wbdata/redolog/redo02b.log
Archived Log entry 379 added for thread 1 sequence 196 ID 0xab4b4bb8 dest 1:
Archived Log entry 380 added for thread 1 sequence 196 ID 0xab4b4bb8 dest 2:
Mon Dec 27 12:59:55 2010
Expanded controlfile section 13 from 111 to 879 records
Requested to grow by 768 records; added 35 blocks of records


Regards

Jimit
Re: Confusion of Archive log generation and RMAN backup [message #487447 is a reply to message #487446] Mon, 27 December 2010 03:06 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
Perhaps they are being created, but not deleted. Try

(ARCHIVELOG ALL DELETE ALL INPUT);
Re: Confusion of Archive log generation and RMAN backup [message #487448 is a reply to message #487446] Mon, 27 December 2010 03:24 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
The alert.log shows they have been created in both destinations.

The message
Thread 1 cannot allocate new log, sequence 196
has nothing to do with your current issue. It means you have to create more log groups and/or improve DBWR performances.

Regards
Michel
Re: Confusion of Archive log generation and RMAN backup [message #487449 is a reply to message #487447] Mon, 27 December 2010 03:55 Go to previous messageGo to next message
jimit_shaili
Messages: 237
Registered: June 2006
Location: India, Ahmedabad
Senior Member
Dear Michel

Bull's eye. Your suggestion works perfectly i've checked it.
Position of archivelog file before backup is 196 on mandatory location and 195 on optional location. During backup it generates two new archive 197 and 198. It takes backup of all(including 197 and 198) and delete all.
I've one more question about the deletion of archivelog files,
Take a case that i'm taking incremental level 0 backup on every monday with (archivelog all) option. It's work fine for monday.
On tuesday i'm taking incremental level 2 backup with (archivelog all) option again. It is backups all archivelog generated during whole as well as previous day(monday) also. It means it is duplicating the archivelogs of monday.(which has been already backed up on monday night backup.) Please suggest me what should be done for avoiding such a duplication of archive backup. Is there anything such as incremental archivelog backup or i need to configure archivelog deletion policy.

Regards

Jimit
Re: Confusion of Archive log generation and RMAN backup [message #487453 is a reply to message #487449] Mon, 27 December 2010 04:49 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
RMAN backs up only what is needed to achieve the retention policy you gave.
If you have a retention policy of redundancy 1, I don't think it will back up the archiveg logs twice.

Regards
Michel
Re: Confusion of Archive log generation and RMAN backup [message #487454 is a reply to message #487453] Mon, 27 December 2010 05:24 Go to previous messageGo to next message
jimit_shaili
Messages: 237
Registered: June 2006
Location: India, Ahmedabad
Senior Member
Dear Michel

I've override the retention policy of redundancy 1 to recovery window of 14 days by following settings.
RMAN> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 14 DAYS;


Is because of above, it is duplicating the archivelogs in incremental backup?

Regards

Jimit
Re: Confusion of Archive log generation and RMAN backup [message #487456 is a reply to message #487454] Mon, 27 December 2010 05:53 Go to previous message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
I think so.

Regards
Michel
Previous Topic: backups and DBID
Next Topic: Recovery ....
Goto Forum:
  


Current Time: Fri Mar 29 02:07:28 CDT 2024