Oracle restore deleted data

Recommended for you: Get network issues from WhatsUp Gold. Not end users.

Divided into two methods: SCN and timestamp two methods.

One, the SCN restore deleted and submitted data

  1, Get the current database SCN

    select current_scn from v$database; (query to switch to the sys user and system user)

    Query to the SCN No.: 1499223

  2, Query the SCN SCN before

    Select * from as of SCN 1499220; (delete data exists, if it exists, then restore the data; if not, then continue to shrink the No. SCN)

  3, Undelete and data have been presented

    Flashback table to SCN 1499220;

Two, the time to recover deleted and submitted data

  1, Query the current system time

    select to_char(sysdate,'yyyy-mm-dd hh24:mi:ss') from dual;

  2, Query and delete data time point data

    Select * from of timestamp to_timestamp as ('2013-05-29 15:29:00','yyyy-mm-dd hh24:mi:ss'); (if not, continued to narrow the scope)

  3, Undelete and data have been presented

    Flashback table to timestamp to_timestamp('2013-05-29 15:29:00','yyyy-mm-dd hh24:mi:ss');

    Note: if in the implementation of the above statement, error. You can try to execute the alter table table name enable row movement; // allows to change the time stamp

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download

Posted by Morgan at December 01, 2013 - 9:06 AM