jueves, 31 de marzo de 2011

Duplicate RMAN - VERITAS

connect catalog rman/rman@CATALOGO;
connect target sys/lolo@CLIENTE;
connect auxiliary sys/telecom;
resync catalog;
RUN {
ALLOCATE AUXILIARY CHANNEL ch00
TYPE 'SBT_TAPE' parms 'SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64.1,ENV=(NB_ORA_CLIENT=sdigbogsisg021-bck,NB_ORA_POLICY=sdigbogsisg021_DB_NOMINA_F_DS,NB_ORA_SERV=bksrv01-se
na,NB_ORA_SCHED=Default-Application-Backup)';

ALLOCATE AUXILIARY CHANNEL ch01
TYPE 'SBT_TAPE' parms 'SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64.1,ENV=(NB_ORA_CLIENT=sdigbogsisg021-bck,NB_ORA_POLICY=sdigbogsisg021_DB_NOMINA_F_DS,NB_ORA_SERV=bksrv01-se
na,NB_ORA_SCHED=Default-Application-Backup)';

SET NEWNAME FOR DATAFILE 1 to '/u02/oradata/NOMINA/sistema/system01.dbf' ;
SET NEWNAME FOR DATAFILE 2 to '/u02/oradata/NOMINA/sistema/undotbs01.dbf' ;
SET NEWNAME FOR DATAFILE 3 to '/u02/oradata/NOMINA/sistema/sysaux01.dbf' ;
SET NEWNAME FOR DATAFILE 4 to '/u02/oradata/NOMINA/sistema/users01.dbf' ;
SET NEWNAME FOR DATAFILE 5 to '/u02/oradata/NOMINA/sistema/cwmlite01.dbf' ;
SET NEWNAME FOR DATAFILE 6 to '/u02/oradata/NOMINA/sistema/drsys01.dbf' ;
SET NEWNAME FOR DATAFILE 7 to '/u02/oradata/NOMINA/sistema/indx01.dbf' ;
SET NEWNAME FOR DATAFILE 8 to '/u02/oradata/NOMINA/datos/KACTUS_DAT02.DBF' ;
SET NEWNAME FOR DATAFILE 9 to '/u02/oradata/NOMINA/datos/KACTUS_DAT01.DBF' ;
SET NEWNAME FOR DATAFILE 10 to '/u02/oradata/NOMINA/indices/KACTUS_NDX01.DBF' ;
SET NEWNAME FOR DATAFILE 11 to '/u02/oradata/NOMINA/datos/KACTUS_RBK01.DBF' ;
SET NEWNAME FOR DATAFILE 12 to '/u02/oradata/NOMINA/sistema/odm01.dbf' ;
SET NEWNAME FOR DATAFILE 13 to '/u02/oradata/NOMINA/sistema/tools01.dbf' ;
SET NEWNAME FOR DATAFILE 14 to '/u02/oradata/NOMINA/sistema/xdb01.dbf' ;
SET NEWNAME FOR DATAFILE 15 to '/u02/oradata/NOMINA/sistema/example01.dbf' ;
SET NEWNAME FOR DATAFILE 16 to '/u02/oradata/NOMINA/sistema/UNDOTBS201.dbf' ;
set until time "to_date('01/30/2011 23:08:00','mm/dd/yyyy hh24:mi:ss')";
DUPLICATE TARGET DATABASE TO NOMINA
PFILE=/u01/oracle/db/10.2.0/dbs/initNOMINA.ora
NOFILENAMECHECK
LOGFILE
GROUP 1 ('/u02/oradata/NOMINA/redologs/redo01B.log') size 200M reuse,
GROUP 2 ('/u02/oradata/NOMINA/redologs/redo02B.log') size 200M reuse,
GROUP 3 ('/u02/oradata/NOMINA/redologs/redo03B.log') size 200M reuse ;
RELEASE CHANNEL ch00 ;
RELEASE CHANNEL ch01 ;
}

lunes, 28 de marzo de 2011

Laboratorio List Incarnation

SQL> shutdown immediate;









Database closed.









Database dismounted.









ORACLE instance shut down.









SQL>









SQL>









SQL>









SQL> startup mount;









ORACLE instance started.

















Total System Global Area 1610612736 bytes









Fixed Size 2139256 bytes









Variable Size 396188552 bytes









Database Buffers 1207959552 bytes









Redo Buffers 4325376 bytes









Database mounted.









SQL>









SQL> alter database archivelog ;

















Database altered.

















SQL> alter database open;

















Database altered.

















SQL> show parameter db_recovery;

















NAME TYPE VALUE









------------------------------------ ----------- ------------------------------









db_recovery_file_dest string /u01/app/oracle/flash_recovery









_area









db_recovery_file_dest_size big integer 5G









SQL>

























SQL> select * from v$instance;

















INSTANCE_NUMBER INSTANCE_NAME









--------------- ----------------









HOST_NAME









----------------------------------------------------------------









VERSION STARTUP_T STATUS PAR THREAD# ARCHIVE LOG_SWITCH_WAIT









----------------- --------- ------------ --- ---------- ------- ---------------









LOGINS SHU DATABASE_STATUS INSTANCE_ROLE ACTIVE_ST BLO









---------- --- ----------------- ------------------ --------- ---









1 acme









afrodita









10.2.0.4.0 28-MAR-11 OPEN NO 1 STARTED









ALLOWED NO ACTIVE PRIMARY_INSTANCE NORMAL NO

































Recovery Manager: Release 10.2.0.4.0 - Production on Mon Mar 28 14:19:32 2011

















Copyright (c) 1982, 2007, Oracle. All rights reserved.

















connected to target database: ACME (DBID=1931435799)

















RMAN> backup database;

















Starting backup at 28-MAR-11









using target database control file instead of recovery catalog









allocated channel: ORA_DISK_1









channel ORA_DISK_1: sid=154 devtype=DISK









channel ORA_DISK_1: starting full datafile backupset









channel ORA_DISK_1: specifying datafile(s) in backupset









input datafile fno=00001 name=/u01/app/oracle/oradata/acme/system01.dbf









input datafile fno=00003 name=/u01/app/oracle/oradata/acme/sysaux01.dbf









input datafile fno=00005 name=/u01/app/oracle/oradata/acme/example01.dbf









input datafile fno=00002 name=/u01/app/oracle/oradata/acme/undotbs01.dbf









input datafile fno=00004 name=/u01/app/oracle/oradata/acme/users01.dbf









channel ORA_DISK_1: starting piece 1 at 28-MAR-11









channel ORA_DISK_1: finished piece 1 at 28-MAR-11









piece handle=/u01/app/oracle/flash_recovery_area/ACME/backupset/2011_03_28/o1_mf_nnndf_TAG20110328T141943_6s1qthww_.bkp tag=TAG20110328T141943 comment=NONE









channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15









channel ORA_DISK_1: starting full datafile backupset









channel ORA_DISK_1: specifying datafile(s) in backupset









including current control file in backupset









including current SPFILE in backupset









channel ORA_DISK_1: starting piece 1 at 28-MAR-11









channel ORA_DISK_1: finished piece 1 at 28-MAR-11









piece handle=/u01/app/oracle/flash_recovery_area/ACME/backupset/2011_03_28/o1_mf_ncsnf_TAG20110328T141943_6s1qtz6y_.bkp tag=TAG20110328T141943 comment=NONE









channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01









Finished backup at 28-MAR-11

















RMAN>

























[afrodita_POWER ]# sqlplus '/as sysdba'

















SQL*Plus: Release 10.2.0.4.0 - Production on Mon Mar 28 14:20:30 2011

















Copyright (c) 1982, 2007, Oracle. All Rights Reserved.

























Connected to:









Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production









With the Partitioning, OLAP, Data Mining and Real Application Testing options

















SQL> alter user hr account unlock;

















User altered.

















SQL> alter user hr identified by hr;

















User altered.

















SQL> connect hr/hr;









Connected.









SQL>









SQL> select * from tab;

















TNAME TABTYPE CLUSTERID









------------------------------ ------- ----------









REGIONS TABLE









COUNTRIES TABLE









LOCATIONS TABLE









DEPARTMENTS TABLE









JOBS TABLE









EMPLOYEES TABLE









JOB_HISTORY TABLE









EMP_DETAILS_VIEW VIEW

















8 rows selected.

















SQL> select count(*) from regions;

















COUNT(*)









----------









4

















SQL> desc regions;









Name Null? Type









----------------------------------------- -------- ----------------------------









REGION_ID NOT NULL NUMBER









REGION_NAME VARCHAR2(25)

















SQL> select * from regions;

















REGION_ID REGION_NAME









---------- -------------------------









1 Europe









2 Americas









3 Asia









4 Middle East and Africa

















SQL> insert into regions values (5,'Oceania');

















1 row created.

















SQL> insert into regions values (6,'Pacifico');

















1 row created.

















SQL> commit;

















Commit complete.

















SQL> archive log list;









ORA-01031: insufficient privileges









SQL> exit









Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production









With the Partitioning, OLAP, Data Mining and Real Application Testing options









[afrodita_POWER ]# sqlplus '/as sysdba'

















SQL*Plus: Release 10.2.0.4.0 - Production on Mon Mar 28 14:22:20 2011

















Copyright (c) 1982, 2007, Oracle. All Rights Reserved.

























Connected to:









Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production









With the Partitioning, OLAP, Data Mining and Real Application Testing options

















SQL> archive log list;









Database log mode Archive Mode









Automatic archival Enabled









Archive destination USE_DB_RECOVERY_FILE_DEST









Oldest online log sequence 1









Next log sequence to archive 2









Current log sequence 2









SQL>

























SQL> archive log list;









Database log mode Archive Mode









Automatic archival Enabled









Archive destination USE_DB_RECOVERY_FILE_DEST









Oldest online log sequence 1









Next log sequence to archive 2









Current log sequence 2









SQL>









SQL> alter system switch logfile;

















System altered.

















SQL> archive log list;









Database log mode Archive Mode









Automatic archival Enabled









Archive destination USE_DB_RECOVERY_FILE_DEST









Oldest online log sequence 1









Next log sequence to archive 3









Current log sequence 3









SQL>

















SQL> delete from hr.locations where location_id=3200;

















1 row deleted.

















SQL> commit;

















Commit complete.

















SQL>

















SQL> alter system switch logfile;

















System altered.

















SQL>

















SQL> alter system switch logfile;

















System altered.

















SQL> archive log list;









Database log mode Archive Mode









Automatic archival Enabled









Archive destination USE_DB_RECOVERY_FILE_DEST









Oldest online log sequence 2









Next log sequence to archive 4









Current log sequence 4









SQL>

















[afrodita_POWER ]# rman target /

















Recovery Manager: Release 10.2.0.4.0 - Production on Mon Mar 28 14:25:58 2011

















Copyright (c) 1982, 2007, Oracle. All rights reserved.

















connected to target database: ACME (DBID=1931435799)

















RMAN> backup archivelog all;

















Starting backup at 28-MAR-11









current log archived









using target database control file instead of recovery catalog









allocated channel: ORA_DISK_1









channel ORA_DISK_1: sid=73 devtype=DISK









channel ORA_DISK_1: starting archive log backupset









channel ORA_DISK_1: specifying archive log(s) in backup set









input archive log thread=1 sequence=2 recid=1 stamp=746979791









input archive log thread=1 sequence=3 recid=2 stamp=746979929









input archive log thread=1 sequence=4 recid=3 stamp=746979965









channel ORA_DISK_1: starting piece 1 at 28-MAR-11









channel ORA_DISK_1: finished piece 1 at 28-MAR-11









piece handle=/u01/app/oracle/flash_recovery_area/ACME/backupset/2011_03_28/o1_mf_annnn_TAG20110328T142606_6s1r6hrp_.bkp tag=TAG20110328T142606 comment=NONE









channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02









Finished backup at 28-MAR-11

















RMAN>

























SQL*Plus: Release 10.2.0.4.0 - Production on Mon Mar 28 14:27:00 2011

















Copyright (c) 1982, 2007, Oracle. All Rights Reserved.

























Connected to:









Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production









With the Partitioning, OLAP, Data Mining and Real Application Testing options

















SQL> select name from v$Datafile;

















NAME









--------------------------------------------------------------------------------









/u01/app/oracle/oradata/acme/system01.dbf









/u01/app/oracle/oradata/acme/undotbs01.dbf









/u01/app/oracle/oradata/acme/sysaux01.dbf









/u01/app/oracle/oradata/acme/users01.dbf









/u01/app/oracle/oradata/acme/example01.dbf

















SQL>

















[afrodita_POWER ]# cd /u01/app/oracle/oradata/acme/









[afrodita_POWER ]# rm system01.dbf









[afrodita_POWER ]# pwd









/u01/app/oracle/oradata/acme









[afrodita_POWER ]# ls









control01.ctl control02.ctl control03.ctl example01.dbf redo01.log redo02.log redo03.log sysaux01.dbf temp01.dbf undotbs01.dbf users01.dbf









[afrodita_POWER ]#









[afrodita_POWER ]# sqlplus '/as sysdba'

















SQL*Plus: Release 10.2.0.4.0 - Production on Mon Mar 28 14:28:33 2011

















Copyright (c) 1982, 2007, Oracle. All Rights Reserved.

























Connected to:









Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production









With the Partitioning, OLAP, Data Mining and Real Application Testing options

















SQL> select * from v$database;









select * from v$database









*









ERROR at line 1:









ORA-00604: error occurred at recursive SQL level 2









ORA-01116: error in opening database file 1









ORA-01110: data file 1: '/u01/app/oracle/oradata/acme/system01.dbf'









ORA-27041: unable to open file









SVR4 Error: 2: No such file or directory









Additional information: 3

























SQL>

















Recovery Manager complete.









[afrodita_POWER ]#









[afrodita_POWER ]#









[afrodita_POWER ]# sqlplus '/as sysdba'

















SQL*Plus: Release 10.2.0.4.0 - Production on Mon Mar 28 14:29:17 2011

















Copyright (c) 1982, 2007, Oracle. All Rights Reserved.

























Connected to:









Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production









With the Partitioning, OLAP, Data Mining and Real Application Testing options

















SQL> shutdown immediate;









ORA-01116: error in opening database file 1









ORA-01110: data file 1: '/u01/app/oracle/oradata/acme/system01.dbf'









ORA-27041: unable to open file









SVR4 Error: 2: No such file or directory









Additional information: 3









SQL>









SQL> shutdown abort;









ORACLE instance shut down.









SQL>

















[afrodita_POWER ]# rman target /

















Recovery Manager: Release 10.2.0.4.0 - Production on Mon Mar 28 14:29:46 2011

















Copyright (c) 1982, 2007, Oracle. All rights reserved.

















connected to target database (not started)

















RMAN> list backup summary;

















using target database control file instead of recovery catalog









RMAN-00571: ===========================================================









RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============









RMAN-00571: ===========================================================









RMAN-03002: failure of list command at 03/28/2011 14:29:50









RMAN-06403: could not obtain a fully authorized session









ORA-01034: ORACLE not available









ORA-27101: shared memory realm does not exist









SVR4 Error: 2: No such file or directory

















RMAN> exit

























Recovery Manager complete.









[afrodita_POWER ]#









[afrodita_POWER ]#









[afrodita_POWER ]# sqlplus '/as sysdba'

















SQL*Plus: Release 10.2.0.4.0 - Production on Mon Mar 28 14:29:57 2011

















Copyright (c) 1982, 2007, Oracle. All Rights Reserved.

















Connected to an idle instance.

















SQL> startup nomount;









ORACLE instance started.

















Total System Global Area 1610612736 bytes









Fixed Size 2139256 bytes









Variable Size 396188552 bytes









Database Buffers 1207959552 bytes









Redo Buffers 4325376 bytes









SQL>









SQL> exit









Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production









With the Partitioning, OLAP, Data Mining and Real Application Testing options









[afrodita_POWER ]#









[afrodita_POWER ]# rman target /

















Recovery Manager: Release 10.2.0.4.0 - Production on Mon Mar 28 14:30:10 2011

















Copyright (c) 1982, 2007, Oracle. All rights reserved.

















connected to target database: acme (not mounted)

















RMAN>

















[afrodita_POWER ]# rman target /

















Recovery Manager: Release 10.2.0.4.0 - Production on Mon Mar 28 14:30:10 2011

















Copyright (c) 1982, 2007, Oracle. All rights reserved.

















connected to target database: acme (not mounted)

















RMAN> list backup summary;

















using target database control file instead of recovery catalog









RMAN-00571: ===========================================================









RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============









RMAN-00571: ===========================================================









RMAN-03002: failure of list command at 03/28/2011 14:30:29









ORA-01507: database not mounted

















RMAN> alter database mount;

















database mounted

















RMAN>

























RMAN> list backup summary;

























List of Backups









===============









Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag









------- -- -- - ----------- --------------- ------- ------- ---------- ---









1 B F A DISK 28-MAR-11 1 1 NO TAG20110328T141943









2 B F A DISK 28-MAR-11 1 1 NO TAG20110328T141943









3 B A A DISK 28-MAR-11 1 1 NO TAG20110328T142606

















RMAN> report schema;

















Report of database schema

















List of Permanent Datafiles









===========================









File Size(MB) Tablespace RB segs Datafile Name









---- -------- -------------------- ------- ------------------------









1 0 SYSTEM *** /u01/app/oracle/oradata/acme/system01.dbf









2 25 UNDOTBS1 *** /u01/app/oracle/oradata/acme/undotbs01.dbf









3 240 SYSAUX *** /u01/app/oracle/oradata/acme/sysaux01.dbf









4 5 USERS *** /u01/app/oracle/oradata/acme/users01.dbf









5 100 EXAMPLE *** /u01/app/oracle/oradata/acme/example01.dbf

















List of Temporary Files









=======================









File Size(MB) Tablespace Maxsize(MB) Tempfile Name









---- -------- -------------------- ----------- --------------------









1 20 TEMP 32767 /u01/app/oracle/oradata/acme/temp01.dbf

















RMAN>

























RMAN> report schema;

















Report of database schema

















List of Permanent Datafiles









===========================









File Size(MB) Tablespace RB segs Datafile Name









---- -------- -------------------- ------- ------------------------









1 0 SYSTEM *** /u01/app/oracle/oradata/acme/system01.dbf









2 25 UNDOTBS1 *** /u01/app/oracle/oradata/acme/undotbs01.dbf









3 240 SYSAUX *** /u01/app/oracle/oradata/acme/sysaux01.dbf









4 5 USERS *** /u01/app/oracle/oradata/acme/users01.dbf









5 100 EXAMPLE *** /u01/app/oracle/oradata/acme/example01.dbf

















List of Temporary Files









=======================









File Size(MB) Tablespace Maxsize(MB) Tempfile Name









---- -------- -------------------- ----------- --------------------









1 20 TEMP 32767 /u01/app/oracle/oradata/acme/temp01.dbf

















RMAN> restore datafile 1;

















Starting restore at 28-MAR-11









allocated channel: ORA_DISK_1









channel ORA_DISK_1: sid=164 devtype=DISK

















channel ORA_DISK_1: starting datafile backupset restore









channel ORA_DISK_1: specifying datafile(s) to restore from backup set









restoring datafile 00001 to /u01/app/oracle/oradata/acme/system01.dbf









channel ORA_DISK_1: reading from backup piece /u01/app/oracle/flash_recovery_area/ACME/backupset/2011_03_28/o1_mf_nnndf_TAG20110328T141943_6s1qthww_.bkp









channel ORA_DISK_1: restored backup piece 1









piece handle=/u01/app/oracle/flash_recovery_area/ACME/backupset/2011_03_28/o1_mf_nnndf_TAG20110328T141943_6s1qthww_.bkp tag=TAG20110328T141943









channel ORA_DISK_1: restore complete, elapsed time: 00:00:07









Finished restore at 28-MAR-11

















RMAN> exit

















[afrodita_POWER ]# sqlplus '/as sysdba'

















SQL*Plus: Release 10.2.0.4.0 - Production on Mon Mar 28 14:32:32 2011

















Copyright (c) 1982, 2007, Oracle. All Rights Reserved.

























Connected to:









Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production









With the Partitioning, OLAP, Data Mining and Real Application Testing options

















SQL> select * from v$instance;

















INSTANCE_NUMBER INSTANCE_NAME









--------------- ----------------









HOST_NAME









----------------------------------------------------------------









VERSION STARTUP_T STATUS PAR THREAD# ARCHIVE LOG_SWITCH_WAIT









----------------- --------- ------------ --- ---------- ------- ---------------









LOGINS SHU DATABASE_STATUS INSTANCE_ROLE ACTIVE_ST BLO









---------- --- ----------------- ------------------ --------- ---









1 acme









afrodita









10.2.0.4.0 28-MAR-11 MOUNTED NO 1 STARTED









ALLOWED NO ACTIVE PRIMARY_INSTANCE NORMAL NO

























SQL> alter database open;









alter database open









*









ERROR at line 1:









ORA-01113: file 1 needs media recovery









ORA-01110: data file 1: '/u01/app/oracle/oradata/acme/system01.dbf'

















[afrodita_POWER ]# rman target /

















Recovery Manager: Release 10.2.0.4.0 - Production on Mon Mar 28 14:33:28 2011

















Copyright (c) 1982, 2007, Oracle. All rights reserved.

















connected to target database: ACME (DBID=1931435799, not open)

















RMAN> recover database;

















Starting recover at 28-MAR-11









using target database control file instead of recovery catalog









allocated channel: ORA_DISK_1









channel ORA_DISK_1: sid=165 devtype=DISK

















starting media recovery

















archive log thread 1 sequence 2 is already on disk as file /u01/app/oracle/flash_recovery_area/ACME/archivelog/2011_03_28/o1_mf_1_2_6s1r0z3y_.arc









archive log thread 1 sequence 3 is already on disk as file /u01/app/oracle/flash_recovery_area/ACME/archivelog/2011_03_28/o1_mf_1_3_6s1r596x_.arc









archive log thread 1 sequence 4 is already on disk as file /u01/app/oracle/flash_recovery_area/ACME/archivelog/2011_03_28/o1_mf_1_4_6s1r6fqm_.arc









archive log filename=/u01/app/oracle/flash_recovery_area/ACME/archivelog/2011_03_28/o1_mf_1_2_6s1r0z3y_.arc thread=1 sequence=2









media recovery complete, elapsed time: 00:00:03









Finished recover at 28-MAR-11

















RMAN> exit

























Recovery Manager complete.









[afrodita_POWER ]#

















RMAN> report schema;

















using target database control file instead of recovery catalog









Report of database schema

















List of Permanent Datafiles









===========================









File Size(MB) Tablespace RB segs Datafile Name









---- -------- -------------------- ------- ------------------------









1 480 SYSTEM *** /u01/app/oracle/oradata/acme/system01.dbf









2 25 UNDOTBS1 *** /u01/app/oracle/oradata/acme/undotbs01.dbf









3 240 SYSAUX *** /u01/app/oracle/oradata/acme/sysaux01.dbf









4 5 USERS *** /u01/app/oracle/oradata/acme/users01.dbf









5 100 EXAMPLE *** /u01/app/oracle/oradata/acme/example01.dbf

















List of Temporary Files









=======================









File Size(MB) Tablespace Maxsize(MB) Tempfile Name









---- -------- -------------------- ----------- --------------------









1 20 TEMP 32767 /u01/app/oracle/oradata/acme/temp01.dbf

























SQL> select RECID,SEQUENCE#,FIRST_CHANGE#,NEXT_CHANGE#,NEXT_TIME from v$archived_log;

















RECID SEQUENCE# FIRST_CHANGE# NEXT_CHANGE# NEXT_TIME









---------- ---------- ------------- ------------ ---------









1 2 574410 582931 28-MAR-11









2 3 582931 583033 28-MAR-11









3 4 583033 583053 28-MAR-11









4 5 583053 603153 28-MAR-11

















SQL>

























[afrodita_POWER ]# rman target /

















Recovery Manager: Release 10.2.0.4.0 - Production on Mon Mar 28 15:02:53 2011

















Copyright (c) 1982, 2007, Oracle. All rights reserved.

















connected to target database: ACME (DBID=1931435799, not open)

















RMAN> restore database until sequence 3;

















Starting restore at 28-MAR-11









using target database control file instead of recovery catalog









allocated channel: ORA_DISK_1









channel ORA_DISK_1: sid=77 devtype=DISK

















channel ORA_DISK_1: starting datafile backupset restore









channel ORA_DISK_1: specifying datafile(s) to restore from backup set









restoring datafile 00001 to /u01/app/oracle/oradata/acme/system01.dbf









restoring datafile 00002 to /u01/app/oracle/oradata/acme/undotbs01.dbf









restoring datafile 00003 to /u01/app/oracle/oradata/acme/sysaux01.dbf









restoring datafile 00004 to /u01/app/oracle/oradata/acme/users01.dbf









restoring datafile 00005 to /u01/app/oracle/oradata/acme/example01.dbf









channel ORA_DISK_1: reading from backup piece /u01/app/oracle/flash_recovery_area/ACME/backupset/2011_03_28/o1_mf_nnndf_TAG20110328T141943_6s1qthww_.bkp









channel ORA_DISK_1: restored backup piece 1









piece handle=/u01/app/oracle/flash_recovery_area/ACME/backupset/2011_03_28/o1_mf_nnndf_TAG20110328T141943_6s1qthww_.bkp tag=TAG20110328T141943









channel ORA_DISK_1: restore complete, elapsed time: 00:00:16









Finished restore at 28-MAR-11

















RMAN> recover database until sequence 3;

















Starting recover at 28-MAR-11









using channel ORA_DISK_1

















starting media recovery

















archive log thread 1 sequence 2 is already on disk as file /u01/app/oracle/flash_recovery_area/ACME/archivelog/2011_03_28/o1_mf_1_2_6s1r0z3y_.arc









archive log filename=/u01/app/oracle/flash_recovery_area/ACME/archivelog/2011_03_28/o1_mf_1_2_6s1r0z3y_.arc thread=1 sequence=2









media recovery complete, elapsed time: 00:00:02









Finished recover at 28-MAR-11

















RMAN> alter database open resetlogs;

















database opened

















RMAN>

























RMAN> alter database open resetlogs;

















database opened

















RMAN> list incarnation;

























List of Database Incarnations









DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time









------- ------- -------- ---------------- --- ---------- ----------









1 1 ACME 1931435799 PARENT 1 04-APR-08









2 2 ACME 1931435799 PARENT 543066 28-MAR-11









3 3 ACME 1931435799 CURRENT 582932 28-MAR-11

















RMAN>

























RMAN> RESET DATABASE TO INCARNATION 2;

















database reset to incarnation 2

















RMAN> list incarnation;

























List of Database Incarnations









DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time









------- ------- -------- ---------------- --- ---------- ----------









1 1 ACME 1931435799 PARENT 1 04-APR-08









2 2 ACME 1931435799 CURRENT 543066 28-MAR-11









3 3 ACME 1931435799 ORPHAN 582932 28-MAR-11

















RMAN>

















SQL> exit









Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production









With the Partitioning, OLAP, Data Mining and Real Application Testing options









[afrodita_POWER ]# rman target /

















Recovery Manager: Release 10.2.0.4.0 - Production on Mon Mar 28 15:21:51 2011

















Copyright (c) 1982, 2007, Oracle. All rights reserved.

















connected to target database: ACME (DBID=1931435799, not open)

















RMAN> restore database until sequence 6;

















Starting restore at 28-MAR-11









using target database control file instead of recovery catalog









allocated channel: ORA_DISK_1









channel ORA_DISK_1: sid=162 devtype=DISK

















channel ORA_DISK_1: starting datafile backupset restore









channel ORA_DISK_1: specifying datafile(s) to restore from backup set









restoring datafile 00001 to /u01/app/oracle/oradata/acme/system01.dbf









restoring datafile 00002 to /u01/app/oracle/oradata/acme/undotbs01.dbf









restoring datafile 00003 to /u01/app/oracle/oradata/acme/sysaux01.dbf









restoring datafile 00004 to /u01/app/oracle/oradata/acme/users01.dbf









restoring datafile 00005 to /u01/app/oracle/oradata/acme/example01.dbf









channel ORA_DISK_1: reading from backup piece /u01/app/oracle/flash_recovery_area/ACME/backupset/2011_03_28/o1_mf_nnndf_TAG20110328T141943_6s1qthww_.bkp









channel ORA_DISK_1: restored backup piece 1









piece handle=/u01/app/oracle/flash_recovery_area/ACME/backupset/2011_03_28/o1_mf_nnndf_TAG20110328T141943_6s1qthww_.bkp tag=TAG20110328T141943









channel ORA_DISK_1: restore complete, elapsed time: 00:00:16









Finished restore at 28-MAR-11

















RMAN> recover database until sequence 6;

















Starting recover at 28-MAR-11









using channel ORA_DISK_1

















starting media recovery

















archive log thread 1 sequence 2 is already on disk as file /u01/app/oracle/flash_recovery_area/ACME/archivelog/2011_03_28/o1_mf_1_2_6s1r0z3y_.arc









archive log thread 1 sequence 3 is already on disk as file /u01/app/oracle/flash_recovery_area/ACME/archivelog/2011_03_28/o1_mf_1_3_6s1r596x_.arc









archive log thread 1 sequence 4 is already on disk as file /u01/app/oracle/flash_recovery_area/ACME/archivelog/2011_03_28/o1_mf_1_4_6s1r6fqm_.arc









archive log thread 1 sequence 5 is already on disk as file /u01/app/oracle/flash_recovery_area/ACME/archivelog/2011_03_28/o1_mf_1_5_6s1rodqj_.arc









archive log filename=/u01/app/oracle/flash_recovery_area/ACME/archivelog/2011_03_28/o1_mf_1_2_6s1r0z3y_.arc thread=1 sequence=2









archive log filename=/u01/app/oracle/flash_recovery_area/ACME/archivelog/2011_03_28/o1_mf_1_3_6s1r596x_.arc thread=1 sequence=3









archive log filename=/u01/app/oracle/flash_recovery_area/ACME/archivelog/2011_03_28/o1_mf_1_4_6s1r6fqm_.arc thread=1 sequence=4









archive log filename=/u01/app/oracle/flash_recovery_area/ACME/archivelog/2011_03_28/o1_mf_1_5_6s1rodqj_.arc thread=1 sequence=5









media recovery complete, elapsed time: 00:00:01









Finished recover at 28-MAR-11

















RMAN> alter database open;

















RMAN-00571: ===========================================================









RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============









RMAN-00571: ===========================================================









RMAN-03002: failure of alter db command at 03/28/2011 15:24:05









ORA-01589: must use RESETLOGS or NORESETLOGS option for database open

















RMAN> alter database open resetlogs;

















database opened

















RMAN> list incarnation;

























List of Database Incarnations









DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time









------- ------- -------- ---------------- --- ---------- ----------









1 1 ACME 1931435799 PARENT 1 04-APR-08









2 2 ACME 1931435799 PARENT 543066 28-MAR-11









3 3 ACME 1931435799 ORPHAN 582932 28-MAR-11









4 4 ACME 1931435799 CURRENT 603154 28-MAR-11

















RMAN>






























Restore Incarnation

RMAN> run {
2> set until sequence 13;
3> RESTORE CONTROLFILE;
4> ALTER DATABASE MOUNT;
5> restore database;
6> recover database;
7> alter database open resetlogs;
8> }

executing command: SET until clause
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of set command at 07/24/2008 17:31:29
ORA-01507: database not mounted

RMAN> run {
2> set until sequence 13;
3> RESTORE CONTROLFILE;
4> ALTER DATABASE MOUNT;
5> restore database;
6> recover database;
7> alter database open resetlogs;
8> }

executing command: SET until clause
released channel: ORA_DISK_1

Starting restore at 24/07/2008
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=155 devtype=DISK

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 07/24/2008 17:31:50
RMAN-06496: must use the TO clause when the database is mounted or open

RMAN> run {
2> set until sequence 13;
3> restore database;
4> recover database;
5> alter database open resetlogs;
6> }

executing command: SET until clause

Starting restore at 24/07/2008
using channel ORA_DISK_1

skipping datafile 1; already restored to file D:\ORACLE\PRODUCT\10.2.0\ORADATA\POWER\SYSTEM01.DBF
skipping datafile 2; already restored to file D:\ORACLE\PRODUCT\10.2.0\ORADATA\POWER\UNDOTBS01.DBF
skipping datafile 3; already restored to file D:\ORACLE\PRODUCT\10.2.0\ORADATA\POWER\SYSAUX01.DBF
skipping datafile 4; already restored to file D:\ORACLE\PRODUCT\10.2.0\ORADATA\POWER\USERS01.DBF
skipping datafile 5; already restored to file D:\ORACLE\PRODUCT\10.2.0\ORADATA\POWER\EXAMPLE01.DBF
restore not done; all files readonly, offline, or already restored
Finished restore at 24/07/2008

Starting recover at 24/07/2008
using channel ORA_DISK_1

starting media recovery
media recovery failed
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 07/24/2008 17:32:33
ORA-00283: recovery session canceled due to errors
RMAN-11003: failure during parse/execution of SQL statement: alter database recover if needed
start until cancel
ORA-00283: recovery session canceled due to errors
ORA-38727: FLASHBACK DATABASE requires a current control file.

RMAN> list backup;


List of Backup Sets
===================

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
1 Full 626.77M DISK 00:10:58 24/07/2008
BP Key: 1 Status: AVAILABLE Compressed: NO Tag: TAG20080724T155413
Piece Name: D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\POWER\BACKUPSET\2008_07_24\O1_MF_NNNDF_TAG20080724T155413_48KV0HJM_.BKP
List of Datafiles in backup set 1
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- ---------- ----
1 Full 3615824 24/07/2008 D:\ORACLE\PRODUCT\10.2.0\ORADATA\POWER\SYSTEM01.DBF
2 Full 3615824 24/07/2008 D:\ORACLE\PRODUCT\10.2.0\ORADATA\POWER\UNDOTBS01.DBF
3 Full 3615824 24/07/2008 D:\ORACLE\PRODUCT\10.2.0\ORADATA\POWER\SYSAUX01.DBF
4 Full 3615824 24/07/2008 D:\ORACLE\PRODUCT\10.2.0\ORADATA\POWER\USERS01.DBF
5 Full 3615824 24/07/2008 D:\ORACLE\PRODUCT\10.2.0\ORADATA\POWER\EXAMPLE01.DBF

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
2 Full 6.80M DISK 00:00:04 24/07/2008
BP Key: 2 Status: AVAILABLE Compressed: NO Tag: TAG20080724T155413
Piece Name: D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\POWER\BACKUPSET\2008_07_24\O1_MF_NCSNF_TAG20080724T155413_48KVNRTV_.BKP
Control File Included: Ckp SCN: 3616477 Ckp time: 24/07/2008
SPFILE Included: Modification time: 24/07/2008

BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
3 19.74M DISK 00:00:07 24/07/2008
BP Key: 3 Status: AVAILABLE Compressed: NO Tag: TAG20080724T160839
Piece Name: D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\POWER\BACKUPSET\2008_07_24\O1_MF_ANNNN_TAG20080724T160839_48KVTTJM_.BKP

List of Archived Logs in backup set 3
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- ---------- ---------- ---------
1 4 3596066 24/07/2008 3614571 24/07/2008
1 5 3614571 24/07/2008 3617076 24/07/2008

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
4 Full 627.39M DISK 00:05:53 24/07/2008
BP Key: 4 Status: AVAILABLE Compressed: NO Tag: TAG20080724T161713
Piece Name: D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\POWER\BACKUPSET\2008_07_24\O1_MF_NNNDF_TAG20080724T161713_48KWC3LK_.BKP
List of Datafiles in backup set 4
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- ---------- ----
1 Full 3617578 24/07/2008 D:\ORACLE\PRODUCT\10.2.0\ORADATA\POWER\SYSTEM01.DBF
2 Full 3617578 24/07/2008 D:\ORACLE\PRODUCT\10.2.0\ORADATA\POWER\UNDOTBS01.DBF
3 Full 3617578 24/07/2008 D:\ORACLE\PRODUCT\10.2.0\ORADATA\POWER\SYSAUX01.DBF
4 Full 3617578 24/07/2008 D:\ORACLE\PRODUCT\10.2.0\ORADATA\POWER\USERS01.DBF
5 Full 3617578 24/07/2008 D:\ORACLE\PRODUCT\10.2.0\ORADATA\POWER\EXAMPLE01.DBF

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
5 Full 6.80M DISK 00:00:03 24/07/2008
BP Key: 5 Status: AVAILABLE Compressed: NO Tag: TAG20080724T161713
Piece Name: D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\POWER\BACKUPSET\2008_07_24\O1_MF_NCSNF_TAG20080724T161713_48KWP4B8_.BKP
Control File Included: Ckp SCN: 3618105 Ckp time: 24/07/2008
SPFILE Included: Modification time: 24/07/2008

BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
6 20.81M DISK 00:00:04 24/07/2008
BP Key: 6 Status: AVAILABLE Compressed: NO Tag: TAG20080724T162416
Piece Name: D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\POWER\BACKUPSET\2008_07_24\O1_MF_ANNNN_TAG20080724T162416_48KWR44W_.BKP

List of Archived Logs in backup set 6
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- ---------- ---------- ---------
1 4 3596066 24/07/2008 3614571 24/07/2008
1 5 3614571 24/07/2008 3617076 24/07/2008
1 6 3617076 24/07/2008 3617287 24/07/2008
1 7 3617287 24/07/2008 3617404 24/07/2008
1 8 3617404 24/07/2008 3617462 24/07/2008
1 9 3617462 24/07/2008 3617519 24/07/2008
1 10 3617519 24/07/2008 3618207 24/07/2008

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
7 Full 627.49M DISK 00:07:19 24/07/2008
BP Key: 7 Status: AVAILABLE Compressed: NO Tag: TAG20080724T162743
Piece Name: D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\POWER\BACKUPSET\2008_07_24\O1_MF_NNNDF_TAG20080724T162743_48KWYQY8_.BKP
List of Datafiles in backup set 7
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- ---------- ----
1 Full 3618390 24/07/2008 D:\ORACLE\PRODUCT\10.2.0\ORADATA\POWER\SYSTEM01.DBF
2 Full 3618390 24/07/2008 D:\ORACLE\PRODUCT\10.2.0\ORADATA\POWER\UNDOTBS01.DBF
3 Full 3618390 24/07/2008 D:\ORACLE\PRODUCT\10.2.0\ORADATA\POWER\SYSAUX01.DBF
4 Full 3618390 24/07/2008 D:\ORACLE\PRODUCT\10.2.0\ORADATA\POWER\USERS01.DBF
5 Full 3618390 24/07/2008 D:\ORACLE\PRODUCT\10.2.0\ORADATA\POWER\EXAMPLE01.DBF

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
8 Full 6.80M DISK 00:00:02 24/07/2008
BP Key: 8 Status: AVAILABLE Compressed: NO Tag: TAG20080724T162743
Piece Name: D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\POWER\BACKUPSET\2008_07_24\O1_MF_NCSNF_TAG20080724T162743_48KXDQXS_.BKP
Control File Included: Ckp SCN: 3618757 Ckp time: 24/07/2008
SPFILE Included: Modification time: 24/07/2008

BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
9 21.50M DISK 00:00:06 24/07/2008
BP Key: 9 Status: AVAILABLE Compressed: NO Tag: TAG20080724T163756
Piece Name: D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\POWER\BACKUPSET\2008_07_24\O1_MF_ANNNN_TAG20080724T163756_48KXKXD6_.BKP

List of Archived Logs in backup set 9
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- ---------- ---------- ---------
1 4 3596066 24/07/2008 3614571 24/07/2008
1 5 3614571 24/07/2008 3617076 24/07/2008
1 6 3617076 24/07/2008 3617287 24/07/2008
1 7 3617287 24/07/2008 3617404 24/07/2008
1 8 3617404 24/07/2008 3617462 24/07/2008
1 9 3617462 24/07/2008 3617519 24/07/2008
1 10 3617519 24/07/2008 3618207 24/07/2008
1 11 3618207 24/07/2008 3618290 24/07/2008
1 12 3618290 24/07/2008 3618378 24/07/2008
1 13 3618378 24/07/2008 3618971 24/07/2008

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
10 Full 627.35M DISK 00:08:47 24/07/2008
BP Key: 10 Status: AVAILABLE Compressed: NO Tag: TAG20080724T170051
Piece Name: D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\POWER\BACKUPSET\2008_07_24\O1_MF_NNNDF_TAG20080724T170051_48KYX1CQ_.BKP
List of Datafiles in backup set 10
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- ---------- ----
1 Full 3618900 24/07/2008 D:\ORACLE\PRODUCT\10.2.0\ORADATA\POWER\SYSTEM01.DBF
2 Full 3618900 24/07/2008 D:\ORACLE\PRODUCT\10.2.0\ORADATA\POWER\UNDOTBS01.DBF
3 Full 3618900 24/07/2008 D:\ORACLE\PRODUCT\10.2.0\ORADATA\POWER\SYSAUX01.DBF
4 Full 3618900 24/07/2008 D:\ORACLE\PRODUCT\10.2.0\ORADATA\POWER\USERS01.DBF
5 Full 3618900 24/07/2008 D:\ORACLE\PRODUCT\10.2.0\ORADATA\POWER\EXAMPLE01.DBF

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
11 Full 6.80M DISK 00:00:15 24/07/2008
BP Key: 11 Status: AVAILABLE Compressed: NO Tag: TAG20080724T170051
Piece Name: D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\POWER\BACKUPSET\2008_07_24\O1_MF_NCSNF_TAG20080724T170051_48KZGD98_.BKP
Control File Included: Ckp SCN: 3619437 Ckp time: 24/07/2008
SPFILE Included: Modification time: 24/07/2008

BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
12 21.84M DISK 00:00:07 24/07/2008
BP Key: 12 Status: AVAILABLE Compressed: NO Tag: TAG20080724T171116
Piece Name: D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\POWER\BACKUPSET\2008_07_24\O1_MF_ANNNN_TAG20080724T171116_48KZJ81Y_.BKP

List of Archived Logs in backup set 12
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- ---------- ---------- ---------
1 4 3596066 24/07/2008 3614571 24/07/2008
1 5 3614571 24/07/2008 3617076 24/07/2008
1 6 3617076 24/07/2008 3617287 24/07/2008
1 7 3617287 24/07/2008 3617404 24/07/2008
1 8 3617404 24/07/2008 3617462 24/07/2008
1 9 3617462 24/07/2008 3617519 24/07/2008
1 10 3617519 24/07/2008 3618207 24/07/2008
1 11 3618207 24/07/2008 3618290 24/07/2008
1 12 3618290 24/07/2008 3618378 24/07/2008
1 13 3618378 24/07/2008 3618971 24/07/2008
1 14 3618971 24/07/2008 3619228 24/07/2008

BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
13 3.03M DISK 00:00:01 24/07/2008
BP Key: 13 Status: AVAILABLE Compressed: NO Tag: TAG20080724T171116
Piece Name: D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\POWER\BACKUPSET\2008_07_24\O1_MF_ANNNN_TAG20080724T171116_48KZJJB8_.BKP

List of Archived Logs in backup set 13
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- ---------- ---------- ---------
1 1 3617405 24/07/2008 3618813 24/07/2008
1 2 3618813 24/07/2008 3619524 24/07/2008

RMAN> run {
2> set until sequence 13;
3> restore database;
4> recover database;
5> alter database open resetlogs;
6> }

executing command: SET until clause

Starting restore at 24/07/2008
using channel ORA_DISK_1

skipping datafile 1; already restored to file D:\ORACLE\PRODUCT\10.2.0\ORADATA\POWER\SYSTEM01.DBF
skipping datafile 2; already restored to file D:\ORACLE\PRODUCT\10.2.0\ORADATA\POWER\UNDOTBS01.DBF
skipping datafile 3; already restored to file D:\ORACLE\PRODUCT\10.2.0\ORADATA\POWER\SYSAUX01.DBF
skipping datafile 4; already restored to file D:\ORACLE\PRODUCT\10.2.0\ORADATA\POWER\USERS01.DBF
skipping datafile 5; already restored to file D:\ORACLE\PRODUCT\10.2.0\ORADATA\POWER\EXAMPLE01.DBF
restore not done; all files readonly, offline, or already restored
Finished restore at 24/07/2008

Starting recover at 24/07/2008
using channel ORA_DISK_1

starting media recovery

archive log thread 1 sequence 10 is already on disk as file D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\POWER\ARCHIVELOG\2008_07_24\O1_MF_1_10_48KWQZ
JM_.ARC
archive log thread 1 sequence 11 is already on disk as file D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\POWER\ARCHIVELOG\2008_07_24\O1_MF_1_11_48KWTD
00_.ARC
archive log thread 1 sequence 12 is already on disk as file D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\POWER\ARCHIVELOG\2008_07_24\O1_MF_1_12_48KWXQ
OZ_.ARC
archive log filename=D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\POWER\ARCHIVELOG\2008_07_24\O1_MF_1_10_48KWQZJM_.ARC thread=1 sequence=10
archive log filename=D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\POWER\ARCHIVELOG\2008_07_24\O1_MF_1_11_48KWTD00_.ARC thread=1 sequence=11
archive log filename=D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\POWER\ARCHIVELOG\2008_07_24\O1_MF_1_12_48KWXQOZ_.ARC thread=1 sequence=12
media recovery complete, elapsed time: 00:00:07
Finished recover at 24/07/2008

database opened

RMAN> list incarnation;


List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1 1 POWER 1581044439 PARENT 1 30/08/2005
2 2 POWER 1581044439 PARENT 534907 24/07/2008
3 3 POWER 1581044439 ORPHAN 3617405 24/07/2008
4 4 POWER 1581044439 CURRENT 3618379 24/07/2008

RMAN>


COMO LO RE RECUPERE

Database dismounted.
ORACLE instance shut down.
SQL> startup nomount;
ORACLE instance started.

Total System Global Area 167772160 bytes
Fixed Size 1247876 bytes
Variable Size 104859004 bytes
Database Buffers 54525952 bytes
Redo Buffers 7139328 bytes
SQL>
SQL> alter database mount;

Database altered.

NOTA: SE DEBE DESACTIVAR EL MODE FLASHBACK

SQL> alter database flashback off;

Database altered.

SQL>

run {
set until sequence 13;
restore database;
recover database;
alter database open resetlogs;
}


Point-in-Time Recovery to a Previous Incarnation
RMAN can seamlessly restore and recover backups from previous incarnations to the current incarnation. To perform point-in-time recovery to a target time prior to the most recent RESETLOGS, however, you must run the RESET DATABASE command to reset the database to the incarnation current at the desired target time.

Assume the following situation:

You run RMAN with a recovery catalog.
You made a backup of target database trgt on October 2, 2002.
You performed incomplete recovery on this database and opened it with the RESETLOGS option on October 10, 2002. A new database incarnation was created.
On October 25, you discover that you need crucial data that was dropped from the database at 8:00 a.m. on October 8, 2002. You decide to reset trgt to the prior incarnation, restore the October 2 backup, and recover to 7:55 a.m. on October 8.


--------------------------------------------------------------------------------
Note:
It is not possible to restore one datafile of a previous incarnation while the current database is in a different incarnation--you must restore the whole database.

--------------------------------------------------------------------------------


To recover the database by means of a backup from the old incarnation:

Obtain the primary key of the prior incarnation with a LIST command:
# obtain primary key of old incarnation
LIST INCARNATION OF DATABASE trgt;

List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
------- ------- ------- ------ ------- ---------- ----------
1 2 TRGT 1224038686 PARENT 1 02-OCT-02
1 582 TRGT 1224038686 CURRENT 59727 10-OCT-02


Make sure the database is started but not mounted:
SHUTDOWN FORCE NOMOUNT


Reset the incarnation to the primary key that you just obtained:

# reset database to old incarnation

RESET DATABASE TO INCARNATION 2;


Recover the database, performing the following actions in the RUN command:
Set the end time for recovery to the time just before the loss of the data.
If automatic channels are not configured, then manually allocate one or more channels.
Restore the control file and mount it.
Restore and recover the database.
For example, run the following commands:

RUN
{
# set time to just before data was lost.
SET UNTIL TIME 'Oct 8 2002 07:55:00';
RESTORE CONTROLFILE; # FROM AUTOBACKUP not needed in catalog mode
ALTER DATABASE MOUNT; # mount database after restoring control file
RESTORE DATABASE;
RECOVER DATABASE;
}


If recovery is successful, then reset the online redo logs:
# this command automatically resets the database so that this incarnation is
# the new incarnation
ALTER DATABASE OPEN RESETLOGS;













/////////////////////////////////////////////////////////////////

CONNECT TARGET / NOCATALOG

# step 1: start and mount a control file that knows about the incarnation to which
# you want to return. if the current control file does not know about it, then
# you must restore an older control file
STARTUP NOMOUNT;
RESTORE CONTROLFILE UNTIL TIME 'SYSDATE-250';
ALTER DATABASE MOUNT;

# step 2: obtain the primary key of old incarnation
LIST INCARNATION OF DATABASE trgt;

List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
------- ------- -------- ------------- ------- ---------- ----------
1 2 TRGT 1334358386 PARENT 154381 OCT 30 2001 16:02:12
1 116 TRGT 1334358386 CURRENT 154877 OCT 30 2001 16:37:39

# step 3: in this example, reset database to incarnation key 2
RESET DATABASE TO INCARNATION 2;

# step 4: restore and recover the database to a point before the RESETLOGS
RESTORE DATABASE UNTIL SCN 154876;
RECOVER DATABASE UNTIL SCN 154876;

# step 5: make this incarnation the current incarnation and then list incarnations:
ALTER DATABASE OPEN RESETLOGS;
LIST INCARNATION OF DATABASE trgt;


List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
------- ------- -------- ---------------- ------- ---------- ----------
1 2 TRGT 1334358386 PARENT 154381 OCT 30 2001 16:02:12
1 116 TRGT 1334358386 PARENT 154877 OCT 30 2001 16:37:39
1 311 TRGT 1334358386 CURRENT 154877 AUG 13 2002 17:17:03
Resetting the Database After Incomplete Recovery: Example

This example assumes that an incomplete recovery or recovery with a backup control file was performed in NOCATALOG mode. Later, RMAN is started in CATALOG mode, but the RESYNC command fails because the incarnation has not been reset in the catalog.

% rman target / catalog rman/rman@catdb

Recovery Manager: Release 10.1.0.2.0 - Production

Copyright (c) 1995, 2003, Oracle. All rights reserved.

connected to target database: TRGT (DBID=1334531173)
connected to recovery catalog database

RMAN> RESYNC CATALOG;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of resync command on default channel at 11/01/2001 12:00:43
RMAN-20003: target database incarnation not found in recovery catalog

RMAN> RESET DATABASE;

new incarnation of database registered in recovery catalog
starting full resync of recovery catalog
full resync complete

miércoles, 9 de marzo de 2011

RAC Voting Disk Problem

Voting Disk que presentaba problemas en un cliente , el cual poseía un RAC de 4 nodos en 10gr2, el problema era que uno de los nodos sufría problemas de Eviction , o sea, el GSSD lo botaba del Cluster.

Las máquinas involucradas..

nodo1 168.10.10.1
nodo2 168.10.10.2
nodo3 168.10.10.3
nodo4 168.10.10.4

1.- Comenzamos con el respaldo físico del voting disk

Desde nodo1 (168.10.10.1)

Lo consultamos, para saber donde está
nodo1> crsctl query css votedisk
0. 0 /dev/rhdisk3

located 1 votedisk(s).
nodo1>





Y se respalda fisicamente (esto no esta soportado en 11gr2)

nodo1> dd if=/dev/rhdisk3 of=voting_resp_10-09-2010.dbf

nodo1> ls -ltr
total 2050816
-rw-r--r-- 1 oracle oinstall 524943360 Sep 10 01:05 voting_resp_10-09-2010.dbf
nodo1>

nodo1> pwd
/home/oracle
nodo1>





2.- Se añade el vote disk con root, pero indica error dado que se encuentra el clusterware arriba, hay documentación que dice que se puede hacer con el comando force, pero esto no se recomienda, dado que se podrían presentar problemas de corrupción.

bash-2.05b# /u1/app/oracle/product/10.2.0/bin/crsctl add css votedisk /dev/rhdisk48
Cluster is not in a ready state for online disk addition





3.- Se bajan las instancias Oracle con usuario oracle

crs_stop -all





4.- Se verifica el estado del crs en cada nodo (se debe ejecutar el comando en cada máquina)

[nodo1]# /u1/app/oracle/product/10.2.0/bin/crsctl check crs
CSS appears healthy
CRS appears healthy
EVM appears healthy


Como se visualiza UP, hay que bajarlo.




5.- Se baja el clusterware en todos los nodos (este comando se debe ejecutar en todos los nodos)

[nodo1]# /u1/app/oracle/product/10.2.0/bin/crsctl stop crs
Stopping resources.
Successfully stopped CRS resources
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.





6.- Se añade el voting disk con la opción force , dado que se encuentra el CRS abajo. Esta tarea puede ser realizada desde cualquier nodo

[nodo2]# /u1/app/oracle/product/10.2.0/bin/crsctl add css votedisk /dev/rhdisk48 -force
Now formatting voting disk: /dev/rhdisk48
successful addition of votedisk /dev/rhdisk48.
[nodo2]#





7.- Verificamos los voting disk existentes, debiesen aparecer el nuevo y el antiguo

[nodo2]# /u1/app/oracle/product/10.2.0/bin/crsctl query css votedisk
0. 0 /dev/rhdisk3
1. 0 /dev/rhdisk48 --> Nuevo

located 2 votedisk(s).





8.- Borramos el voting disk anterior con la opción force

[nodo2]# /u1/app/oracle/product/10.2.0/bin/crsctl delete css votedisk /dev/rhdisk3 -force
successful deletion of votedisk /dev/rhdisk3.





9.- Consultamos nuevamente el votedisk

[nodo2]# /u1/app/oracle/product/10.2.0/bin/crsctl query css votedisk
0. 0 /dev/rhdisk48

located 1 votedisk(s).





10.- Levantamos clusterware en todos los nodos (se debe ejecutar el mismo comando en todos los nodos)

[nodo2]# /u1/app/oracle/product/10.2.0/bin/crsctl start crs
Attempting to start CRS stack
The CRS stack will be started shortly





11.- Verificamos el clusterware

/u1/app/oracle/product/10.2.0/bin/crsctl check crs
CSS appears healthy
CRS appears healthy
EVM appears healthy





12.- Y procedemos a levantar todos los componentes y servicios de nuestro clusterware

/u1/app/oracle/product/10.2.0/bin/crs_start -all