热门标签 | HotTags
当前位置:  开发笔记 > 数据库 > 正文

如何启用OracleSharedServer

专用服务器连接---(SERVERDEDICATED)共享服务器连接---(SERVERSHARED)那么如何配置共享服务器呢?有两个参数是必须的:DIS

专用服务器连接---(SERVER = DEDICATED)共享服务器连接---(SERVER = SHARED)那么如何配置共享服务器呢?有两个参数是必须的:DIS

在某些应用中共享服务器还是有独特的优势的,从官方描述中可以看到如下优势:
减少实例进程的数目
增加对外服务的用户数目
减少无用或者空闲服务器的进程数目
减少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

linux

推荐阅读
  • 全能终端工具推荐:高效、免费、易用
    介绍一款备受好评的全能型终端工具——MobaXterm,它不仅功能强大,而且完全免费,适合各类用户使用。 ... [详细]
  • 本文介绍如何配置SecureCRT以正确显示Linux终端的颜色,并解决中文显示问题。通过简单的步骤设置,可以显著提升使用体验。 ... [详细]
  • 本文将详细探讨 Linux 系统中的 netstat 命令,该命令用于查看网络状态和连接情况。通过了解 IP 地址和端口的基本概念,我们将更好地理解如何利用 netstat 命令来监控和管理网络服务。 ... [详细]
  • 本文详细介绍了Linux操作系统中的cp和scp命令,包括它们的基本使用方法、常见选项以及如何通过scp命令安全地在不同主机之间传输文件。 ... [详细]
  • 本文介绍了MySQL数据库的安全权限管理思想及其制度流程,涵盖从项目开发、数据库更新到日常运维等多个方面的详细流程控制,旨在通过严格的流程管理和权限控制,有效预防数据安全隐患。 ... [详细]
  • 本文介绍了一个基于 Java SpringMVC 和 SSM 框架的综合系统,涵盖了操作日志记录、文件管理、头像编辑、权限控制、以及多种技术集成如 Shiro、Redis 等,旨在提供一个高效且功能丰富的开发平台。 ... [详细]
  • 本文深入探讨了MySQL中常见的面试问题,包括事务隔离级别、存储引擎选择、索引结构及优化等关键知识点。通过详细解析,帮助读者在面对BAT等大厂面试时更加从容。 ... [详细]
  • 本文详细介绍了如何在Linux系统中创建和管理DB2数据库,包括用户切换、数据库创建、错误处理、连接与断开、表空间和缓冲池的创建,以及用户权限管理和数据导入导出等操作。 ... [详细]
  • MySQL 'Too Many Connections' 错误处理及优化方案
    本文详细介绍了如何诊断和解决MySQL数据库中出现的‘Too Many Connections’错误,包括查看当前连接状态、调整配置文件以及优化应用代码等方法。 ... [详细]
  • 最新计算机专业原创毕业设计参考选题都有源码+数据库是近期作品ling取参考你的选题刚好在下面有,有时间看到机会给您发1ssm资源循环利用2springboot校园考勤系统3ssm防 ... [详细]
  • 请看|间隔时间_Postgresql 主从复制 ... [详细]
  • 本文详细探讨了在服务器上运行的PostgreSQL数据库出现'内存不足'错误的具体情况,并提供了一系列有效的解决策略。通过本文,读者将能够更好地理解这一常见问题及其背后的原理。 ... [详细]
  • NFS(Network File System)即网络文件系统,是一种分布式文件系统协议,主要用于Unix和类Unix系统之间的文件共享。本文详细介绍NFS的配置文件/etc/exports和相关服务配置,帮助读者理解如何在Linux环境中配置NFS客户端。 ... [详细]
  • 本文介绍了Java语言开发的远程教学系统,包括源代码、MySQL数据库配置以及相关文档,适用于计算机专业的毕业设计。系统支持远程调试,采用B/S架构,适合现代教育需求。 ... [详细]
  • Linux环境下Git安装及常见问题解析
    本文详细介绍了在Ubuntu系统中安装Git的过程,包括环境检查、软件安装、用户配置以及SSH密钥生成等步骤,并针对安装过程中可能出现的问题提供了有效的解决方案。 ... [详细]
author-avatar
林舒婷880
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有