BP Key: 4117 Status: AVAILABLE Compressed: NO Tag: TAG20160729T143033 Handle: 10rbtt89_1_1 Media: s3.amazonaws.com/rman_backup List of Datafiles in backup set 4117 File LV Type Ckp SCN Ckp Time Name ---- -- ---- ---------- ---------- ---- 4 Full 7840655778587 04/10/2016 /u01/oradata/BD01/users01.dbfBS Key Type LV Size Device Type Elapsed Time Completion Time------- ---- -- ---------- ----------- ------------ ---------------4118 Full 17.25M SBT_TAPE 00:01:05 04/10/2016 BP Key: 4118 Status: AVAILABLE Compressed: NO Tag: TAG20160729T143058 Handle: c-2858829824-20160729-01 Media: s3.amazonaws.com/rman_backup SPFILE Included: Modification time: 04/10/2016 SPFILE db_unique_name: BD01 Control File Included: Ckp SCN: 7840655778602 Ckp time: 04/10/2016 Apos a realizacao do backup fisico pelo RMAN, irei simular uma falha na instancia do Oracle e iniciar o processo de restore/recover do banco de dados.SQL*Plus: Release 11.2.0.3.0 Production on Tue Oct 4 10:15:32 2016Copyright (c) 1982, 2011, Oracle. All rights reserved.Connected to an idle instance.SQL> startupORACLE instance started.Total System Global Area 2137886720 bytesFixed Size 2230072 bytesVariable Size 1459620040 bytesDatabase Buffers 671088640 bytesRedo Buffers 4947968 bytesBanco de dados montado.ORA-01157: n?o e possivel identificar/bloquear arquivo de dados 4 - consultearquivo de analise DBWRORA-01110: 4 do arquivo de dados: '/u01/oradata/BD01/users01.dbf'Segue abaixo a simulacao do restore e recover do banco de dados.$ rman target /Recovery Manager: Release 11.2.0.3.0 - Production on Tue Oct 4 10:20:25 2016Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.connected to target database: BD01 (DBID=2858829824, not open)RMAN> restore datafile 4;Starting restore at 04/10/2016using target database control file instead of recovery catalogallocated channel: ORA_DISK_1channel ORA_DISK_1: SID=156 device type=DISKallocated channel: ORA_SBT_TAPE_1channel ORA_SBT_TAPE_1: SID=189 device type=SBT_TAPEchannel ORA_SBT_TAPE_1: Oracle Secure Backup Web Services Library VER=3.16.7.12channel ORA_SBT_TAPE_1: starting datafile backup set restorechannel ORA_SBT_TAPE_1: specifying datafile(s) to restore from backup setchannel ORA_SBT_TAPE_1: restoring datafile 00004 to /u01/oradata/BD01/users01.dbfchannel ORA_SBT_TAPE_1: reading from backup piece 10rbtt89_1_1channel ORA_SBT_TAPE_1: piece handle=10rbtt89_1_1 tag=TAG20160729T143033channel ORA_SBT_TAPE_1: restored backup piece 1channel ORA_SBT_TAPE_1: restore complete, elapsed time: 00:00:15Finished restore at 04/10/2016RMAN> recover datafile 4;Starting recover at 04/10/2016using channel ORA_DISK_1using channel ORA_SBT_TAPE_1starting media recoverymedia recovery complete, elapsed time: 00:00:02Finished recover at 04/10/2016RMAN> alter database open;database opened Caso seja necessario realizar um restore completo de todos os arquivos de dados incluindo control files e spfile segue um exemplo abaixo.$ export NLS_LANG=AMERICAN_AMERICA.WE8MSWIN1252$ export NLS_DATE_FORMAT='dd/mm/yyyy hh24:mi:ss'$ export ORA_RMAN_SGA_TARGET=512$ rman target /Recovery Manager: Release 11.2.0.3.0 - Production on Tue Oct 4 10:36:12 2016Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.connected to target database (not started)RMAN> startup nomountstartup failed: ORA-01078: failure in processing system parametersLRM-00109: could not open parameter file '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/initBD01.ora'starting Oracle instance without parameter file for retrieval of spfileOracle instance startedTotal System Global Area 534462464 bytesFixed Size 2230072 bytesVariable Size 192940232 bytesDatabase Buffers 331350016 bytesRedo Buffers 7942144 bytesRMAN> run {2> allocate channel d1_tape_backup DEVICE TYPE 'SBT_TAPE' PARMS 'SBT_PARMS=(OSB_WS_PFILE=/u01/app/oracle/product/11.2.0/dbhome_1/dbs/osbwsBD01.ora),SBT_LIBRARY=/u01/app/oracle/product/11.2.0/dbhome_1/lib/libosbws.so';3> set DBID 28588298244> restore spfile from autobackup;5> release channel d1_tape_backup;6> }using target database control file instead of recovery catalogallocated channel: d1_tape_backupchannel d1_tape_backup: SID=396 device type=SBT_TAPEchannel d1_tape_backup: Oracle Secure Backup Web Services Library VER=3.16.7.12executing command: SET DBIDStarting restore at 04/10/2016 10:46:13channel d1_tape_backup: looking for AUTOBACKUP on day: 20160801channel d1_tape_backup: AUTOBACKUP found: c-2858829824-20160801-02channel d1_tape_backup: restoring spfile from AUTOBACKUP c-2858829824-20160801-02channel d1_tape_backup: SPFILE restore from AUTOBACKUP completeFinished restore at 04/10/2016 10:49:07released channel: d1_tape_backupRMAN> shutdown immediateOracle instance shut downRMAN> startup nomountconnected to target database