All Category

공개범위 설정
Table
   
기본채널
Table
   
카테고리
Table
   
공개범위
[전체]전체 공개
Table
   
위치정보
[전체]나만 보기
Table
   
다운로드
[전체]로그인 공개
Table
   
슬라이드
Table
   
시작고정
Table
   
사진정보
0
Date: 2021-05-17
2021
May
17

[Server 접속 설정] 오라클 접속 정보 설정(listener.ora, sqlnet.ora, tnsnames.ora)


[Server 접속 설정] 오라클 접속 정보 설정(listener.ora, sqlnet.ora, tnsnames.ora)







1. 접속 방식 설정 : /home/oracle/app/oracle/product/19.3.0.0/dbhome_1/network/admin/sqlnet.ora


# sqlnet.ora Network Configuration File: /home/oracle/app/oracle/product/19.3.0.0/dbhome_1/network/admin/sqlnet.ora
# Generated by Oracle configuration tools.

NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)

         

- NAMES.DIRECTORY_PATH : 오라클 클라이언트가 데이터베이스 접속시 별칭(Alias)의 확인 순서를 결정

  NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)

  1. Hostname : 호스트네임서버 

 2. TnsNames : 로컬네임서버(tnsnames.ora)






2. 통신환경 설정: /home/oracle/app/oracle/product/19.3.0.0/dbhome_1/network/admin/listener.ora

- 프로토콜 및 포트 정의

# listener.ora Network Configuration File: /home/oracle/app/oracle/product/19.3.0.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
 
SID_LIST_LISTENER =
 (SID_LIST =

  (SID_DESC =
   #(GLOBAL_DBNAME=MYWEB)
   (GLOBAL_DBNAME=CDBORCL)
   (SID_NAME = CDBORCL)
   (ORACLE_HOME = /home/oracle/app/oracle/product/19.3.0.0/dbhome_1)
  )

  (SID_DESC =
   (GLOBAL_DBNAME= MYWEB)
   #(GLOBAL_DBNAME= PDBORCL)
   (SID_NAME = PDBORCL)
   (ORACLE_HOME = /home/oracle/app/oracle/product/19.3.0.0/dbhome_1)
  )

  (SID_DESC =
   (GLOBAL_DBNAME= MYWEB)
   #(GLOBAL_DBNAME= PDBORCL2)
   (SID_NAME = PDBORCL2)
   (ORACLE_HOME = /home/oracle/app/oracle/product/19.3.0.0/dbhome_1)
  )

 )



LISTENER =
 (DESCRIPTION_LIST =
  (DESCRIPTION =
   (ADDRESS = (PROTOCOL = TCP)(HOST = myServer)(PORT = 1521))
   (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
  )

  (DESCRIPTION =
   (ADDRESS = (PROTOCOL = tcps)(HOST = 192.168.10.11)(PORT = 5500))

   (Security=(my_wallet_directory=/home/oracle/app/oracle/admin/MYWEB/xdb_wallet))
   (Presentation=HTTP)(Session=RAW)

  )
 )

- 리스너 설정

LISTENER       : 리스너 이름 SID_LIST_리스너이름, SID_LIST_리스너이름과 같아야함

ADDRESS_LIST    : ADDRESS들의 모임이며 여러 개의 ADDRESS를 동시에 설정 가능

ADDRESS        : 데이터베이스 서버의 주소와 프로토콜, Host명,포트번호 지정


- SID LIST

SID_LIST_LISTENER : SID_LIST_리스너이름 리스너 서비스 이름 지정

SID_LIST      : 해당 리스너 프로세스가 하나 이상의 데이터베이스를 서비스 할 경우에 해당 부분에 여러개의 SID_DESC를 등록한다.

SID_NAME      : 리스너의 접속을 허용하는 데이터베이스의 SID 명을 지정한다.


- 리스너 상태 확인 : lsnrctl status

[oracle@myServer admin]$ lsnrctl status

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 17-MAY-2021 21:17:44

Copyright (c) 1991, 2019, Oracle. All rights reserved.

Starting /home/oracle/app/oracle/product/19.3.0.0/dbhome_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 19.0.0.0.0 - Production
System parameter file is /home/oracle/app/oracle/product/19.3.0.0/dbhome_1/network/admin/listener.ora
Log messages written to /home/oracle/app/oracle/diag/tnslsnr/myServer/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=myServer)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=192.168.1.3)(PORT=5500))(Security=(my_wallet_directory=/home/oracle/app/oracle/admin/MYWEB/xdb_wallet))(Presentation=HTTP)(Session=RAW))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=myServer)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias           LISTENER
Version          TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date        17-MAY-2021 21:17:44
Uptime          0 days 0 hr. 0 min. 0 sec
Trace Level        off
Security         ON: Local OS Authentication
SNMP           OFF
Listener Parameter File  /home/oracle/app/oracle/product/19.3.0.0/dbhome_1/network/admin/listener.ora
Listener Log File     /home/oracle/app/oracle/diag/tnslsnr/myServer/listener/alert/log.xml
Listening Endpoints Summary...
 (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=myServer)(PORT=1521)))
 (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
 (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=192.168.10.11)(PORT=5500))(Security=(my_wallet_directory=/home/oracle/app/oracle/admin/MYWEB/xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "CDBORCL" has 1 instance(s).
 Instance "CDBORCL", status UNKNOWN, has 1 handler(s) for this service...
Service "MYWEB" has 2 instance(s).
 Instance "PDBORCL", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
[oracle@myServer admin]$ 








3. Client 접속 별칭(Alias) : /home/oracle/app/oracle/product/19.3.0.0/dbhome_1/network/admin/tnsnames.ora

# tnsnames.ora Network Configuration File: /home/oracle/app/oracle/product/19.3.0.0/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.



CDBORCL =
 (DESCRIPTION =
  (ADDRESS = (PROTOCOL = TCP)(HOST = myServer)(PORT = 1521))
  (CONNECT_DATA =
   (SERVER = DEDICATED)
   (SERVICE_NAME = CDBORCL)
  )
 )

PDBORCL =
 (DESCRIPTION =
  (ADDRESS = (PROTOCOL = TCP)(HOST = myServer)(PORT = 1521))
  (CONNECT_DATA =
   (SERVER = DEDICATED)
   (SERVICE_NAME = PDBORCL)
  )
 )

PDBORCL2 =
 (DESCRIPTION =
  (ADDRESS = (PROTOCOL = TCP)(HOST = myServer)(PORT = 1521))
  (CONNECT_DATA =
   (SERVER = DEDICATED)
   (SERVICE_NAME = PDBORCL2)
  )
 )

LISTENER_CDBORCL =
 (ADDRESS = (PROTOCOL = TCP)(HOST = myServer)(PORT = 1521))


- 서비스 이름 : CDBORCL, PDBORCL, PDBORCL2

- DESCRIPTION : 접속 데이터베이스 정보

- ADDRESS : 접속 데이터베이스 서버의 리스너 주소 정보(Server정보)

- CONNECT_DATA : SERVICE_NAME 서비스이름 또는 SID이름 지정


- TNS 접속 확인 : tnsping 서비스 또는 SID이름

[oracle@myServer admin]$ tnsping CDBORCL

TNS Ping Utility for Linux: Version 19.0.0.0.0 - Production on 17-MAY-2021 21:30:39

Copyright (c) 1997, 2019, Oracle. All rights reserved.

Used parameter files:
/home/oracle/app/oracle/product/19.3.0.0/dbhome_1/network/admin/sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = myServer)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = CDBORCL)))
OK (0 msec)
[oracle@myServer admin]





4. 자동시작 설정 : /etc/oratab

# This file is used by ORACLE utilities. It is created by root.sh
# and updated by either Database Configuration Assistant while creating
# a database or ASM Configuration Assistant while creating ASM instance.

# A colon, ':', is used as the field terminator. A new line terminates
# the entry. Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form:
#  $ORACLE_SID:$ORACLE_HOME:<N|Y>:
#
# The first and second fields are the system identifier and home
# directory of the database respectively. The third field indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
#

CDBORCL:/home/oracle/app/oracle/product/19.3.0.0/dbhome_1:Y










URL : http://www.epari.net/@architecture/vlink/b/ct
목록
도움이 되는 유익한 내용이었다면 힘이 될 수 있는 댓 글을 남겨주세요.
4
0
  • 뎃글달기
Upload
v
Name Type Size