- 最后登录
- 2015-4-22
- 在线时间
- 122 小时
- 威望
- 133
- 金钱
- 1304
- 注册时间
- 2012-2-22
- 阅读权限
- 50
- 帖子
- 144
- 精华
- 1
- 积分
- 133
- UID
- 254
|
1#
发表于 2013-1-17 17:16:23
|
查看: 3902 |
回复: 2
都在说flashback database 后,以resetlogs打开数据库后,不能向前闪回,只能往后闪回
实验如下:
注意,一旦resetlogs之后,将不能再flashback至resetlogs之前的时间点
我这个实验,好像可以,但如果涉及之后有表空间创建或数据文件添加。估计就不行了。
这是昨天的操作,和时间
17:47:09 sys@TEST10G> create tablespace test_flashback datafile '/u01/oradata/TEST10G/test_flashback.dbf' size 1M ;
Tablespace created.
17:48:59 sys@TEST10G> create table saup.flashback_recover1 tablespace test_flashback as select * from dba_objects where rownum<8000;
Table created.
这是今天的操作和时间- 16:31:03 sys@TEST10G> flashback database to timestamp to_timestamp('2013-01-16 18:00:00','yyyy-mm-dd hh24:mi:ss');
- Flashback complete.
- 16:31:46 sys@TEST10G> alter database open resetlogs;
- Database altered.
- 16:32:17 sys@TEST10G> shutdown immediate;
- 16:32:49 sys@TEST10G> startup mount
- 16:32:57 sys@TEST10G> flashback database to timestamp to_timestamp('2013-01-16 20:00:00','yyyy-mm-dd hh24:mi:ss');
- Flashback complete.
- 16:33:12 sys@TEST10G> flashback database to timestamp to_timestamp('2013-01-16 17:00:00','yyyy-mm-dd hh24:mi:ss');
- Flashback complete.
- 16:33:59 sys@TEST10G> flashback database to timestamp to_timestamp('2013-01-16 16:30:00','yyyy-mm-dd hh24:mi:ss');
- Flashback complete.
- 16:34:10 sys@TEST10G>
- 16:34:10 sys@TEST10G> alter database open resetlogs;
- Database altered.
- 16:34:26 sys@TEST10G> select CREATED,RESETLOGS_CHANGE#,RESETLOGS_TIME from v$database;
- CREATED RESETLOGS_CHANGE# RESETLOGS_TIME
- ------------------- ----------------- -------------------
- 2013-01-16 16:03:01 616073 2013-01-17 16:34:24
- 16:34:48 sys@TEST10G> shutdown immediate;
- 16:35:18 sys@TEST10G> startup mount
- 16:35:47 sys@TEST10G> select * from v$flashback_database_log;
- OLDEST_FLASHBACK_SCN OLDEST_FLASHBACK_TI RETENTION_TARGET FLASHBACK_SIZE ESTIMATED_FLASHBACK_SIZE
- -------------------- ------------------- ---------------- -------------- ------------------------
- 615690 2013-01-16 16:23:23 1440 36864000 0
- 16:36:13 sys@TEST10G> flashback database to timestamp to_timestamp('2013-01-16 16:25:00','yyyy-mm-dd hh24:mi:ss');
- Flashback complete.
- 16:36:46 sys@TEST10G> flashback database to timestamp to_timestamp('2013-01-16 17:25:00','yyyy-mm-dd hh24:mi:ss');
- Flashback complete.
- 16:37:10 sys@TEST10G> flashback database to timestamp to_timestamp('2013-01-16 16:25:00','yyyy-mm-dd hh24:mi:ss');
- Flashback complete.
- 16:37:22 sys@TEST10G> flashback database to timestamp to_timestamp('2013-01-16 18:25:00','yyyy-mm-dd hh24:mi:ss');
- flashback database to timestamp to_timestamp('2013-01-16 18:25:00','yyyy-mm-dd hh24:mi:ss')
- *
- ERROR at line 1:
- ORA-38795: warning: FLASHBACK succeeded but OPEN RESETLOGS would get error below
- ORA-01245: offline file 6 will be lost if RESETLOGS is done
- ORA-01111: name for data file 6 is unknown - rename to correct file
- ORA-01110: data file 6: '/u01/app/oracle/product/10.2.0/test_10g/dbs/UNNAMED00006'
- 16:37:31 sys@TEST10G>
- 16:38:00 sys@TEST10G>
- 16:38:00 sys@TEST10G> flashback database to scn 621452;
- flashback database to scn 621452
- *
- ERROR at line 1:
- ORA-38795: warning: FLASHBACK succeeded but OPEN RESETLOGS would get error below
- ORA-01245: offline file 6 will be lost if RESETLOGS is done
- ORA-01111: name for data file 6 is unknown - rename to correct file
- ORA-01110: data file 6: '/u01/app/oracle/product/10.2.0/test_10g/dbs/UNNAMED00006'
复制代码 |
|