Using Oracle 9i Flashback Functionality Author: James L. Colestock Step 1: First you must configure Automatic Undo Management (AUM): This entails altering a few initialization parameters and creating the UNDO tablespace (if it does not already exist) Add to the initSID.ora or SPFILE: undo_management = AUTO You must determine next the value of the undo_retention parameter, which represents the amount of read consistency time, in seconds, that shall be guaranteed - you will be able to "flashback" atleast this far into the past. If just converting to AUM you will have to simply set this figure per Oracle guidelines and refine later. For database already in AUM, refer to V$UNDOSTAT. The specific undo_retention value as well as the size of undo tablespace to create are determined using the following formulas: Undo Segment Space Required = (undo_retention (secs) * max undo blocks per second * db_block_size) (Example: 300 seconds * 50/blocks per sec * 8K = 120MB) Set undo_retention (seconds)in the initSID.ora or SPFILE: undo_retention = XXX (Example: undo_retention = 7200; 2 hrs.) Creating the Undo Tablespace: SQL> create undo tablespace datafile '/XX/oradata/undoXX.dbf' size ; Set the Undo Tablespace in initSID.ora or SPFILE: undo_tablespace = Step 2: Determine Time or SCN to "Flashback" to by Enabling Flashback and Searching for Data: Work with the person who has lost the data toggling between flashback enabled and disabled using the DBMS_FLASHBACK until you find the data you are looking for or determine that you cannot. There is an ENABLE_AT_SYSTEM_CHANGE_NUMBER procedure as well SQL>begin dbms_flashback.enable_at_time('15-JAN-03 11:49:00'); exception when others then dbms_output.put_line(sqlerrm); end; SQL>begin dbms_flashback.disable; exception when others then dbms_output.put_line(sqlerrm); end; Step 3: Use Export and Import to Restore the Data # exp FLASHBACK_TIME='2003-01-15:12:05:00' TABLE=table_name USERID=source_user ROWS=Y file=dump_file_here # imp USERID=user@SID file=dump_file_here