› Fóruns › Banco de dados Oracle › Restore de Controlfile com RMAN › Restore de Controlfile com RMAN
João da uma olhada nesse roteiro que criei pode lhe ajudar.
Recuperação com RMAN , após remoção “crash” do arquivo de controle (CONTROL-FILE) com a base on-line.
Backup do Control-file: (O backup do control file deve ser sempre incluso na rotina diária de backup).
RMAN> backup current controlfile tag ‘BKP_CTL’ format ‘/u03/wis/bkp_ctl_%d_%U_%s.rman’;
Starting backup at 29-JUL-09
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=149 devtype=DISK
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
channel ORA_DISK_1: starting piece 1 at 29-JUL-09
channel ORA_DISK_1: finished piece 1 at 29-JUL-09
piece handle=/u03/wis/bkp_ctl_WIS_04klbn9d_1_1_4.rman tag=BKP_CTL comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 29-JUL-09
[oracle@admbidev wis]$ rm -rf control02.ctl
SQL> select * from dba_data_files ;
select * from dba_data_files
*
ERROR at line 1:
ORA-00210: cannot open the specified control file
ORA-00202: control file: ‘/u03/wis/control02.ctl’
ORA-27041: unable to open file
Linux Error: 2: No such file or directory
Additional information: 3
SQL> shutdown immediate ;
ORA-00210: cannot open the specified control file
ORA-00202: control file: ‘/u03/wis/control02.ctl’
ORA-27041: unable to open file
Linux Error: 2: No such file or directory
Additional information: 3
SQL> shutdown abort ;
ORACLE instance shut down.
[oracle@admbidev wis]$ rman target /
Recovery Manager: Release 10.2.0.3.0 – Production on Wed Jul 29 11:01:43 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database (not started)
RMAN> startup nomount ;
Oracle instance started
Total System Global Area 536870912 bytes
Fixed Size 1262788 bytes
Variable Size 155192124 bytes
Database Buffers 373293056 bytes
Redo Buffers 7122944 bytes
RMAN> RESTORE CONTROLFILE FROM ‘/u03/wis/bkp_ctl_WIS_04klbn9d_1_1_4.rman’;
Starting restore at 29-JUL-09
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:02
output filename=/u03/wis/control01.ctl
output filename=/u03/wis/control02.ctl
Finished restore at 29-JUL-09
RMAN> alter database mount ;
database mounted
released channel: ORA_DISK_1
RMAN> recover database;
Starting recover at 29-JUL-09
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
starting media recovery
archive log thread 1 sequence 1 is already on disk as file /u03/wis/redo04.log
archive log filename=/u03/wis/redo04.log thread=1 sequence=1
media recovery complete, elapsed time: 00:00:00
Finished recover at 29-JUL-09
RMAN> alter database open resetlogs;
database opened
RMAN> shutdown immediate ;
database closed
database dismounted
Oracle instance shut down
RMAN> startup ;
connected to target database (not started)
Oracle instance started
database mounted
database opened
Total System Global Area 536870912 bytes
Fixed Size 1262788 bytes
Variable Size 155192124 bytes
Database Buffers 373293056 bytes
Redo Buffers 7122944 bytes
Aporveito pra divulgar meu Blog aonde coloquei esses exemplos de
backup/restore.
https://profissionaloracle.com.br/blogs/vieri/
Mershan grátis!! heuaheu
[]s