Skip to content

리스너(Listener)란?

조회 수 20393 추천 수 0 2010.01.29 08:43:26
- 오라클 리스너는 네트워크를 이용하여 클라이언트에서 오라클 서버로 연결하기 위한 
   오라클 네트워크 관리자 입니다.
 
 - 오라클에서 네트워크를 통한 연결은 모두 리스너가 담당하며 리스너와 연결되기 위해서는
   클라이언트에 오라클 NET8이 설치되어 있고 이를 통해 오라클 서비스명이라는 것을
   만들어 접속해야 합니다.
 
 - 오라클 서버에서 리스너를 시작시켜줘야 클라이언트들이 접속할 수 있습니다.
 
 - lsnrctl명령어로 리스너를 관리 할 수 있습니다.

-
오라클 서버/클라이언트간의 네트워크 설정을 하기위해서는
  서버에서는 listener.ora파일(외부에서 DB로 접속할때 이파일의 설정을 통해서 DB에 접속)을 그리고
  클라이언트에서는 tnsnames.ora파일(원격으로 DB에 접속할때 필요한 파일)을 설정해 주어야 합니다.
  =>listener.ora 파일
     
(192.168.10.123에 오라클 사용, 파일경로 :  /home/oracle/product/9.2.0/network/admin/listener.ora)
      LISTENER =
       (DESCRIPTION_LIST =
         (DESCRIPTION =
           (ADDRESS_LIST =
             (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
           )
         (ADDRESS_LIST =
            (ADDRESS = (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT = 1521))
         )
       )
      )

     SID_LIST_LISTENER =
      (SID_LIST =
        (SID_DESC =
          (SID_NAME = PLSExtProc)
          (ORACLE_HOME = /home/oracle/product/9.2.0)
          (PROGRAM = extproc)
        )
      (SID_DESC =
        (GLOBAL_DBNAME = fuzewire)
        (ORACLE_HOME = /home/oracle/product/9.2.0)
        (SID_NAME = ora9)
      )
    )
 
  =>
tnsnames.ora 파일
     (192.168.10.123에 오라클 사용, 파일경로 : /home/oracle/product/9.2.0/network/admin/tnsnames.ora )
     FUZEWIRE.LOCALDOMAIN =
       (DESCRIPTION =
         (ADDRESS_LIST =
           (ADDRESS = (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT = 1521))
         )
         (CONNECT_DATA =
           (SERVER = DEDICATED)
           (SERVICE_NAME = fuzewire)
         )
       )

 - 사용예)
   => 오라클 시작하기
      
[root@localhost root]# su - oracle
   => 오라클  리스너 상태 확인
       [oracle@localhost oracle]$ lsnrctl status

       LSNRCTL for Linux: Version 9.2.0.4.0 - Production on 04-MAY-2007 09:59:48
       Copyright (c) 1991, 2002, Oracle Corporation.  All rights reserved.
       Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC)))
       TNS-12541: TNS:no listener
       TNS-12560: TNS:protocol adapter error
       TNS-00511: No listener
       Linux Error: 111: Connection refused
       Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost.localdomain)(PORT=1521)))
       TNS-12541: TNS:no listener
       TNS-12560: TNS:protocol adapter error
       TNS-00511: No listener
       Linux Error: 111: Connection refused

  => 오라클  리스너 start
      [oracle@localhost oracle]$ lsnrctl start

      LSNRCTL for Linux: Version 9.2.0.4.0 - Production on 04-MAY-2007 10:00:04
      Copyright (c) 1991, 2002, Oracle Corporation.  All rights reserved.
      Starting /home/oracle/product/9.2.0/bin/tnslsnr: please wait...
      TNSLSNR for Linux: Version 9.2.0.4.0 - Production
      System parameter file is /home/oracle/product/9.2.0/network/admin/listener.ora
      Log messages written to /home/oracle/product/9.2.0/network/log/listener.log
      Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)))
      Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC)))
     STATUS of the LISTENER
     ------------------------
    Alias                     LISTENER
    Version                   TNSLSNR for Linux: Version 9.2.0.4.0 - Production
    Start Date                04-MAY-2007 10:00:05
    Uptime                    0 days 0 hr. 0 min. 0 sec
    Trace Level               off
    Security                  OFF
    SNMP                      OFF
    Listener Parameter File   /home/oracle/product/9.2.0/network/admin/listener.ora
    Listener Log File         /home/oracle/product/9.2.0/network/log/listener.log
    Listening Endpoints Summary...
     (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)))
     (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))
    Services Summary...
    Service "PLSExtProc" has 1 instance(s).
      Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Service "fuzewire" has 1 instance(s).
      Instance "ora9", status UNKNOWN, has 1 handler(s) for this service...
    The command completed successfully

 =>오라클 리스너 명령어보기
    [oracle@localhost oracle]$ lsnrctl help

    LSNRCTL for Linux: Version 9.2.0.4.0 - Production on 15-JUN-2007 16:49:33
    Copyright (c) 1991, 2002, Oracle Corporation.  All rights reserved.
    The following operations are available
    An asterisk (*) denotes a modifier or extended command:

    start               stop                status             
    services            version             reload             
    save_config         trace               spawn              
    change_password     quit                exit               
    set*                show*                  

 - 그 외 자주 사용하는 명령어)
    * 시작시 : lsnrctl
start
    * 멈출때 : lsnrctl
stop
    * 재시작시 : lsnrctl reload
    * 상태보기  :  lsnrctl
status
    * 명령어보기 : lsnrctl help

profile

일요일은 짜빠게뤼~ 먹는날~^^

엮인글 :
http://adminplay.com/4892/dfb/trackback
List of Articles
번호 제목 글쓴이 날짜 조회 수sort

rsync 에러

리눅스에서 일정기간 이상된 파일 삭제하기

FreeBSD CPU 개수 확인 등.(mptable, sysctl)

콘솔에 남는 메세지로그파일로 남기기

ethtool 사용법

vim 편집기 색상변경

grep 옵션~!

find 찾아바꾸기

서버로그 관리

MRTG 로그 데이터 시간확인하기

실시간 접근정보 확인

iscsi-target 설정 에러 모음

hdparm - 하드디스크의 자세한 정보 보기

아파치 모듈 mod_status file

특정 디랙토리 인증걸기 htpasswd, htaccess

syslogd : 콘솔에 남는 메세지 로그파일로 남기기

apm설치시 configure error

리눅스 언어 인코딩 설정

sysctl 커널 파라미터

제로보드4의 데이터를 XE 로 이전하는 방법 file

Copyright ADMINPLAY corp. All rights reserved.

abcXYZ, 세종대왕,1234

abcXYZ, 세종대왕,1234