Oracle重做日志文件组-清除

前端之家收集整理的这篇文章主要介绍了Oracle重做日志文件组-清除前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
启动数据库的最后的选择

一旦清楚 全备份将不可用!



清除group3

sql> alter database clear logfile group 3;
Database altered

sql> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES BLOCKSIZE MEMBERS ARCHIVED STATUS FIRST_CHANGE# FIRST_TIME NEXT_CHANGE# NEXT_TIME
---------- ---------- ---------- ---------- ---------- ---------- -------- ---------------- ------------- ----------- ------------ -----------
1 1 13 52428800 512 1 NO INACTIVE 21995736819 2017-9-21 9 21995740613 2017-9-21 1
2 1 14 52428800 512 2 NO CURRENT 21995740613 2017-9-21 1 281474976710
3 1 0 52428800 512 1 NO UNUSED 21995708930 2017-9-21 7 21995736819 2017-9-21 9



切换日志查看 3已重新启用 但是恢复数据需要group 2

sql> alter system switch logfile;
System altered

sql> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES BLOCKSIZE MEMBERS ARCHIVED STATUS FIRST_CHANGE# FIRST_TIME NEXT_CHANGE# NEXT_TIME
---------- ---------- ---------- ---------- ---------- ---------- -------- ---------------- ------------- ----------- ------------ -----------
1 1 13 52428800 512 1 NO INACTIVE 21995736819 2017-9-21 9 21995740613 2017-9-21 1
2 1 14 52428800 512 2 NO ACTIVE 21995740613 2017-9-21 1 21995744015 2017-9-21 1
3 1 15 52428800 512 1 NO CURRENT 21995744015 2017-9-21 1 281474976710

sql>



不归档 清除group3 unarchived 关键字 sql> alter database clear unarchived logfile group 3;

猜你在找的Oracle相关文章