强制切换联机重做日志
desc v$log
alter system switch logfile;
select group#, thread#,sequence#, status from v$log;
强制执行检查点
alter system checkpoint;
增加 redo files groups (组)
desc v$logfile
select * from v$logfile;
alter database add logfile group 3
('/u01/oradata/wilson/redo03.log') size 100M;
实际生产环境之中至少一个group里面有两个member 以防单点故障
若一member为invalid则此redo logfile不可用
往组里面增加成员(member)
alter database add logfile member
'/u01/oradata/wilson/redo03a.log' to group 3;
select * from $logfile;
将往group 3里面新增一个logfile member 大小与redo03.log相等
删除logfile
alter database drop logfile group 3; (删组)
alter database drop logfile member '/u01/oradata/wilson/redo03a.log';(删member)
仅删除控制文件里的信息,可在OS上将其rm掉
改变redolog 位置及名字
shutdown immediate
cd /u01/oradata/wilson
cp redo03.log ..(上一级)(也可是其它位置)
mv redo03.log redo03.rdo (改名)
startup mount
alter database rename file
'/u01/oradata/wilson/redo03.log' to '/u01/oradata/redo03.rdo';
alter database open
!
rm /u01/oradata/wilson/redo03.log
清空logfile
alter database clear logfile group 3;
有可能损坏数据库,慎用!