- 浏览: 1000992 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (529)
- 服务器 (8)
- jsp (1)
- java (6)
- AIX (1)
- solaris (3)
- linux学习 (53)
- javaScript (2)
- hibernate (1)
- 数据库 (74)
- sql语句 (8)
- oracle 学习 (75)
- oracle 案例 (42)
- oracle 管理 (42)
- Oracle RAC (27)
- oracle data guard (12)
- oracle 参数讲解 (14)
- Oracle 字符集 (8)
- oracle性能调优 (24)
- oracle备份与恢复 (12)
- oracle Tablespace (9)
- oracle性能诊断艺术 (1)
- oracle 11g学习 (5)
- oracle streams (1)
- oracle upgrade and downgrade (4)
- db2学习 (13)
- db2命令学习 (2)
- mysql (28)
- sql server (30)
- sql server 2008 (0)
- 工具 (10)
- 操作系统 (3)
- c++ (1)
- stock (1)
- 生活 (5)
- HADOOP (2)
最新评论
-
massjcy:
...
如何将ubuntu文件夹中文名改为英文 -
skypiea:
谢谢。。。
终于解决了。。。
Oracle 10.2.0.4(5)EM不能启动的解决方案(Patch 8350262) -
qwe_rt:
引用vi /etc/sysconfig/network 请问 ...
Linux操作系统下配置静态IP上网 -
liuqiang:
sudo killall -9 apache2
ps 和 kill 命令详解 -
dazuiba:
引用*绝杀 kill -9 PID 当使用此命令时,一定要通过 ...
ps 和 kill 命令详解
Oracle MTS的相关问题
一、什么是MTS
MTS = Multi-Threaded Server
MTS是ORACLE SERVER的一个可选的配置选择,是相对DEDICATE方式而言,它最大的优点是在以不用增加物理资源(内存)的前提下支持更多的并发的连接。
Joseph C.Johnson以餐馆给出一个MTS的形象的比喻
假设ORACLE是一家餐馆,当你走进一家餐馆时你感觉最舒服的服务方式就是有一个专门的waiter来为你服务,而不管餐馆中来了多少人,她只对你请求应答,这是DEDICTE的处理方式,也就是说每一个ORACLE客户端的连接都有一个专门的服务进程来为它服务。而大部的餐馆的服方式都不是一对一的,当你走进的时侯,你就被指定了一个waiter,她也可能为其它桌服着务,这对于餐馆来说是最有利的,因为他们可以服务更多的客人而不需要增加他们的员工。这样对你来说也可能是不错的,如果餐馆不是太忙,她服务的客人的请求都很简短且容易完成,你的感觉也好像自己拥有一个专门的waiter,waiter把你的ORDER转给厨师,然后把做好的菜拿给你,这就是MTS的处理方式,这些共享的waiters我们叫她们为Dispatchers,厨师我们则叫他们为Shared Server Processes。
假设ORACLE是一家餐馆,当你走进一家餐馆时你感觉最舒服的服务方式就是有一个专门的waiter来为你服务,而不管餐馆中来了多少人,她只对你请求应答,这是DEDICTE的处理方式,也就是说每一个ORACLE客户端的连接都有一个专门的服务进程来为它服务。而大部的餐馆的服方式都不是一对一的,当你走进的时侯,你就被指定了一个waiter,她也可能为其它桌服着务,这对于餐馆来说是最有利的,因为他们可以服务更多的客人而不需要增加他们的员工。这样对你来说也可能是不错的,如果餐馆不是太忙,她服务的客人的请求都很简短且容易完成,你的感觉也好像自己拥有一个专门的waiter,waiter把你的ORDER转给厨师,然后把做好的菜拿给你,这就是MTS的处理方式,这些共享的waiters我们叫她们为Dispatchers,厨师我们则叫他们为Shared Server Processes。
二、MTS架构
[metalink-Note:29038.1]
1. Oracle Multi-Threaded Server Architecture.
----------------------------------------------
+-----------+ user
+-----------+| processes
| ||
|APPLICATION||
| CODE ||
| |+
+-----------+
/|\
| CLIENT
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| SERVER
\|/
+----------------------------------+
+----------------------------------+|
| ||
| DISPATCHER PROCESSES ||
| |+
+----------------------------------+
| /|\
| |
| +-----------+ |
| +-----------+| shared |
| +-----------+|| server |
| | ORACLE ||+ processes |
| |SERVER CODE|+ |
| +-----------+ |
| /|\ /|\ | |
| | | | |
| | | | |
| | \|/ | |
+---------------|-----|-------|----------------|-------+
| \|/ | \|/ | |
| +-------------------+ +----------------------+ |
| | REQUEST | | RESPONSE QUEUES | |
| | QUEUES | +----------------------+ |
| +-------------------+ |
| SYSTEM GLOBAL AREA |
| |
+------------------------------------------------------+
Client Connections to MTS
~~~~~~~~~~~~~~~~~~~~~~~~~
A client process wanting to connect to an Oracle instance using MTS
should go through the following steps:
----------------------------------------------
+-----------+ user
+-----------+| processes
| ||
|APPLICATION||
| CODE ||
| |+
+-----------+
/|\
| CLIENT
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| SERVER
\|/
+----------------------------------+
+----------------------------------+|
| ||
| DISPATCHER PROCESSES ||
| |+
+----------------------------------+
| /|\
| |
| +-----------+ |
| +-----------+| shared |
| +-----------+|| server |
| | ORACLE ||+ processes |
| |SERVER CODE|+ |
| +-----------+ |
| /|\ /|\ | |
| | | | |
| | | | |
| | \|/ | |
+---------------|-----|-------|----------------|-------+
| \|/ | \|/ | |
| +-------------------+ +----------------------+ |
| | REQUEST | | RESPONSE QUEUES | |
| | QUEUES | +----------------------+ |
| +-------------------+ |
| SYSTEM GLOBAL AREA |
| |
+------------------------------------------------------+
Client Connections to MTS
~~~~~~~~~~~~~~~~~~~~~~~~~
A client process wanting to connect to an Oracle instance using MTS
should go through the following steps:
a) Call the listener
b) The listener tells it to call back on the address where
the dispatcher is listening (a REDIRECT)
c) The client calls the dispatcher and establishes a connection.
d) The dispatcher now has a CLIENT connection ESTABLISHED and
will also continue to listen for any new connections.
e) The client sends a SQL message to the dispatcher.
f) The dispatcher unwraps this message packet and places the
request onto a queue in the SGA (System Global Area).
This queue has NOTHING to do with SQL*Net. The SQL*Net
layer ends in the dispatcher.
g) A shared server will pick up the request from the SGA queue
and process it. When there is any result this is placed
on a separate queue in the SGA ready for the dispatcher.
h) The dispatcher picks up the response message from the SGA
and wraps this into a SQL*Net message. This is passed
back to the client.
b) The listener tells it to call back on the address where
the dispatcher is listening (a REDIRECT)
c) The client calls the dispatcher and establishes a connection.
d) The dispatcher now has a CLIENT connection ESTABLISHED and
will also continue to listen for any new connections.
e) The client sends a SQL message to the dispatcher.
f) The dispatcher unwraps this message packet and places the
request onto a queue in the SGA (System Global Area).
This queue has NOTHING to do with SQL*Net. The SQL*Net
layer ends in the dispatcher.
g) A shared server will pick up the request from the SGA queue
and process it. When there is any result this is placed
on a separate queue in the SGA ready for the dispatcher.
h) The dispatcher picks up the response message from the SGA
and wraps this into a SQL*Net message. This is passed
back to the client.
三、确定你的DB是否在使用MTS
[metalink-Note:1071305.6]
Solution Description:
=====================
Look at the "init.ora" parameter MTS_DISPATCHERS.
MTS_DISPATCHERS defines the number of dispatchers created when the instance
starts up. If this is set to zero, or is null (default value), then you are NOT
using MTS.
=====================
Look at the "init.ora" parameter MTS_DISPATCHERS.
MTS_DISPATCHERS defines the number of dispatchers created when the instance
starts up. If this is set to zero, or is null (default value), then you are NOT
using MTS.
If MTS_DISPATCHERS is greater than zero, then check these other "init.ora"
parameters for valid values:
parameters for valid values:
MTS_MAX_DISPATCHERS Maximum number of dispatchers
MTS_SERVERS Number of server processes created at startup
MTS_MAX_SERVERS Maximum number of shared server processes
MTS_SERVICE SID
MTS_LISTENER_ADDRESS Configuration of the listener
MTS_SERVERS Number of server processes created at startup
MTS_MAX_SERVERS Maximum number of shared server processes
MTS_SERVICE SID
MTS_LISTENER_ADDRESS Configuration of the listener
Solution Explanation:
=====================
These other "init.ora" parameters may have valid values, but if MTS_DISPATCHERS
is zero or null, MTS is not being used.
=====================
These other "init.ora" parameters may have valid values, but if MTS_DISPATCHERS
is zero or null, MTS is not being used.
四、MTS相关参数的含义
[metalink-Note:29038.1]
The main parameters required to start MTS are:
o MTS_SERVICE - This parameter establishes the name of the MTS service
that clients connect to, in order for the dispatchers to handle requests.
o MTS_DISPATCHERS - Dispatchers are detached processes that handle client
process requests and communicate them to server processes for execution.
that clients connect to, in order for the dispatchers to handle requests.
o MTS_DISPATCHERS - Dispatchers are detached processes that handle client
process requests and communicate them to server processes for execution.
This parameter defines the number of dispatchers to startup for
each protocol that is configured for MTS. For example,
mts_dispatchers = "ipc, 2"
each protocol that is configured for MTS. For example,
mts_dispatchers = "ipc, 2"
o MTS_SERVERS - This is the number of shared server processes that
start at instance startup time. Shared servers service the
client requests passed on to them by the dispatchers.
start at instance startup time. Shared servers service the
client requests passed on to them by the dispatchers.
o MTS_LISTENER_ADDRESS - This is the full address for dispatchers to listen
on, and is the same as the address configured in the TNS listener. The
address specification is protocol-specific. For example:
on, and is the same as the address configured in the TNS listener. The
address specification is protocol-specific. For example:
mts_listener_address = "(address=(protocol=ipc)(key=sw))"
五、使用MTS连接DB
先在主机命令行 $ lsnrctl services;
"D000" established:0 refused:0 current:1 max:972 state:ready
DISPATCHER <machine: db1, pid: 3950>
(ADDRESS=(PROTOCOL=tcp)(HOST=eagle1)(PORT=33166));
DISPATCHER <machine: db1, pid: 3950>
(ADDRESS=(PROTOCOL=tcp)(HOST=eagle1)(PORT=33166));
查看dispather的监听端口号——33166。(dispather进程名称一般是 ora_dNNN_SID,NNN in (000-999))
在client端的tnsname.ora中,注意:
TODB_MTS =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.2)(PORT = 33166))
)
(CONNECT_DATA =
(SERVER = SHARED)
(SERVICE_NAME = dbname)
)
)
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.2)(PORT = 33166))
)
(CONNECT_DATA =
(SERVER = SHARED)
(SERVICE_NAME = dbname)
)
)
这样可以解决ora-12520问题(当然这只是解决方法之一)
六、一问一答
Q:MTS一定比Delicated模式好吗?
A:不是。如果硬件好点,建议使用Delicated模式。biti语录:“我是能不用MTS就不用”
Q:MTS与Delicated模式可以相互转换吗?
A:可以。
MTS => Delicated
Reset the MTS Parameters in init.ora and reopen your DB.
Delicated => MTS
Added the MTS Parameters in init.ora and reopen your DB.
Q:MTS模式下可以用Delicated连进来吗?
A:可以。(SERVER = Delicated)即可。反之则不行。
Q:RAC环境一定得是MTS吗?
A:不是。
Q:JDBC thin 支持MTS吗?
A:目前不支持。
发表评论
-
数据库设计规范
2011-11-24 10:40 6834数据库设计(Database Desi ... -
Linux下用OCCI或OCI连接Oracle
2011-07-26 12:00 2867首先,去oracle官网下载C ... -
PowerDesigner快捷键
2011-03-19 00:10 1060一般快捷键F4 打开检查模型窗口,检查模型F5 如果图 ... -
oracle和sql server功能对比
2011-01-05 22:05 1769Oracle Database 10g对比SQL Server ... -
Parse CPU to Parse Elapsd%的理解
2010-11-28 18:37 6715Parse CPU to Parse Elapsd%是指sql ... -
DB2客户端连接服务端的方法(转载)
2010-07-14 22:40 880在DB2中从客户端访问服 ... -
四大数据库的比较(SQL Server、Oracle、Sybase和DB2)
2010-07-14 21:54 1477本篇引用于公司数据库 ... -
Oracle迁移到DB2常用转换
2010-07-01 13:12 1112因为项目需要,要将Oracle上的东西转移到DB2,于是收集整 ... -
输出object的DDL的方法
2010-06-23 01:07 1391最近一段时间,由于经常要通过ssh访问远程环境。所以图形工具使 ... -
oracle的license和正版使用问题
2010-06-08 01:08 19061, 正版Oracle 产品和盗版的区别 直奔主题,这是许多研 ... -
oracle opatch 工具的使用(oracle小补丁安装)(转)
2010-05-30 13:49 2211从9.2版开始,Oracle公司设计实现了个别补丁安装管理工具 ... -
mysql常用函数
2009-12-29 10:25 911一、数学函数ABS(x) ... -
SP2-0618和_SP2-0611错误处理
2009-12-27 23:48 1037AUTOTRACE是一项 SQL*Plus 功能,自动跟踪为 ... -
几分钟学会Oracle Audit
2009-12-03 15:49 21171、什么是审计 简单来讲,就是把对数据库的操作记录下来。不管 ... -
alter system switch logfile和alter system archive log current的区别
2009-12-03 12:19 1073alter system switch logfile 是强制 ... -
由HWM引出的drop,delete,truncate的异同点比较
2009-12-02 14:18 1209今天在做HWM时,说truncate表后HWM会降低,但是dr ... -
主流数据库的比较
2009-12-02 10:29 1252开发数据库应用,选择一个好的数据库是非常重要的。目前, 商品 ... -
10g: SYSAUX 里面都有些什么东西
2009-09-04 12:38 1780Isabella says:SYSAUX 暴涨有 ... -
ORACLE的PL/SQL一
2009-08-26 17:03 1111一、什么是PL/SQL? P ... -
Oracle中password file的作用及说明
2009-08-21 21:19 1008在数据库没有启动之前,数据库内建用户是无法通过数据库来验证身份 ...
相关推荐
在卸载完成后,重新安装的时候,提示OracleMTSRecoveryService 路径找不到 在注册表HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\OracleMTSRecoveryService 修改对应的路径解决
此版本不支持 Pro*C/C++和.NET程序所需的Oracle Provider for OLE DB,如需支持上述功能,请访问并下载ODAC(Oracle Data Access Components,其包含 ODP.NET, Oracle Services for MTS, Oracle Providers for ASP...
15由于使用了MTS方式,导致数据库操作特别慢(包括备份) 16由于存在一个大事务操作,导致数据库性能特别差或产生频繁日志切换 17由于没有COMMIT,导致数据库表被锁住 18索引创建不合理,导致数据库查询特别慢 19 ...
软件功能: 1.查询Oracle实例名、状态、版本等 2.Oracle连接数 ...24.MTS 25.碎片程度高的表 26.使用CPU多的用户 27.KILL用户会话 使用说明详细见:http://blog.chinaunix.net/uid-765492-id-3380917.html
相比1.1版本更新内容: 增加了对11G更好的支持 增加了对大量服务器监控配置 增加了监控内容 1.0功能: 1.查询Oracle实例名、状态、版本等 ...24.MTS 25.碎片程度高的表 26.使用CPU多的用户 27.KILL用户会话
Unzip ODAC (xcopy version) zip file to expand the contents. The following directories will be created: a) instantclient_11_2 - Oracle Instant Client ...g) OraMTS - Oracle Services for MTS
为了提高性能,我们针对Oracle数据库本身提供了的方法或方案进行过不少的尝试,主要包括: 共享服务器模式(MTS);集群技术(Clustering)RAC;分区; 并行处理(主要是并行查询)。 Oracle提供的这些特性确实是用来进行...
除了以上提及的特性之外,还支持Oracle 8和Oracle 8i特性,如LOB定位、对象和参考、XML TYPE、时间戳、滚动查询、密码到期、外部程序开发以及MTS Oracle服务等。 主要功能: 按范例查询模式 ——TOracleDataSet组件...
oracle的网络配置的文件,MTS,等。 自己搜集的,可以参考下。
主要内容:收集性能数据、优化SQL语句和应用程序、调整共享池(Shared Pool)的性能、调整缓冲区高速缓存(Buffer Cache)的性能、调整重做有关的性能、共享(多线程)服务器(MTS)、调整磁盘I/O的性能、调整闩(latch)和...
1.2.3 MTS(multi-threaded server) 8 1.2.4 调整临时表空间 9 1.2.5 调整回滚表空间 9 1.2.6 调整日志(日志组,日志成员) 10 1.2.7 调整用户表空间 10 1.2.8 创建用户 11 1.2.9 创建数据对象(表,索引,系列,...
其他环境变量 参考Oracle相关的安装文档和随机文档。 3.2、数据库设计原则 数据库SID 数据库SID是唯一标志数据库的符号,命名长度不能超过30个字符。对于单节点数 据库,以字符开头的30个长度以内字串作为SID的命名...
有关所有区域的信息, 请参阅 Oracle8i National Language Support Guide。 值范围: 任何有效的地区名。 默认值: 根据操作系统而定 nls_timestamp_format: 说明: 与 NLS_TIME_FORMAT 相似, 只不过它设置的是 ...
找ORACLE字符集 <br>select * from sys.props$ where name='NLS_CHARACTERSET'; <br>15. 监控 MTS <br>select busy/(busy+idle) "shared servers busy" from v$dispatcher; <br>此值大于0.5时,...
主要内容:收集性能数据、优化SQL语句和应用程序、调整共享池(Shared Pool)的性能、调整缓冲区高速缓存(Buffer Cache)的性能、调整重做有关的性能、共享(多线程)服务器(MTS)、调整磁盘I/O的性能、调整闩(latch)和...
Dsn=orcl;uid=scott;dbq=ORCL;dba=W;apa=T;exc=F;fen=T;qto=T;frc=10;fdl=10;lob=T;rst=T;btd=F;bnf=F;bam=IfAllSuccessful;num=NLS;dpm=F;mts=T;mdi=F;csr=F;fwc=F;fbs=64000;tlo=O
这样可使 .NET 应用程序运行跨多个资源结合不同操作(例如将定单插入SQL Server 数据库、将消息写入 Microsoft 消息队列(MSMQ)队列,以及从 Oracle 数据库检索数据)的事务。 要实现COM+事务处理的类则必须继承...
How to choose the most appropriate ...How to take full advantage of relational database servers, such as SQL Server and Oracle How to meld relational databases with object-oriented programming Who