Rman list backup; until scn
Hello,
my question might be a little strange, but I would just like to confirm my understanding to be sure about my testing.
Consider the following:
RMAN> list backup
List of Backup Sets
===================
BS Key Size Device Type Elapsed Time Completion Time
5520 396.79M DISK 00:02:38 15-OCT-11
BP Key: 5541 Status: AVAILABLE Compressed: YES Tag: TAG20111015T190048
Piece Name: E:\KPZ\PROD_BACKUP\2011_10_15\O1_MF_ANNNN_TAG20111015T190048_79MKSH03_.BKP
List of Archived Logs in backup set 5520
Thrd Seq Low SCN Low Time Next SCN Next Time
1 37170 690296258 14-OCT-11 690301863 14-OCT-11
1 37171 690301863 14-OCT-11 690306944 14-OCT-11
1 37172 690306944 14-OCT-11 690312517 14-OCT-11
1 37173 690312517 14-OCT-11 690326343 14-OCT-11
1 37174 690326343 14-OCT-11 690328734 14-OCT-11
1 37175 690328734 14-OCT-11 690334332 14-OCT-11
1 37176 690334332 14-OCT-11 690354457 14-OCT-11
1 37177 690354457 14-OCT-11 690365309 14-OCT-11
1 37178 690365309 14-OCT-11 690383830 14-OCT-11
1 37179 690383830 14-OCT-11 690389381 14-OCT-11
1 37180 690389381 14-OCT-11 690399124 14-OCT-11
1 37181 690399124 14-OCT-11 690403117 14-OCT-11
1 37182 690403117 14-OCT-11 690408333 14-OCT-11
1 37183 690408333 14-OCT-11 690411748 14-OCT-11
1 37184 690411748 14-OCT-11 690417353 14-OCT-11
1 37185 690417353 14-OCT-11 690422345 14-OCT-11
1 37186 690422345 14-OCT-11 690428300 15-OCT-11
1 37187 690428300 15-OCT-11 690433347 15-OCT-11
1 37188 690433347 15-OCT-11 690439543 15-OCT-11
1 37189 690439543 15-OCT-11 690444502 15-OCT-11
1 37190 690444502 15-OCT-11 690450317 15-OCT-11
1 37191 690450317 15-OCT-11 690453707 15-OCT-11
1 37192 690453707 15-OCT-11 690457501 15-OCT-11
1 37193 690457501 15-OCT-11 690458775 15-OCT-11
1 37194 690458775 15-OCT-11 690464449 15-OCT-11
1 37195 690464449 15-OCT-11 690469446 15-OCT-11
1 37196 690469446 15-OCT-11 690474941 15-OCT-11
1 37197 690474941 15-OCT-11 690481459 15-OCT-11
1 37198 690481459 15-OCT-11 690484981 15-OCT-11
1 37199 690484981 15-OCT-11 690490292 15-OCT-11
1 37200 690490292 15-OCT-11 690495899 15-OCT-11
1 37201 690495899 15-OCT-11 690500991 15-OCT-11
1 37202 690500991 15-OCT-11 690508506 15-OCT-11
1 37203 690508506 15-OCT-11 690514835 15-OCT-11
1 37204 690514835 15-OCT-11 690519918 15-OCT-11
1 37205 690519918 15-OCT-11 690535732 15-OCT-11
1 37206 690535732 15-OCT-11 690626387 15-OCT-11
1 37207 690626387 15-OCT-11 690629393 15-OCT-11
1 37208 690629393 15-OCT-11 690634991 15-OCT-11
1 37209 690634991 15-OCT-11 690640154 15-OCT-11
1 37210 690640154 15-OCT-11 690646056 15-OCT-11
1 37211 690646056 15-OCT-11 690651236 15-OCT-11
1 37212 690651236 15-OCT-11 690656775 15-OCT-11
1 37213 690656775 15-OCT-11 690662593 15-OCT-11
1 37214 690662593 15-OCT-11 690668154 15-OCT-11
1 37215 690668154 15-OCT-11 690673574 15-OCT-11
1 37216 690673574 15-OCT-11 690677649 15-OCT-11
1 37217 690677649 15-OCT-11 690683129 15-OCT-11
1 37218 690683129 15-OCT-11 690688406 15-OCT-11
1 37219 690688406 15-OCT-11 690693988 15-OCT-11
1 37220 690693988 15-OCT-11 690698971 15-OCT-11
1 37221 690698971 15-OCT-11 690705146 15-OCT-11
1 37222 690705146 15-OCT-11 690710236 15-OCT-11
1 37223 690710236 15-OCT-11 690715886 15-OCT-11
1 37224 690715886 15-OCT-11 690719326 15-OCT-11
1 37225 690719326 15-OCT-11 690724866 15-OCT-11
1 37226 690724866 15-OCT-11 690729976 15-OCT-11
1 37227 690729976 15-OCT-11 690735596 15-OCT-11
1 37228 690735596 15-OCT-11 690740660 15-OCT-11
1 37229 690740660 15-OCT-11 690746167 15-OCT-11
1 37230 690746167 15-OCT-11 690751851 15-OCT-11
1 37231 690751851 15-OCT-11 690756900 15-OCT-11
1 37232 690756900 15-OCT-11 690759044 15-OCT-11
BS Key Type LV Size Device Type Elapsed Time Completion Time
5521 Incr 0 494.68M DISK 00:03:24 15-OCT-11
BP Key: 5542 Status: AVAILABLE Compressed: YES Tag: TAG20111015T195017
Piece Name: E:\KPZ\PROD_BACKUP\2011_10_15\O1_MF_NNND0_TAG20111015T195017_79MKZP6W_.BKP
List of Datafiles in backup set 5521
File LV Type Ckp SCN Ckp Time Name
14 0 Incr 690768806 15-OCT-11 E:\ORACLE\ORADATA\KPZP\DATAFILES\CCAPP.DBF
126 0 Incr 690768806 15-OCT-11 E:\ORACLE\ORADATA\KPZP\DATAFILES\WAAPP.DBF
131 0 Incr 690768806 15-OCT-11 E:\ORACLE\ORADATA\KPZP\DATAFILES\PSDEFAULT02.DBF
BS Key Type LV Size Device Type Elapsed Time Completion Time
5522 Incr 0 193.66M DISK 00:01:38 15-OCT-11
BP Key: 5543 Status: AVAILABLE Compressed: YES Tag: TAG20111015T195017
Piece Name: E:\KPZ\PROD_BACKUP\2011_10_15\O1_MF_NNND0_TAG20111015T195017_79ML6DXJ_.BKP
List of Datafiles in backup set 5522
File LV Type Ckp SCN Ckp Time Name
3 0 Incr 690769344 15-OCT-11 E:\ORACLE\ORADATA\KPZP\DATAFILES\UNDOTBS01.DBF
4 0 Incr 690769344 15-OCT-11 E:\ORACLE\ORADATA\KPZP\DATAFILES\USERS01.DBF
128 0 Incr 690769344 15-OCT-11 E:\ORACLE\ORADATA\KPZP\DATAFILES\SYSAUX02.DBF
132 0 Incr 690769344 15-OCT-11 E:\ORACLE\ORADATA\KPZP\DATAFILES\UNDO3.DBF
BS Key Type LV Size Device Type Elapsed Time Completion Time
5523 Incr 0 644.30M DISK 00:04:11 15-OCT-11
BP Key: 5544 Status: AVAILABLE Compressed: YES Tag: TAG20111015T195017
Piece Name: E:\KPZ\PROD_BACKUP\2011_10_15\O1_MF_NNND0_TAG20111015T195017_79ML9NMK_.BKP
List of Datafiles in backup set 5523
File LV Type Ckp SCN Ckp Time Name
1 0 Incr 690770341 15-OCT-11 E:\ORACLE\ORADATA\KPZP\DATAFILES\SYSTEM01.DBF
2 0 Incr 690770341 15-OCT-11 E:\ORACLE\ORADATA\KPZP\DATAFILES\SYSAUX01.DBF
127 0 Incr 690770341 15-OCT-11 E:\ORACLE\ORADATA\KPZP\DATAFILES\SYSTEM02.DBF
129 0 Incr 690770341 15-OCT-11 E:\ORACLE\ORADATA\KPZP\DATAFILES\SYSAUX03.DBF
BS Key Size Device Type Elapsed Time Completion Time
5524 18.86M DISK 00:00:10 15-OCT-11
BP Key: 5545 Status: AVAILABLE Compressed: YES Tag: TAG20111015T200023
Piece Name: E:\KPZ\PROD_BACKUP\2011_10_15\O1_MF_ANNNN_TAG20111015T200023_79MLKTVM_.BKP
List of Archived Logs in backup set 5524
Thrd Seq Low SCN Low Time Next SCN Next Time
1 37233 690759044 15-OCT-11 690764137 15-OCT-11
1 37234 690764137 15-OCT-11 690768526 15-OCT-11
1 37235 690768526 15-OCT-11 690770962 15-OCT-11
RMAN> /** I left out some lines that seemed duplicate for my question - lines with the same SCN and some older archived logs. I can post the whole thing if it should turn out to be relevant.
What SCN would be appropriate for me to use, taking into account this is a level 0 incremental backup, to restore to the point of a full backup?
I'm fairly sure i can do the following: (and yes, this will result in a successful restore/recover)
run{
set until scn 690770341;
restore database;
switch datafile all;
recover database;
} But is that really the point that I should recover to? The other alternative would be to recover to the SCN of those archivelogs at the very bottom?
Thank you for any comments, whatever they are :-)
I am copying the backups between different hosts (or external tape applications) and building the database from backups. So I create a blank instance and catalog the backup files, then specify an SCN to restore/recover.
Would the SCN part be unneeded? I guess if I want to recover to the latest possible state, I do not need to specify any SCN :-). For testing purposes I only specified the full backup SCN to save time, but in the event this would be needed in a production environment, you are right that I would need to recover to the latest possible SCN. Thanks for pointing that out.
Similar Messages
-
I am using the following commands.
RMAN> sql "alter session set nls_date_format=''dd-mon-yyyy HH24:MI:SS''";
2> report unrecoverable database;
3> report need backup days 2 database;
4> list backup;
5> EXIT;
BS Key Type LV Size Device Type Elapsed Time Completion Time------- ---- -- ---------- ----------- ------------ ---------------
6249525 Full 68G SBT_TAPE 01:38:05 *25-OCT-2010*
BP Key: 6249547 Status: AVAILABLE Tag: TAG20101025T040741
Even after setting nls_date_format, completion time in list backup command is not returning exact time..it is returning just the date..
how to get completion time in RMAN LIST BACKUP COMMAND with hour,minute and second details...please let me know
I am using catalog database...target database version 9i and catalog db version is 10g.
Thanks,
dbNLS_DATE_FORMAT at OS level
I tied this export NLS_DATE_FORMAT=DD-MON-YYYY HH24:MI:SS is throwing error
NLS_DATE_FORMAT=DD-MON-YYYY: is not an identifier, please tell me what i am missing? -
RMAN LIST backup and maintain backup.
Hi Experts,
Currently we have some changes on the rman retention policy from 168days to 90days.
RMAN Retention policy is:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 14 DAYS;
And RMAN Scripts monthly backup is:
run
allocate channel t1 type 'sbt_tape' parms
'ENV=(TDPO_OPTFILE=/opt/tivoli/tsm/client/oracle/bin64/tdpo_monthly.opt)';
backup as compressed backupset database tag ${SID}_MONTHLY keep until time 'sysdate+168';
release channel t1;
I believe I still have the old backup after I changed the 'sysdate+168' to 'sysdate+90'; on my scripts
How do I manage to delete this ?
Using, List backup and list backup summary will prompt me very long line and window,
How do I create the CONFIGURE settings I can remove the allocate channel... on my scripts ?
Cheers,
RaffHi mseberg,
I have executed as your advised below, but somehow it doesnt get the files.
Is there any way to check what is the oldest backup that available ?
RMAN> DELETE noprompt BACKUP COMPLETED BEFORE 'SYSDATE-90';
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=100 device type=DISK
allocated channel: ORA_SBT_TAPE_1
channel ORA_SBT_TAPE_1: SID=138 device type=SBT_TAPE
channel ORA_SBT_TAPE_1: Data Protection for Oracle: version 5.5.1.0
specification does not match any backup in the repository
RMAN> DELETE EXPIRED BACKUP;
using channel ORA_DISK_1
using channel ORA_SBT_TAPE_1
specification does not match any backup in the repository
RMAN> DELETE FORCE NOPROMPT BACKUP COMPLETED BEFORE 'SYSDATE-90';
using channel ORA_DISK_1
using channel ORA_SBT_TAPE_1
specification does not match any backup in the repository -
We try to create standby database from a production DB on another server (10.2.0.4). The RMAN backup is in the nfs file system which is also mounted to the target server (the DR box). So, the access path for the rman backup is the same look from primary DB server and DR DB server. I started the RMAN run:
RMAN> RUN
2> {
3> ALLOCATE AUXILIARY CHANNEL aux1 DEVICE TYPE DISK;
4> ALLOCATE AUXILIARY CHANNEL aux2 DEVICE TYPE DISK;
5> DUPLICATE TARGET DATABASE for standby
6> nofilenamecheck
7> dorecover;
8> }
9>
10> exit
using target database control file instead of recovery catalog
allocated channel: aux1
channel aux1: sid=582 devtype=DISK
allocated channel: aux2
channel aux2: sid=584 devtype=DISK
Starting Duplicate Db at 21-JUN-12
contents of Memory Script:
set until scn 12198261770353;
restore clone standby controlfile;
sql clone 'alter database mount standby database';
executing Memory Script
executing command: SET until clause
Starting restore at 21-JUN-12
released channel: aux1
released channel: aux2
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 06/21/2012 16:33:36
RMAN-03015: error occurred in stored script Memory Script
RMAN-06026: some targets not found - aborting restore
RMAN-06024: no backup or copy of the control file found to restore
===========================================================================
The backups should have controlfile. There is rman show all display:
RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
CONFIGURE BACKUP OPTIMIZATION OFF;
CONFIGURE DEFAULT DEVICE TYPE TO DISK;
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/backup/inbound/online/controlfile_auto%F';
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1;
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1;
CONFIGURE CHANNEL 1 DEVICE TYPE DISK FORMAT '/backup/inbound/online/%d_%T_%t_%s';
CONFIGURE MAXSETSIZE TO UNLIMITED;
CONFIGURE ENCRYPTION FOR DATABASE OFF;
CONFIGURE ENCRYPTION ALGORITHM 'AES128';
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE;
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/backup/inbound/online/snapcf_inbound.f';
Why and how to fix? Thanks for help!Here is the list of command:
RMAN> list backup of controlfile ;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
5518 Full 4.57M DISK 00:00:07 17-JUN-12
BP Key: 5518 Status: AVAILABLE Compressed: NO Tag: TAG20120617T035926
Piece Name: /backup/inbound/online/controlfile_autoc-2080040856-20120617-00
Control File Included: Ckp SCN: 12197994840698 Ckp time: 17-JUN-12
BS Key Type LV Size Device Type Elapsed Time Completion Time
5522 Full 4.57M DISK 00:00:00 18-JUN-12
BP Key: 5522 Status: AVAILABLE Compressed: NO Tag: TAG20120618T010158
Piece Name: /backup/inbound/online/controlfile_autoc-2080040856-20120618-00
Control File Included: Ckp SCN: 12198041382572 Ckp time: 18-JUN-12
BS Key Type LV Size Device Type Elapsed Time Completion Time
5526 Full 4.57M DISK 00:00:01 19-JUN-12
BP Key: 5526 Status: AVAILABLE Compressed: NO Tag: TAG20120619T010352
Piece Name: /backup/inbound/online/controlfile_autoc-2080040856-20120619-00
Control File Included: Ckp SCN: 12198090424606 Ckp time: 19-JUN-12
BS Key Type LV Size Device Type Elapsed Time Completion Time
5530 Full 4.57M DISK 00:00:02 20-JUN-12
BP Key: 5530 Status: AVAILABLE Compressed: NO Tag: TAG20120620T010304
Piece Name: /backup/inbound/online/controlfile_autoc-2080040856-20120620-00
Control File Included: Ckp SCN: 12198146424201 Ckp time: 20-JUN-12
BS Key Type LV Size Device Type Elapsed Time Completion Time
5534 Full 4.57M DISK 00:00:02 21-JUN-12
BP Key: 5534 Status: AVAILABLE Compressed: NO Tag: TAG20120621T010357
Piece Name: /backup/inbound/online/controlfile_autoc-2080040856-20120621-00
Control File Included: Ckp SCN: 12198210334547 Ckp time: 21-JUN-12
==================================================================
I tried to catalog the controlfile:
RMAN> catalog controlfilecopy '/backup/inbound/online/controlfile_autoc-2080040856-20120621-00';
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of catalog command on default channel at 06/21/2012 17:24:32
ORA-19563: control file header validation failed for file /backup/inbound/online/controlfile_autoc-2080040856-20120621-00
====================================================================
We have level 1 backup everyday, except Sunday. I have level 0 backup on Sunday. I alos tried the metalink note RMAN Duplicate For Standby Fails with Rman-06024: No Backup Or Copy Of The Control File Found To Restore [ID 466321.1]. It does not work.
Thanks for help! -
11g RMAN UNDO backup optimization
Hi all?
I have tested 11g RMAN UNDO backup optimization
1st I fill the undo tablespace by sql manipulations and not commiting
2nd backed undo_ts up by RMAN (size 24m)
3rd I made a commit
Then backed undo tablespace again but backup_size didn’t change (24m)
Then I made some more manipulations and backed undo_ts again. This time backup_size reduced. (11m)
Then I restarted db and backed up undo_ts again. This time backup size became what I expected (600K)
The question is why 11g rman undo tablespace backup size didn’t reduce after commit?
according to 11g undo optimization it had to
SQL> select sum(bytes) from dba_free_space where tablespace_name = 'UNDOTBS2';
SUM(BYTES)
13172736
SQL> begin
for i in 1..100000 loop
insert into testundo values(i);
end loop;
end;
2 3 4 5 6
PL/SQL procedure successfully completed.
SQL> SQL> update testundo set
id=2 where id>0;
2
update testundo set
ERROR at line 1:
ORA-30036: unable to extend segment by 8 in undo tablespace 'UNDOTBS2'
SQL> select sum(bytes) from dba_free_space where tablespace_name = 'UNDOTBS2';
SUM(BYTES)RMAN> backup datafile 6;
RMAN> list backup of datafile 6;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
10 Full *24.54M* DISK 00:00:04 10-JUN-10
BP Key: 10 Status: AVAILABLE Compressed: NO Tag: TAG20100610T142437
Piece Name: /home/oracle/flash_recovery_area/11GR1/backupset/2010_06_10/o1_mf_nnndf_TAG20100610T142437_611ctr1f_.bkp
List of Datafiles in backup set 10
File LV Type Ckp SCN Ckp Time Name
6 Full 577669 10-JUN-10 /home/oracle/oradata/11GR1/datafile/undotbs2.dbf
SQL> commit;
Commit complete.RMAN> backup datafile 6 format 'after commit.backup';
RMAN> list backup of datafile 6;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
11 Full *24.54M* DISK 00:00:02 10-JUN-10
BP Key: 11 Status: AVAILABLE Compressed: NO Tag: TAG20100610T142541
Piece Name: /home/oracle/product/11/Db_1/dbs/after commit.backup
List of Datafiles in backup set 11
File LV Type Ckp SCN Ckp Time Name
6 Full 577705 10-JUN-10 /home/oracle/oradata/11GR1/datafile/undotbs2.dbf
SQL> alter system archive log current;
System altered.
SQL> commit;
Commit complete.
SQL> select count(*) from testundo;
COUNT(*)
100000
SQL> delete from testundo;
100000 rows deleted.
SQL> commit;
Commit complete.
SQL> insert into testundo values(1);
1 row created.
SQL> commit;
Commit complete.
SQL> alter system flush buffer_cache;
System altered.RMAN> backup datafile 6;
RMAN> list backup of datafile 6;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
13 Full *11.03M* DISK 00:00:01 10-JUN-10
BP Key: 13 Status: AVAILABLE Compressed: NO Tag: TAG20100610T143359
Piece Name: /home/oracle/flash_recovery_area/11GR1/backupset/2010_06_10/o1_mf_nnndf_TAG20100610T143359_611dd8sz_.bkp
List of Datafiles in backup set 13
File LV Type Ckp SCN Ckp Time Name
6 Full 578410 10-JUN-10 /home/oracle/oradata/11GR1/datafile/undotbs2.dbf
RMAN>
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 393375744 bytes
Fixed Size 1300156 bytes
Variable Size 352323908 bytes
Database Buffers 33554432 bytes
Redo Buffers 6197248 bytes
Database mounted.
Database opened.
SQL> RMAN> backup datafile 6;
RMAN> list backup of datafile 6;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
14 Full *600.00K* DISK 00:00:02 10-JUN-10
BP Key: 14 Status: AVAILABLE Compressed: NO Tag: TAG20100610T152843
Piece Name: /home/oracle/flash_recovery_area/11GR1/backupset/2010_06_10/o1_mf_nnndf_TAG20100610T152843_611hlwmv_.bkp
List of Datafiles in backup set 14
File LV Type Ckp SCN Ckp Time Name
6 Full 580347 10-JUN-10 /home/oracle/oradata/11GR1/datafile/undotbs2.dbf
Thanks in advance
TurkelHi Turkel,
The space used for undo is also related to the undo retention setting.
As it seems you do a test update and proceed with backups on:
- 14:24:37 (-> 25M)
- 14:25:41 (-> 25M)
- 14:33:59 (-> 11M)
- 15:28:43 (-> 600K)
The first two backups probably are still within the undo retention period for the update.
The third backup shows a partly empty undo (is your setting 900?).
The last falls outside the retention period for the update resulting in the small backup size.
Regards,
Tycho -
List backup of archivelog sequence between 7748 and 7750;
Hi,
in 8.1.7, I get syntaxe error when I Issue this commande :
RMAN> list backup of archivelog sequence between 7748 and 7750;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01005: syntax error: found "identifier": expecting one of: "all, from, high, like, low, until"
RMAN-01008: the bad identifier was: sequence
RMAN-01007: at line 1 column 27 file: standard input
Do you know the right syntax ??
Many thanks before.replace sequence by logseq.
In the future, please use the RMAN reference manual, and do NOT ask this doc question here.
Sybrand Bakker
Senior Oracle DBA -
Rman full backup, crash and full restore?
Hi,
I try to implement a simple backup and restore process with rman. Ok, with rman it's not simple. ;-)
My aim is to backup a database with a full backup and restore it from this backup, for example when it crashes.
Ok, for creating the backup I use this rman script:
run
allocate channel t1 type disk;
backup incremental level 0 format 'PATHTOBAKFILE' database;
release channel t1;
The result is a 1GB large backupfile.
Now I delete the whole database and create a new one to simulate a crash.
After this is done, I want to restore the state of the database which is frozen in the backupfile.
Therefor I use the following rman script:
run
allocate channel t1 type disk format 'PATHTOBACKUPFILE';
shutdown immediate;
startup mount;
restore database;
recover database;
alter database open resetlogs;
release channel t1;
Now rman tells me an error:
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: Fehler bei restore Befehl auf 04/09/2008 10:24:59
RMAN-06026: Einige Ziele nicht gefunden - Recovery wird abgebrochen
RMAN-06023: Kein Backup bzw. keine Kopie der Datendatei 4 zum Wiederherstellen gefunden
RMAN-06023: Kein Backup bzw. keine Kopie der Datendatei 3 zum Wiederherstellen gefunden
RMAN-06023: Kein Backup bzw. keine Kopie der Datendatei 2 zum Wiederherstellen gefunden
RMAN-06023: Kein Backup bzw. keine Kopie der Datendatei 1 zum Wiederherstellen gefunden
In english: No backup or copy of datafile X where found for restore.
I think the backup/restore possibilities with rman are very complex and I don't exactly understand which is the right backup strategie. I'm not an oracle specialist. Maybe someone can give me a hint.
My program should backup the database full, differential and incremental and also restore only by using the given backupfiles. So I want somethink like Point-In-Time recovery, but rman should use the time-point of the given backupfile. And this backupfiles are stored outside oracle, e.g. on a server or somethink like this.
Thanks a lot for help.
Best regards,
RonnyRMAN> run
2> {
3> allocate channel t1 type disk;
4> backup incremental level 0 format 'PATHTOBAKFILE.%d.%u.P%p.C%c' current contr
olfile database;
5> release channel t1;
6> }
released channel: ORA_DISK_1
allocated channel: t1
channel t1: sid=160 devtype=DISK
Starting backup at 09-APR-08
channel t1: starting incremental level 0 datafile backupset
channel t1: specifying datafile(s) in backupset
input datafile fno=00001 name=C:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\SYSTEM01.DBF
input datafile fno=00003 name=C:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\SYSAUX01.DBF
input datafile fno=00002 name=C:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\UNDOTBS01.DBF
input datafile fno=00004 name=C:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\USERS01.DBF
channel t1: starting piece 1 at 09-APR-08
channel t1: finished piece 1 at 09-APR-08
piece handle=C:\WINDOWS\SYSTEM32\PATHTOBAKFILE.ORCL.0TJDDSC1.P1.C1 comment=NONE
channel t1: backup set complete, elapsed time: 00:01:05
channel t1: starting incremental level 0 datafile backupset
channel t1: specifying datafile(s) in backupset
including current controlfile in backupset
including current SPFILE in backupset
channel t1: starting piece 1 at 09-APR-08
channel t1: finished piece 1 at 09-APR-08
piece handle=C:\WINDOWS\SYSTEM32\PATHTOBAKFILE.ORCL.0UJDDSE2.P1.C1 comment=NONE
channel t1: backup set complete, elapsed time: 00:00:05
channel t1: starting incremental level 0 datafile backupset
channel t1: specifying datafile(s) in backupset
including current controlfile in backupset
channel t1: starting piece 1 at 09-APR-08
channel t1: finished piece 1 at 09-APR-08
piece handle=C:\WINDOWS\SYSTEM32\PATHTOBAKFILE.ORCL.0VJDDSE7.P1.C1 comment=NONE
channel t1: backup set complete, elapsed time: 00:00:02
Finished backup at 09-APR-08
released channel: t1
RMAN> list backup of controlfile
2> ;
ORACLE error from target database:
ORA-19922: there is no parent row with id 0 and level 0
ORA-06512: at "SYS.DBMS_BACKUP_RESTORE", line 5035
ORA-06512: at line 1
RMAN-06900: WARNING: unable to generate V$RMAN_STATUS or V$RMAN_OUTPUT row
RMAN-06901: WARNING: disabling update of the V$RMAN_STATUS and V$RMAN_OUTPUT row
s
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
18 Incr 0 2M DISK 00:00:02 09-APR-08
BP Key: 18 Status: AVAILABLE Compressed: NO Tag: TAG20080409T214537
Piece Name: C:\WINDOWS\SYSTEM32\PATHTOBAKFILE.ORCL.0UJDDSE2.P1.C1
Controlfile Included: Ckp SCN: 337949 Ckp time: 09-APR-08
BS Key Type LV Size Device Type Elapsed Time Completion Time
19 Incr 0 2M DISK 00:00:01 09-APR-08
BP Key: 19 Status: AVAILABLE Compressed: NO Tag: TAG20080409T214537
Piece Name: C:\WINDOWS\SYSTEM32\PATHTOBAKFILE.ORCL.0VJDDSE7.P1.C1
Controlfile Included: Ckp SCN: 337950 Ckp time: 09-APR-08
RMAN> run
2> {
3> allocate channel t1 type disk format 'PATHTOBAKFILE.ORCL.0VJDDSE7.P1.C1';
4> shutdown immediate;
5> startup nomount;
6> restore controlfile from 'PATHTOBAKFILE.ORCL.0VJDDSE7.P1.C1';
7> startup mount;
8> restore database;
9> recover database;
10> shutdown normal;
11> startup;
12> release channel t1;
13> }
released channel: ORA_DISK_1
allocated channel: t1
channel t1: sid=160 devtype=DISK
database closed
database dismounted
Oracle instance shut down
connected to target database (not started)
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
Starting restore at 09-APR-08
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=160 devtype=DISK
channel ORA_DISK_1: restoring controlfile
channel ORA_DISK_1: restore complete
output filename=C:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\CONTROL01.CTL
output filename=C:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\CONTROL02.CTL
output filename=C:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\CONTROL03.CTL
Finished restore at 09-APR-08
database is already started
database mounted
ORACLE error from target database:
ORA-19922: there is no parent row with id 0 and level 0
ORA-06512: at "SYS.X$DBMS_BACKUP_RESTORE", line 5038
ORA-06512: at line 1
RMAN-06900: WARNING: unable to generate V$RMAN_STATUS or V$RMAN_OUTPUT row
RMAN-06901: WARNING: disabling update of the V$RMAN_STATUS and V$RMAN_OUTPUT row
s
Starting restore at 09-APR-08
Starting implicit crosscheck backup at 09-APR-08
released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=160 devtype=DISK
Crosschecked 2 objects
Finished implicit crosscheck backup at 09-APR-08
Starting implicit crosscheck copy at 09-APR-08
using channel ORA_DISK_1
Finished implicit crosscheck copy at 09-APR-08
searching for all files in the recovery area
cataloging files...
cataloging done
no files cataloged
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to C:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\SYSTEM01.DBF
restoring datafile 00002 to C:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\UNDOTBS01.DBF
restoring datafile 00003 to C:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\SYSAUX01.DBF
restoring datafile 00004 to C:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\USERS01.DBF
channel ORA_DISK_1: restored backup piece 1
piece handle=C:\WINDOWS\SYSTEM32\PATHTOBAKFILE.ORCL.0TJDDSC1.P1.C1 tag=TAG200804
09T214537
channel ORA_DISK_1: restore complete
Finished restore at 09-APR-08
Starting recover at 09-APR-08
using channel ORA_DISK_1
starting media recovery
archive log thread 1 sequence 1 is already on disk as file C:\ORACLE\PRODUCT\10.
1.0\ORADATA\ORCL\REDO02.LOG
archive log filename=C:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\REDO02.LOG thread=1 s
equence=1
media recovery complete
Finished recover at 09-APR-08
database dismounted
Oracle instance shut down
connected to target database (not started)
Oracle instance started
database mounted
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of startup command at 04/09/2008 21:53:03
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open
open database with resetlogs instead startup
RMAN>Khurram -
Formating RMAN "LIST" command output
I am running following command at rman prompt which has a output over 10 pages which I cant scroll back to see the entire output.
RMAN> LIST BACKUP OF ARCHIVELOG ALL;
Is there any way where in I can use something similar to "set pause on" of sqllpus within rman.
One way I am achieveing this is by using cmdfile and logfile option in whicle connecting. But its not that feasible to write command file for each and every command.
Pls advise...You can try this to run the rman command and also you can have the options what you are looking for.
$ echo 'list backup of archivelog all;' |
rman rcvcat rman/rman target backup_admin/backup_admin@sri
Recovery Manager: Release 10.2.0.1.0 - Production on Mon Mar 6 15:18:30 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: SRI (DBID=1762478285)
connected to recovery catalog database
RMAN>
List of Backup Sets
===================
BS Key Size Device Type Elapsed Time Completion Time
9936 374.63M DISK 00:00:32 06-MAR-06
BP Key: 9941 Status: AVAILABLE Compressed: NO Tag: TAG20060306T115312
Piece Name: E:\ORADATA\SRI\FLASH_RECOVERY_AREA\SRI\BACKUPSET\2006_03_06\O1_MF_ANNNN_TAG20060306T115312_20S4SD4B_.BKP
List of Archived Logs in backup set 9936
Thrd Seq Low SCN Low Time Next SCN Next Time
1 81 12350590 02-MAR-06 12405197 02-MAR-06
1 82 12405197 02-MAR-06 12474206 03-MAR-06
1 83 12474206 03-MAR-06 12580631 06-MAR-06
1 84 12580631 06-MAR-06 12609253 06-MAR-06
1 85 12609253 06-MAR-06 12614028 06-MAR-06
RMAN>
Recovery Manager complete.
But I have no idea what exactly you want to track in the output. Meaning which part of the output you want to grep and perform sort etc.,
well you can try..
$ echo 'list backup of archivelog all;' |
rman rcvcat rman/rman target backup_admin/backup_admin@sri |
grep < required string> | awk... bla bla... -Sri -
RMAN restore using set until scn
Hi guys.
Quick question about using set until scn
when I do list backup output shows multiple scn's for one full (I allocated 4 tape channels for the backup so there are 4 scn's in the output)
Which one do I specify in the set until scn command? Below there is ..163 ...164 ...165 ...166
Here is the backup I want to use:
BS Key Type LV Size Device Type Elapsed Time Completion Time
12526 Incr 0 19G SBT_TAPE 00:27:22 Dec 31 2009 10:25:30
BP Key: 12526 Status: AVAILABLE Tag: TAG20091231T095808
Piece Name: rcworaprd-vprd2-full<12920:707047088:1>.dbf
List of Datafiles in backup set 12526
File LV Type Ckp SCN Ckp Time Name
1 0 Incr 1697159163 Dec 31 2009 09:58:08 /u02/oradata/vprd2/system01.dbf
11 0 Incr 1697159163 Dec 31 2009 09:58:08 /u02/oradata/vprd2/ppa_data01.dbf
12 0 Incr 1697159163 Dec 31 2009 09:58:08 /u02/oradata/vprd2/ppa_index01.dbf
13 0 Incr 1697159163 Dec 31 2009 09:58:08 /u02/oradata/vprd2/itd_index01.dbf
16 0 Incr 1697159163 Dec 31 2009 09:58:08 /u02/oradata/vprd2/rcl_data01.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
12527 Incr 0 21G SBT_TAPE 00:29:19 Dec 31 2009 10:27:27
BP Key: 12527 Status: AVAILABLE Tag: TAG20091231T095808
Piece Name: rcworaprd-vprd2-full<12921:707047088:1>.dbf
List of Datafiles in backup set 12527
File LV Type Ckp SCN Ckp Time Name
4 0 Incr 1697159164 Dec 31 2009 09:58:08 /u02/oradata/vprd2/tools01.dbf
7 0 Incr 1697159164 Dec 31 2009 09:58:08 /u02/oradata/vprd2/xdb01.dbf
8 0 Incr 1697159164 Dec 31 2009 09:58:08 /u02/oradata/vprd2/user_index02.dbf
9 0 Incr 1697159164 Dec 31 2009 09:58:08 /u02/oradata/vprd2/una_data01.dbf
14 0 Incr 1697159164 Dec 31 2009 09:58:08
BS Key Type LV Size Device Type Elapsed Time Completion Time
12528 Incr 0 29G SBT_TAPE 00:33:48 Dec 31 2009 10:31:57
BP Key: 12528 Status: AVAILABLE Tag: TAG20091231T095808
Piece Name: rcworaprd-vprd2-full<12923:707047089:1>.dbf
List of Datafiles in backup set 12528
File LV Type Ckp SCN Ckp Time Name
6 0 Incr 1697159166 Dec 31 2009 09:58:09 /u02/oradata/vprd2/user_index01.dbf
17 0 Incr 1697159166 Dec 31 2009 09:58:09 /u02/oradata/vprd2/rcl_index01.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
12529 Incr 0 23G SBT_TAPE 00:38:09 Dec 31 2009 10:36:17
BP Key: 12529 Status: AVAILABLE Tag: TAG20091231T095808
Piece Name: rcworaprd-vprd2-full<12922:707047088:1>.dbf
List of Datafiles in backup set 12529
File LV Type Ckp SCN Ckp Time Name
2 0 Incr 1697159165 Dec 31 2009 09:58:09 /u02/oradata/vprd2/drsys01.dbf
3 0 Incr 1697159165 Dec 31 2009 09:58:09 /u02/oradata/vprd2/eng_data01.dbf
5 0 Incr 1697159165 Dec 31 2009 09:58:09 /u02/oradata/vprd2/user_data01.dbf
10 0 Incr 1697159165 Dec 31 2009 09:58:09 /u02/oradata/vprd2/una_index01.dbf
15 0 Incr 1697159165 Dec 31 2009 09:58:09 /u02/oradata/vprd2/eng_index01.dbf
Or would it be better to use the set until time... using the oldest time from the backupset 12529 (Dec 31 2009 10:36:17)
All input is appreciated.
Thanks
JamieNote that an online backup is an inconsistent backup:
>
Any backup taken when the database has not been shut down normally is an inconsistent backup. When a database is restored from an inconsistent backup, Oracle must perform media recovery before the database can be opened, applying any pending changes from the redo logs.
As long as your database is running in ARCHIVELOG mode, and you back up your archived redo log files as well as your datafiles, inconsistent backups can be the foundation for a sound backup and recovery strategy. Inconsistent backups are an important part of the backup strategy for most databases, because they offer superior availability. For example, backups taken while the database is still open are inconsistent backups
>
If you need to restore your database using the listed backups, you need to apply the archived redo logs until a SCN which is greater than any SCN in the datafile backup sets: otherwise Oracle won't open the database because some datafiles may have different SCN. -
Incremental backup and recover with UNTIL SCN options.
Hi there
My question is just about internal RMAN mecanisms.
Suppose i've cumulative method for backup with RMAN.
Reference backup provided by Level 0 (by night)
after that i've file001.arc, file002.arc during day
Baclup cumulative Level 1 (by night)
after that i've file003.arc, file004.arc, file005.arc during day
Baclup cumulative Level 1 (by night)
after that i've file006.arc, file007.arc, file008.arc, file009.arc, file010.arc, file011.arc during day
Baclup cumulative Level 1 (by night)
after that i've file012.arc, file013.arc during day
Baclup cumulative Level 1 (by night)
Suppose we need to recover with UNTIL SCN ... (incident can be identied by SCN #nnnnn, suppose SCN near of file008.arc).
Is Rman use benefits of incremental, or in this case (need to recover before particular SCN) systematically start with Reference backup (Created by Incremental Level 0) and then file001.arc, file002.arc ....
Platform:Oracle 10g
Regards
DenYou recover using backup controlfile when you have lost the controlfile - should be obvious.
You recover until cancel when, for example, you want to manually see the archive logs being applied and decide when to stop recovering (maybe you have lost the archive log backups and want it to stop when you don't have any more left to apply). -
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 -
RMAN restore UNTIL SCN in DATA GUARD environment
Hello,
OS=RHL5
DB=11.2.0.3 Primary and 1 Physical STANDBY database.
I have a huge application changes tomorrow and its possible that I have the requirement to ROLLBACK the database 5 hours back because the application.
I am thinking to adopt following method from the official Oracle documentation (untilClause):
STARTUP FORCE MOUNT
RUN
SET UNTIL SCN 1418901; ## Any required SCN number will be used here.
RESTORE DATABASE;
RECOVER DATABASE;
ALTER DATABASE OPEN RESETLOGS;
I will of course take LEVEL0 backup tonight and LEVEL1 backup before the start of work.
My humble question to you is that: If this is the correct method I am adopting? and if yes, then what about Physical standby database? Will there something to restore/recover too? or it's not required or standby database need to create again (which I am afraid of)?
Flash back is not enabled.
Bundle of thanks for the suggestion.
Best Regardshello John-MK,
My humble question to you is that: If this is the correct method I am adopting?
the method is correct but not the BEST PRACTICE...create a RESTORE POINT instead of using SCN. for example:
SET UNTIL RESTORE POINT before_app_changes;
1. drawbacks of using flashback feature are:
a. you need more disk space
b. there is CPU overhead associated with flashback log operation
c.compulsorily need to use fast recovery area and you can not backup flashback log
d.others..
but my own opinion, i think the advantage out weight the drawbacks, since you are paying for it already
2. if the standby database did not apply redo data past the new resetlogs SCN, then you do not need to re-build. no manual intervention
HTH
Tobi -
RMAN - Incremental backup / NOARCHIVELOG / Restore & Recover Until Cancel
I'm testing out a weekly plan as follows:
Sun : Shutdown db, RMAN level 0 Incremental Backup
Mon-Sat: Shutdown db, RMAN level 1 Incremental Backup.
The database is NOARCHIVELOG mode and is 10.2 XE.
I then run a restore (which I understand to be to move the datafiles from the backup set to their online location). My next aim is to do a recover.
I'm really confused at this point. Say I take the backup the night before (either a level 0 or 1, I'm assuming that this makes no difference) then in the morning I drop a table accidentally. Okay - I want to go back to the position after the backup. When I do recover, I understand that Oracle applies redo logs written since the backup.
So I don't want a recover, I want a recover until cancel. When I issue this command it is suggesting that I use an archive log file. Well obviously I don't have any of those so I press cancel thinking that this will bring me back to the point EXACTLY AFTER THE NIGHTLY BACKUP and with my table back. But it doesn't!
I would be really grateful if anyone has a definitive answer to this - what are the steps to recover a database to the point after the backup was taken ignoring any changes since the backup.
Thanks all.
Tom.Hi Werner
Do you mean if the online logs are available with the changes after the last backup until the database restore then there is a possibility to apply changes? Ie at this point I could put in the redo log names instead of the archive log names.
If they have been overwritten since the backup (ie cycled round completely) then is the behaviour to restore the database and then not apply any logs?
Do you know if this is documented anywhere? There seems to be an emphasis on ARCHIVELOG mode only, especially in the books I have seen.
Thanks,
Tom -
"list backup of tablespace" - Not coming out back to RMAN prompt
Hi All,
We have a script to perform the restore and recover test process.
In that we have given the command "list backup of tablespace <tablespace name > summary" to check if the tablespace is backedup successfully.
Its returning the list of backup pieces, but it hangs in that stage without coming back to RMAN prompt.
I have manually loged in to rman session and typed "list backup of tablespace <tablespace name > summary", after listing the backup it hangs and not coming back to RMAN prompt.
Please advice on this.
Thanks & Regards,
RakeshAnd your version and operating system are?
Is this a production system with other things running or a home machine with minimal resources?
If Windows specifically which edition of the Windows software (don't just say XP). -
Hello,
How do i know what SEQUENCE and THREAD to put into the command, is there any query to run?
Example:
RMAN> RUN
SET UNTIL SEQUENCE 11 THREAD 1;
DUPLICATE TARGET DATABASE TO "clone" NOFILENAMECHECK;
With regardsAssuming a non-RAC database, it is always THREAD 1 (i.e. you do NOT need to specify the THREAD).
For the SEQUENCE value, query V$ARCHIVED_LOG for the max(SEQUENCE#).
Hemant K Chitale
Maybe you are looking for
-
How do my partner and I share our calendars on our iPhones?
Hello. I am completely new to all of this so I apologise if I don't follow any protocols correctly. I would love some help to figure out the best way for my partner and I to share our calendars on our iPhones please. I have done a lot of research
-
Access to different application in same server
Any know an easy way to access the JNDI/EJB of a different application running in the same server? Perry Hoekstra, MS E-Commerce Architect Talent Software Services
-
Problem passing parameter to crystal report subreport from *.aspx page
Background: I am developing a .NET web application using Visual Studio 2005. The code behind is in VB.net. One of my asp.net pages calls a report, which is invoked when the user clicks a Print button. I have developed this report using the Crystal Re
-
How do i install windows 8 from an ISO
I have a MacBook Pro (13-inch Early 2011) running OS X Mountain Lion (10.8.2) and want to install windows 8 (x86) from an ISO file but do not know how to? Any ideas? Thanks, Andy
-
I am using Oracle BPM 10gR3 studio. I want to access the processes available in bpm through core java client from eclipse. Could anyone explain me how can i access the bpm process from java client ? Thanks in advance.