bers of log group 1 of thread 1 ORA-00312: online log 1 thread 1: '/u01/app/oracle/oradata/ora10g/redo01.log'
提示无法打开日志组1的日志文件,因为之前在OS层面已经将其删除了
--观察alert日志 [oracle@ora10g ora10g]$ cd /u01/app/oracle/admin/ora10g/bdump/ [oracle@ora10g bdump]$ tail -50f alert_ora10g.log MMON started with pid=11, OS id=2970 Wed Jun 24 10:45:54 2015 starting up 1 dispatcher(s) for network address '(ADDRESS=(PARTIAL=YES)(PROTOCOL=TCP))'... starting up 1 shared server(s) ... CJQ0 started with pid=10, OS id=2968 MMNL started with pid=12, OS id=2972 Wed Jun 24 10:45:55 2015 ALTER DATABASE MOUNT Wed Jun 24 10:45:58 2015 Setting recovery target incarnation to 8 Wed Jun 24 10:45:58 2015 Successful mount of redo thread 1, with mount id 4202063779 Wed Jun 24 10:45:58 2015 Database mounted in Exclusive Mode Completed: ALTER DATABASE MOUNT Wed Jun 24 10:45:59 2015 ALTER DATABASE OPEN Wed Jun 24 10:45:59 2015 LGWR: STARTING ARCH PROCESSES ARC0 started with pid=16, OS id=2980 Wed Jun 24 10:45:59 2015 ARC0: Archival started ARC1: Archival started LGWR: STARTING ARCH PROCESSES COMPLETE Wed Jun 24 10:45:59 2015 Errors in file /u01/app/oracle/admin/ora10g/bdump/ora10g_lgwr_2960.trc: ORA-00313: Message 313 not found; No message file for product=RDBMS, facility=ORA; arguments: [1] [1] ORA-00312: Message 312 not found; No message file for product=RDBMS, facility=ORA; arguments: [1] [1] [/u01/app/oracle/oradata/ora10g/redo01.log] ORA-27037: Message 27037 not found; No message file for product=RDBMS, facility=ORA Linux Error: 2: No such file or directory Additional information: 3 Wed Jun 24 10:45:59 2015 Errors in file /u01/app/oracle/admin/ora10g/bdump/ora10g_lgwr_2960.trc: ORA-00313: Message 313 not found; No message file for product=RDBMS, facility=ORA; arguments: [1] [1] ORA-00312: Message 312 not found; No message file for product=RDBMS, facility=ORA; arguments: [1] [1] [/u01/app/oracle/oradata/ora10g/redo01.log] ORA-27037: Message 27037 not found; No message file for product=RDBMS, facility=ORA Linux Error: 2: No such file or directory Additional information: 3 Wed Jun 24 10:45:59 2015 ARC0: STARTING ARCH PROCESSES ARC2: Archival started ARC0: STARTING ARCH PROCESSES COMPLETE ARC0: Becoming the 'no FAL' ARCH ARC0: Becoming the 'no SRL' ARCH ARC1 started with pid=17, OS id=2982 Wed Jun 24 10:46:00 2015 ARC1: Becoming the heartbeat ARCH ARC2 started with pid=18, OS id=2984 Wed Jun 24 10:46:00 2015 ORA-313 signalled during: ALTER DATABASE OPEN... 发现确实是读取redo01.log文件错误,无法OPEN数据库,只停留在MOUNT状态
--清空刚才被删除的2个在线日志文件(相当于重建) SYS@ora10g> select open_mode from v$database;
OPEN_MODE ---------- MOUNTED
SYS@ora10g> alter database clear logfile group 1;
Database altered.
SYS@ora10g> alter database open; alter database open * ERROR at line 1: ORA-00313: open failed for members of log group 3 of thread 1 ORA-00312: online log 3 thread 1: '/u01/app/oracle/oradata/ora10g/redo03.log'
SYS@ora10g> alter database clear logfile group 3;
Database altered.
SYS@ora10g> alter database open;
Database altered.
SYS@ora10g> conn zlm/zlm Connected. ZLM@ora10g> select count(*) from t1;
COUNT(*) ---------- 10
ZLM@ora10g>
尽管删除了2个非在线日志文件,那么就可以很方便的将数据库打开,只要重建被删除的日志文件就行(通过CLEAR操作),且数据并不会丢失(因为是shutdown immediate方式关闭库的)
--继续查看alert日志内容 Wed Jun 24 10:48:55 2015 alter database clear logfile group 1 Wed Jun 24 10:48:56 2015 Clearing online log 1 of thread 1 sequence number 20 Wed Jun 24 10:48:56 2015 Errors in file /u01/app/oracle/admin/ora10g/udump/o |