Oracle学习(七)之增加日志组

增加日志组的sql 语句:
alter database add logfile group [组号]
(‘日志组文件1’,
‘日志组文件2’,
‘日志组文件3’)
size 日志组大小;

注:
1)组号可以不用制定,数据库会自动填写(一般按组号递增顺序)
2)可以有多个日志组文件,中间用“,”连接就好

1.增加组:
SQL> alter database add logfile group 8
2 (‘/u03/ora11g/student/redo0801.rdo’,
3 ‘/u04/ora11g/student/redo0802.rdo’,
4 ‘/u05/ora11g/student/redo0803.rdo’)
5 size 50m;

Database altered.

2.查询日志组状态
SQL> select GROUP#,STATUS from v$log;

GROUP# STATUS
--------------- ----------------
     1 INACTIVE
     2 INACTIVE
     3 CURRENT
     8 UNUSED

3.查询日志组文件
SQL> select GROUP#,MEMBER from v$logfile order by 1,2;

GROUP# MEMBER
------ ----------------------------------------
     1 /u03/ora11g/student/redo0101.rdo
     1 /u03/ora11g/student/redo0201.rdo
     1 /u03/ora11g/student/redo0301.rdo
     2 /u04/ora11g/student/redo0202.rdo
     2 /u04/ora11g/student/redo0302.rdo
     2 /u04/ora11g/student/redo0402.rdo
     3 /u05/ora11g/student/redo0103.rdo
     3 /u05/ora11g/student/redo0203.rdo
     3 /u05/ora11g/student/redo0303.rdo
     8 /u03/ora11g/student/redo0801.rdo
     8 /u04/ora11g/student/redo0802.rdo
     8 /u05/ora11g/student/redo0803.rdo

你可能感兴趣的:(Oracle数据库学习)