[Oracle] 프로세서의 구조 2

·2025년 8월 21일
0

오라클 관리

목록 보기
20/163


🔸 이론1. 오라클 리스너 프로세서의 역할

💡 리스너가 클라이언트들의 접속 요청을 받아서 오라클에 접속을 할 수 있게 해줌


실습1. 리스너를 통하지 않고 scott으로 접속하시오

서버실에 가야 할 수 있음
아니면 putty에서 하면 됨

sqlplus scott/tiger

[oracle@ora19c ~]$ sqlplus scott/tiger

SQL*Plus: Release 19.0.0.0.0 - Production on821 10:24:12 2025
Version 19.3.0.0.0

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

마지막 성공한 로그인 시간: 목 821 2025 10:02:57 +09:00

다음에 접속됨:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

SQL>

실습2. 리스너를 통해서 scott 유져로 접속하시오

easy connect 방식으로 접속

sqlplus scott/tiger@192.168.13.69:1521/ora19

sqlplus 아이디/비밀번호@ip주소:포트번호/서비스이름


[oracle@ora19c ~]$ sqlplus scott/tiger@192.168.13.69:1521/ora19

SQL*Plus: Release 19.0.0.0.0 - Production on821 10:25:45 2025
Version 19.3.0.0.0

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

마지막 성공한 로그인 시간: 목 821 2025 10:24:12 +09:00

다음에 접속됨:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

SQL>

위와 같이 접속되면 아래와 같이 sql developer로도 접속 가능


문제1. 리스너를 내리고 나서 easy connect 방식으로 리스너 통해서 접속이 되는지 확인하시오

lsnrctl stop

[oracle@ora19c ~]$ lsnrctl stop

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 21-8-2025 10:28:15

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

(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.13.81)(PORT=1521)))에 연결되었습니다
명령이 성공적으로 수행되었습니다
[oracle@ora19c ~]$
[oracle@ora19c ~]$ sqlplus scott/tiger@192.168.13.69:1521/ora19

SQL*Plus: Release 19.0.0.0.0 - Production on821 10:28:34 2025
Version 19.3.0.0.0

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

ERROR:
ORA-12541: TNS:리스너가 없습니다.


사용자명 입력:

lsnrctl stop으로 리스너를 내렸으니까
에러 발생


lsnrctl start
sqlplus scott/tiger@192.168.13.69:1521/ora19

하면 리스너에 접속됨


실습3. 오라클 필수 백그라운드 프로세서중에 dbwr가 리눅스에 잘 떠 있는지 확인하시오

[oracle@ora19c ~]$ ps -ef |grep dbw0 | grep -v grep
oracle    3840     1  0 09:38 ?        00:00:00 ora_dbw0_ORA19

실습4. 오라클 필수 백그라운드 프로세서를 kill 시키면 db가 다운되는지 확인하세요

[oracle@ora19c ~]$ ps -ef |grep dbw0 | grep -v grep
oracle    3840     1  0 09:38 ?        00:00:00 ora_dbw0_ORA19
[oracle@ora19c ~]$
[oracle@ora19c ~]$
[oracle@ora19c ~]$
[oracle@ora19c ~]$ kill -9 3840
[oracle@ora19c ~]$
[oracle@ora19c ~]$ sys

SQL*Plus: Release 19.0.0.0.0 - Production on821 10:45:38 2025
Version 19.3.0.0.0

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

휴지 인스턴스에 접속되었습니다.	-- db down됨

db가 다운되었으니
SQL> startup 해줘야 됨


🔸 이론2. grid infrastructure 데몬 프로세서의 역할

  • ASM(Automatic Storage Management)을 관리하는 프로세서
  • 오라클 클러스터 서비스를 관리하는 프로세서


실습5. 리눅스 서버가 리부트 되면 오라클 디비도 자동으로 올라오게 설정하시오

[oracle@ora19c ~]$ cat /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.
#
#
ORA19:/u01/app/oracle/product/19.3.0/dbhome_1:N
[oracle@ora19c ~]$

ORA19:/u01/app/oracle/product/19.3.0/dbhome_1:Y


실습6. 리눅스 서버를 reboot 하면 자동으로 오라클이 올라오는지 확인하시오

[oracle@ora19c ~]$ ls -l /etc/oratab
-rw-rw-r--. 1 oracle oinstall 789  8월 21 11:00 /etc/oratab
[oracle@ora19c ~]$
[oracle@ora19c ~]$
[oracle@ora19c ~]$
[oracle@ora19c ~]$ su -
암호:
마지막 로그인: 월  818 20:00:10 KST 2025 일시 pts/1
[root@ora19c ~]# reboot

[oracle@ora19c ~]$ ps -ef |grep pmon | grep -v grep
[oracle@ora19c ~]$

0개의 댓글