ITPub博客

首页 > Linux操作系统 > Linux操作系统 > ORA-00327

ORA-00327

原创 Linux操作系统 作者:fei890910 时间:2013-10-29 22:14:48 0 删除 编辑


重新开库报错,下面处理时在报错日志不是current状态下的操作

SQL> alter database open;

alter database open

*

ERROR at line 1:

ORA-00327: log 2 of thread 1, physical size  less than needed

ORA-00312: online log 2 thread 1: '/u01/app/oracle/oradata/orcl/redo02.log'

 

 

官方文档关于ORA-00327这个错误的描述

ORA-00327: log string of thread string, physical size string less than needed string

Cause: A log file has shrunk in size. This is likely to have been caused by operator or operating system error.

Action: Restore the log file from backup. If backup is not available, drop this log and re-create. If the database was shut down cleanly, no further action should be required; otherwise incomplete recovery may be required.

 

Drop 日志组2 并重建日志组2

SQL> alter database drop logfile group  2 ;

Database altered.

 

查看日志组状态

SQL> select * from v$log;

 

    GROUP#    THREAD#  SEQUENCE#      BYTES    MEMBERS ARC STATUS           ---------- ---------- ---------- ---------- ---------- --- ----------------

         3          1       1234   52428800          1 YES INACTIVE              

         1          1       1235   52428800          1 NO  CURRENT                

 

将日志文件redo02.log 改名成redo02.log.bak

[oracle@/u01/app/oracle/oradata/orclaix213]# ls

control01.ctl  control03.ctl  redo01.log     redo03.log     system01.dbf   undotbs01.dbf

control02.ctl  example01.dbf  redo02.log     sysaux01.dbf   temp01.dbf     users01.dbf

[oracle@/u01/app/oracle/oradata/orclaix213]# mv redo02.log redo02.log.bak

 

重新创建日志组

SQL> alter database add logfile group 2 ('/u01/app/oracle/oradata/orcl/redo02.log') size 50m;

Database altered.

 

日志组2 已经添加

SQL> select * from v$log;

    GROUP#    THREAD#  SEQUENCE#      BYTES    MEMBERS ARC STATUS          

---------- ---------- ---------- ---------- ---------- --- -------------

         1          1       1235   52428800          1 NO  CURRENT               

         3          1       1234   52428800          1 YES INACTIVE              

         2          1          0  104857600          1 YES   UNUSED

 

重新开库,日志文件组正常

SQL>  alter database open;

 

Database altered.

 

SQL> select * from v$log;

 

    GROUP#    THREAD#  SEQUENCE#      BYTES    MEMBERS ARC STATUS          

---------- ---------- ---------- ---------- ---------- --- ----------------

         1          1       1235   52428800          1 YES INACTIVE              

         2          1       1236   52428800          1 NO  CURRENT               

         3          1       1234   52428800          1 YES INACTIVE               

 

 在我遇到这个问题几天后,询问了一老师,他告诉我 其实只需要关闭数据库从新开库就可以打开,并不需要重新建日志文件,所以表示抱歉!                                                                                                                                                         


 

 

 

 

 

 

 

 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29108064/viewspace-775300/,如需转载,请注明出处,否则将追究法律责任。

下一篇: ORA-01194
请登录后发表评论 登录
全部评论

注册时间:2013-08-15

  • 博文量
    120
  • 访问量
    746362