alter database clear logfile group
或者
alter database clear unarchived logfile group应该是会清空日志中的东西,那如果在数据库恢复的时候,会不会导致数据丢失?
或者
alter database clear unarchived logfile group应该是会清空日志中的东西,那如果在数据库恢复的时候,会不会导致数据丢失?
解决方案 »
- oracle 10g中导入数据库 导错用户怎么改?
- 关于三个配置文件 tnsnames.ora listener.ora sqlnet.ora 的疑问
- ~~~~~~~~日期格式转换问题---头大 高手赐教
- group by 和max速度的问题
- 关于插值(简单哦,要分的来)
- Oracle 9i安装过程中当双击通用安装器时只出现通用安装器LOGO画面,然后就无反应了.
- 通过第一个游标的值作为第二个游标的参数,报错.
- 数据库管理要学多久才能工作?
- 很鸟的问题
- 在表中有一字段长度为Varchar2(20),但却只能输入10个中文字符!可输入20个英文字符!如何能该字段容纳20个中文字符!急急急!请大侠帮忙
- 数据库中numberic 和number的区别
- 安装Oracle10g出现的问题?
执行: alter database clear logfile group
因为这种情况下,redo 已经完成归档,所以恢复时不会造成数据的丢失。当redo 为active时,即表示正在归档,这个时候,只能执行:
alter database clear unarchived logfile group这个时候,如果进行恢复,是会有数据丢失的。 一般除非redo 损坏才会用到这个命令。具体的情况还是需要具体对待。 如果的Data Guard 环境,执行了alter database clear unarchived logfile group,那么DG 就需要重新搭建了。参考:
Oracle 不同故障的恢复方案
http://blog.csdn.net/tianlesoftware/archive/2010/12/30/6106178.aspx
alter system switch logfile 会不会马上产生归档日志,得看系统数据库繁忙程度,有时日志应用不及时就不能马上归档,当然这些都必须在开启归档状态下进行。
active -- has stuff in it that is needed for instance recovery if we crashed
right now.
current -- where stuff is being written to right now
inactive -- was used at some point, but isn't needed for instance recovery
anymore (all blocks it was protecting have been flushed to disk by a
checkpoint) and isn't the current redo log file...
All other status would be "not normal" and after some period of activity
would become "normal"
System altered.
ops$tkyte@ORA9IR2> alter database clear logfile group 1;
alter database clear logfile group 1
*
ERROR at line 1:
ORA-01624: log 1 needed for crash recovery of thread 1
ORA-00312: online log 1 thread 1: '/home/ora9ir2/oradata/ora9ir2/redo01.log'
now we cannot clear it because of dirty blocks in the cache, so we get rid of them
ops$tkyte@ORA9IR2> alter system checkpoint
2 /
System altered.
ops$tkyte@ORA9IR2> alter database clear logfile group 1;
Database altered.