Weakness Of Flashback
Weakness Of Flashback it would fail as a result of controlfile recreate,? ???????????????????????????? drop tablespace,? ???????????????????????????? shrink datafile. 1)controlfile receate would disable flashback. 1@@@@prepare @@@backup controlfile RMAN> backup current controlfile format '/u01/app/oracle/flash_recovery_area/ ORCL/man_backup_controlfile/controlfile_2011_11_28.bkp'; ? @@@find the flashback time point. SQL> select sysdate from dual; SYSDATE ------------------- 2011-11-28 01:26:05 ? @@@remove controlfile SQL> show parameter control NAME???????????????????????????????? TYPE??????? VALUE ------------------------------------ ----------- ------------------------------ control_file_record_keep_time??????? integer???? 7 control_files??????????????????????? string????? /u01/app/oracle/oradata/orcl/c ???????????????????????????????????????????????? ontrol01.ctl,/u01/app/oracle/ ???????????????????????????????????????????????? oradata/orcl/control02.ctl,/u ???????????????????????????????????????????????? 01/app/oracle/oradata/orcl/con ???????????????????????????????????????????????? trol03.ctl [oracle@station3 orcl]$ rm -rf /u01/app/oracle/oradata/orcl/control* [oracle@station3 autobackup]$ rm -rf /u01/app/oracle/flash_recovery_area /ORCL/autobackup/* ? @@@controlfile also work,when you shutdown with 'immediate' option. SQL> shutdown immediate? ORA-00210: cannot open the specified control file ORA-00202: control file: '/u01/app/oracle/oradata/orcl/control01.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. ? 2@@@@begin rescue @@@ RMAN> restore controlfile from '/u01/app/oracle/flash_recovery_area/ ORCL/man_backup_controlfile/controlfile_2011_11_28.bkp'; RMAN> alter database mount; RMAN> recover database; RMAN> alter database open resetlogs; database opened ? 3@@@@check result. @@@ SQL> shutdown immediate? SQL> startup mount; RMAN> flashback database to time "to_date('2011-11-28 01:26:05',2> 'yyyy-mm-dd:hh24:mi:ss')"; starting media recovery media recovery failed RMAN-00571: ================================================= RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS === RMAN-00571: ================================================= RMAN-03002: failure of flashback command at 11/28/2011 01:43:21 ORA-38729: Not enough flashback database log data to do FLASHBACK. @@@ @@@OLDEST_FLASHBACK_TIME > that time before. SQL> select OLDEST_FLASHBACK_SCN,OLDEST_FLASHBACK_TIME? from v$flashback_database_log; OLDEST_FLASHBACK_SCN OLDEST_FLASHBACK_TI -------------------- ------------------- ????????????? 757257 2011-11-28 01:38:32 ? ? 2)shrink datafile would disable flashback. 1@@@@prepare @@@modify the time format is convenient for flashback. [oracle@station3 ~]$ vim .bash_profile? @@@add the line. export NLS_DATE_FORMAT="yyyy-mm-dd hh24:mi:ss" [oracle@station3 ~]$ .? .bash_profile ? SQL> select sysdate from dual;? SYSDATE ------------------- 2011-11-28 01:49:02 ? @@@check the enterprise manager=> tablespace => real used space. [oracle@station3 orcl]$ du -sh /u01/app/oracle/oradata/orcl/example01.dbf? 101M??? example01.dbf ? @@@shrink datafile.the rowid changed. SQL> alter database datafile '/u01/app/oracle/oradata/orcl/example01.dbf' resize 70M; Database altered. ? 2@@@@begin SQL> shutdown immediate; SQL> startup mount; [oracle@station3 orcl]$ rman target / RMAN> flashback database to time "to_date ('2011-11-28 01:49:02','yyyy-mm-dd hh24:mi:ss')"; starting media recovery media recovery failed RMAN-00571: ======================================================= RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ========= RMAN-00571: ======================================================= RMAN-03002: failure of flashback command at 11/28/2011 01:57:53 ORA-38766: cannot flashback data file 5; file resized smaller ORA-01110: data file 5: '/u01/app/oracle/oradata/orcl/example01.dbf' SQL> alter database open; ? 3@@@@check @@@through the OLDEST_FLASHBACK_TIME include that time before,@@@you could not flashback database to that time. SQL> select OLDEST_FLASHBACK_SCN,OLDEST_FLASHBACK_TIME? from v$flashback_database_log; OLDEST_FLASHBACK_SCN OLDEST_FLASHBACK_TI -------------------- ------------------- ????????????? 757257 2011-11-28 01:38:32 SQL> select sysdate from dual; SYSDATE ------------------- 2011-11-28 02:01:56 ? ? 3)drop tablespace would disable flashback 1@@@@prepare? @@@ SQL> create tablespace temp_permanent datafile? '/u01/app/oracle/oradata/orcl/t_permanent.dbf' size 100M; Tablespace created. SQL> select sysdate from dual ; SYSDATE ------------------- 2011-11-28 02:36:17 SQL> drop tablespace temp_permanent;? Tablespace dropped. @@@ RMAN> backup tablespace temp_permanent; ? 2@@@@begin @@@famous error: "unnamed00007" RMAN> flashback database to time "to_date ('2011-11-28 02:36:17','yyyy-mm-dd hh24:mi:ss')"; starting media recovery media recovery failed RMAN-00571: ======================================================= RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ========== RMAN-00571: ====================================================== RMAN-03002: failure of flashback command at 11/28/2011 02:40:09 ORA-38795: warning: FLASHBACK succeeded but OPEN RESETLOGS would get error below ORA-01245: offline file 7 will be lost if RESETLOGS is done ORA-01111: name for data file 7 is unknown - rename to correct file ORA-01110: data file 7: '/u01/app/oracle/product/10.2.0/db_1/dbs/UNNAMED00007' ? @@@???(continue.......) RMAN> restore tablespace temp_permanent RMAN-00571: ======================================================= RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ========== RMAN-00571: ====================================================== RMAN-03002: failure of restore command at 11/28/2011 02:47:16 RMAN-06085: must use SET NEWNAME command to restore? datafile /u01/app/oracle/product/10.2.0/db_1/dbs/UNNAMED00007 ? @@@ RMAN> flashback database to time "to_date ('2011-11-28 02:35:17','yyyy-mm-dd hh24:mi:ss')"; RMAN> alter database open resetlogs; database opened (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |