用戶管理的不完全恢復必須滿足下面三個條件才可以使用
a) 歸檔模式
b) 要有所有datafile在誤操作之前的備份
c) 要有自要使用的備份以來的所有歸檔
不完全恢復的類型
a) 基於時間點
b) 基於Cancel
c) 基於SCN(系統改編號) recover database until scn <scn_number>
實例說明幾種場景的不完全恢復
alter system switch logfile;
delete from emp where empno=<N>;
alter system switch logfile;
alter system switch logfile;
oemapp consol
登陸到management server(參看
查詢出誤操作時間或SCN
a
b
c
d
e
//recover database until scn
f
g
h
delete dept where depno=
commit;
alter database switch logfile;
alter database switch logfile;
alter database switch logfile;
shutdown immediate
刪除users表空間(對應的文件號假如是
試著做完全恢復
shutdown immediate
還原所有文件
startup mount
alter tablespace users online
recover database until cancel
alter database open resetlogs
別忘了重新備份
alter system switch logfile;
alter system switch logfile;
alter system switch logfile;
alter database backup controlfile to
alter system switch logfile;
conn scott/tiger
delete dept where deptno=
commit;
alter system switch logfile;
alter system switch logfile;
alter system switch logfile;
shutdown abort/immediate/normal/transactional
刪除所有數據文件
startup [nomount]
從備份中恢復控制文件
復制所有備份的數據文件(在刪除前要已經有備份)
recover database until cancel using backup controlfile;
alter database open resetlogs;
別忘了做全備
shutdown immediate
刪除所有的聯機日志
startup
recover database until cancel
alter database open resetlogs;
別忘了做全備
archive log list
select * from v$tablespace
select * from scott
drop tablespace indx including contents and datafiles;
alter system switch logfile;
shutdown immediate
恢復所有的數據文件和控制文件
查詢alter
startup mount
alter session set nls_date_format=
recover database until time ;
alter database open resetlogs
別忘了做全備
From:http://tw.wingwit.com/Article/program/Oracle/201311/17998.html