Configure flashback database [ID 249319.1]
<DIV>Configure flashback database </DIV><DIV> </DIV>
<DIV> </DIV>
<DIV> <BR>修改时间25-MAY-2011 类型 BULLETIN 状态 ARCHIVED<BR> </DIV>
<DIV>Applies to:<BR>Enterprise Manager for RDBMS<BR>Oracle Server - Enterprise Edition<BR>Oracle Server - Personal Edition<BR>Oracle Server - Standard Edition<BR>Information in this document applies to any platform.<BR>***Checked for relevance on 25-May-2011*** <BR>Purpose<BR>- What is Flashback Database?</DIV>
<DIV>- How to Configure a Flashback Database?<BR>Scope and Application<BR>This feature can be used by DBA's and Support Analysts to understand and<BR>configure Flashback database.<BR>Configure flashback database<BR>Flashback database<BR>-----------------------------<BR>- This a new feature introduced in 10g.<BR>- Flashbacking a database means going back to a previous database state.<BR>- The Flashback Database feature provides a way to quickly revert entire<BR> Oracle database to the state it was in at a past point in time.<BR>- This is different from traditional point in time recovery.<BR>- A new background process RVWR introduced which is responsible for writing<BR> flashback logs which stores pre-image(s) of data blocks<BR> - One can use Flashback Database to back out changes that:<BR> - Have resulted in logical data corruptions.<BR> - Are a result of user error.<BR>- This feature is not applicable for recovering the database in case of media<BR> failure.<BR>- The time required for flashbacking a database to a specific time in past is<BR> DIRECTLY PROPORTIONAL to the number of changes made and not on the size<BR> of the database.</DIV>
<DIV>How to Configure Flashback database<BR>------------------------------------<BR>Prerequisites<BR>--------------<BR>a) Database must be in archivelog mode.<BR>b) Last clean shutdown.<BR>c) Enterprise and Personal Edition required</DIV>
<DIV>Configuration: -<BR>---------------<BR>Initialization Parameters required: -<BR>a) DB_RECOVERY_FILE_DEST (dynamically modifiable) --> Physical location where RVWR background process<BR> writes flashback logs.<BR>b) DB_RECOVERY_FILE_DEST_SIZE (dynamically modifiable) --> Maximum size flashback logs can occupy in<BR> DB_RECOVERY_FILE_DEST.<BR>c) DB_FLASHBACK_RETENTION_TARGET (dynamically modifiable) --> upper limit in minutes on how far back<BR> one can flashback the database.</DIV>
<DIV> After setting these parameters in parameter file(init.ora) or spfile.</DIV>
<DIV>Note:- Clean shutdown is mandatory.</DIV>
<DIV><BR>SQL> Startup mount;</DIV>
<DIV>SQL> Alter database flashback on;</DIV>
<DIV>SQL> Alter database open;</DIV>
<DIV>SQL> select flashback_on from v$database;<BR>FLASHBACK_ON<BR>------------<BR>YES</DIV>
<DIV><BR>To see the background process :-<BR>$ ps -eaf | grep rvwr<BR>oracle 10302 1 0 10:58:09 ? 0:00 ora_rvwr_db10g<BR>oracle 22353 12428 1 13:31:16 pts/tL 0:00 grep rvwr</DIV>
<DIV><BR>The above two output confirms that the datbase has its flashback feature ON.</DIV>
<DIV><BR>How to Flashback the database to the previous state on basis of :<BR>----------------------------------------------------------------<BR>a) SCN<BR>b) Timestamp<BR>c) Log Sequence Number</DIV>
<DIV>State 1 State 2<BR> ------- -------<BR>| | >--------------- | |<BR>| | flashback | |<BR> ------- -------<BR>SCN=100 SCN=150</DIV>
<DIV>Timestamp=12-09-2003:10:00:00 Timestamp=12-09-2003:12:00:00</DIV>
<DIV>Log Sequence Number= 50 Log Sequence Number= 55</DIV>
<DIV>Using SCN :-<BR>----------<BR>SQL> shutdown immediate<BR>SQL> startup mount<BR>SQL> flashback database to SCN 100;</DIV>
<DIV>Flashback complete.</DIV>
<DIV>SQL> alter database open resetlogs;</DIV>
<DIV>Database altered.</DIV>
<DIV><BR>Note:- This feature can be used with RMAN or Enterprise Manager also.</DIV>
<DIV>Using Timestamp :-<BR>---------------<BR>SQL> shutdown immediate<BR>SQL> startup mount<BR>SQL> flashback database to TIMESTAMP(sysdate - 2/24);</DIV>
<DIV>Flashback complete.</DIV>
<DIV>SQL> alter database open resetlogs;</DIV>
<DIV>Database altered.</DIV>
<DIV><BR>Using Log sequence Number and RMAN<BR>----------------------------------<BR>RMAN> flashback database to sequence=50 thread=1;</DIV>
<DIV>RMAN> alter database open resetlogs;</DIV>
<DIV> </DIV>
<DIV>RELATED DOCUMENTS<BR>-----------------<BR>Oracle Database 10g: Maximize Availability</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> 相关的</DIV>
<DIV><BR>产品</DIV>
<DIV>Enterprise Management > Enterprise Manager Consoles, Packs, and Plugins > Managing Databases using Enterprise Manager > Enterprise Manager for RDBMS<BR>Oracle Database Products > Oracle Database > Oracle Database > Oracle Server - Enterprise Edition<BR>Oracle Database Products > Oracle Database > Oracle Database > Oracle Server - Enterprise Edition<BR>Oracle Database Products > Oracle Database > Oracle Database > Oracle Server - Personal Edition<BR>Oracle Database Products > Oracle Database > Oracle Database > Oracle Server - Standard Edition<BR>关键字</DIV>
<DIV>FLASHBACK</DIV>
<DIV><BR> </DIV>
页:
[1]