Reestore rman

Solo disponible en BuenasTareas
  • Páginas : 3 (651 palabras )
  • Descarga(s) : 0
  • Publicado : 17 de mayo de 2011
Leer documento completo
Vista previa del texto
restore controlfile to '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/spfileorcl.ora' from '/u02/RMAN/spfile_ORCL_751_20110511.ora';

run {
crosscheck archivelog all;
delete expired archivelog all;crosscheck backup;
report obsolete;
delete noprompt obsolete;
allocate channel disk1 type disk;
backup format '/u02/RMAN/spfile_%d_%s_%T.ora' tag 'spfile backup' spfile;
BACKUP as COMPRESSEDBACKUPSET DATABASE format '/u02/RMAN/%T_%d_%p_%t_%u.dbf';
backup format '/u02/RMAN/%T_%d_%p_%t_%u.alf' archivelog all delete input;
backup format '/u02/RMAN/%T_%d_%p_%t_%u.ctf' current controlfile;release channel disk1;
}

run {
crosscheck archivelog all;
crosscheck backup;
allocate channel disk1 type disk;
backup format '/u02/RMAN/spfile_%d_%s_%T.ora' tag 'spfile backup' spfile;
BACKUPas COMPRESSED BACKUPSET DATABASE format '/u02/RMAN/%T_%d_%p_%t_%u.dbf';
backup format '/u02/RMAN/%T_%d_%p_%t_%u.alf' archivelog all delete input;
backup format '/u02/RMAN/%T_%d_%p_%t_%u.ctf' currentcontrolfile;
release channel disk1;
}

run {
allocate channel disk1 type disk;
restore controlfile from '/u02/RMAN/20110511_ORCL_1_750866361_nmmc2jtp.ctf';
release channel disk1;
}

run {allocate channel disk1 type disk;
set until time "to_date('11-05-2011 13:58:00','dd-mm-yyyy hh24:mi:ss')";
set newname for datafile '/Biometria/app/oracle/oradata/orcl/system01.dbf' to'/u02/oradata/orcl/datafile/system01.dbf';
set newname for datafile '/Biometria/app/oracle/oradata/orcl/undotbs01.dbf' to '/u02/oradata/orcl/datafile/undotbs01.dbf';
set newname fordatafile '/Biometria/app/oracle/oradata/orcl/sysaux01.dbf' to '/u02/oradata/orcl/datafile/sysaux01.dbf';
set newname for datafile '/Biometria/app/oracle/oradata/orcl/users01.dbf' to'/u02/oradata/orcl/datafile/users01.dbf';
set newname for datafile '/Biometria/app/oracle/oradata/orcl/users02.dbf' to '/u02/oradata/orcl/datafile/users02.dbf';
set...
tracking img