oracle11g OMF 特性与添…

22:40:02 SQL> select member from v$logfile;

MEMBER
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/MYNEWDB/onlinelog/o1_mf_3_88745ykl_.log
/u01/app/oracle/oradata/MYNEWDB/onlinelog/o1_mf_2_88745w0v_.log
/u01/app/oracle/oradata/MYNEWDB/onlinelog/o1_mf_1_88745t68_.log

22:40:28 SQL>  select * from v$log;
rows will be truncated

rows will be truncated

rows will be truncated

rows will be truncated


      GROUP#      THREAD#  SEQUENCE#          BYTES  BLOCKSIZE      MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- ---------- --- ----------
                1                  1                  7    52428800              512                  1 NO  CURRENT
                2                  1                  5    52428800              512                  1 YES INACTIVE
                3                  1                  6    52428800              512                  1 YES INACTIVE


删除loggroup3

22:41:27 SQL> alter database drop logfile '/u01/app/oracle/oradata/MYNEWDB/onlinelog/o1_mf_3_88745ykl_.log';

Database altered.

确认loggroup3已经删除

22:42:36 SQL> select * from v$log;
rows will be truncated

rows will be truncated

rows will be truncated

rows will be truncated


      GROUP#      THREAD#  SEQUENCE#          BYTES  BLOCKSIZE      MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- ---------- --- ----------
                1                  1                  7    52428800              512                  1 NO  CURRENT
                2                  1                  5    52428800              512                  1 YES INACTIVE


重新添加loggroup 3
22:43:00 SQL> alter database add logfile group 3 ('/u01/app/oracle/oradata/MYNEWDB/onlinelog/o1_mf_3_88745ykl_.log') size 512 reuse ;
alter database add logfile group 3 ('/u01/app/oracle/oradata/MYNEWDB/onlinelog/o1_mf_3_88745ykl_.log') size 512 reuse
*
ERROR at line 1:
ORA-01276: Cannot add file
/u01/app/oracle/oradata/MYNEWDB/onlinelog/o1_mf_3_88745ykl_.log. 
File has an Oracle Managed Files file name.
由此可见在oracle11g中不需要给数据文件,日志文件,等添加具体path ,oracle会自动帮我们创建。
 
不加具体path,成功添加文件
22:48:28 SQL>
22:48:28 SQL>
22:48:28 SQL> alter database add logfile group 3;

Database altered.

22:48:43 SQL>

你可能感兴趣的:(oracle11g OMF 特性与添…)