Oracle shared server & dedicated server
Oracle shared server的应用一般是基于表单的,并涉及给数据库提交小数据量信息,因而返回给客户的是小的结果集合。ORACLE采用不同的方式管理专用服务器和共享服务器连接。在一个ORACLE SHARED SERVER环境中,调度程序[Dispatcher]进程负责服务客户请求。在一个专用服务器环境中单个客户进程由单个服务器进程处理.
ORACLE给SGA增加两种新型的结构:请求队列和响应队列。这两种结构是在专用服务器环境中是不存在的。here is one request queue for all dispatchers, but each dispatcher has its own response queue.
Shared Server SGA 与 Dedicated server SGA 区别:
Shared Server SGA有 LARGE POOL ,LARGE POOL 有UGA(USER GLOBAL AREA)
The PGA is an area of memory where information about each client session is maintained. This information includes bind variables, cursor information, and the client’s sort area. In an Oracle Shared Server environment, this information is moved from the PGA to an area of the SGA called the User Global Area (UGA)
ORACLE SHARED SERVER的优点和缺点:
优点:ORACLE SHARED SERVER能够减少服务器上的总内存与进程需求。由于客户正共享进程,所以总进程数量减少。
缺点:生成大量网络通信信息或产生大型结果集合的应用软件不是ORACLE SHARED SERVER连接的合适侯选者。
ORACLE SHARED SERVER一个可缩放性增强选件,不是一个性能增强选件
you should not perform certain administrative tasks using Oracle Shared Server connections, including bulk loads of data, index and table rebuilds, and table analysis. These types of tasks deal with manipulating large data sets and should use dedicated connections
By default, if Oracle Shared Server is configured, a client is connected to a dispatcher unless the client explicitly requests a dedicated connection.
# tnsnames.ora Network Configuration File:
# C:oracleproduct10.1.0db_1 etworkadmin nsnames.ora
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = MJW01)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = orcl)
(SRVR = DEDICATED) # Request a dedicated connection for DBA
)
使用localnaming在TNSNAMES中指定连接方式,那么客户端也可以以DEDICATED方式连接Oracle Shared Server
listerner--dispatcher--request queue--shared server process--response queue