[20191113]oracle共享连接模式端口2.txt
[20191113]oracle共享连接模式端口2.txt
--//昨天的测试链接:http://blog.itpub.net/267265/viewspace-2663651/=>[20191112]oracle共享连接模式端口.txt
--//链接里面还提到http://www.usn-it.de/index.php/2008/11/10/oracle-how-to-stop-a-mts-dispatcher-process/
--//可以执行如下,kill D000进程,自己也测试看看。
--//alter system shutdown immediate 'D000';
1.环境:
SYS@book> @ ver1
PORT_STRING VERSION BANNER
------------------------------ -------------- --------------------------------------------------------------------------------
x86_64/Linux 2.4.xx 11.2.0.4.0 Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
SYS@book> show parameter dispatchers
NAME TYPE VALUE
--------------- ------- -------------------------------------
dispatchers string (PROTOCOL=TCP) (SERVICE=book,bookXDB)
max_dispatchers integer
SYS@book> create pfile='/tmp/@.ora' from spfile;
File created.
--//保存1份pfile参数文件.
# netstat -tunlp | egrep "Active|Proto|ora_[ds]"
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 :::38229 :::* LISTEN 36466/ora_d000_book
udp 0 0 ::1:57385 :::* 36466/ora_d000_book
udp 0 0 ::1:11314 :::* 36468/ora_s000_book
2.kill d000:
SYS@book> alter system shutdown immediate 'D000';
System altered.
--//alert.log出现:
Wed Nov 13 08:34:13 2019
idle dispatcher 'D000' terminated, pid = (19, 1)
# netstat -tunlp | egrep "Active|Proto|ora_[ds]"
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
udp 0 0 ::1:11314 :::* 36468/ora_s000_book
# ps -ef | grep ora_[sd]000
oracle 36468 1 0 08:33 ? 00:00:00 ora_s000_book
--//ora_d000_book进程消失.等了N久也没有出现.
>sqlplus scott/book@192.168.100.78:1521/book
SCOTT@192.168.100.78:1521/book> @ spid
SID SERIAL# PROCESS SERVER SPID PID P_SERIAL# C50
---------- ---------- ------------------------ --------- -------------------- ------- ---------- -------------------------------------------------
267 3 7652:8308 DEDICATED 36540 19 3 alter system kill session '267,3' immediate;
--//可以发现这个时候登录选择的是DEDICATED模式.注意我这里配置book支持2种服务模式.
d:\tools\sqltemp>sqlplus -s -l scott/book@192.168.100.78:1521/book:SHARED
ERROR:
ORA-12520: TNS:listener could not find available handler for requested type of
server
SP2-0751: Unable to connect to Oracle. Exiting SQL*Plus
SYS@book> alter system shutdown immediate 'S000';
alter system shutdown immediate 'S000'
*
ERROR at line 1:
ORA-00127: dispatcher S000 does not exist
--//我以前的做法是kill ora_s000_book进程.
SYS@book> alter system set dispatchers='(PROTOCOL=TCP) (SERVICE=book,bookXDB)' scope=memory;
System altered.
# netstat -tunlp | egrep "Active|Proto|ora_[ds]"
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 :::53018 :::* LISTEN 36624/ora_d000_book
udp 0 0 ::1:51280 :::* 36624/ora_d000_book
udp 0 0 ::1:11314 :::* 36468/ora_s000_book
--//对比前面的测试监听端口发生了变化.
# ps -ef | grep ora_[sd]000
oracle 36468 1 0 08:33 ? 00:00:00 ora_s000_book
oracle 36624 1 0 08:44 ? 00:00:00 ora_d000_book
d:\tools\sqltemp>sqlplus -s -l scott/book@192.168.100.78:1521/book
@ spid
SID SERIAL# PROCESS SERVER SPID PID P_SERIAL# C50
---------- ---------- ------------------------ --------- -------------------- ------- ---------- --------------------------------------------------
281 7 7772:4532 SHARED 36468 20 1 alter system kill session '281,7' immediate;
--//可以发现这个时候登录选择的是SHARED模式.
--//换一句话讲这个修改dispatchers生效不需要重启服务.
3. 修改dispatchers参数:
alter system set dispatchers=
'(address=(partial=true)(protocol=tcp)(host=192.168.100.78)(port=30000))(dispatchers=1)(SERVICE=book,bookXDB)',
'(address=(partial=true)(protocol=tcp)(host=192.168.100.78)(port=30005))(dispatchers=1)(SERVICE=book,bookXDB)'
scope=memory sid='*';
--//注:scope=memory.
--//修改前:
# netstat -tunlp | egrep "Active|Proto|ora_[ds]"
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 :::53018 :::* LISTEN 36624/ora_d000_book
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
udp 0 0 ::1:51280 :::* 36624/ora_d000_book
udp 0 0 ::1:11314 :::* 36468/ora_s000_book
--//修改后:
# netstat -tunlp | egrep "Active|Proto|ora_[ds]"
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 192.168.100.78:30005 0.0.0.0:* LISTEN 36678/ora_d002_book
tcp 0 0 192.168.100.78:30000 0.0.0.0:* LISTEN 36676/ora_d001_book
tcp 0 0 :::53018 :::* LISTEN 36624/ora_d000_book
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
udp 0 0 ::1:40457 :::* 36678/ora_d002_book
udp 0 0 ::1:51280 :::* 36624/ora_d000_book
udp 0 0 ::1:64603 :::* 36676/ora_d001_book
udp 0 0 ::1:11314 :::* 36468/ora_s000_book
--//注意下划线的端口没有变化.
SYS@book> show parameter dispatchers
NAME TYPE VALUE
---------------- --------- ----------------------------------------------------------------------------------------------------
dispatchers string (PROTOCOL=TCP) (SERVICE=book,bookXDB), (address=(partial=true)(protocol=tcp)(host=192.168.100.78)(po
rt=30000))(dispatchers=1)(SERVICE=book,bookXDB), (address=(partial=true)(protocol=tcp)(host=192.168.
100.78)(port=30005))(dispatchers=1)(SERVICE=book,bookXDB)
max_dispatchers integer
--//有时候真心觉得oracle真变态,它是在原来基础上追加了参数dispatchers的内容.
SYS@book> show spparameter dispatchers
SID NAME TYPE VALUE
-------- --------------- -------- --------------------------------------
* dispatchers string (PROTOCOL=TCP) (SERVICE=book,bookXDB)
* max_dispatchers integer
--//继续测试:
alter system set dispatchers=
'(address=(partial=true)(protocol=tcp)(host=192.168.100.78)(port=30000))(dispatchers=1)(SERVICE=book,bookXDB)',
'(address=(partial=true)(protocol=tcp)(host=192.168.100.78)(port=30005))(dispatchers=1)(SERVICE=book,bookXDB)'
scope=both sid='*';
--//注:scope=both
SYS@book> show parameter dispatchers
NAME TYPE VALUE
---------------- ------- ----------------------------------------------------------------------------------------------------
dispatchers string (PROTOCOL=TCP) (SERVICE=book,bookXDB), (address=(partial=true)(protocol=tcp)(host=192.168.100.78)(po
rt=30000))(dispatchers=1)(SERVICE=book,bookXDB), (address=(partial=true)(protocol=tcp)(host=192.168.
100.78)(port=30005))(dispatchers=1)(SERVICE=book,bookXDB)
max_dispatchers integer
SYS@book> show spparameter dispatchers
SID NAME TYPE VALUE
-------- ---------------- -------- ----------------------------------------------------------------------------------------------------
* dispatchers string (PROTOCOL=TCP) (SERVICE=book,bookXDB)
* dispatchers string (address=(partial=true)(protocol=tcp)(host=192.168.100.78)(port=30000))(dispatchers=1)(SERVICE=book,bookXDB)
* dispatchers string (address=(partial=true)(protocol=tcp)(host=192.168.100.78)(port=30005))(dispatchers=1)(SERVICE=book,bookXDB)
* max_dispatchers integer
--//可以发现这样修改实际上是追加内容.oracle有时候难以理解.
4.连接测试:
d:\tools\sqltemp>sqlplus -s -l scott/book@192.168.100.78:30000/book @spid
SID SERIAL# PROCESS SERVER SPID PID P_SERIAL# C50
---------- ---------- ------------------------ --------- -------------------- ------- ---------- --------------------------------------------------
281 11 9076:7200 SHARED 36468 20 1 alter system kill session '281,11' immediate;
--//SERVER=SHARED,spid=36468
# ps -ef | grep 3646[8]
oracle 36468 1 0 08:33 ? 00:00:00 ora_s000_book
--//sqlplus scott/book@192.168.100.78:30005/book 也是ok的.
5.收尾还原:
--//略.
--//参考链接:http://blog.itpub.net/267265/viewspace-2663651/=>[20191112]oracle共享连接模式端口.txt
6.总结:
--//不需要重启参数dispatchers就能生效.
--//修改dispatchers参数,内容在原来基础上追加
[20191113]oracle共享连接模式端口2.txt的更多相关文章
- [20191112]oracle共享连接模式端口.txt
[20191112]oracle共享连接模式端口.txt --//如果使用共享服务模式,你可以发现每次重启数据库对应的端口号会发生变化.# netstat -tunlp | egrep "A ...
- [20190306]共享服务模式与SDU.txt
[20190306]共享服务模式与SDU.txt --//一些文档提到共享服务模式,服务端SDU=65535,测试验证看看.--//链接:https://blogs.sap.com/2013/02/0 ...
- Oracle dblink的连接模式的关系测试总结
这篇主要介绍一下database link由于连接数据库的方式不同遇到的一些问题,我们知道连接ORACLE服务器的模式一般有两种方式:专用服务器连接(dedicated server)和共享服务器连接 ...
- [20180316]共享服务模式和直接路径读.txt
[20180316]共享服务模式和直接路径读.txt --//在共享服务器模式下,执行计划不会选择直接路径读,通过例子证明. 1.环境:SYS@book> @ &r/ver1PORT_S ...
- oracle共享与专用模式的动态转换及区别(转载)
一直没对专用于共享的互换搞清楚,找到了这篇文章 http://blog.csdn.net/tianlesoftware/archive/2010/06/26/5695784.aspx ,让我实践了一把 ...
- Oracle数据库的连接模式connection Mode、连接connection与会话session
数据库的连接模式Connection Mode: Dedicated Server Mode(专有模式) 当用户发出请求时,如远程的client端通过监听器连接数据库上,ORACLE的服务器端会启用一 ...
- Oracle共享服务器的连接模式
一般Oracle数据库安装默认都是选择专用服务器模式的连接方式,但实际上Oracle也支持共享服务器的连接模式,不过这种在实际生产中见到的很少,我个人只在一些医院行业的客户生产环境中见到过这类配置. ...
- oracle远程连接配置
今日需要对站内所有的空间数据做入库处理,所以在服务器上安装了oracle,在本地需要对其进行连接,在网上查阅了相关资料,整理如下: 远程服务端配置:1. 数据库配置 因为要为外界客户端提供数据服 ...
- asp.net学习之ado.net(连接模式访问)
原文:asp.net学习之ado.net(连接模式访问) ado.net框架支持两种模式的数据访问: 连接模式(Connected)和非连接模式(disconnected).这一节介绍如何使用连 ...
随机推荐
- webpack 配置babel-loader babel7
babel 7版本配置 在webpack中 默认只能处理部分 ES6的新语法,一些更高级的ES6或ES7的语法,webpack是处理不了的这个时候就需要借助第三方的loader 来帮助webpack ...
- Vue-cli项目部署到Nginx
项目环境: 0. Nginx使用 以windows版为例,下载niginx压缩包并解压到任意目录,双击nginx.exe,在浏览器中访问http://localhost,如果出现Welcome to ...
- Refresh design pattern
多年后, 再次翻阅设计模式书籍, 将每种模式的要点总结于此, 需要本身有一定设计模式基础, 再结合要点, 帮助更好理解与运用. 策略模式 (Strategy) 附加功能单独抽象不同接口 功能以组合方式 ...
- Docker Compose安装Registry后配置WebUI与客户端
场景 Docker 私服Registry简介与使用Docker-Compose安装Registry: https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article ...
- FCC---CSS Flexbox: Use the flex-direction Property to Make a Row
Adding display: flex to an element turns it into a flex container. This makes it possible to align a ...
- [转]UIpath advanced certification dumps
本文转自:https://dotnetbasic.com/2019/06/uipath-advanced-certification-dumps.html UiPath advanced certif ...
- python部署mariadb主从架构
主机部署: import configparser import os def config_mariadb_yum(): exists = os.path.exists('/etc/yum.repo ...
- JavaScript banner轮播 左右切换 圆点点击切换
1.效果如下图: 2.源码如下: <!DOCTYPE html> <html lang="en"> <head> <meta charse ...
- Linux tree
tree命令,是大小写敏感的.常用的是:1.tree -C 颜色显示 2.tree -f 显示文件全路径ls -R也可以显示树结构,但没上面 清晰 3.tree -L n n 是数字,表示显示几层 4 ...
- MySQL数据库~~~~~锁和事务
一 锁 innodb存储引擎默认是行级锁 行级锁定最大的特点就是锁定对象的颗粒度很小,也是目前各大数据库管理软件所实现的锁定颗粒度最小的.由于锁定颗粒度很小,所以发生锁定资源争用的概率也最小,能够给予 ...