ORCLE_基础十八(Shared Server)

论坛 期权论坛 脚本     
匿名技术用户   2020-12-29 22:23   359   0

Server Configurations

1.Dedicated server process

2.Shared server process


Dedicated Server Processes

Oracle Shared Server



Benefits of Shared Server

1.Reduces the number of processes against an instance

2.Increases the number of possible users

3.Achieves load balancing

4.Reduces the number of idle server processes

5 Reduces memory usage and system overhead


Processing a Request


The SGA and PGA

Configuring Shared Server

1.Required initailization parameters

a.dispatchers

b.SHARED_SERVERS

2.Optional initailization parameters

a.MAX_DISPATCHERS

b.MAX_SHARED_SERVERS

c.CIRCUITS

d. SHARED_SERVER_SESSIONS


DISPATCHERS


MAX_DISPATCHERS

1.Specifies the maximum number of dispatcher processes that can run simultaneously

2.Issues the ALTER SYSTEM command to add more dispatchers than initially started

MAX_DISPATCHERS=5

static 一开始就那么多个


SHARED_SERVERS

Specifies the number of server process created when an instance is started up

SHARED_SERVERS=6


MAX_SHARED_SERVERS

Specifies the maximum number of shared servers that can be started

Allows shared servers to be allocated dynamically based on the length of the request queue

MAX_SHARED_SERVERS=10

这个参数是动态的


CIRCUITS

1.specifies the total number of virtual circuits that are available for inbound and outbound network sessins

2.Contributes to total SGA size
CIRCUITS=100


SHARED_SERVER_SESSIONS

1.Specifies the total number of ORACLE Shared Server user sessions allow

2.Setting thi parameter enables you to reserve user sessions for dedicated servers

SHARED_SERVER_SESSIONS=100

alter system set dispatchers='(protocol=tcp)(dispatchers=3)'
alter system set shared_servers=1
oracle@localhost dbs]$ lsnrctl services

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 09-APR-2015 08:43:31

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost.localdomain)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:0 refused:0
         LOCAL SERVER
Service "king" has 1 instance(s).
  Instance "king", status READY, has 4 handler(s) for this service...
    Handler(s):
      "D002" established:0 refused:0 current:0 max:1022 state:ready
         DISPATCHER <machine: localhost.localdomain, pid: 6071>
         (ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=28844))
      "D001" established:0 refused:0 current:0 max:1022 state:ready
         DISPATCHER <machine: localhost.localdomain, pid: 6069>
         (ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=16724))
      "D000" established:0 refused:0 current:0 max:1022 state:ready
         DISPATCHER <machine: localhost.localdomain, pid: 5030>
         (ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=3631))
      "DEDICATED" established:0 refused:0 state:ready
         LOCAL SERVER
Service "kingXDB" has 1 instance(s).
  Instance "king", status READY, has 0 handler(s) for this service...
Service "king_XPT" has 1 instance(s).
  Instance "king", status READY, has 4 handler(s) for this service...
    Handler(s):
      "D002" established:0 refused:0 current:0 max:1022 state:ready
         DISPATCHER <machine: localhost.localdomain, pid: 6071>
         (ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=28844))
      "D001" established:0 refused:0 current:0 max:1022 state:ready
         DISPATCHER <machine: localhost.localdomain, pid: 6069>
         (ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=16724))
      "D000" established:0 refused:0 current:0 max:1022 state:ready
         DISPATCHER <machine: localhost.localdomain, pid: 5030>
         (ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=3631))
      "DEDICATED" established:0 refused:0 state:ready
         LOCAL SERVER
The command completed successfully

客户端:



服务器端共享连接 ,看session




Related Parameters

Other initialization parameters affected by Oracle Shared Server that my require adjustment:

1.LARGE_POOL_SIZE

2.SESSION


Dedicated vs Shared




You must use a dedicated server process when:

1.Submit batch jobs(it is expected that there will be little or no idle time)

2.Connecting as sysdba to startup, shutdown, or perform recovery

3. In 3-Tier system , dedicated server is better

in shared serfer ways connect to database cann't execute shutdown or startup


Dynamic Views

1.v$CIRCUIT

2.v$SHARED_SERVER

3.v$DISPATCHER

4.V$SHARED_SERVER_MONITOR

5.v$QUEUE

6.V$SESSION




分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:7942463
帖子:1588486
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP