14 Temmuz 2010 Çarşamba

Redo log Dosyalarında Bozulma (ORA-00312)

O an kullanılmayan (statusu current olmayan) Redo log dosyalarında bozulma olursa, Archiver redo log dosyasını kullanmaya çalıştığında durur ve veritabanı DML işlemini tamamlayamaz. Örnek bir redo log bozulması durumunda alert log’da göreceğimiz mesajlara bakalım:

Errors in file /oracle/diag/rdbms/oratest/oratest/trace/oratest_arc3_10426.trc:
ORA-00313: open failed for members of log group 1 of thread 1
ORA-00312: online log 1 thread 1: ‘/oracle/oradata/oratest/redo01.log’
ORA-27046: file size is not a multiple of logical block size
Additional information: 1
Bu durumda yapılması gereken hatalı olan redo logları sıfırlamaktır. Hata mesajlarında görüldüğü üzere 1. gruptaki redo log dosyasında (redo1.log) problem var. Bozulmuş olan redo log dosyasını aşağıdaki komutlar ile temizleyebilirsiniz:

ALTER DATABASE CLEAR UNARCHIVED LOGFILE ‘/oracle/oradata/oratest/redo1.log’;

veya

ALTER DATABASE CLEAR UNARCHIVED LOGFILE GROUP 1;
Alternatif olarak bu log dosyasını DROP edip yeniden oluşturabilirsiniz. Log file’ı temizlerken kullanılan UNARCHIVED parametresi, log file’ın henüz archivelenmediğini, yeniden kullanıldıktan sonra arşivleme yapılmasının istendiğini gösterir. Bu işlemden sonra archiever prosesi çalışmaya devam edecektir:

Completed: ALTER DATABASE CLEAR UNARCHIVED LOGFILE group 1
Wed May 26 22:50:43 2009
Archiver process freed from errors. No longer stopped
Wed May 26 22:50:50 2009
Starting background process SMCO
Wed May 26 22:50:50 2009
SMCO started with pid=15, OS id=16754
Wed May 26 22:52:41 2009
Thread 1 cannot allocate new log, sequence 14
Private strand flush not complete
Current log# 1 seq# 13 mem# 0: /oracle/oradata/oratest/redo01.log
Thread 1 advanced to log sequence 14 (LGWR switch)
Current log# 2 seq# 14 mem# 0: /oracle/oradata/oratest/redo02.log
Thread 1 cannot allocate new log, sequence 15
Checkpoint not complete
Archiver prosesi çalışmasına devam etmesine rağmen eğer “checkpoint not complete” uyarısı veriyorsa manuel olarak checkpoint yaptırmamız gerekir:

ALTER SYSTEM CHECKPOINT;
Eğer sorunlu olan redo log dosyası “o an kullanımda olan” (statusu current) redolog dosyası ise hata archiver yerine logwiter (LGWR) prosesi tarafından tespit edilecek ve veritabanı kapanacaktır. Yeniden açtığınız zaman veritabanı, redo log’un silinmesine izin vermez. Bu durumda recovery işlemi yapmanız gerekir:

RMAN> RESTORE DATABASE;
SQL> RECOVER DATABASE UNTIL CANCEL;
SQL> ALTER DATABASE OPEN RESETLOGS;
---------------------------------------
http://www.gokhanatil.com/2009/07/redo-log-dosyalarinda-bozulma-ora-00312/

8 Temmuz 2010 Perşembe

CP of Datafile for Online Backup Returns "A system call received a parameter that is not valid."

Applies to:
Oracle Server - Enterprise Edition - Version: 10.2.0.3
AIX5L Based Systems (64-bit)

Symptoms
Coping a datafile after a 'begin backup' with the database is open returns an error:
A system call received a parameter that is not valid.


Cause
This problem is caused with the use of JFS2 file systems, CIO not enabled, and the parameter FILESYSTEMIO_OPTIONS set to SETALL.

Note 272520.1 - Direct I/O or Concurrent I/O on AIX 5L:
External utilities or tools cannot read datafiles on JFS2 file systems if you use the values SETALL or DIRECTIO for the FILESYSTEMIO_OPTIONS parameter. For more information, refer to the AIX
documentation which covers the open() restriction in cio mode.


Solution
1. Enable CIO on JFS2 file system

OR

2. Change FILESYSTEMIO_OPTIONS=asynch


Since its a dynamic initialization parameter you can use the ALTER SESSION,
ALTER SYSTEM commands to do this.

Parameter type
String

Syntax
FILESYSTEMIO_OPTIONS = {none | setall | directIO | asynch}

Default value
There is no default value.

Parameter class
Dynamic: ALTER SESSION, ALTER SYSTEM


References
Note 257338.1 - Direct I/O (DIO) and Concurrent I/O (CIO) on AIX 5L
Note 272520.1 - Direct I/O or Concurrent I/O on AIX 5L
----------------------------------------------------
http://ebsblog.blog.163.com/blog/static/127949789200981533133531/
http://forums.sdn.sap.com/message.jspa?messageID=3129195