› Fóruns › Banco de dados Oracle › RMAN › RMAN
Vamo lá galera !! 😀
Seguinte fiz os passo todinhos novamente do zero !
Resultado tudo CERTO!!
Restore OK.
RECOVER mais ou MENOS.. risos…
Seguinte:
disparei meu script:
rman target /
STARTUP NOMOUNT
SET DBID=428367008;
RESTORE CONTROLFILE FROM ‘/u03/wis/full_wis_692811273_2’;
ALTER DATABASE MOUNT;
RUN {
ALLOCATE CHANNEL C1 DEVICE TYPE DISK;
ALLOCATE CHANNEL C2 DEVICE TYPE DISK;
ALLOCATE CHANNEL C3 DEVICE TYPE DISK;
ALLOCATE CHANNEL C4 DEVICE TYPE DISK;
SET UNTIL SEQUENCE 1190 THREAD 1;
set newname for datafile 1 to ‘/u03/wis/system01.dbf’;
set newname for datafile 2 to ‘/u03/wis/undotbs1.dbf’;
set newname for datafile 3 to ‘/u03/wis/sysauy01.dbf’;
set newname for datafile 4 to ‘/u03/wis/data_entrega.dbf’;
set newname for datafile 5 to ‘/u03/wis/data_entrega_small.dbf’;
set newname for datafile 6 to ‘/u03/wis/gkoscf_dtau.dbf’;
set newname for datafile 7 to ‘/u03/wis/gkoscf_inau.dbf’;
set newname for datafile 8 to ‘/u03/wis/gkoscf_indy.dbf’;
set newname for datafile 9 to ‘/u03/wis/indy_entrega.dbf’;
set newname for datafile 10 to ‘/u03/wis/tbs_data_asstec.dbf’;
set newname for datafile 11 to ‘/u03/wis/tbs_data_cestqhist_32m.dbf’;
set newname for datafile 12 to ‘/u03/wis/tbs_data_detprep_32m.dbf’;
set newname for datafile 13 to ‘/u03/wis/tbs_data_hist_256k.dbf’;
set newname for datafile 14 to ‘/u03/wis/tbs_data_hist_32m.dbf’;
set newname for datafile 15 to ‘/u03/wis/tbs_data_hist_5m.dbf’;
set newname for datafile 16 to ‘/u03/wis/tbs_data_hist_64m.dbf’;
set newname for datafile 17 to ‘/u03/wis/tbs_data_inet.dbf’;
set newname for datafile 18 to ‘/u03/wis/tbs_data_sge.dbf’;
set newname for datafile 19 to ‘/u03/wis/tbs_data_trcmovestq_64m.dbf’;
set newname for datafile 20 to ‘/u03/wis/tbs_data_wis_256k.dbf’;
set newname for datafile 21 to ‘/u03/wis/tbs_data_wis_32m.dbf’;
set newname for datafile 22 to ‘/u03/wis/tbs_data_wis_5m.dbf’;
set newname for datafile 23 to ‘/u03/wis/tbs_indy_asstec.dbf’;
set newname for datafile 24 to ‘/u03/wis/tbs_indy_cestqhist_32m.dbf’;
set newname for datafile 25 to ‘/u03/wis/tbs_indy_detprep__32m.dbf’;
set newname for datafile 26 to ‘/u03/wis/tbs_indy_hist_256k.dbf’;
set newname for datafile 27 to ‘/u03/wis/tbs_indy_inet.dbf’;
set newname for datafile 28 to ‘/u03/wis/tbs_indy_sge.dbf’;
set newname for datafile 29 to ‘/u03/wis/tbs_indy_trcmovestq_64m.dbf’;
set newname for datafile 30 to ‘/u03/wis/tbs_indy_wis_256k.dbf’;
set newname for datafile 31 to ‘/u03/wis/tbs_indy_wis_32m.dbf’;
set newname for datafile 32 to ‘/u03/wis/tbs_indy_wis_5m.dbf’;
set newname for datafile 33 to ‘/u03/wis/tools.dbf’;
set newname for datafile 34 to ‘/u03/wis/undotbs2.dbf’;
set newname for datafile 35 to ‘/u03/wis/users.dbf’;
set newname for datafile 36 to ‘/u03/wis/gkoscf_data.dbf’;
RESTORE DATABASE;
switch datafile all;
RECOVER DATABASE ;
ALTER DATABASE OPEN RESETLOGS;
}
Ele fez tudo certo, restaurou os archivos fez o switch perfeitamente!!! 🙂
Mas na hora do recover ele reclamou do SCN.
então mudei de método ao invês do until sequence
que peguei na v$log da origem… usei o SCN que obtive
no list backup do meu destino.
veja abaixo.
RMAN> run{
2> set until sequence 5256322985 ;
3> recover database;
4> }
executing command: SET until clause
Starting recover at 24-JUL-09
using channel ORA_DISK_1
starting media recovery
unable to find archive log
archive log thread=1 sequence=1195
Oracle Error:
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01190: control file or data file 1 is from before the last RESETLOGS
ORA-01110: data file 1: ‘/u03/wis/system01.dbf’
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 07/24/2009 14:01:55
RMAN-06054: media recovery requesting unknown log: thread 1 seq 1195 lowscn 5669424646
RMAN> run{
2> set until sequence 5256322985 ;
3> recover database noredo;
4> }
executing command: SET until clause
Starting recover at 24-JUL-09
using channel ORA_DISK_1
Finished recover at 24-JUL-09
com o NOREDO ele conseguiu fazer acho que foi
porque tinha alguma transação no redo que não archivei
no bkp on-line, devia ter dado mais de um switch.
obs: Rodrigo vai me concertando ai…. heheheh
RMAN> alter database open ;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 07/24/2009 14:02:58
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open
Ele me pediu para abrir com resetlogs
RMAN> alter database open resetlogs ;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 07/24/2009 14:03:08
ORA-00344: unable to re-create online log ‘/u02/oracle/oradata/wis/redo01.log’
ORA-27040: file create error, unable to create file
Linux Error: 2: No such file or directory
não entendi porque ele quis criar o REDO no u02 !?!?!
FALTA POUCO!!!!! 8)
Se precisa de mais informação me diga…