当前位置:  数据库>oracle

如何启用Oracle Shared Server

    来源: 互联网  发布时间:2017-05-05

    本文导语: 在某些应用中共享服务器还是有独特的优势的,从官方描述中可以看到如下优势:减少实例进程的数目增加对外服务的用户数目减少无用或者空闲服务器的进程数目减少Oracle数据库对内存占用和os的开销实现负载平衡相对于专有...

在某些应用中共享服务器还是有独特的优势的,从官方描述中可以看到如下优势:
减少实例进程的数目
增加对外服务的用户数目
减少无用或者空闲服务器的进程数目
减少Oracle数据库对内存占用和os的开销
实现负载平衡
相对于专有服务器模式,一个比较重要的区别是共享服务器要求使用net services来连接,即使用户经常和服务器进程在同一台机器上也是如此。
但是在某些情况下必须使用专用服务器:比如使用sysdba登陆进行管理操作的时候。
当然,要使用这两种不同的模式,重要的还是在服务器进行配置后还要在客户端的连接串配置有所体现
专用服务器连接---(SERVER = DEDICATED)
共享服务器连接---(SERVER = SHARED)
那么如何配置共享服务器呢?有两个参数是必须的:
DISPATCHERS
SHARED_SERVERS
可选择配置的参数:
MAX_DISPATCHERS
MAX_SHARED_SERVERS
CIRCUITS
SHARED_SERVER_SESSIONS
大部分情况下我们只要修改DISPATCHERS即可,我们先看下默认的专用服务器情况下参数:
[oracle@test ~]$ sqlplus "/as sysdba"



















SQL*Plus: Release 10.2.0.5.0 - Production on Tue Aug 14 15:04:26 2012

Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options


sys@GT10G> select * from v$version;

BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - Prod
PL/SQL Release 10.2.0.5.0 - Production
CORE    10.2.0.5.0    Production
TNS for Linux: Version 10.2.0.5.0 - Production
NLSRTL Version 10.2.0.5.0 - Production





sys@GT10G> show parameter disp;

NAME                     TYPE     VALUE
------------------------------------ -------- ------------------------------
dispatchers                 string   (PROTOCOL=TCP) (SERVICE=gt10gXDB)
max_dispatchers              integer
共享服务器和专用服务器还可以从监听程序的信息体现出来,我们先记录下修改之前的专用服务器的监听状态和信息:
[oracle@test ~]$ lsnrctl status




LSNRCTL for Linux: Version 10.2.0.5.0 - Production on 14-AUG-2012 15:03:32

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=test)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 10.2.0.5.0 - Production
Start Date                14-AUG-2012 14:52:08
Uptime                    0 days 0 hr. 11 min. 24 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/oracle/10g/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File         /u01/oracle/10g/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=test)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "gt10g" has 1 instance(s).
  Instance "gt10g", status READY, has 1 handler(s) for this service...
Service "gt10gXDB" has 1 instance(s).
  Instance "gt10g", status READY, has 1 handler(s) for this service...
Service "gt10g_XPT" has 1 instance(s).
  Instance "gt10g", status READY, has 1 handler(s) for this service...
The command completed successfully























[oracle@test ~]$ lsnrctl service

LSNRCTL for Linux: Version 10.2.0.5.0 - Production on 14-AUG-2012 15:03:39

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=test)(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 "gt10g" has 1 instance(s).
  Instance "gt10g", status READY, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:0 refused:0 state:ready
         LOCAL SERVER
Service "gt10gXDB" has 1 instance(s).
  Instance "gt10g", status READY, has 1 handler(s) for this service...
    Handler(s):
      "D002" established:0 refused:0 current:0 max:1022 state:ready
         DISPATCHER
         (ADDRESS=(PROTOCOL=tcp)(HOST=test)(PORT=47446))
Service "gt10g_XPT" has 1 instance(s).
  Instance "gt10g", status READY, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:0 refused:0 state:ready
         LOCAL SERVER
The command completed successfully






















现在我们要设置一下共享服务器,这里我们只要设置DISPATCHERS参数:
sys@GT10G> alter system set DISPATCHERS = "(PROTOCOL=TCP)(DISPATCHERS=3)(PROTOCOL=IPC)(DISPATCHERS=1)";

System altered.

我们首先从监听状态和信息来看下前后的不同:
[oracle@test ~]$ lsnrctl status

LSNRCTL for Linux: Version 10.2.0.5.0 - Production on 14-AUG-2012 15:07:37

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=test)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 10.2.0.5.0 - Production
Start Date                14-AUG-2012 14:52:08
Uptime                    0 days 0 hr. 15 min. 28 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/oracle/10g/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File         /u01/oracle/10g/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=test)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "gt10g" has 1 instance(s).
  Instance "gt10g", status READY, has 2 handler(s) for this service...
Service "gt10gXDB" has 1 instance(s).
  Instance "gt10g", status READY, has 1 handler(s) for this service...
Service "gt10g_XPT" has 1 instance(s).
  Instance "gt10g", status READY, has 2 handler(s) for this service...
The command completed successfully























[oracle@test ~]$ lsnrctl service

LSNRCTL for Linux: Version 10.2.0.5.0 - Production on 14-AUG-2012 15:09:22

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=test)(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 "gt10g" has 1 instance(s).
  Instance "gt10g", status READY, has 2 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:0 refused:0 state:ready
         LOCAL SERVER
      "D000" established:0 refused:0 current:0 max:1022 state:ready
         DISPATCHER
         (ADDRESS=(PROTOCOL=ipc)(KEY=#19006.1))
Service "gt10gXDB" has 1 instance(s).
  Instance "gt10g", status READY, has 1 handler(s) for this service...
    Handler(s):
      "D002" established:0 refused:0 current:0 max:1022 state:ready
         DISPATCHER
         (ADDRESS=(PROTOCOL=tcp)(HOST=test)(PORT=47446))
Service "gt10g_XPT" has 1 instance(s).
  Instance "gt10g", status READY, has 2 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:0 refused:0 state:ready
         LOCAL SERVER
      "D000" established:0 refused:0 current:0 max:1022 state:ready
         DISPATCHER
         (ADDRESS=(PROTOCOL=ipc)(KEY=#19006.1))
The command completed successfully





























    
 
 

您可能感兴趣的文章:

 
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。












  • 相关文章推荐
  • Apache如何启用gzip压缩
  • sql server 禁用与启用触发器的语句
  • IE(Internet Explorer)浏览器中启用cookie的步骤
  • kdevelop3 如何启用代码帮助(code complete)功能?
  • CentOS 6内核升级:下载编译启用新内核版本详细过程
  • android ListView的右边滚动滑块启用方法 分享
  • 在 Windows Sever 2003 里面怎么启用 3D 加速
  • UNIX如何启用/禁用网卡?
  • linux系统下怎么控制外设(光驱、U盘、串口等)端口的禁用和启用?
  • 如何让非root用户启用小于1024号的端口?
  • 新手提问:RHLinux9.0下如何启用telnet?
  • sqlserver 禁用触发器和启用触发器的语句
  • 如何让gnome自带的终端启用语法高亮
  • 如何在fedora6启用apache服务?
  • 如何默认启用vim而不是vi
  • 关于RHEL 5如何启用3D桌面
  • 请问qt启用两个QThread线程可不可以运行不同的程序
  • 如何linux 程序中启用其他进程,非阻塞,非popen
  • 是不是这样关闭和启用NAGLE?
  • ubuntu11.04启用unity,经常假死
  • ubuntu11.04,无线网络已禁用,怎么启用?


  • 站内导航:


    特别声明:169IT网站部分信息来自互联网,如果侵犯您的权利,请及时告知,本站将立即删除!

    ©2012-2021,