首页 > 代码库 > Oracle基础 05 联机日志 redolog

Oracle基础 05 联机日志 redolog

--两个相关视图
v$log
v$logfile


alter system switch logfile;  --强制日志切换
alter system checkpoint;      --强制检查点


--添加日志组
alter database add logfile group 4 (‘/u01/app/oracle/oradata/dbtest/redo04a.log‘, 
‘/u01/app/oracle/redofile/redo04b.log‘) size 50M;


--删除日志组
alter database drop logfile group 4;


--添加日志成员
alter database add logfile member
‘/u01/app/oracle/redofile/redo01b.log‘ to group 1;

alter system switch logfile;   --使添加的成员可用


--删除日志成员
alter database drop logfile member
‘/u01/app/oracle/redofile/redolog4c.log‘;


-- 移动日志成员(mount下)
alter database rename file ‘/u01/app/oracle/redofile/redolog5a.log‘,
‘/u01/app/oracle/redofile/redolog5b.log‘ to
‘/u01/app/oracle/oradata/dbtest/redolog5a.log‘,‘/u01/app/oracle/oradata/dbtest/redolog5b.log‘;
alter database open;

Oracle基础 05 联机日志 redolog