Skip to content

Latest commit

 

History

History
41 lines (41 loc) · 1.56 KB

File metadata and controls

41 lines (41 loc) · 1.56 KB
  • là 1 công nghệ để recover data, phòng tránh data loss
  • nếu xóa, truncate, drop table (trừ purge) => dùng flashback để recover
  • can restore to a certain time, restore point or system change number (SCN) or before drop
    • SCN: là 1 số int duy nhất tăng dần sau mỗi thay đổi của db
  • flashback restore cả constraint và index của table
  • flashback có thể recover cả table, transaction hoặc db
  • flashback là logical, nên nếu có physical problem trên disk => flashback ko giải quyết được
  • khi sử dụng flashback. all trigger disable. cần sử dụng enable triggers
  • để sử dụng flashback, cần thực hiện:
alter table {table_name} enable row movement
  • cú pháp:
    flashback table {table1}, {table2} 
    to {scn|timestamp {exp}|restore point {point}} 
    [enable|disable triggers  | before drop [rename]] 
    • drop nếu có rename thì sẽ lấy lại + đổi tên bảng
  • flashback restore từ undo files. Nhưng restore có thể ko đầy đủ, do thiếu dữ liệu nên dữ liệu cũ từ recycle bin hoặc undo files đã bị xóa bớt
  • restore point: cách tạo:
create restore point {name}
  • lấy dữ liệu trong recycle bin
select * from recyclebin;
  • user can find their object in recycle bin without DBA privileges. còn DBA dc nhìn all user
  • xóa hẳn khỏi thùng rác
purge table {table}
  • xóa mọi thứ trong thùng rác
purge recyclebin
  • lấy timestamp
sysdate - interval '3' minute