Chinaunix首页 | 论坛 | 博客
  • 博客访问: 970105
  • 博文数量: 358
  • 博客积分: 8185
  • 博客等级: 中将
  • 技术积分: 3751
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-15 16:27
个人简介

The views and opinions expressed all for my own,only for study and test, not reflect the views of Any Company and its affiliates.

文章分类

全部博文(358)

文章存档

2012年(8)

2011年(18)

2010年(50)

2009年(218)

2008年(64)

我的朋友

分类: Oracle

2009-08-25 23:29:12


①There is a common input queue shared by all dispatchers, but each dispatcher has its own response queue.
②The PGA for a dedicated server session will store the session’s session data, its cursor state, its sort space, and its stack space.
The memory used in the SGA for each shared server session, known as the User Global Area (UGA), includes all of what would have been in a PGA with the exception of the session’s stack space
・The listener establishes sessions by connecting users to dispatchers.
・The dispatchers receive statements from user processes.
・The common queue is shared for all statements.Stores jobs waiting for execution
・Shared servers execute statements as normal.Executes SQL statements
・If created, the large pool is where the UGAs are stored.
・Each dispatcher has its own response queue for result sets.Stores results waiting to be fetched


■Configuring Shared Server
Instance Parameters for Shared Server:
DISPATCHERS
SHARED_SERVERS
MAX_SHARED_SERVERS
MAX_DISPATCHERS
LOCAL_LISTENER
LARGE_POOL_SIZE
CIRCUITS
SHARED_SERVER_SESSIONS
PROCESSES
SESSIONS

■Configuring and Verifying Shared Server
alter system set dispatchers='(protocol=tcp)(dispatchers=2)' scope=spfile;
alter system set shared_servers=3 scope=spfile;
startup force;

select program from v$process
Note that there are two processes, d000 and d001, that are the two
dispatchers, and three shared server processes, s000, s001, and s002.

select dispatcher,saddr,circuit from v$circuit;
showing which dispatcher your new session hascome through and the session address.

④$ lsnrctl services

■Monitoring the Shared Server
V$CIRCUIT -- V$SESSION V$DISPATCHER
  will have one row for each current connection through the shared server.
V$SHARED_SERVER
  will tell you the status of each shared server process.
V$DISPATCHER
  has one row per dispatcher.
V$SHARED_SERVER_MONITOR
  showing the maximum number of connections and sessions (usually these figures will be the same) that have ever come through the shared server
V$QUEUE
  will have one row for the common queue, and one row for each dispatcher’s response queue.

■When to Use the Shared Server
It is often said that you should think about using shared server when your number of concurrent connections is in the low hundreds. 
If you have less than one hundred concurrent connections, you almost certainly don’t need it. 
But if you have more than a thousand, you probably do. 
The criticalfactor is whether your operating system performance is beginning to degrade because of excessive context switches.

・shared server is ideal for managing many sessions doing short transactions (OLTP environment)
・for batch processing work, dedicated servers are much better (a data warehouse environment)
・it is logically impossible to issue startup or shutdown commands through a shared server
・database administration work are better done through a dedicated server(Index creation, table maintenance,RMAN...)
・If dispatchers and shared servers are available, by default every connection through the listener will use them
・Making a local connection that bypasses the listener will always result in a dedicated server process being launched,

eg:
SQL> alter system set dispatchers='(protocol=tcp)(dispatchers=2)' scope=spfile;

System altered.

SQL> alter system set shared_servers=3 scope=spfile;

System altered.

SQL> startup force;
ORACLE instance started.

Total System Global Area  385875968 bytes
Fixed Size                  1219568 bytes
Variable Size             134218768 bytes
Database Buffers          247463936 bytes
Redo Buffers                2973696 bytes
Database mounted.
Database opened.
SQL> select program from v$process;

PROGRAM
------------------------------------------------
PSEUDO
oracle@centos5 (PMON)
oracle@centos5 (PSP0)
oracle@centos5 (MMAN)
oracle@centos5 (DBW0)
oracle@centos5 (LGWR)
oracle@centos5 (CKPT)
oracle@centos5 (SMON)
oracle@centos5 (RECO)
oracle@centos5 (CJQ0)
oracle@centos5 (MMON)

PROGRAM
------------------------------------------------
oracle@centos5 (MMNL)
oracle@centos5 (D000)
oracle@centos5 (D001)
oracle@centos5 (S000)
oracle@centos5 (S001)
oracle@centos5 (S002)
oracle@centos5 (TNS V1-V3)
oracle@centos5 (QMNC)
oracle@centos5 (J000)
oracle@centos5 (q000)

PROGRAM
------------------------------------------------
oracle@centos5 (q002)
oracle@centos5 (q003)

24 rows selected.

SQL> select dispatcher,saddr,circuit from v$circuit;

DISPATCH SADDR    CIRCUIT
-------- -------- --------
36E1A6EC 36F00BE8 34D88934

SQL>


阅读(414) | 评论(0) | 转发(0) |
0

上一篇:Oracle Networking Configure

下一篇:8_提出话题

给主人留下些什么吧!~~