IT 주저리주저리

오라클에서 Delete/Drop 한 데이터 복구 방법

최두일 2017. 4. 24. 10:54



잘못해서 데이터나 PL-SQL을 삭제한 경우, 응급 조치하는 방법이며,

휴지통을 이용하는 방법과 DBA 권한을 이용하여 복구하는 방법이 있다.


1. Data Delete 복구

   가) 분단위 조회

       - Select * from Table_Name AS of timestamp(systimestamp-interval '600' minute);

   나) 시간단위 조회

       - Select * from Table_Name AS of timestamp(systimestamp-interval '24' hour)


2. Data Drop 시점 복구

   가) Select * from user_recyclebin where ORIGINAL_NAME IN('table_name');

   나) DBA 권한

        - Table Drop 복구

           flashback 관련

        - 프로시져, 패키지 복구

          select text from dba_source as of timestamp to_date('201704201000', 'yyyymmddhh24mi')

          where name = 'REPORT_MOVE';