oracle 增加日志组和日志文件

版权声明:欢迎转载,无需注明出处! https://blog.csdn.net/tstcylq/article/details/78744863
--查看日志文件组
select * from v$log;

--查看日志文件
select * from v$logfile;

--添加日志文件组
alter database add logfile group 4 ('D:\app\Administrator\oradata\orcl\REDO04.LOG') size 512m;
alter database add logfile group 5 ('D:\app\Administrator\oradata\orcl\REDO05.LOG') size 512m;
alter database add logfile group 6 ('D:\app\Administrator\oradata\orcl\REDO06.LOG') size 512m;

alter system switch logfile;
alter database drop logfile group 1;

注: 
删除日志组(文件)时: 
1)该日志文件所在的的日志组(文件)不能处于current状态,需要执行一次手动日志切换; 
2)该日志文件所在的日志文件组中必须包含有其他的日志成员; 
3)删除日志文件组时必须有其他的日志文件组; 
4)如果数据库运行在归档模式下,则应该在删除日志文件之前,确定它所在的日志文件组已经被归档,否则会导致数据丢失。

猜你喜欢

转载自blog.csdn.net/tstcylq/article/details/78744863