테스트환경
OS | Centos 7.9 (Virtual Box 7.0) |
DB | 11.2.0.4 |
수동설정이유
> netca 구동시, 메모리 주소값을 찾지 못하는 에러가 발생하여 vm문제가 있어 수동으로 설치 진행
NETMGR
[ora11g@localhost ~]$ netmgr |
1. 로컬 리스너 선택 후 + 버튼을 통해 추가
2. 사용할 리스너 이름 지정
(LISTENER => DB11G)
3. 수신중인 위치(Listening Locations)로 선택 후 주소 추가
- Host이름과 포트 번호를 지정해주고 프로토콜 TCP/IP로 설정
4. Database Service
- 전역 데이터베이스 이름과 SID, Oracle 홈 디렉토리 지정
- Global Database Name : SID와 동일하나 다를 수도 있다. 통상적으로 하나의 시스템에서 하나의 서비스를 제공함으로 편의성이 생기게된다.
- OracleHome : 오라클 설치 전 환경변수 설정을 통해 지정하였을 경우 자동 입력
- SID : 한 서버에서 여러 개의 인스턴스가 기동 될 수 있어서 지정 필요
tnsnames.ora 설정
[ora11g@localhost admin]$ pwd
/ora_engine/product/11.2.0.4/db_1/network/admin
[ora11g@localhost admin]$ vi tnsnames.ora
DB11G=
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.111)(PORT = 2525))
)
(CONNECT_DATA =
(SERVICE_NAME = DB11G)
)
)
Listener 최종 확인
- listener.ora 확인
[ora11g@localhost admin]$ pwd
/ora_engine/product/11.2.0.4/db_1/network/admin
[ora11g@localhost admin]$ vi listener.ora
# listener.ora Network Configuration File: /ora_engine/product/11.2.0.4/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
# copyright (c) 1997 by the Oracle Corporation
#
# NAME
# listener.ora
# FUNCTION
# Network Listener startup parameter file example
# NOTES
# This file contains all the parameters for listener.ora,
# and could be used to configure the listener by uncommenting
# and changing values. Multiple listeners can be configured
# in one listener.ora, so listener.ora parameters take the form
# of SID_LIST_<lsnr>, where <lsnr> is the name of the listener
# this parameter refers to. All parameters and values are
# case-insensitive.
# <lsnr>
# This parameter specifies both the name of the listener, and
# it listening address(es). Other parameters for this listener
# us this name in place of <lsnr>. When not specified,
# the name for <lsnr> defaults to "LISTENER", with the default
# address value as shown below.
#
# SID_LIST_<lsnr>
# List of services the listener knows about and can connect
# clients to. There is no default. See the Net8 Administrator's
# Guide for more information.
#
# PASSWORDS_<lsnr>
# Specifies a password to authenticate stopping the listener.
# Both encrypted and plain-text values can be set. Encrypted passwords
# can be set and stored using lsnrctl.
# LSNRCTL> change_password
# Will prompt for old and new passwords, and use encryption both
# to match the old password and to set the new one.
# LSNRCTL> set password
# Will prompt for the new password, for authentication with
# the listener. The password must be set before running the next
# command.
# LSNRCTL> save_config
# Will save the changed password to listener.ora. These last two
# steps are not necessary if SAVE_CONFIG_ON_STOP_<lsnr> is ON.
# See below.
#
# Default: NONE
#
# PASSWORDS_LISTENER = 20A22647832FB454 # "foobar"
# SAVE_CONFIG_ON_STOP_<lsnr>
# Tells the listener to save configuration changes to listener.ora when
# it shuts down. Changed parameter values will be written to the file,
# while preserving formatting and comments.
# Default: OFF
# Values: ON/OFF
#
# SAVE_CONFIG_ON_STOP_LISTENER = ON
# USE_PLUG_AND_PLAY_<lsnr>
# Tells the listener to contact an Onames server and register itself
# and its services with Onames.
# Values: ON/OFF
# Default: OFF
#
# USE_PLUG_AND_PLAY_LISTENER = ON
# LOG_FILE_<lsnr>
# Sets the name of the listener's log file. The .log extension
# is added automatically.
# Default=<lsnr>
#
# LOG_FILE_LISTENER = lsnr
# LOG_DIRECTORY_<lsnr>
# Sets the directory for the listener's log file.
# Default: <oracle_home>/network/log
#
# LOG_DIRECTORY_LISTENER = /private/app/oracle/product/8.0.3/network/log
# TRACE_LEVEL_<lsnr>
# Specifies desired tracing level.
# Default: OFF
# Values: OFF/USER/ADMIN/SUPPORT/0-16
#
# TRACE_LEVEL_LISTENER = SUPPORT
# TRACE_FILE_<lsnr>
# Sets the name of the listener's trace file. The .trc extension
# is added automatically.
# Default: <lsnr>
#
# TRACE_FILE_LISTENER = lsnr
# TRACE_DIRECTORY_<lsnr>
# Sets the directory for the listener's trace file.
# Default: <oracle_home>/network/trace
#
# TRACE_DIRECTORY_LISTENER=/private/app/oracle/product/8.0.3/network/trace
# CONNECT_TIMEOUT_<lsnr>
# Sets the number of seconds that the listener waits to get a
# valid database query after it has been started.
# Default: 10
#
# CONNECT_TIMEOUT_LISTENER=10
DB11G =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.111)(PORT = 2525))
)
SID_LIST_DB11G =
(SID_LIST =
(SID_DESC =
(ORACLE_HOME = /ora_engine/product/11.2.0.4/db_1)
(SID_NAME = ORA11G)
)
)
ADR_BASE_DB11G = /ora_engine
- listener 기동
[ora11g@localhost admin]$ lsnrctl start DB11G
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 02-FEB-2023 10:59:07
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Starting /ora_engine/product/11.2.0.4/db_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 11.2.0.4.0 - Production
System parameter file is /ora_engine/product/11.2.0.4/db_1/network/admin/listener.ora
Log messages written to /ora_engine/diag/tnslsnr/localhost/db11g/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.56.111)(PORT=2525)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.56.111)(PORT=2525)))
STATUS of the LISTENER
------------------------
Alias DB11G
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 02-FEB-2023 10:59:07
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /ora_engine/product/11.2.0.4/db_1/network/admin/listener.ora
Listener Log File /ora_engine/diag/tnslsnr/localhost/db11g/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.56.111)(PORT=2525)))
Services Summary...
Service "ORA11G" has 1 instance(s).
Instance "ORA11G", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
[ora11g@localhost admin]$ lsnrctl status DB11G
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 02-FEB-2023 10:59:10
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.56.111)(PORT=2525)))
STATUS of the LISTENER
------------------------
Alias DB11G
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 02-FEB-2023 10:59:07
Uptime 0 days 0 hr. 0 min. 2 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /ora_engine/product/11.2.0.4/db_1/network/admin/listener.ora
Listener Log File /ora_engine/diag/tnslsnr/localhost/db11g/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.56.111)(PORT=2525)))
Services Summary...
Service "ORA11G" has 1 instance(s).
Instance "ORA11G", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
'DB > Oracle' 카테고리의 다른 글
[ETC] Listener 자동 기동 스크립트 (0) | 2023.02.06 |
---|---|
[ADMIN] Datafile Storage 이동 작업 (1) | 2023.02.03 |
[ADMIN] Redolog 파일 조회 및 LogSwitch, Checkpoint (0) | 2023.01.09 |
[ADMIN] Redo.log 서버 내부적 Log switch 작동 원리 (0) | 2023.01.09 |
[ADMIN] Archive log mode 설정 및 경로 설정 (0) | 2023.01.09 |