分类: Oracle
2009-07-16 09:29:42
The following initialization parameters control shared server operation:(以下参数是用于共享服务器进程设置)
■ SHARED_SERVERS: Specifies the initial number of shared servers to start and the
minimum number of shared servers to keep. This is the only required parameter
for using shared servers.(最重要的参数,设置共享进程的最小值,只要该值大于0,则启动共享模式,
其实共享模式和专用模式是并存的,但默认是共享模式,进程名称:ora_s001_sid)
■ MAX_SHARED_SERVERS: Specifies the maximum number of shared servers that
can run simultaneously.(设置共享进程的最大值)
■ SHARED_SERVER_SESSIONS: Specifies the total number of shared server user
sessions that can run simultaneously. Setting this parameter enables you to reserve
user sessions for dedicated servers.(设置共享进程支持的最大会话数,用于保留可用的专用模式连接。)
■ DISPATCHERS: Configures dispatcher processes in the shared server architecture.
(设置分发器的个数,进程名称:ora_d001_sid)
■ MAX_DISPATCHERS: Specifies the maximum number of dispatcher processes that
can run simultaneously. This parameter can be ignored for now. It will only be
useful in a future release when the number of dispatchers is auto-tuned according
to the number of concurrent connections.
(设置分发器的最大个数)
■ CIRCUITS: Specifies the total number of virtual circuits that are available for
inbound and outbound network sessions.
(设置共享模式的最大的连接数)
共享模式可以在动态设定,具体步骤如下:
服务器端:
1.设定shared_servers为非零值:
alter system set shared_servers=2;
2.设定dispatchers为正确值:
alter system set dispatchers='(PROTOCOL=TCP)(SERVICE=your_sid)(DISPATCHERS=2)';
客户端:
默认模式:
DEFAULT =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 1.1.1.242)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = balance)
)
)
专用模式:
DEDICATED =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 1.1.1.242)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = balance)
)
)
共享模式:
SHARED =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 1.1.1.242)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = SHARED)
(SERVICE_NAME = balance)
)
)
连接:
sqlplus
sqlplus
sqlplus