Backup archive log with delete all input clause
Our database is 10.2.0.3 RAC db and database server is window 2003.
Our RMAN catalog db was down for a couple of weeks. During this two weeks period we use control file instead. But when I compare the log files before using control file and after going back to catalog db I found the following differences. I also pasted backup script below. It looks like that after we reuse the catalog db it is able to delete all archive logs as soon as it is backed up. The only change I can think of is one of the archive log destination is changed from F:\archive to G:\archive. This db has a physical standby db which is not up to date. Can you help me to figure out why this differences in the backup process since I am kind of worried if we bring the standby db up to date we will not be able to ship the archive log since they are deleted from the backup process. Thank you so much for your help. Shirley
10> resync catalog;
11> #change archivelog all crosscheck;
12> crosscheck archivelog all;
13>
14> #Backup Database and archive log files.
15> backup as compressed backupset
16> incremental level 0 format 'F:\backup\%d_LVL0_%T_%u_s%s_p%p' filesperset 5 tag 'INDRAC'
17> database plus archivelog format 'F:\backup\%d_LVL0_%T_%u_s%s_p%p'
18> filesperset 10 tag 'INDRAC'
19> delete all input;
Before using control file:
channel ORA_DISK_2: finished piece 1 at 24-MAY-08
piece handle=F:\BACKUP\PRODRAC_LVL0_20080524_04JH7588_S41988_P1 tag=INDRAC comment=NONE
channel ORA_DISK_2: backup set complete, elapsed time: 00:04:17
RMAN-08137: WARNING: archive log not deleted as it is still needed
archive log filename=F:\ARCHIVE\PRODRAC_004_04966_0575926036.ARC thread=4 sequence=4966
RMAN-08137: WARNING: archive log not deleted as it is still needed
archive log filename=E:\ARCHIVE\PRODRAC_004_04966_0575926036.ARC thread=4 sequence=4966
RMAN-08137: WARNING: archive log not deleted as it is still needed
archive log filename=F:\ARCHIVE\PRODRAC_004_04967_0575926036.ARC thread=4 sequence=4967
RMAN-08137: WARNING: archive log not deleted as it is still needed
archive log filename=E:\ARCHIVE\PRODRAC_004_04967_0575926036.ARC thread=4 sequence=4967
After went back to catalog:
channel ORA_DISK_2: backup set complete, elapsed time: 00:02:47
channel ORA_DISK_2: deleting archive log(s)
archive log filename=G:\ARCHIVE\PRODRAC_004_05760_0575926036.ARC recid=51689 stamp=660017344
archive log filename=E:\ARCHIVE\PRODRAC_004_05760_0575926036.ARC recid=51688 stamp=660017344
archive log filename=G:\ARCHIVE\PRODRAC_004_05761_0575926036.ARC recid=51697 stamp=660032069
archive log filename=E:\ARCHIVE\PRODRAC_004_05761_0575926036.ARC recid=51696 stamp=660032069
archive log filename=E:\ARCHIVE\PRODRAC_004_05762_0575926036.ARC recid=51704 stamp=660051690
archive log filename=G:\ARCHIVE\PRODRAC_004_05762_0575926036.ARC recid=51705 stamp=660051690
archive log filename=E:\ARCHIVE\PRODRAC_004_05763_0575926036.ARC recid=51710 stamp=660061718
archive log filename=G:\ARCHIVE\PRODRAC_004_05763_0575926036.ARC recid=51711 stamp=660061718
archive log filename=E:\ARCHIVE\PRODRAC_004_05764_0575926036.ARC recid=51716 stamp=660069980
archive log filename=G:\ARCHIVE\PRODRAC_004_05764_0575926036.ARC recid=51717 stamp=660069980
archive log filename=E:\ARCHIVE\PRODRAC_004_05765_0575926036.ARC recid=51720 stamp=660081117
archive log filename=G:\ARCHIVE\PRODRAC_004_05765_0575926036.ARC recid=51721 stamp=660081117
archive log filename=G:\ARCHIVE\PRODRAC_004_05766_0575926036.ARC recid=51723 stamp=660087215
archive log filename=E:\ARCHIVE\PRODRAC_004_05766_0575926036.ARC recid=51722 stamp=660087214
channel ORA_DISK_1: finished piece 1 at 14-JUL-08
piece handle=F:\BACKUP\PRODRAC_LVL0_20080714_1MJLG8GQ_S45110_P1 tag=INDRAC comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:04:43
Shirley,
If there was no change to the E: then the logs should have been kept (RMAN-8137) unless they were possibly aged out of the controlfile (unlikely since it defaults to 65K) or have been applied already. (The F: logs would have been marked as EXPIRED at the next crosscheck). Check to see which are EXPIRED:
RMAN> list expired archivelog all;
To see the earliest log:
select sequence# from v$log_history where rownum <2;
Have you checked the V$MANAGED_STANDBY to insure they were not already applied? Given that your latest rman log shows logs being deleted with no RMAN-8137 raised would indicate that they are not needed for the standby.
Similar Messages
-
Backup archivelog all delete all input
RMAN> backup archivelog all delete all input;
i have backed up all my archivelogs using the above command, but after the backup archivelogs are not deleted from its default location .ie my default archive location is '/oracle/archive' . After executing the above command, I can see all the archivelogs still available in that location. why is it so
Db:10.2.0
OS: solaris 10
Edited by: user13364377 on Aug 22, 2010 10:44 AM>
My control_file_record_keep_time is 7 days. My understanding is that when we specify the below command,
Rman>backup archivelog all delete all input;
rman will backup all the archive logs(one copy of each log sequece) from the archive location and then delete all the archive logs from the archive location. is it not correct?
>
That is generally right. But that assumes that RMAN knows about these archivelogfiles. It knows about them because of entries in the controlfile. If they are nolonger present - RMAN will not know them and not Backup & delete them.
Kind regards
Uwe Hesse
http://uhesse.wordpress.com -
RMAN-08138: WARNING: archived log not deleted - must create more backups
I ran:
1. CROSSCHECK ARCHIVELOG ALL
2. DELETE EXPIRED ARCHIVELOG ALL
I am getting this error. I am trying to free my arciver after an ORA-00257 error.
Can anyone help me out?Basically this error means you are trying to delete archivelogs still needed for recovery (according to your retention policy). Develop a strategy which backs up the archivelogs in regular intervals, after a successful backup delete the archivelogs from disk, for example:
backup archivelog all delete all input;
Werner -
RMAN9I HOW TO RESTORE ARCHIVE LOGS WITH LIMITED DISK SPACE
제품 : RMAN
작성날짜 : 2002-12-09
RMAN9I HOW TO RESTORE ARCHIVE LOGS WITH LIMITED DISK SPACE
==========================================================
PURPOSE
이 자료는 Oracle 9.2 이상의 RMAN에서 사용 가능한 MAXSIZE 기능에 대하여
설명할 것이다.
How to restore archive logs with limited disk space
Old Backup을 사용하여 RMAN으로 database를 recvoery할때, 모든 archived
redo logfile들을 Restore할 destination의 disk space가 모자란 경우를 종종 만난다.
이러한 경우 여러 개의 restore and recovery job으로 나누어 수행한다.
즉, 첫 번째 restore and recovery job이 끝나면 archived redo logfile들을 지우고
다음 적용될 것들을 restore한다. 그리고 다시 Recovery를 수행한다. 이러한 작업을
원하는 시점까지 recovery를 하기위해 반복적으로 수행한다.
Oracle 9iR2(9.2.0.x)부터 RMAN은 MAXSIZE option을 제공하는데 이것은 archive log
file이 restore될 disk의 space를 control할 수 있게 해 준다.
만약 disk space가 매우 제한적이라면, 즉 예를 들어 모든 archive log의 size 합보다
disk free space가 적다면 MAXSIZE option을 사용하는 것은 매우 유용하다.
이 OPTION이 기술되면 RMAN은 Media Manager에게 disk space 크기에 부합하는 만큼만
archive log들을 restore하도록 한다. 부가적인 restore operation들은 restore된
마지막 archive log가 적용될 때마다 발생한다.
MAXSIZE option은 이러한 작업들을 하나의 rman job으로 처리하게 해 주고
실수를 하지 않게 해 준다.
아래는 MAXSIZE를 설명하기 위한 예제이며 총 6 단계로 구성되어 있다.
STEP 1: Add data to the database to enforce log switches
STEP 2: Backup the database and archive logs and delete the logs
STEP 3: Add additional data to enforce new log switches
STEP 4: Remove the data file and simulate a database crash
STEP 5: Restore the data file from the backup
STEP 6: Recover the database using MAXSIZE
위 예제는 Unix와 Windows 모두에 적용될 수 있다.
STEP 6 는 다음과 같은 조건으로 두 번 수행될 것이다.
1) MAXSIZE가 archive log size보다 작은 경우:
이 경우 RMAN-6558 Error message를 만나게 된다.
그러므로 MAXSIZE를 archive log보다는 크게 설정해야한다.
2) MAXSIZE가 archive log size보다 큰 경우:
예를 들어 여러 개의 archive log를 포함할 수 있을 정도로 크게 설정하면
restore/recovery는 user에게 transparent하게 수행되어진다.
즉 archive log들은 restore된 후 applied되고 deleted되어 진다. 다시 새로운
archive log들이 restore되어지고 applied된 후 deleted 되어 진다. 이러한 작업은
recovery가 끝날 때까지 반복되어진다. 이러한 작업들이 진행되는 동안 RMAN은
아무런 Message도 발생시키지 않는다.
# Step 1: INSERT enough new data to generate log switches
create table rman_tst (col1 varchar2 (10));
begin
for i in 1..30000 loop
insert into rman_tst values(i,'test');
commit;
end loop;
end;
# Step 2: BACKUP the database and the archive logs automatically
# and then delete the input
run {
backup database format='/web01/usupport/krosenme/admin/backups/db_%d%s%t'
plus archivelog format='/web01/usupport/krosenme/admin/backups/arch_%d%s%t'
delete input;
# Step 3: INSERT enough new data to generate new log switches
begin
for i in 1..30000 loop
insert into rman_tst values(i,'test');
commit;
end loop;
end;
# Step 4: REMOVE users01.dbf file and crash the database
mv users01.dbf users01.org
shutdown abort
# Restore is now needed as the data file is deleted. The backup was
# taken before the new data was added to it, thus archive logs are
# needed to bring the database up to date
# Step 5: RESTORE the data file from the full backup
run {
restore datafile '/web01/usupport/krosenme/oradata/kro_920/users01.dbf';
# Step 6: RECOVER
run {
recover database delete archivelog maxsize 10 K;
# This will fail with RMAN-6558 as the archived log has a size of 16 KB,
# which is bigger than MAXSIZE limit of 10 KB. So the error is expected
# and MAXSIZE works as designed.
# Now rerunning STEP 6: but with MAXSIZE 50 K
run {
recover database delete archivelog maxsize 50 K;
RELATED DOCUMENTS
Recovery Manager Reference, Release 2 (9.2)cold backup means offline backup, you shut database normally and copy datafiles to another location.
i think operating system does not matter that much but it is RedHat Linux Enterprise Server.
backing up archivelogs whith rman script which is:
run {
allocate channel c1 type disk format '$BKUPLOC/arch_%d_%u_%s_%p.bkp';
change archivelog all validate;
sql 'ALTER SYSTEM ARCHIVE LOG CURRENT';
backup archivelog time between 'SYSDATE - (30*60/(60*60*24))' and 'sysdate';
release channel c1;
so here is the details.
1. because everything is lost, we restored all files(datafiles, controlfiles, redologs etc) from offline backup meaning copied all files from another location to corresponding location.
2. want to apply archive logs which were created after cold backup till disk failure and we have these archive logs with backups which were taken by rman.
So
first of all, we want to register these archive log rman backups(because these backup information does not exist in restored controlfile)
and then restore them and then apply them.
we need rman commands to register these backups and restore them.
Regards,
Kamil -
Full backup and backup archive logs
Hello,
today in the early morning i did backup of my db with :
RMAN> backup as COMPRESSED BACKUPSET DATABASE format '/backup/%d_t%t_s%s_p%p';This command created two files :
[oracle@p1 backup]$ ls -l
total 1132680
-rw-r----- 1 oracle oinstall 1155940352 Sep 14 00:44 TEST_t697508918_s5_p1
-rw-r----- 1 oracle oinstall 2785280 Sep 14 00:44 TEST_t697509873_s6_p1Did i backed up archive logs also with this command ?
If I did not, do i have to i n order to have everything to do complete resterer and recovery ?
Is now to late to backup them?Can you confirm that this backup will be placed in the FRA, it will backup all datafile, control files, spfile and control files all arhchivle logs and when backup finshes then will delete all archive logs ?+
after running that command yo can confirm it by yourself at RMAN prompt.
RMAN> list backup;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
200 Full 509.78M DISK 00:01:03 15-FEB-07
BP Key: 202 Status: AVAILABLE Compressed: NO Tag: TAG20070215T171219
Piece Name: /disk2/PROD/backupset/2007_02_15/o1_mf_nnndf_TAG20070215T171219_2xb17nbb_.bkp
List of Datafiles in backup set 200
File LV Type Ckp SCN Ckp Time Name
1 Full 421946 15-FEB-07 /disk1/oradata/prod/system01.dbf
2 Full 421946 15-FEB-07 /disk1/oradata/prod/sysaux01.dbf
3 Full 421946 15-FEB-07 /disk1/oradata/prod/undotbs01.dbf
4 Full 421946 15-FEB-07 /disk1/oradata/prod/cwmlite01.dbf
5 Full 421946 15-FEB-07 /disk1/oradata/prod/drsys01.dbf
6 Full 421946 15-FEB-07 /disk1/oradata/prod/example01.dbf
7 Full 421946 15-FEB-07 /disk1/oradata/prod/indx01.dbf
8 Full 421946 15-FEB-07 /disk1/oradata/prod/tools01.dbf
9 Full 421946 15-FEB-07 /disk1/oradata/prod/users01.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
201 Full 7.98M DISK 00:00:03 15-FEB-07
BP Key: 203 Status: AVAILABLE Compressed: NO Tag: TAG20070215T171219
Piece Name: /disk2/PROD/backupset/2007_02_15/o1_mf_ncsnf_TAG20070215T171219_2xb19prg_.bkp
SPFILE Included: Modification time: 15-FEB-07
SPFILE db_unique_name: PROD
Control File Included: Ckp SCN: 421968 Ckp time: 15-FEB-07
BS Key Size Device Type Elapsed Time Completion Time
227 30.50M SBT_TAPE 00:00:11 15-FEB-07
BP Key: 230 Status: AVAILABLE Compressed: NO Tag: TAG20070215T171334
Handle: 0bia4rtv_1_1 Media:
List of Archived Logs in backup set 227
Thrd Seq Low SCN Low Time Next SCN Next Time
1 5 389156 15-FEB-07 411006 15-FEB-07
1 6 411006 15-FEB-07 412972 15-FEB-07
1 7 412972 15-FEB-07 417086 15-FEB-07
1 8 417086 15-FEB-07 417114 15-FEB-07
1 9 417114 15-FEB-07 417853 15-FEB-07
1 10 417853 15-FEB-07 421698 15-FEB-07
1 11 421698 15-FEB-07 421988 15-FEB-07list backup will show you everything.
Would then this be incremental level 0 backup ?
yes by default i think so.
so with this i must be able to flasback my database at least 3 day in the past if i understood correctly.
But i am little puzled about purging those flasback data ...
Can you point me please to some link or tell how can i purge logs that are not need for that flashback period... ?
please read this link
http://download.oracle.com/docs/cd/B19306_01/backup.102/b14192/rpfbdb003.htm#sthref513
Khurram -
WARNING: archive log not deleted as it is still needed
Our Oralce Database is a single node database of version 10.1.0.
Dataguard/Standby is not configured.....we are executing the following command for archivelog backup
run
allocate channel c1 device type sbt;
backup archivelog all delete input;
This script is successfull in backingup all the archvied log files however it is not deleteing the input files. Instead it gives the warning....
"WARNING: archive log not deleted as it is still needed"
What could be the problem?If you do a Metalink seach on "WARNING: archive log not deleted as it is still needed." you'll find a couple of documents that explain the issue.
The short answer is that RMAN has backed up logs which have not yet shipped to standby, so it won't delete them, cause they're still needed till they're successfully shipped to standby.
-Mark -
Need a shell script to backup archive log daily
Hi All,
We need a shell script to backup the archive logs daily after shutting down the concurrent manager and once the backup is completed, needs to start the concurrent manager through the script itself, if you have any ideas or sample scripts, please provide and help us.
The objective is to backup the daily archive logs with out any loss of data.
Thanks,I do not have a similar script to share, sorry. However, you may review the following links/notes:
Note: 137181.1 - RMAN Backup Shell Script Example
https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=137181.1
Recovery Manager (RMAN) Manuals
http://www.oracle.com/pls/db102/homepage -
Current archive log got deleted, how to recover using previous archive log?
Hi
My current log sequence #819 and it is got deleted and no choice to get it back and I have previous archived logs with sequences #814 to 818.
When I starting my database it is showing that use 'MUST USE RESETLOGS OR NORESETLOGS option for database open then I used the command
SQL> ALTER DATABASE OPEN RESETLOGS;
ALTER DATABASE OPEN RESETLOGS
ERROR at line 1:
ORA-01113: file 1 needs media recovery
ORA-01110: data file 1: 'E:\APP\ADMINISTRATOR\ORADATA\ORCL\SYSTEM01.DBF'
SQL> alter database recover;
alter database recover
ERROR at line 1:
ORA-00283: recovery session canceled due to errors
ORA-01610: recovery using the BACKUP CONTROLFILE option must be done
SQL> alter database recover using backup controlfile;
alter database recover using backup controlfile
ERROR at line 1:
ORA-00279: change 8433746 generated at 01/15/2013 19:51:59 needed for thread 1
ORA-00289: suggestion :
E:\APP\ADMINISTRATOR\FLASH_RECOVERY_AREA\ORCL\ARCHIVELOG\2013_01_16\O1_MF_1_819_
%U_.ARC
ORA-00280: change 8433746 for thread 1 is in sequence #819
now I don't have the archive log with sequence 819, I have recover from 818. please tell me how to do it?You probably should post to the correct forum too: Recovery Manager (RMAN)
cheers -
Backup archive logs problem using RMAN
Hi guys
I got failure when using RMAN to backup archive log files:
Starting backup at 20-APR-06
current log archived
released channel: c1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 04/20/2006 21:53:57
RMAN-06059: expected archived log not found, lost of archived log compromises recoverability
ORA-19625: error identifying file /opt/oracle/flash_recovery_area/DB10G/archivelog/2006_03_17/o1_mf_1_1_21p5c251_.arc
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
RMAN> **end-of-file**
My archive log files location:
SQL> show parameter log_archive_dest
NAME TYPE VALUE
log_archive_dest_1 string LOCATION=/opt/oracle/oradata/DB10G/arch/
Current archive log files:
$ ls /opt/oracle/oradata/DB10G/arch
1_17_586191737.dbf 1_21_586191737.dbf 1_25_586191737.dbf 1_29_586191737.dbf 1_33_586191737.dbf
1_18_586191737.dbf 1_22_586191737.dbf 1_26_586191737.dbf 1_30_586191737.dbf 1_34_586191737.dbf
1_19_586191737.dbf 1_23_586191737.dbf 1_27_586191737.dbf 1_31_586191737.dbf 1_35_586191737.dbf
1_20_586191737.dbf 1_24_586191737.dbf 1_28_586191737.dbf 1_32_586191737.dbf afiedt.buf
$
But when I check v$archived_log:
SQL> select name,status,deleted from v$archived_log;
NAME S DEL
D YES
D YES
D YES
D YES
D YES
D YES
D YES
D YES
D YES
D YES
D YES
/opt/oracle/flash_recovery_area/DB10G/archivelog/2006_03_17/ A NO
/opt/oracle/flash_recovery_area/DB10G/archivelog/2006_03_18/ A NO
/opt/oracle/flash_recovery_area/DB10G/archivelog/2006_03_19/ A NO
/opt/oracle/oradata/DB10G/redo01.log A NO
/opt/oracle/oradata/DB10G/redo02.log A NO
/opt/oracle/oradata/DB10G/redo03.log A NO
/opt/oracle/oradata/DB10G/arch/1_5_585926175.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_6_585926175.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_7_585926175.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_1_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_2_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_3_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_4_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_5_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_6_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_7_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_8_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_9_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_10_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_11_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_12_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_13_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_14_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_15_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_16_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_17_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_18_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_19_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_20_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_21_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_22_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_23_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_24_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_25_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_26_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_27_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_28_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_29_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_30_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_31_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_32_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_33_586191737.dbf A NO
/opt/oracle/oradata/DB10G/arch/1_34_586191737.dbf A NO
More records than actual archived logs. How could it happen? How to solve?
THanks in advance.
SharonHi,
Use
RMAN>crosscheck archivelog all; cmd -
How to restore archive logs with rman
Hi,
here is the scenario:
we have lost everything because of disk failure.
we have a full cold backup and archivelog backups which were created after cold backup and were backed up with rman.
after restoring from cold backup, because archivelog backups do not exist in controlfile, how can we catalog archivelog backups and restore them?
could you give me the exact rman command for this?
Best Regards,
Kamilcold backup means offline backup, you shut database normally and copy datafiles to another location.
i think operating system does not matter that much but it is RedHat Linux Enterprise Server.
backing up archivelogs whith rman script which is:
run {
allocate channel c1 type disk format '$BKUPLOC/arch_%d_%u_%s_%p.bkp';
change archivelog all validate;
sql 'ALTER SYSTEM ARCHIVE LOG CURRENT';
backup archivelog time between 'SYSDATE - (30*60/(60*60*24))' and 'sysdate';
release channel c1;
so here is the details.
1. because everything is lost, we restored all files(datafiles, controlfiles, redologs etc) from offline backup meaning copied all files from another location to corresponding location.
2. want to apply archive logs which were created after cold backup till disk failure and we have these archive logs with backups which were taken by rman.
So
first of all, we want to register these archive log rman backups(because these backup information does not exist in restored controlfile)
and then restore them and then apply them.
we need rman commands to register these backups and restore them.
Regards,
Kamil -
RMAN-08120: WARNING: archived log not deleted, not yet applied by standby
i get RMAN-08120: WARNING: archived log not deleted, not yet applied by standby on primary
but when i run below query i get the same result from primary and standby
SQL> select max(sequence#) from v$archived_log;
MAX(SEQUENCE#)
44051
SQL>
standby is one log switch behind only!i get RMAN-08120: WARNING: archived log not deleted, not yet applied by standby on primary You already have answer by post of Mseberg.
but when i run below query i get the same result from primary and standby
SQL> select max(sequence#) from v$archived_log;
MAX(SEQUENCE#)
44051
SQL>
standby is one log switch behind only!this is wrong query used on primary & standby. even if any one of archive gap available lets suppose sequence *44020* , this archive not transported to standby due to some network problem and so on. later if archives from *44021* all the archives transported on standby upto *44051* , then it shows the maximum sequence transferred to standby, It wont shows applied sequence.
Check the below queries.
Primary:-
SQL> select thread#,max(sequence#) from v$archived_log group by thread#;
Standby:-
SQL> select thread#,max(sequence#) from v$archived_log where applied='YES' group by thread#;
HTH. -
Incremental Backup -- Archive Logs
When we take incremental backups do we need archive logs?
Here is the scenario if I delete archive log's and then take a incremental level=1 backup of the database, is my database still recoverable?Hi,
>>If a successful incremental backup was performed AFTER the archive log was deleted, you should be OK. If the archive log was deleted after the incremental backup, you should take another incremental backup.
if the archivelog was deleted that are generated before starting the backup then u don't need that archivelog after sucessfully completion of backup and if this is generated after the backup then u loss the data.So in that case u should take another backup.
Thanks
Kuljeet -
COLD BACKUP을 받은 후 ARCHIVE LOG로 변환하여 사용한 경우 INCOMPLETE RECOVERY.
제품 : ORACLE SERVER
작성날짜 : 2002-04-09
COLD BACKUP을 받은 후 ARCHIVE LOG로 변환하여 사용한 경우 INCOMPLETE RECOVERY.
======================================================================
PURPOSE
COLD BACKUP을 받은 후 ARCHIVE LOG MODE로 변환하여 사용한 경우의 RECOVERY
과정을 TEST로 확인하여 본다.
Examples
No Archive log mode.
SQL> select * from tab ;
TNAME TABTYPE CLUSTERID
EMP TABLE
EMP1 TABLE
EMP2 TABLE
EMP3 TABLE
EMP4 TABLE
10 rows selected.
SQL> select count(*) from emp3 ;
COUNT(*)
0
SQL> select count(*) from emp4 ;
COUNT(*)
0
Cold backup을 받은후 Archive log mode 변경한 경우
SVRMGR> startup mount
SVRMGR> archive log list
Database log mode No Archive Mode
Automatic archival Enabled
Archive destination D:\Oracle\oradata\SNAP\archive
Oldest online log sequence 26
Current log sequence 28
SVRMGR> alter database archivelog ;
SVRMGR> alter database open ; => archive log mode 변경.
SQL> select * from tab ;
TNAME TABTYPE CLUSTERID
EMP TABLE
EMP1 TABLE
EMP2 TABLE
EMP3 TABLE
EMP4 TABLE
10 rows selected.
SQL> insert into emp3 select * from emp ;
14 rows created.
SQL> commit ;
Commit complete.
SQL> insert into emp4 select * from emp1 ;
71680 rows created.
SQL> commit ;
Commit complete.
SQL> select count(*) from emp3 ;
COUNT(*)
14
SQL> select count(*) from emp4 ;
COUNT(*)
71680
## log switch 발생.
SVRMGR> alter system switch logfile ;
SQL> insert into emp3 select * from emp ; -- current log에 반영.
14 rows created.
SQL> commit ;
SQL> select count(*) from emp3 ;
COUNT(*)
28
SQL> select count(*) from emp4 ;
COUNT(*)
71680
# ALL DATABASE CRASH #
# recover 과정... #
1. Restore Cold-backup
2. modify initSID.ora
log_archive_start = true
log_archive_dest_1 = "location=D:\Oracle\oradata\SNAP\archive"
log_archive_format = %%ORACLE_SID%%T%TS%S.ARC
3. svrmgrl
Statement processed.
SVRMGR> startup mount
ORACLE instance started.
Total System Global Area 40703244 bytes
Fixed Size 70924 bytes
Variable Size 23777280 bytes
Database Buffers 16777216 bytes
Redo Buffers 77824 bytes
Database mounted.
SVRMGR> archive log list
Database log mode No Archive Mode
Automatic archival Enabled
Archive destination D:\Oracle\oradata\SNAP\archive
Oldest online log sequence 26
Current log sequence 28
SVRMGR> alter database archivelog ;
Statement processed.
SVRMGR> recover database using backup controlfile until cancel ;
ORA-00279: change 340421 generated at 04/29/2001 23:42:20 needed for thread 1
ORA-00289: suggestion : D:\ORACLE\ORADATA\SNAP\ARCHIVE\SNAPT001S00028.ARC
ORA-00280: change 340421 for thread 1 is in sequence #28
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
Log applied.
ORA-00279: change 340561 generated at 04/29/2001 23:47:29 needed for thread 1
ORA-00289: suggestion : D:\ORACLE\ORADATA\SNAP\ARCHIVE\SNAPT001S00029.ARC
ORA-00280: change 340561 for thread 1 is in sequence #29
ORA-00278: log file 'D:\ORACLE\ORADATA\SNAP\ARCHIVE\SNAPT001S00028.ARC' no longe
r needed for this recovery
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
Log applied.
ORA-00279: change 340642 generated at 04/29/2001 23:47:35 needed for thread 1
ORA-00289: suggestion : D:\ORACLE\ORADATA\SNAP\ARCHIVE\SNAPT001S00030.ARC
ORA-00280: change 340642 for thread 1 is in sequence #30
ORA-00278: log file 'D:\ORACLE\ORADATA\SNAP\ARCHIVE\SNAPT001S00029.ARC' no longe
r needed for this recovery
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
Log applied.
ORA-00279: change 340723 generated at 04/29/2001 23:47:40 needed for thread 1
ORA-00289: suggestion : D:\ORACLE\ORADATA\SNAP\ARCHIVE\SNAPT001S00031.ARC
ORA-00280: change 340723 for thread 1 is in sequence #31
ORA-00278: log file 'D:\ORACLE\ORADATA\SNAP\ARCHIVE\SNAPT001S00030.ARC' no longe
r needed for this recovery
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
Log applied.
ORA-00279: change 340797 generated at 04/29/2001 23:48:01 needed for thread 1
ORA-00289: suggestion : D:\ORACLE\ORADATA\SNAP\ARCHIVE\SNAPT001S00032.ARC
ORA-00280: change 340797 for thread 1 is in sequence #32
ORA-00278: log file 'D:\ORACLE\ORADATA\SNAP\ARCHIVE\SNAPT001S00031.ARC' no longe
r needed for this recovery
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
cancel
Media recovery cancelled.
SVRMGR> alter database open resetlogs ;
Statement processed.
SVRMGR>
SQL> connect scott/tiger
SQL> select count(*) from emp3 ;
COUNT(*)
14
SQL> select count(*) from emp4 ;
COUNT(*)
71680
# 결론...... #
따라서 current log file에 기록된 14 row에 대한 부분은 recover가 될수
없지만 archive log file에 적용된 log에 대한 data는 정상적으로 복구가
가능하다.
# 주의 사항 #
cold backup을 restore한 후 database open후 shutdown 한 다음 archive
log mode로 변경하여 recover를 진행하는 경우 SCN number가 변경되기
때문에 ora-600 error가 발생하며 media recovery를 필요로 하기 때문에
주의하여야 한다.
SVRMGR> startup
ORACLE instance started.
Total System Global Area 40703244 bytes
Fixed Size 70924 bytes
Variable Size 23777280 bytes
Database Buffers 16777216 bytes
Redo Buffers 77824 bytes
Database mounted.
Database opened.
SVRMGR> shutdown
Database closed.
Database dismounted.
ORACLE instance shut down.
SVRMGR> startup mount
ORACLE instance started.
Total System Global Area 40703244 bytes
Fixed Size 70924 bytes
Variable Size 23777280 bytes
Database Buffers 16777216 bytes
Redo Buffers 77824 bytes
Database mounted.
SVRMGR> alter database archivelog ;
Statement processed.
SVRMGR> recover database using backup controlfile until cancel ;
ORA-00279: change 339542 generated at 04/29/2001 23:30:57 needed for thread 1
ORA-00289: suggestion : D:\ORACLE\ORADATA\SNAP\ARCHIVE\SNAPT001S00003.ARC
ORA-00280: change 339542 for thread 1 is in sequence #3
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
ORA-00283: recovery session canceled due to errors
ORA-00600: internal error code, arguments: [3020], [8390146], [1], [3], [143], [
240], [], []
SVRMGR> exit
Server Manager complete.
Rederence Documents
--------------------- -
I tried to reset my iPhone (3gs) with deleting all data. When it power off and automatically again on then it is showing Apple logo only. Not restore and startup my phone. iPhone alerming low charge and I tried to charge and not charging.
What I should do now?Something has gone wrong. Turn your phone off, then force it into recovery mode:
Leave the USB cable connected to your computer, but NOT your phone, iTunes running, press & hold the home button while connecting the USB cable to your dock connector, continue holding the home button until you see “Connect to iTunes” on the screen. You may now release the home button. iTunes should now display that it has detected your phone in recovery mode, if not quit and reopen iTunes. If you still don’t see the recovery message repeat these steps again. iTunes will give you the option to restore from a backup or set up as new. In your case, select "new". -
Keep archived logs but deleting backup of db
Hey
I'm running a backup script every night that issues a "backup database plus archivelog" and saves the backup to disk. Due to disk space limitations I have to delete the obsolete backup taken the night before. However the "delete obsolete" also deletes the archived logs on disk. Is there a way to delete the obsolete backup but still keep the logs on disk?
Tried the "delete backup of database completed before 'sysdate-1' but I cant seem to get passed the promting for deletion - it has to run automatically.
Thanks for any advice..Why don't you work with retention and than you delete the obsolete?
delete backup of database will remove the full backup of the database (datafiles, archivelog, spfile). You can create a script to delete the backup of a given list of datafiles.
RMAN> report obsolete;
RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 2
Report of obsolete backups and copies
Type Key Completion Time Filename/Handle
Archive Log 540 26-MAY-05 /db/ARON/fs1/archived_for_logminer/1_1.dbf
Archive Log 541 26-MAY-05 /db/ARON/fs1/archived_for_logminer/1_2.dbf
RMAN> configure retention policy to redundancy 1;
old RMAN configuration parameters:
CONFIGURE RETENTION POLICY TO REDUNDANCY 2;
new RMAN configuration parameters:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
new RMAN configuration parameters are successfully stored
starting full resync of recovery catalog
full resync complete
RMAN> report obsolete;
RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 1
Report of obsolete backups and copies
Type Key Completion Time Filename/Handle
Backup Set 3125 22-JUL-05
Backup Piece 3127 22-JUL-05 /db/ARON/BACKUP/RMAN/backup_ARON_564316052_208_1_6ggq5hsk_1_1.bck
Backup Set 3126 22-JUL-05
Backup Piece 3128 22-JUL-05 /db/ARON/BACKUP/RMAN/backup_ARON_564316052_207_1_6fgq5hsk_1_1.bck
Backup Set 3139 22-JUL-05
Backup Piece 3140 22-JUL-05 /db/ARON/BACKUP/RMAN/backup_ARON_564316097_209_1_6hgq5hu1_1_1.bck
Backup Set 3190 24-OCT-05
Backup Piece 3193 24-OCT-05 /db/ARON/BACKUP/RMAN/backup_ARON_572546170_212_1_6kh20n3q_1_1.bck
Backup Set 3191 24-OCT-05
Backup Piece 3194 24-OCT-05 /db/ARON/BACKUP/RMAN/backup_ARON_572546170_213_1_6lh20n3q_1_1.bck
Backup Set 3192 24-OCT-05
Backup Piece 3195 24-OCT-05 /db/ARON/BACKUP/RMAN/backup_ARON_572546180_214_1_6mh20n44_1_1.bck
Archive Log 540 26-MAY-05 /db/ARON/fs1/archived_for_logminer/1_1.dbf
Archive Log 541 26-MAY-05 /db/ARON/fs1/archived_for_logminer/1_2.dbfBye, Aron
Maybe you are looking for
-
From Apple website when I go to itunes update to 10.3 I am not seeing the left column to download itunes 10.3. Does anyone else have this problem? I tried yesterday as well. Today, I threw my itunes 9.1.1 in the trash and emptied it... and then re
-
So if the title is not clear, im really stuck. i got Kontakt 2 and the EWQL sound sets the other day from my uncle and I've been trying them out in logic. My problem is, that in my full orchestral piece, I have a violin 1 which plays pizz at the star
-
Hi, The payment terms maintained in vendor master is K102. 2% disc. 10 days 0 dics 30 days We raised vendor invoice via MIRO and it populate K102 as terms. Later on we raised Credit Memo via MIRO also [baseline is 02.09.2008]...the terms popul
-
Grouping of data based on user prompt having a list of dimensions
Hi All, I have a requirement to be able to group data in OBIEE request or Dashboard based on user prompt selection. The prompt should list the Dimensions Available e.g. Dimensions: Product, Region, Employee Fact: Sales The report is to display sales
-
System time zone and User time zone is differenct.
Hello friends. We use SRM 5.5 with classic scenario. (SP07) Our system time zone is CET. Now if we have a user different with a different time zone in the user master, for example, a UTC+9. We can end with up with a received date in service BBPBWSP_S