Pages

Sunday, February 5, 2017

ORA-00447 and ORA-00321 by Example

=============================
General
=============================
Issue:
For no apparent reason the database is "stuck".
When checking Oracle alert.log, following strange messages appear:

Sat Feb 04 19:01:51 2017
Thread 1 advanced to log sequence 93642 (LGWR switch)
  Current log# 3 seq# 93642 mem# 0: D:\ORACLE_DB\DB1\DB_IGT\ORA_REDO_03_A.RDO
Sat Feb 04 19:31:51 2017
Thread 1 advanced to log sequence 93643 (LGWR switch)
  Current log# 1 seq# 93643 mem# 0: D:\ORACLE_DB\DB1\DB_IGT\ORA_REDO_01_A.RDO
Sat Feb 04 20:01:50 2017
Sat Feb 04 20:01:50 2017
Sat Feb 04 20:01:50 2017
Sat Feb 04 20:01:50 2017
Sat Feb 04 20:01:51 2017
Sat Feb 04 20:01:51 2017
Sat Feb 04 20:01:51 2017
Sat Feb 04 20:01:51 2017
Sat Feb 04 20:01:51 2017
Sat Feb 04 20:01:51 2017
Sat Feb 04 20:01:51 2017
Sat Feb 04 20:01:51 2017
Sat Feb 04 20:01:51 2017
Sat Feb 04 20:01:51 2017
Sat Feb 04 20:01:51 2017
Sat Feb 04 20:01:51 2017


Checking trace files from same time, following errors are repeated in arch trace files:
For example: igt_arc0_908.trc

Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining,
Oracle Database Vault and Real Application Testing options
Windows Server 2003 Version V5.2 Service Pack 2
CPU                 : 16 - type 586, 2 Physical Cores
Process Affinity    : 0x00000000
Memory (Avail/Total): Ph:9564M/10229M, Ph+PgF:13344M/14102M, VA:1222M/2047M
Instance name: igt
Redo thread mounted by this instance: 1
Oracle process number: 35
Windows thread id: 908, image: ORACLE.EXE (ARC0)


*** 2016-06-11 19:45:08.373
*** SESSION ID:(311.3) 2016-06-11 19:45:08.373
*** CLIENT ID:() 2016-06-11 19:45:08.373
*** SERVICE NAME:() 2016-06-11 19:45:08.373
*** MODULE NAME:() 2016-06-11 19:45:08.373
*** ACTION NAME:() 2016-06-11 19:45:08.373
*** 2017-02-04 19:31:51.098
...
...
...
...
kcrroda: calling ksfdrcres to create AL or RL
*** 2017-02-04 19:31:51.098 3353 kcrr.c
kcrroda: completed call to ksfdrcres
error 321 detected in background process
OPIRIP: Uncaught error 447. Error stack:

*** 2017-02-04 20:01:52.567
ORA-00447: fatal error in background process
ORA-00321: log  of thread , cannot update log file header

How to resolve the issue?

=============================
Resolution
=============================
Restart Oracle service
SHUTDOWN ABORT
STARTUP NORMAL
SHUTDOWN IMMEDIATE
STARTUP NORMAL

=============================
Reason for ORA-00447 and ORA-00321
=============================
Oracle Metalink is pretty vague about it:
"Errors are usually due to usage, application or configuration issues but in some cases they may be caused by a bug issue."

After restart, Oracle has recovered from a crash successfully.
From alert.log:

starting up 1 dispatcher(s) for network address '(ADDRESS=(PARTIAL=YES)(PROTOCOL=TCP))'...
starting up 1 shared server(s) ...
ORACLE_BASE from environment = d:\software\oracle
Sat Feb 04 23:33:30 2017
alter database mount exclusive
Sat Feb 04 23:33:30 2017
MMNL started with pid=16, OS id=3692 
Sat Feb 04 23:33:33 2017
Sweep Incident[30074]: completed
Sweep Incident[30073]: completed
Sweep Incident[30072]: completed
Setting recovery target incarnation to 1
Successful mount of redo thread 1, with mount id 1173416138
Database mounted in Exclusive Mode
Lost write protection disabled
Completed: alter database mount exclusive
alter database open
Beginning crash recovery of 1 threads
 parallel recovery started with 15 processes
Started redo scan
Completed redo scan
 0 redo blocks read, 0 data blocks need recovery
Started redo application at
 Thread 1: logseq 93643, block 3261, scn 3254622468935
Recovery of Online Redo Log: Thread 1 Group 1 Seq 93643 Reading mem 0
  Mem# 0: D:\ORACLE_DB\DB1\DB_IGT\ORA_REDO_01_A.RDO
Completed redo application of 0.00MB
Completed crash recovery at
 Thread 1: logseq 93643, block 3261, scn 3254622488936
 0 data blocks read, 0 data blocks written, 0 redo blocks read
LGWR: STARTING ARCH PROCESSES


In case the restart fails, need to restart with RESETLOGS option
SHUTDOWN ABORT
STARTUP MOUNT
RECOVER DATABASE UNTIL CANCEL
ALTER DATABASE OPEN RESETLOGS

No comments:

Post a Comment