💡 shared server 구조에서는 서버 프로세서들끼지 정보를 공유해야합니다.
손님이 주문한 주문 메뉴에 대한 정보가 공유가 되어져야합니다.
어느 하나의 서버 프로세서만 알고 있으면 안됩니다.
서버 프로세서의 pga 영역에 정렬영역, 해쉬영역, 비트맵영역, 유져세션 데이터 등의
데이터(손님에 대한 데이터)가 SGA 영역으로 들어가면 공유가 되어집니다.
[oracle@ora19c admin]$ sysdw
SQL*Plus: Release 19.0.0.0.0 - Production on 금 8월 29 15:57:32 2025
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
다음에 접속됨:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
SYS @ ora19dw > show parameter sga_target
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
sga_target big integer 2304M
SYS @ ora19dw >
SYS @ ora19dw > select 2304 * 1.2 from dual;
2304*1.2
----------
2764.8
SYS @ ora19dw > alter system set sga_target=2764m scope both;
alter system set sga_target=2764m scope both
*
1행에 오류:
ORA-00927: 누락된 등호
SYS @ ora19dw > show parameter sga_max_size
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
sga_max_size big integer 2304M
SYS @ ora19dw > alter system set sga_max_size=2764m scope=spfile;
시스템이 변경되었습니다.
SYS @ ora19dw > alter system set sga_target=2764m scope=spfile;
시스템이 변경되었습니다.
SYS @ ora19dw > shutdown immediate
데이터베이스가 닫혔습니다.
데이터베이스가 마운트 해제되었습니다.
ORACLE 인스턴스가 종료되었습니다.
SYS @ ora19dw > startup
ORACLE 인스턴스가 시작되었습니다.
Total System Global Area 2902454440 bytes
Fixed Size 8900776 bytes
Variable Size 536870912 bytes
Database Buffers 2348810240 bytes
Redo Buffers 7872512 bytes
데이터베이스가 마운트되었습니다.
데이터베이스가 열렸습니다.
SYS @ ora19dw > show parameter sga_target
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
sga_target big integer 2768M
SYS @ ora19dw >
💡 메모리 기본 청크(chunk)의 배수만큼 늘어나기 때문에 더 크기가 커질 수 있습니다.
shared server 프로세서 구조로 운영되었을 때 할 수 없는 일
[oracle@ora19c admin]$ sqlplus sys/oracle_4U as sysdba@orakbm2_shared
SQL*Plus: Release 19.0.0.0.0 - Production on 금 8월 29 16:08:23 2025
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
다음에 접속됨:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
SYS @ ORA19 > SELECT SERVER
FROM V$SESSION
WHERE SID = SYS_CONTEXT('USERENV', 'SID');
SERVER
---------
DEDICATED
[oracle@ora19c admin]$ sqlplus scott/tiger@orakbm2_shared
SQL*Plus: Release 19.0.0.0.0 - Production on 금 8월 29 16:09:43 2025
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
마지막 성공한 로그인 시간: 금 8월 29 2025 14:19:02 +09:00
다음에 접속됨:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
SCOTT @ orakbm2_shared > SELECT SERVER
FROM V$SESSION
WHERE SID = SYS_CONTEXT('USERENV', 'SID'); 2 3
SERVER
---------
SHARED
SCOTT @ orakbm2_shared >
💡 11g 버젼에서는 위와 같이 sys 로 접속하면 shared server 프로세서를 할당받아서 shutdown 을 못했는데 19c 는 dedicated server 프로세서를 자동으로 할당 받기때문에 shutdown 할 수 있습니다. 그런데 일반 유져인 scott은 shared server 로 할당 받습니다.