1Z0-032-14: User-managed incomplete recovery
特殊原因:归档日志有部分损坏,在线日志有部分损坏,人为数据损坏。
什么情况进行不完全恢复:
归档日志 is lost;
controlfile is lost;
在线日志 is lost;
用户错误:删除了重要数据(表),且进行了commit;如6点数据丢失,一定是恢复到6点以前。
恢复是前推,而不是后退;在DB中作过的事不可以后悔。
需要进行完整的备份才可以进行恢复;整个DB向前推,所有工作都要向前推,不仅是作一个表空间等。
types of incomplete recovery:
time-based recovery: 可以确定时间点
cancel-based recovery: 取消操作到一定程度。
change-based recovery: 恢复到一定的SCN号。
control file问题: 丢失;备份了但DB结构发生了改变。
更改数据文件位置方法:startup; alter tablespace users offline;
alter tablespace users rename datafile 'd:/user01.dbf' to 'e:/.../users01.dbf';
alter tablespace users online;
在不完整修改时,可能要修复多次才可以达到结果;所以先对DB对行全面备份,要多备份日志文件及controlfile,归档日志备份与删除。
在什么情况下进行: alert.log :
check before and after recovery;
contains error information,hints,and scns;
步骤:
1)shutdown immediate and backup the whole DB.
2)restore all datafiles. 其他文件都无用了。
3)mount the DB.
4) 恢复到失败之前的时间点 recover database until time '2007-05-01:14;22:02'
5)open the DB with resetlogs. alter database open resetlogs;
6) perform a closed database backup.
语法:recover database until cancel
recover database until time '2007-05-01:14;22:02'
recover database until time '2007-05-01:14;22:02' using backup controlfile
什么情况进行不完全恢复:
归档日志 is lost;
controlfile is lost;
在线日志 is lost;
用户错误:删除了重要数据(表),且进行了commit;如6点数据丢失,一定是恢复到6点以前。
恢复是前推,而不是后退;在DB中作过的事不可以后悔。
需要进行完整的备份才可以进行恢复;整个DB向前推,所有工作都要向前推,不仅是作一个表空间等。
types of incomplete recovery:
time-based recovery: 可以确定时间点
cancel-based recovery: 取消操作到一定程度。
change-based recovery: 恢复到一定的SCN号。
control file问题: 丢失;备份了但DB结构发生了改变。
更改数据文件位置方法:startup; alter tablespace users offline;
alter tablespace users rename datafile 'd:/user01.dbf' to 'e:/.../users01.dbf';
alter tablespace users online;
在不完整修改时,可能要修复多次才可以达到结果;所以先对DB对行全面备份,要多备份日志文件及controlfile,归档日志备份与删除。
在什么情况下进行: alert.log :
check before and after recovery;
contains error information,hints,and scns;
步骤:
1)shutdown immediate and backup the whole DB.
2)restore all datafiles. 其他文件都无用了。
3)mount the DB.
4) 恢复到失败之前的时间点 recover database until time '2007-05-01:14;22:02'
5)open the DB with resetlogs. alter database open resetlogs;
6) perform a closed database backup.
语法:recover database until cancel
recover database until time '2007-05-01:14;22:02'
recover database until time '2007-05-01:14;22:02' using backup controlfile