Below is the expple for a timebase recover for a distaer (delete dbf, redo and ctl files).
16:18 (12 July 2007)
create table t1 (a number);
16:45 (12 July 2007)
insert into t1 values (1);
insert into t1 values (1);
insert into t1 values (1);
insert into t1 values (1);
16:56 (12 July 2007)
insert into t1 values (222);
insert into t1 values (222);
insert into t1 values (222);
insert into t1 values (222);
16:59 (12 July 2007)
insert into t1 values (999);
insert into t1 values (999);
insert into t1 values (999);
insert into t1 values (999);
17:05 (12 July 2007) Delete all files form /u01 D1AR inc system 1 redo, 1 control
[D1AR]$ ls
control01.ctl D1AR_INDX_01.dbf redo01.log system01.dbf undotbs01.dbf
D1AR_DRSYS_01.dbf D1AR_INDX_02.dbf sysaux01.dbf temp01.dbf users01.dbf
[D1AR]$ rm *.dbf
[D1AR]$ rm *.log
[D1AR]$ rm *.ctl
$ export NLS_LANG=.UTF8
$ export NLS_DATE_FORMAT='Mon DD YYYY HH24:MI:SS'
$ rman catalog rman/rman@rmandev
RMAN> connect target /
run {
restore database;
restore controlfile;
set until time 'JUL 12 2007 16:57:00';
recover database;
}
sql "alter database open resetlogs";
shutdown immediate;
startup;
Successful TEST, database is usable and output is:
SQL> select * from t1;
A
----------
1
1
1
1
222
222
222
222
No comments:
Post a Comment