starland

[ORACLE] Oracle11g physical standby환경에서 ORA-08103에러 본문

Oracle관련

[ORACLE] Oracle11g physical standby환경에서 ORA-08103에러

starland 2010. 3. 2. 00:21
반응형

출처 : 허진님의 블로그

 

운영환경의 oracle 버젼과 동일해 퍼옵니다.

요약하자면, data guard환경에서

primary db에서 특정 table을 truncate후 새 data을 입력하면

standby db에서 갱신된 table에 접근하지 못하는(

ORA-08103: object no longer exists )

 버그(Bug 7650993)에 관련된 내용 입니다.

 

================================================

 

다음의 환경에서 Data Guard 운영하고 있습니다.

1. Oracle version 11.1.0.7.0

2. O/S Oracle Enterprise Linux 5.3 64bit

 

물론 primary host standby host 대해 동일한 O/S install되어 있고,

database version 동일합니다.

 

일전부터 문제가 발생하기 시작했는데,

어떤 문제인가 하면, 매일 새벽에 기동되는 batch program 종료된 이후,

특정 table 대해 select count(*) from 실행하면

다음과 같이 ORA-08103 error 발생한다는 것입니다.

SQL> select * from <table_name>;

ERROR:

ORA-08103: object no longer exists

물론 batch program primary host상에서 실행되며,

위의 error primary database상에서는 발생하지 않고,

오직 standby database상에서만 발생하고 있습니다.

참고로 batch program 일부 tables truncate 후에 data 입력하는 처리를 수행합니다.

 

근본적인 해결책은 아니지만 임시처방으로서 다음과 같은 방법을 사용할 있습니다.

문제의 table emp라고 가정하고, primary database상에서 다음과 같이 table recreate합니다.

SQL> create table emp_bk as select * from emp;

Table created.

SQL> select dbms_metadata.get_ddl('TABLE', 'EMP', 'SCOTT') from dual;

/* primary key 확인 */

SQL> select index_name from user_indexes where table_name = 'EMP';

/* emp 관련된 indexes 확인 */

SQL> select dbms_metadata.get_ddl('INDEX', '<index-01>', 'SCOTT') from dual;

SQL> select dbms_metadata.get_ddl('INDEX', '<index-02>', 'SCOTT') from dual;

/* index 생성하기 위한 script 추출 */

SQL> drop table emp;

Table dropped.

SQL> rename emp_bk to emp;

Table renamed.

/* table명을 변경 */

SQL> alter table emp add constraint … primary key (…);

/* primary key 생성 */

SQL> create index <index-01> on emp (…);

Index created.

SQL> create index <index-02> on emp (…);

Index created.

이렇게 문제의 table recreate하면 ORA-08103 error 이상 발생하지 않았습니다.

하지만 임시방편에 불과하므로 근본적인 해결을 위해

Oracle Support Team 문의를 했습니다.

 

문의해 결과, 다음과 같은 response 받았습니다.

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

This issue is caused by Bug 7650993.

You can apply one-off patch 7650993 to fix the issue.

 

To implement the solution, please execute the following steps:

 

1. Download and review the readme and pre-requisites for Patch.7650993.

    Download Link: http://updates.oracle.com/download/7650993.html

    Choose 11.1.0.7 and linux x86-64.

2. Ensure that you have taken a backup of your system before applying the recommended patch.

3. Apply the patch in a test environment.

4. Retest the issue.

5. Migrate the solution as appropriate to other environments.

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

patch apply하는 방법은 readme파일에도 적혀 있는데 간단히 설명하면,

1. 현재 running중인 $ORACLE_HOME상에 존재하는 모든 processes(listener, instances)

    정지시킨다.

2. 다음과 같이 patch apply하는 command 실행한다.

$ cd 7650993

$ opatch apply

$ opatch lsinventory (제대로 patch apply되었는지 확인)

3. 정지시켰던 listener instances 재기동한다.

 

참고로 7650993 bug Oracle 11.1.0.6.0 Oracle 11.1.0.7.0에서 발생하고

있다고 합니다.

반응형