[20191113]oracle共享連線模式埠2.txt
[20191113]oracle共享連線模式埠2.txt
--//昨天的測試連結:http://blog.itpub.net/267265/viewspace-2663651/=>[20191112]oracle共享連線模式埠.txt
--//連結裡面還提到
--//可以執行如下,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引數,內容在原來基礎上追加
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2663817/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- [20191112]oracle共享連線模式埠.txtOracle模式
- Oracle共享伺服器的連線模式Oracle伺服器模式
- FTP資料埠連線FTP
- cx_Oracle 連線 OracleOracle
- Servlet連線OracleServletOracle
- PHP 連線 OraclePHPOracle
- thinkphp連線OraclePHPOracle
- PHP 連線oraclePHPOracle
- 【CONNECT】Oracle連線方式詳細介紹(專用/共享伺服器)Oracle伺服器
- Oracle網路配置之共享模式和專有模式Oracle模式
- oracle 連線查詢Oracle
- DBA ORACLE連線操作Oracle
- 3.2.2 python連線oraclePythonOracle
- Linux中連線埠命令有哪些?Linux
- 如何用ip地址連線共享印表機 用ip地址連線共享印表機的方法
- Linux檢視埠併發連線數Linux
- Oracle左外連線、右外連線、完全外連線以及(+)號用法Oracle
- Oracle連線Db2OracleDB2
- [Oracle-> MySQL] Oracle通過dblink連線MySQL--Oracle 19c連線到MySQL 5.7OracleMySql
- [20220322]探究oracle sequence 2.txtOracle
- java操作Oracle 方式一 ( 連線-》操作-》斷開連線 )JavaOracle
- 【JDBC】java連線池模擬測試 連線oracleJDBCJavaOracle
- 【JDBC】使用OracleDataSource建立連線池用於連線OracleJDBCOracle
- Oracle 自動化運維-Python連線OracleOracle運維Python
- EOSCleos連線到非預設主機/埠
- gdbserver連線Ubuntu除錯程式(使用串列埠)ServerUbuntu除錯串列埠
- 配置Oracle DBlink連線MySQL庫OracleMySql
- PL/Plus本地連線oracle配置Oracle
- cx_Oracle.SessionPool 連線池OracleSession
- Python 連線 Oracle資料庫PythonOracle資料庫
- oracle連線查詢詳解Oracle
- 修改windows遠端桌面連線埠-批處理Windows
- 開放vps埠後卻依然無法連線
- [20231023]共享伺服器的問題2.txt伺服器
- 使用instantclient連線oracle資料庫clientOracle資料庫
- Sqlcl 連線Oracle DataBase 19cSQLOracleDatabase
- [Navicate]Navicate連線Oracle資料庫Oracle資料庫
- [20230216]資料庫連線訪問asm相關檢視2.txt資料庫ASM