블로그 이미지
좋은느낌/원철
이것저것 필요한 것을 모아보렵니다.. 방문해 주셔서 감사합니다..

calendar

1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

Notice

    2009. 5. 19. 20:04 개발/Oracle

    http://radiocom.kunsan.ac.kr
    오라클 리스너(Listener)는 네트워크를 이용하여 클라이언트에서 오라클 서버로 연결하기 위한 오라클 네트워크 관리자이다. 만약 로컬 데이터베이스가 아니고 네트워크로 연결된 원격 데이터베이스 서버에 연결하려면 원격 데이터베이스 서버는 그 리스너를 기동해야 한다. 즉, 서버가 클라이언트의 요청을 들을 수 있도록 그 리스너를 시작하는 것이다. 이러한 리스너의 시작과 종료, 또 그 상태를 확인하는 오라클 데이터베이스 관리 툴이 바로 오라클 리스너(lsnrctl)이다. 
    디폴트 리스너 이름은 LISTENER 이지만, 이 이름은 $ORACLE_HOME/network/admin/listener.ora 파일에서 리스너 이름을 변경할 수 있다.
    【예제】
    $ lsnrctl help
    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 status
    
    【예제】
    $ ls -l network/admin/listener.ora
    -rw-r--r--   1 oracle   oinstall     599 Jan  7 13:15 network/admin/listener.ora
    $ cat network/admin/listener.ora
    # listener.ora Network Configuration File: /export/home0/oracle/app/oracle/product/10.2.1/network/admin/listener.ora
    # Generated by Oracle configuration tools.
     
    SID_LIST_LISTENER =
      (SID_LIST =
        (SID_DESC =
          (SID_NAME = PLSExtProc)
          (ORACLE_HOME = /export/home0/oracle/app/oracle/product/10.2.1)
          (PROGRAM = extproc)
        )
      )
     
    LISTENER =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS_LIST =
            (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
          )
          (ADDRESS_LIST =
            (ADDRESS = (PROTOCOL = TCP)(HOST = jinpo.kunsan.ac.kr)(PORT = 1521))
          )
        )
      )
     
    $ 
    
    또 다른 방법으로 오라클 리스너는 오라클 홈의 bin 디렉토리에 위치하며 리스너를 실행하면, 리슨너 프롬프트인 LSNRCTL>이 출력된다. 이때 도움말이 필요하다면 HELP를 입력하여 도움을 받을 수 있다. 이러한 오라클 리스너의 명령어 중 START는 오라클 리스너를 시작하고, STOP는 오라클 리스너를 종료하는 명령어이다. STATUS는 시작된 오라클 리스너의 상태를 확인하는 명령어이며, SERVICES는 현재 시작된 서비스의 수를 출력하는 명령어이다.
    【예제】
    $ lsnrctl
    LSNRCTL for Solaris: Version 10.2.0.1.0 - Production on 02-SEP-2007 15:47:03
     
    Copyright (c) 1991, 2005, Oracle.  All rights reserved.
     
    Welcome to LSNRCTL, type "help" for information.
     
    LSNRCTL> help
    The following operations are available
    An asterisk (*) denotes a modifier or extended command:
    
    start               stop                status
    services            version             reload
    save_config         trace               spawn
    dbsnmp_start        dbsnmp_stop         dbsnmp_status
    change_password     debug               test
    quit                exit                set*
    show*
    
    오라클 리스너 명령어의 세부 사항은 다음과 같다.
    
    start [listener_name]start listener
    stop [listener_name]stop listener
    status [listener_name]get the status of listener
    service [listener_name]get the service information of the listener
    version [listener_name]get the version information of the listener
    reload [listener_name]reload the parameter files and SIDs
    save_config [listener_name]saves configuration changes to parameter file
    trace OFF | USER | ADMIN [listener_name]set tracing to the specified level
    spawn [listener_name] spawn_alias
    [(ARGUMENTS='arg0, arg1,...')]
    change_password [listener_name]changes the password of the listener
    quit | exitexit LSNRCTL
    오라클 리스너 명령어 중에서 set과 show 명령어의 쓰임새는 다음과 같다. 【예제】 LSNRCTL> help set The following operations are available after set An asterisk (*) denotes a modifier or extended command: password rawmode displaymode trc_file trc_directory trc_level log_file log_directory log_status current_listener connect_timeout startup_waittime use_plugandplay direct_handoff save_config_on_stop LSNRCTL> help show The following operations are available after show An asterisk (*) denotes a modifier or extended command: rawmode displaymode trc_file trc_directory trc_level log_file log_directory log_status current_listener connect_timeout startup_waittime snmp_visible use_plugandplay direct_handoff save_config_on_stop LSNRCTL>
    posted by 좋은느낌/원철