반응형


Windows 서버에서 Opatch 를 진행 시


OPatch failed with error code = 74


위와 같은 에러가 발생하며 opatch 가 안되는 현상이 발생


물론 서비스도 확인 해서 이미 중지된 상태이면 아래와 같이 서비스를 확인해 볼 필요가 있다.




Distributed Transaction Coordinator


서비스를 중지한 후 다시 Opatch 진행해 보자.


Oracle Engine 와 연관이 되어 있는 듯 한데 이 부분은 좀 더 찾아 봐야 될 듯 싶다.


반응형
반응형

DB에 접속이 안되는 현상이 있다고 연락을 받아 확인하다가,

Merge 구문이 inactive 상태에서 다른 Session 을 block 하고 있는 상태를 확인하게 되었다.


Merge 구문이 실행 된 후 완료 되고 Inactive 상태로 빠지는데,

이 때 다른 Merge 구문을 block을 함으로써 lock 상태가 되었다. 그러면서 자원을 획득하지 못한

Blocked 는 inactive 상태가 되고..이렇게 트리 형태로 증가되는 부분을 확인 하였다.


이것이 왜 그런지는 조금 더 찾아 봐야겠지만 내가 본 현상과 예측은 이와 같다.


그러면 찾아보기 전에 Merge 구문에 대해서 정리부터 해본다.


너무나도 쉽다고 생각할 수 있지만 어차피 언젠가는 merge 구문 사용이 필요할 때를 대비해서 정리해 본다.

쉽게 말해서 있으면 update / 없으면 insert 를 하는 구문이다.


간단한 테스트로 진행 (타 블로그 참조 하였음)


2개의 테이블 생성


create table emp_t (no number(3), name varchar2(10), deptno number(3));

create table emps_s ( no number(3), name varchar2(10), deptno number(3));


테이터 생성


SQL> insert into emps_s values(100, 'AA', 600);

SQL> insert into emps_s values(200, 'B', 20);

SQL> insert into emps_s values(300, 'C', 30);

SQL> insert into emps_s values(210, 'D', 40);

SQL> insert into emps_s values(400,'F',50);

SQL> insert into emp_t values(100,'A',10);

SQL> insert into emp_t values(200,'B',20);

SQL> insert into emp_t values(300,'C',30);


확인


merge 구문실행


SQL> merge into emp_t t using emps_s s on (t.no=s.no)

when matched then 

update set t.name = s.name, t.deptno=s.deptno

when not matched then

insert values(s.no, s.name, s.deptno);


5 rows merged.



두 테이블의 데이터가 동일한 것을 확인 가능

commit 은 필수!!!


단, 조건절 내의 동일한 값이 있을 경우 ORA-30926 가 발생



SQL> merge into emp_t t using emps_s s on (t.no=s.no)

when matched then

update set t.name = s.name, t.deptno=s.deptno

where deptno=777   <-원하는 조건을 추가하여 가능

when not matched then

insert values(s.no, s.name, s.deptno);


플랜을 한번 확인해 보니 아래와 같이 확인이 가능하다



Hash Join 으로 풀리고, 테이블에 대해서 index 가 없으니 당연히 full scan ..

이 부분도 고려하여 index 설계를 잘 하면, merge 구문도 성능 향상을 볼 수 있을 듯 싶다.


아래는 테스트 하다가, index 타는 merge 구문을 캡쳐하여 추가한 것이다.

Index 를 이용하여 merge 구문이 실행 된 것을 확인할 수 있다.



참조 블로그

http://majesty76.tistory.com/37

반응형
반응형

업체에서 점검 중에 아래와 같은 에러 메시지를 Alert Log 에서 학인함


ORA-01652: unable to extend temp segment by 128 in tablespace TEMP



Detail

This error is fairly self explanatory - we cannot get enough space for a temporary segment. 

The size reported in the error message is the number of contiguous free Oracle blocks that cannot be found in the listed tablespace.


NOTE:

A "temp segment" is not necessarily a SORT segment in a temporary tablespace. It is also used for temporary situations while creating or dropping objects like tables and indexes in permanent tablespaces.

eg: When you perform a CREATE INDEX a TEMP segment is created to hold what will be the final permanent index data. This TEMP segment is converted to a real INDEX segment in the dictionary at the end of the CREATE INDEX operation. It remains a temp segment for the duration of the CREATE INDEX operation and so failures to extend it report ORA-1652 rather than an INDEX related space error.


그렇다면 Temp 를 사용하는 경우다..

내가 가장 많이 알고 있는게 Sort 할 경우인데, 그 외에도 아래와 같다.

(Create , Drop 할때도 생길 수 있음)


A SORT

Used for a SELECT or for DML/DDL

CREATE INDEX

The index create performs a SORT in the users default TEMP tablespace and ALSO uses a TEMP segment to build the final index in the INDEX  tablespace. Once the index build is complete the segment type is changed.

 CREATE PK CONSTRAINT

 

ENABLE CONSTRAINT

 

CREATE TABLE

New tables start out as TEMPORARY segments.
   Eg: If MINEXTENTS is > 1 or you issue CREATE table as SELECT.

Accessing a GLOBAL TEMPORARY TABLE

When you access a global temporary table a TEMP segment is instantiated to hold the temporary data.


Sort Segment 확인

-- Used_block 과 Total_block 이 같으면 temp 가 부족한 것을 확인 가능

select TABLESPACE_NAME,TOTAL_BLOCKS,USED_BLOCKS,FREE_BLOCKS from v$sort_segment; 


아래의 명령어로 현재 temp 를 누가 사용하는지 확인 가능

SELECT a.username, a.sid, a.serial#, a.osuser, b.tablespace, b.blocks, c.sql_text

FROM v$session a, v$tempseg_usage b, v$sqlarea c

WHERE a.saddr = b.session_addr

AND c.address= a.sql_address

AND c.hash_value = a.sql_hash_value

ORDER BY b.tablespace, b.blocks;



TEMP 확이

SELECT * FROM DBA_TEMP_FILES;


Trace 확인 했을 때에는 GATHER_TABLE_STATS 를 확인 하였다...

흠...테이블 단위 통계 정보 수집이면...이때도 Temp 를 쓰는가 보다..

When gathering GLOBAL statistics a large amount of TEMP space is needed in order to collect the necessary information.


해결방법


Gather the statististics at the partition level rather than the table level and derive the table level statistics from the partitions.

To do this gather using granularity => 'PARTITION'.

exec dbms_stats.gather_table_stats(ownname => '<schema name>', tabname => '<table name>', granularity => 'PARTITION');


참고로 10g 이라서 아래도 참조할 부분이다.


This new value exists in 10.2.0.5 and for 10.2.0.4 after Patch 6526370 applied (see more in Note 6526370.8 Bug 6526370 - New GRANULARITY option for DBMS_STATS statistics on the table).


해결방법


1. tempfiles을 추가, 현재 파일 사이즈를 증가하거나 혹은 auto extend를 활성화

2. 쿼리/구문을 튜닝하여 sort 작업들이 디스크가 아니라 메모리에서 수행(가장중요)


1. Temp 를 하나 더 추가 

ALTER TABLESPACE TEMP ADD TEMPFILE '/ORADATA/TEMP02.DBF' SIZE 1000M AUTOEXTEND ON;


2.기본 Temp resize 

ALTER DATABASE TEMPFILE ''/ORADATA/TEMP01.DBF'' RESIZE 2000M; 


참조oracle 문서

How Do You Find Who And What SQL Is Using Temp Segments (문서 ID 317441.1)

ORA-1652 에러에 대한 문제 해결 방안 (문서 ID 1908925.1)

RAC 환경은,  Note 280578.1


참조 사이트

http://jun3.tistory.com/26

반응형
반응형


아래 내용도 기본적으로 알아야 하는 내용들.....

CLUSTERWARE PROCESSES in 11g RAC R2 Environment

i).Cluster Ready Services (CRS)

$ ps -ef | grep crs | grep -v grep

root 25863 1 1 Oct27 ? 11:37:32 /opt/oracle/grid/product/11.2.0/bin/crsd.bin reboot

crsd.bin => The above process is responsible for start, stop, monitor and failover of resource. It maintains OCR and also restarts the resources when the failure occurs.

This is applicable for RAC systems. For Oracle Restart and ASM ohasd is used.

ii).Cluster Synchronization Service (CSS)

$ ps -ef | grep -v grep | grep css

root 19541 1 0 Oct27 ? 00:05:55 /opt/oracle/grid/product/11.2.0/bin/cssdmonitor

root 19558 1 0 Oct27 ? 00:05:45 /opt/oracle/grid/product/11.2.0/bin/cssdagent

oragrid 19576 1 6 Oct27 ? 2-19:13:56 /opt/oracle/grid/product/11.2.0/bin/ocssd.bin

cssdmonitor => Monitors node hangs(via oprocd functionality) and monitors OCCSD process hangs (via oclsomon functionality) and monitors vendor clusterware(via vmon functionality).This is the multi threaded process that runs with elavated priority.

Startup sequence: INIT --> init.ohasd --> ohasd --> ohasd.bin --> cssdmonitor

cssdagent => Spawned by OHASD process.Previously(10g) oprocd, responsible for I/O fencing.Killing this process would cause node reboot.Stops,start checks the status of occsd.bin daemon

Startup sequence: INIT --> init.ohasd --> ohasd --> ohasd.bin --> cssdagent

occsd.bin => Manages cluster node membership runs as oragrid user.Failure of this process results in node restart.

Startup sequence: INIT --> init.ohasd --> ohasd --> ohasd.bin --> cssdagent --> ocssd --> ocssd.bin

iii) Event Management (EVM)

$ ps -ef | grep evm | grep -v grep

oragrid 24623 1 0 Oct27 ? 00:30:25 /opt/oracle/grid/product/11.2.0/bin/evmd.bin

oragrid 25934 24623 0 Oct27 ? 00:00:00 /opt/oracle/grid/product/11.2.0/bin/evmlogger.bin -o /opt/oracle/grid/product/11.2.0/evm/log/evmlogger.info -l /opt/oracle/grid/product/11.2.0/evm/log/evmlogger.log

evmd.bin => Distributes and communicates some cluster events to all of the cluster members so that they are aware of the cluster changes.

evmlogger.bin => Started by EVMD.bin reads the configuration files and determines what events to subscribe to from EVMD and it runs user defined actions for those events.

iv).Oracle Root Agent

$ ps -ef | grep -v grep | grep orarootagent

root 19395 1 0 Oct17 ? 12:06:57 /opt/oracle/grid/product/11.2.0/bin/orarootagent.bin

root 25853 1 1 Oct17 ? 16:30:45 /opt/oracle/grid/product/11.2.0/bin/orarootagent.bin

orarootagent.bin => A specialized oraagent process that helps crsd manages resources owned by root, such as the network, and the Grid virtual IP address.

The above 2 process are actually threads which looks like processes. This is a Linux specific

v).Cluster Time Synchronization Service (CTSS)

$ ps -ef | grep ctss | grep -v grep

root 24600 1 0 Oct27 ? 00:38:10 /opt/oracle/grid/product/11.2.0/bin/octssd.bin reboot

octssd.bin => Provides Time Management in a cluster for Oracle Clusterware

vi).Oracle Agent

$ ps -ef | grep -v grep | grep oraagent

oragrid 5337 1 0 Nov14 ? 00:35:47 /opt/oracle/grid/product/11.2.0/bin/oraagent.bin

oracle 8886 1 1 10:25 ? 00:00:05 /opt/oracle/grid/product/11.2.0/bin/oraagent.bin

oragrid 19481 1 0 Oct27 ? 01:45:19 /opt/oracle/grid/product/11.2.0/bin/oraagent.bin

oraagent.bin => Extends clusterware to support Oracle-specific requirements and complex resources. This process runs server callout scripts when FAN events occur. This process was known as RACG in Oracle Clusterware 11g Release 1 (11.1).

ORACLE HIGH AVAILABILITY SERVICES STACK

i) Cluster Logger Service

$ ps -ef | grep -v grep | grep ologgerd

root 24856 1 0 Oct27 ? 01:43:48 /opt/oracle/grid/product/11.2.0/bin/ologgerd -m mg5hfmr02a -r -d /opt/oracle/grid/product/11.2.0/crf/db/mg5hfmr01a

ologgerd => Receives information from all the nodes in the cluster and persists in a CHM repository-based database. This service runs on only two nodes in a cluster

ii).System Monitor Service (osysmond)

$ ps -ef | grep -v grep | grep osysmond

root 19528 1 0 Oct27 ? 09:42:16 /opt/oracle/grid/product/11.2.0/bin/osysmond

osysmond => The monitoring and operating system metric collection service that sends the data to the cluster logger service. This service runs on every node in a cluster

iii). Grid Plug and Play (GPNPD):

$ ps -ef | grep gpn

oragrid 19502 1 0 Oct27 ? 00:21:13 /opt/oracle/grid/product/11.2.0/bin/gpnpd.bin

gpnpd.bin => Provides access to the Grid Plug and Play profile, and coordinates updates to the profile among the nodes of the cluster to ensure that all of the nodes have the most recent profile.

iv).Grid Interprocess Communication (GIPC):

$ ps -ef | grep -v grep | grep gipc

oragrid 19516 1 0 Oct27 ? 01:51:41 /opt/oracle/grid/product/11.2.0/bin/gipcd.bin

gipcd.bin => A support daemon that enables Redundant Interconnect Usage.

v). Multicast Domain Name Service (mDNS):

$ ps -ef | grep -v grep | grep dns

oragrid 19493 1 0 Oct27 ? 00:01:18 /opt/oracle/grid/product/11.2.0/bin/mdnsd.bin

mdnsd.bin => Used by Grid Plug and Play to locate profiles in the cluster, as well as by GNS to perform name resolution. The mDNS process is a background process on Linux and UNIX and on Windows.

vi).Oracle Grid Naming Service (GNS)

$ ps -ef | grep -v grep | grep gns

gnsd.bin => Handles requests sent by external DNS servers, performing name resolution for names defined by the cluster.


참조 https://blogs.oracle.com/myoraclediary/entry/clusterware_processes_in_11g_rac


반응형

'Oracle > Architecture' 카테고리의 다른 글

[Join] Inner join / Outer join  (0) 2017.02.03
[Oracle] TAF 와 CTF 개념  (0) 2015.10.13
반응형

하아...

복구는 요청이 올때마다 테스트를 안해볼 수가 없다..


옛날에 공부하면서 테스트 했던 부분도

아...이렇게 되었던 거지 하면서도 다시 물어보면 확신에 차서 이야기를 못한다..

역시 내공이 부족하다..능력이 부족한걸까...


어쨋든 오랫만에 다시 테스트를 해봤다.



Hotbackup 도중 베리타스 에서 DB를 내리게 될 경우..


보통 베리타스에서 DB를 내리게 되는 경우 Abort로 내리는 것을 로그로 확인한 기억이 있다.

또한, OS 엔지니어가 확인까지 해준 적이 있기에..

당연히 이번에도 Abort로 내리는 것으로 가정 하였다.


Hotbackup 은 Archive Mode 에서만 가능 하다는 것을 머리에 새겨두고..


SQL> alter tablespace users begin backup;


Tablespace altered.


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

Alert Log



이 상태에서 session 을 열어 abort로 내리자.


그리고 다시 startup 해보자.


예상대로 에러가 떨어진 것을 확인할 수 있다.


혹시 모르니 상태 확인도 필수



mount 상태이군..

깔끔하게 책에 있던 내용데로 진행해 보자.


SQL> alter database datafile '/oradata/EAIDB/users01.dbf' end backup;

Database altered.


SQL> alter database open;

Database altered.


역시나 책은 배신하지 않는군...


다른 방법으로 recover database 해도 된다.

SQL> recover database;

Media recovery complete.


SQL> alter database open;

Database altered.




뭐 어쨋든..

오랜만에 아무 생각없이 복구 했군...


아무것도 아니라고 생각 들지만 고객한테는 확실하게 이야기를 해야되고, 나도 확실히 알고 있어야지 복구가 쉬우니...

기초도 탄탄히!!!

반응형
반응형

가끔 OS patch 확인할 필요가 있다.

그때마다 매번 검색 하기도...그렇다고 외우면 자꾸 잊고..쓸일도 없고...


노트의 필요성...


$instfix -i -k "IY68975"

    All filesets for IY68975 were found.

<-- 현재 설치 되어 있는 패치


$instfix -i -k "IZ41855"

    There was no data for IZ41855 in the fix database.

<--현재 설치 되어 있지 않는 패치





Usage: instfix [-R Path] [-T [-M platform]] [-s string] 

          [ -k keyword | -f file ] [-d device] [-S] 

          [-p | [-i [-c] [-q] [-t type] [-v] [-F]]] [-a] 


Function: Installs or queries filesets associated with keywords or fixes.


        -a Display the symptom text (can be combined with -i, -k, or -f).

        -c Colon-separated output for use with -i. Output includes keyword

           name, fileset name, required level, installed level, status, and

           abstract.  Status values are < (down level), = (correct level),

           + (superseded), and ! (not installed).

        -d Input device (not valid with flags -i or -a).

        -F Returns failure unless all filesets associated with the fix

           are installed.

        -f Input file containing keywords or fixes. Use '-' for standard input.

           The -T option produces a suitable input file format for -f.

        -i Use with -k or -f option to display whether specified fixes or 

           keywords are installed.  Installation is not attempted.

           If neither -k nor -f is specified, all known fixes are displayed.

        -k Install filesets for a keyword or fix.

        -M Use with -T option to display information for fixes present

           on the media that have to do with the platform specified.

        -p Use with -k or -f to print filesets associated with keywords.

           Installation is not attempted when -p is used.

        -q Quiet option for use with -i.  If -c is specified, no heading is 

           displayed.  Otherwise, no output is displayed.

        -R User Specified Install Location

        -S Suppress multi-volume processing.

        -s Search for and display fixes on media containing a specified string.

        -T Display fix information for complete fixes present on the media.

        -t Use with -i option to limit search to a given type.  Currently

           valid types are 'f' (fix) and 'p' (preventive maintenance).

        -v Verbose option for use with -i.  Gives information about each

           fileset associated with a fix or keyword.

           to the environment provided.


반응형

'OS > AIX' 카테고리의 다른 글

Topas Memory  (0) 2015.08.25
반응형

이놈의 삽질은..

한번 시작하면 몇일을 가니..

정말 OS 담당자가 짜잔 하고 구축 해 놨으면 좋겠다..


몇일 전 Network- Interconnect IP 가 끊어 지는 경우 CSS 데몬이 체크하다가 데이터 정합성 유지를 위해 한쪽 노드의 OS 를 리부팅 하는 경우가 생겼다. (주로 slave쪽을 재기동)


하지만, 네트워크 상에서는 어떠한 에러 로그도 없었다고 하니..

테스트를 해서 증명할 수 밖에..


먼저 나는 10g 에서 하고 싶었는데..10g RAC 구축해 놓은 것이 없어서

어쩔수 없이 11g 에서 테스트를 진행할 수 밖에 없었다.


각설하고..10g File system 구축은 AIX 에서 몇번 했지만 실질적으로 테스트는 11g로 많이 진행 하였기 때문에 이참에 하나 구축할 필요가 있었다.


여러번의 삽질 끝에 완료는 했지만 삽질의 주 요인을 하나 찾아서 공유해 본다.


먼저 10g ocfs 설치는 가급적 yum 으로 진행 했으면 하는 바람이다....

이걸로도 삽질하다가 포기한 적이 있기에....

그리고 ocfs2 설정은 다른 블로그도 많기에 아래 부분만 확인 잘 했으면 한다.


설정 도중 

service o2cb configure 한다.

# service o2cb configure

 

Configuring the O2CB driver.

 

This will configure the on-boot properties of the O2CB driver.

The following questions will determine whether the driver is loaded on

boot.  The current values will be shown in brackets ('[]').  Hitting

ENTER without typing an answer will keep that current value.  Ctrl-C

will abort.

 

Load O2CB driver on boot (y/n) [n]: y

Cluster stack backing O2CB [o2cb]: 

Cluster to start on boot (Enter "none" to clear) [ocfs2]: ocfscluster1

Specify heartbeat dead threshold (>=7) [31]: 

Specify network idle timeout in ms (>=5000) [30000]: 

Specify network keepalive delay in ms (>=1000) [2000]: 

Specify network reconnect delay in ms (>=2000) [2000]: 

Writing O2CB configuration: OK

Loading filesystem "configfs": OK

Mounting configfs filesystem at /sys/kernel/config: OK

Loading stack plugin "o2cb": OK

Loading filesystem "ocfs2_dlmfs": OK

Creating directory '/dlm': OK

Mounting ocfs2_dlmfs filesystem at /dlm: OK

Setting cluster stack "o2cb": OK

Checking O2CB cluster configuration : Failed


위에서 빨간색 부분은 클러스터 명이다.


# o2cb_ctl -C -n ocfscluster1 -t cluster -a name=ocfscluster1


등록한 이후 아래와 같이 각 노드를 클러스터에 등록하는 경우이다.

여기서 내가 잘못한 부분이다.


# o2cb_ctl -C -n ocfsrac1 -t node -a number=0 -a ip_address=192.168.131.100 -a ip_port=7777 -a cluster=ocfscluster1

# o2cb_ctl -C -n ocfsrac2 -t node -a number=1 -a ip_address=192.168.131.110 -a ip_port=7777 -a cluster=ocfscluster1


파란색 부분이 자기 자신에 맞게 설정해 줘야 하는 부분이다.


즉, 다른 부분은 잘못 설정해도 오류가 나지만 ocfsrac1 , ocfsrac2 는 설정 잘못해도 오류가 생기지 않는다.(Host명을 잘못 설정해도 오류가 날일 없겠지...=_=;;)


다른 부분 에러는 내가 판단해서 잘 설정했지만 host 명을 따라 하다 보니 잘못 적은 것이다..에러가 없으니 난 완료된 줄 알았다.


하지만 service o2cb status 를 하게되면 아래와 같이 나온다.


rac1:/root>service o2cb status

Driver for "configfs": Loaded

Filesystem "configfs": Mounted

Stack glue driver: Loaded

Stack plugin "o2cb": Loaded

Driver for "ocfs2_dlmfs": Loaded

Filesystem "ocfs2_dlmfs": Mounted

Checking O2CB cluster "ocfscluster1": Offline


먼 짓을 해도 계속 offline 만 뜬다.. 나머지는 정상적인데...

다른 부분도 추가해서 첨부하자면..


rac1:/root>service o2cb start ocfscluster1

Setting cluster stack "o2cb": OK

Registering O2CB cluster "ocfscluster1": OK

Setting O2CB cluster timeouts : OK

-------------------------------------------------------
rac1:/root>/etc/init.d/o2cb status
Driver for "configfs": Loaded
Filesystem "configfs": Mounted
Stack glue driver: Loaded
Stack plugin "o2cb": Loaded
Driver for "ocfs2_dlmfs": Loaded
Filesystem "ocfs2_dlmfs": Mounted
-------------------------------------------------------
rac1:/root>vi /etc/fstab

LABEL=/                 /                       ext3    defaults        1 1
LABEL=/app              /app                    ext3    defaults        1 2
LABEL=/var              /var                    ext3    defaults        1 2
LABEL=/home             /home                   ext3    defaults        1 2
LABEL=/boot             /boot                   ext3    defaults        1 2
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
LABEL=SWAP-sda5         swap                    swap    defaults        0 0
/dev/sdb1               /oradata01               ocfs2   _netdev,datavolume,nointr      0 0


전혀 문제가 없이 나온다.

결국 아래에서 수정 후 정상적으로 공유가 되었다.



즉!!name 에는 자신의 host 명을 설정해 줘야한다!!!


ocfs 설정 참고 자료

http://db.necoaki.net/145


반응형
반응형

10.2.0.5 2node RAC 에서 한쪽 (Slave) 노드가 자꾸 재기동 되는 현상에서

이것 저것 확인하다가 아래와 같이 에러로그가 있어서 찾아보다가 확신이 안서서

일단은 포워딩 하여 저장해 본다.

아래는 crsd.log 이다.(master)


2015-10-10 12:49:30.874: [ COMMCRS][9526]clsc_receive: (114771870) error 2


2015-10-10 21:54:31.062: [ COMMCRS][9526]clsc_receive: (114771870) error 2


2015-10-13 10:41:30.444: [  CRSEVT][11008]32CAAMonitorHandler :: 0:Could not join /oracle/crs/bin/racgwrap(check)

category: 1234, operation: scls_process_join, loc: childcrash, OS error: 0, other: Abnormal termination of the child


2015-10-13 10:41:30.449: [  CRSEVT][11008]32CAAMonitorHandler :: 0:Action Script /oracle/crs/bin/racgwrap(check) timed out for ora.glvndbp05.vip! (timeout=60)

2015-10-13 10:41:30.449: [  CRSAPP][11008]32CheckResource error for ora.glvndbp05.vip error code = -2

2015-10-13 10:43:03.482: [  CRSEVT][11011]32CAAMonitorHandler :: 0:Could not join /oracle/crs/bin/racgwrap(check)

category: 1234, operation: scls_process_join, loc: childcrash, OS error: 0, other: Abnormal termination of the child


2015-10-13 10:43:03.482: [  CRSEVT][11011]32CAAMonitorHandler :: 0:Action Script /oracle/crs/bin/racgwrap(check) timed out for ora.glvndbp05.vip! (timeout=60)

2015-10-13 10:43:03.482: [  CRSAPP][11011]32CheckResource error for ora.glvndbp05.vip error code = -2

2015-10-13 10:44:36.509: [  CRSEVT][11017]32CAAMonitorHandler :: 0:Could not join /oracle/crs/bin/racgwrap(check)

category: 1234, operation: scls_process_join, loc: childcrash, OS error: 0, other: Abnormal termination of the child


위에서 확인해 보면 정리해서...

[CRSEVT] CAAMonitorHandler :: 0:Could not join .../crs/bin/racgwrap(check)

category: 1234, operation: scls_process_join, loc: childcrash, OS error: 0, other: Abnormal termination of the child


[CRSEVT] CAAMonitorHandler :: 0:Action Script ../crs/bin/racgwrap(check) timed out for 오라클.vip! (timeout=60)


이부분이 보인다. 검색해 보니 딱 한분(한국어로 검색...) 올려놔 있어서

정확하게 몰라서 일단은 공유해 본다.


퍼온 것이므로 문제 되면 자삭하겠습니다.


10g RAC 환경에서 있는 bug 인데 racgmain check 데몬이 비정상적으로 fork 되면서 메모리 사용율이 올라가게 되어 결국 나중엔 시스템을 사용할수 없는 지경까지 이르게 됨.

 

 oracle 26024     1  0  Dec  6  ?         0:00 /oracle/crs/bin/racgmain check

 oracle 23218     1  0  Dec  6  ?         0:00 /oracle/crs/bin/racgmain check

 oracle 23179     1  0  Dec  4  ?         0:00 /oracle/ora10/bin/racgmain check

 oracle 27277     1  0  Dec  6  ?         0:00 /oracle/ora10/bin/racgmain check

 oracle  1028     1  0  Dec  5  ?         0:00 /oracle/ora10/bin/racgmain check

 oracle  7991     1  0  Dec  4  ?         0:00 /oracle/ora10/bin/racgmain check

 oracle 15324     1  0  Dec  3  ?         0:00 /oracle/ora10/bin/racgmain check

 oracle 14314     1  0  Dec  4  ?         0:00 /oracle/ora10/bin/racgmain check

 oracle 10895     1  0  Dec  4  ?         0:00 /oracle/ora10/bin/racgmain check

 oracle   404     1  0  Dec  3  ?         0:00 /oracle/ora10/bin/racgmain check


해결책은 아래와 같이 CRS bundle #2 patchset을 적용시키거나 workaround 방법을 써서 조치해 주어야 함.

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


Applies to:

Oracle Server - Enterprise Edition - Version: 10.2.0.1 to 11.1.0.6

Information in this document applies to any platform.

Oracle Server Enterprise Edition - Version: 10.1.0.2 to 10.2.0.4

Symptoms

System slows down and many "racgmain check" processes may appear in ps output.  CRS log would show the following messages.

oracle@HA5-ZW05:[/home/oracle] ps -ef|grep "racgmain check"|wc -l

1290


~~~~

CAAMonitorHandler :: 0:Action Script /opt/oracle/product/crs/bin/racgwrap(check) timed out for ora.harac1.vip! (timeout=60)

CheckResource error for ora.harac1.vip error code = -2

CAAMonitorHandler :: 0:Could not join /opt/oracle/product/crs/bin/racgwrap(check)

category: 1234, operation: scls_process_join, loc: childcrash, OS error: 0, 

other: Abnormal termination of the child

~~~~

Cause

crsd.bin invokes the racgmain to check the status of the resources that are managed by CRS. The racgmain is invoked through the wrapper script racgwrap. 


If the resource action timed out, crsd kills the action script, which is racgwrap, while racgmain process will not be killed. Over time, this might create lot of orphan racgmain processes in the system. This would eventually slow down the due to the resource contention at the OS level.


Internal bug:6196746  addresses this issue.


Solution


This is fixed in 11.1.0.7 patchset.. If you are running into this issue in 10gR2, please go ahead and apply 10.2.0.4 patchset and the latest CRS bundle patch. This fix is included  in CRS bundle patch from bundle #2 onwards.

Following option could be used as a temporary workaround until the patch is applied.


1.  Make a copy of racgwrap located under $ORACLE_HOME/bin and $CRS_HOME/bin on ALL Nodes


2.  Edit the file racgwrap and modify the last 3 lines from:


~~~

$ORACLE_HOME/bin/racgmain "$@"

status=$?

exit $status


to:


# Line added to fix for Bug 6196746

exec $ORACLE_HOME/bin/racgmain "$@"

~~~


3.  Kill all the orphan racgmain processes running.


$ ps -ef|grep "racgmain check"

oracle 18701 1 0 Aug 1 ? 0:00 /oracle/product/10.2.0/database/bin/racgmain check

oracle 14653 1 0 Aug 1 ? 0:00 /oracle/product/10.2.0/database/bin/racgmain check

oracle 24517 1 0 Aug 1 ? 0:00 /oracle/product/10.2.0/database/bin/racgmain check


$ kill -9 <PID of racgmain>



펌 : http://pat98.tistory.com/376


추가로 찾은 문서도 공유해 본다.


10g/11gR1: Many Orphaned Or Hanging "racgmain" Processes Running (문서 ID 732086.1) <--위에 것과 동일


10g RAC: One node VIP status always shows "UNKNOWN" and "CRS-0223: Resource 'ora.rac-test1.vip' has placement error" when try to startup the VIP. (문서 ID 1993024.1)

Symptoms

Symptom 1:

In 10g RAC on unix platform, VIP on one nodes always shows "UNKNOWN". 


Symptom 2:

When try to start it up, it report following error:

CRS-1028: Dependency analysis failed because of:

CRS-0223: Resource 'ora.rac-test1.vip' has placement error.  


Symptom 3:

In CRSD log, find following error:


2015-03-19 10:51:09.772: [  CRSRES][3737213248][ALERT]0`ora.rac-test1.vip` on member `rac-test1` has experienced an unrecoverable failure.

2015-03-19 10:51:09.772: [  CRSRES][3737213248]0Human intervention required to resume its availability.

2015-03-19 10:51:09.772: [  CRSEVT][3741415744]0CAAMonitorHandler :: 0:Could not execute /u01/app/oracle/product/10.2.0/crs_1/bin/racgwrap(stop) for ora.rac-test2.vip

category: 1234, operation: scls_canexec, loc: , OS error: 0, other: no exe permission, file /u01/app/oracle/product/10.2.0/crs_1/bin/racgwrap    ===> No execute permission for this file.


Solution

1. Shutdown all the resource of this node: instance/asm/nodeapps/crs


2. Change permission of those 2 files to 751 on the node with issue


chmod 751 /u01/app/oracle/product/10.2.0/crs_1/racg/admin/racgwrap

chmod 751 /u01/app/oracle/product/10.2.0/crs_1/bin/racgeut


3. Then you can startup all the resource and check whether VIP is online.



반응형
반응형

ORACLE 10g RAC 테스트 할 필요가 생겼다.


CSS 관련하여 해당 데몬이 죽었을 경우 OS 가 리부팅 되는 것인데,

또한, private IP 가 통신 안될 때에도 DISK 적합성 때문에 OS 강제 리부팅 하는 경우가 있다


이 부분은 다음에 정리 되는데로 올려야 겠다.


아래는 RAC 설치 전 OCFS2 로 파일 시스템 구축 중에 생기는 에러에 대해 정리한 부분이다.


rac1:/root>mkfs.ocfs2 -b 4K -C 32K -N 2 -L "OCFS2Filesystem" /dev/sdb1

mkfs.ocfs2 1.8.0

Cluster stack: classic o2cb

/dev/sdb1 is apparently in use by the system; will not make a ocfs2 volume here!

<--이렇게 에러가 - _ -;;;


아래와 같이 상태 확인

rac1:/root>dmsetup status


rac-vote01: 0 614400 linear 

rac-control02: 0 204800 linear 

rac-undotbs2: 0 1638400 linear 

rac-control01: 0 204800 linear 

rac-undotbs1: 0 1638400 linear 

rac-system: 0 1638400 linear 

rac-users: 0 1638400 linear 

rac-redo06: 0 409600 linear 

rac-spfile: 0 204800 linear 

rac-temp: 0 1638400 linear 

rac-redo05: 0 409600 linear 

rac-redo04: 0 409600 linear 

rac-sysaux: 0 1638400 linear 

rac-redo03: 0 409600 linear 

rac-vote03: 0 614400 linear 

rac-redo02: 0 409600 linear 

rac-ocr02: 0 614400 linear 

rac-vote02: 0 614400 linear 

rac-redo01: 0 409600 linear 

rac-control03: 0 204800 linear 

rac-ocr01: 0 614400 linear 

젠장 내 잘못이다..기존에 raw device 구성 중에 이 짓을 했으니...ㅠㅠ

아래와 같이 지워주자..


rac1:/root>dmsetup remove_all

다시 진행해 보자..!!


rac1:/root>mkfs.ocfs2 -b 4K -C 32K -N 2 -L "OCFS2Filesystem" /dev/sdb1


mkfs.ocfs2 1.8.0

Cluster stack: classic o2cb

Label: OCFS2Filesystem

Features: sparse extended-slotmap backup-super unwritten inline-data strict-journal-super xattr indexed-dirs refcount discontig-bg

Block size: 4096 (12 bits)

Cluster size: 32768 (15 bits)

Volume size: 21467922432 (655149 clusters) (5241192 blocks)

Cluster groups: 21 (tail covers 10029 clusters, rest cover 32256 clusters)

Extent allocator size: 12582912 (3 groups)

Journal size: 134184960

Node slots: 2

Creating bitmaps: done

Initializing superblock: done

Writing system files: done

Writing superblock: done

Writing backup superblock: 3 block(s)

Formatting Journals: done

Growing extent allocator: done

Formatting slot map: done

Formatting quota files: done

Writing lost+found: done

mkfs.ocfs2 successful



완료!!!!!

감사합니다.


출처 : http://blog.helperchoi.com/75


반응형

'OS > LINUX' 카테고리의 다른 글

[펌]PuTTY 한글 깨짐 문제 해결하기  (1) 2016.02.23
[CentOS 6.6] FTP 설정  (1) 2016.02.17
반응형

TAF 와 CTF 도 모르고 지금까지 뭘한걸까...

역시 개념은 잘 알고 있어야 되는듯..

문제를 해결하고 심화된 공부를 할지라도, 결국은 기본이 중요하다는 것을..


- TAF

 RAC 에서 Failover 의 개념으로 한쪽 노드에 장애가 발생했을 경우, 나머지 살아있는 노드로 Failover 되는 것


- TAF 적용 방법

 클라이언트 $ORACLE_HOME/network/admin/tnsnames.ora 파일 수정


ORCLTEST =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = vip-linux1)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = vip-linux2)(PORT = 1521))
    (LOAD_BALANCE = yes)
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcltest.idevelopment.info)
      (FAILOVER_MODE =
        (TYPE = SELECT)
        (METHOD = BASIC)
        (RETRIES = 180)
        (DELAY = 5)

      )
    )

  )


 - Type : None, Session, Select 선택. 사용 해제를 위해서는 Type=SESSION 설정하며, Session 과 Open Cursor 의 Failover 위해서는 Type=Select 로 설정. TAF를 해제하기 위해서는 Type=None으로 설정


 - METHOD : BASIC 또는 PRECONNECT 중 하나 사용. BASIC 방식을 사용하면, 기존 접속이 실패할 때까지, TAF는 접속의 재설정을 시도하지 않음. PRECONNECT 방식을 사용하면 TAF는 백업 접속을 위해 필요한 메모리 구조를 사전 설정 가능하지만, 기존 접속이 실패할 때까지 백업 접속은 비활성화


 - BACKUP : 백업 접속의 설정을 위해 사용되는 네트 서비스 이름을 지정. BACKUP 지정은 PRCONNECT 방식을 사용할 때 필요. BASIC 방식에서 추천. 그렇지 않으면 클라이언트가 재접속을 할때까지 추가적으로 지연을 시켜 실패한 인스턴스에 최초로 재접속을 시도. 그러나 사용자는 LOAD_BALANCING=ON 인 상태에서 BACKUP을 지정할 수 없음


 - DELAY : TAF가 장애 후에 BACKUP 에 연결하려는 시도 사이에서 기다리는 수초간을 지연


 - RETRIES : TAF가 장애 후에 BACKUP 연결 하기 위한 시도 횟수. RETRIES와 DELAY는 TAF가 백업 접속을 실패하기 전에 콜드 페일오버가 완료될 수 있는 지연시간이 있음


- /etc/hosts 에 정의 되어 있어야 함

10.10.100.101 vip-linux1

10.10.100.102 vip-linux2


- TAF 테스트


C:\> sqlplus system/manager@orcltest


COLUMN instance_name    FORMAT a13

COLUMN host_name        FORMAT a9

COLUMN failover_method  FORMAT a15

COLUMN failed_over      FORMAT a11


SELECT

    instance_name

  , host_name

  , NULL AS failover_type

  , NULL AS failover_method

  , NULL AS failed_over

FROM v$instance

UNION

SELECT

    NULL

  , NULL

  , failover_type

  , failover_method

  , failed_over

FROM v$session

WHERE username = 'SYSTEM';



INSTANCE_NAME HOST_NAME FAILOVER_TYPE FAILOVER_METHOD FAILED_OVER

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

orcl1         linux1

                        SELECT        BASIC           NO


위에서 설정한 SQL*Plus 세션에서 로그아웃 하지 않습니다!


위 쿼리를 수행한 다음, abort 옵션을 사용하여 linux1 노드의 orcl1 인스턴스를 셧다운 합니다. 이 작업을 수행하기 위해 아래와 같이 srvctl 커맨드라인 유틸리티를 사용합니다:


# su - oracle

$ srvctl status database -d orcl

Instance orcl1 is running on node linux1

Instance orcl2 is running on node linux2


$ srvctl stop instance -d orcl -i orcl1 -o abort


$ srvctl status database -d orcl

Instance orcl1 is not running on node linux1

Instance orcl2 is running on node linux2


다시 앞의 SQL 세션으로 돌아가, 버퍼에 저장된 SQL 구문을 재실행합니다: 

COLUMN instance_name    FORMAT a13

COLUMN host_name        FORMAT a9

COLUMN failover_method  FORMAT a15

COLUMN failed_over      FORMAT a11


SELECT

    instance_name

  , host_name

  , NULL AS failover_type

  , NULL AS failover_method

  , NULL AS failed_over

FROM v$instance

UNION

SELECT

    NULL

  , NULL

  , failover_type

  , failover_method

  , failed_over

FROM v$session

WHERE username = 'SYSTEM';


INSTANCE_NAME HOST_NAME FAILOVER_TYPE FAILOVER_METHOD FAILED_OVER

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

orcl2         linux2

                        SELECT        BASIC           YES


SQL> exit


위 실행 결과에서, 세션이 linux2 노드의 orcl2 인스턴스로 페일오버 되었음을 확인


- CTF 와 TAF 차이



CTF  : 신규접속자

- 한쪽 Instance 가 장애가 나더라도  자동으로 다른 Instance로 접속할  수 있게 함

- RAC 설치시 기본으로 됨



TAF  : 기존접속자

- 기존 접속자를 넘겨주는 기술

- 별도로 설정해야 사용가능 


출처 :   http://aozjffl.tistory.com/323

http://dinggur.tistory.com/207


http://www.oracle.com/technology/global/kr/pub/articles/hunter_rac10gr2_3.html

     http://www.oracle.com/technology/global/kr/deploy/availability/htdocs/taf.html

     http://publib.boulder.ibm.com/infocenter/pim/v6r0m0/index.jsp?topic=/com.ibm.wpc.ins.doc/wpc_tsk_setting_up_oracle_to_use_taf_support.html




반응형

+ Recent posts