[20231024]共享伺服器的問題3.txt
[20231024]共享伺服器的問題3.txt
--//測試遇到的問題,當設定dispatchers='(PROTOCOL=TCP)'時,lsnrctl status依舊顯示bookXDB服務,驗證重啟應該看不到該服務。
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
PARAMETER_NAME TYPE VALUE
---------------- --------- --------------------------------
dispatchers string (PROTOCOL=TCP) (SERVICE=bookXDB)
max_dispatchers integer
SYS@book> show parameter service
PARAMETER_NAME TYPE VALUE
-------------- ------- ---------------
service_names string BOOK, BOOKSHARE
$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 23-OCT-2023 10:12:54
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=0.0.0.0)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 24-APR-2023 08:58:39
Uptime 182 days 1 hr. 14 min. 15 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0.4/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/11.2.0.4/dbhome_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "BOOKSHARE" has 1 instance(s).
Instance "book", status READY, has 1 handler(s) for this service...
Service "Book" has 2 instance(s).
Instance "book", status UNKNOWN, has 1 handler(s) for this service...
Instance "book", status READY, has 1 handler(s) for this service...
Service "bookXDB" has 1 instance(s).
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Instance "book", status READY, has 1 handler(s) for this service...
The command completed successfully
--//顯示bookXDB服務.
2.開始測試:
SYS@book> alter system set dispatchers='(PROTOCOL=TCP)' scope=memory;
System altered.
$ rlsql -s -l scott/book@127.0.0.1:1521/bookXDB @spid<<<quit
ERROR:
ORA-12516: TNS:listener could not find available handler with matching protocol stack
SP2-0751: Unable to connect to Oracle. Exiting SQL*Plus
$ rlsql -s -l scott/book@127.0.0.1:1521/bookxdb @spid<<<quit
ERROR:
ORA-12516: TNS:listener could not find available handler with matching protocol stack
SP2-0751: Unable to connect to Oracle. Exiting SQL*Plus
--//但是不支援bookXDB服務名.
--//嘗試重啟監聽看看。
$ lsnrctl stop ; lsnrctl start
$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 23-OCT-2023 10:36:15
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=0.0.0.0)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 23-OCT-2023 10:36:01
Uptime 0 days 0 hr. 0 min. 14 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0.4/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/11.2.0.4/dbhome_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "BOOKSHARE" has 1 instance(s).
Instance "book", status READY, has 2 handler(s) for this service...
Service "Book" has 2 instance(s).
Instance "book", status UNKNOWN, has 1 handler(s) for this service...
Instance "book", status READY, has 2 handler(s) for this service...
Service "bookXDB" has 1 instance(s).
Instance "book", status READY, has 0 handler(s) for this service...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The command completed successfully
--//註冊的服務名bookXDB是存在,但是無論怎麼,都無法透過bookxdb連上服務,可以注意一個細節handler=0.前面是1,也就是沒有獲得句
--//柄.(我估計如果我重啟資料庫,這項內容應該不存在,補充測試看看!!)
3.繼續測試:
SYS@book> alter system set dispatchers='(PROTOCOL=TCP)' scope=both;
System altered.
SYS@book> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SYS@book> startup
ORACLE instance started.
Total System Global Area 643084288 bytes
Fixed Size 2255872 bytes
Variable Size 205521920 bytes
Database Buffers 427819008 bytes
Redo Buffers 7487488 bytes
Database mounted.
Database opened.
SYS@book> alter system register;
System altered.
$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 30-OCT-2023 08:41:50
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=0.0.0.0)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 23-OCT-2023 10:37:31
Uptime 6 days 22 hr. 4 min. 19 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0.4/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/11.2.0.4/dbhome_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "BOOKSHARE" has 1 instance(s).
Instance "book", status READY, has 2 handler(s) for this service...
Service "Book" has 2 instance(s).
Instance "book", status UNKNOWN, has 1 handler(s) for this service...
Instance "book", status READY, has 2 handler(s) for this service...
The command completed successfully
--//沒有bookXDB服務了.
$ lsnrctl stop ; lsnrctl start
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 30-OCT-2023 08:43:35
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=0.0.0.0)(PORT=1521)))
The command completed successfully
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 30-OCT-2023 08:43:35
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Starting /u01/app/oracle/product/11.2.0.4/dbhome_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 11.2.0.4.0 - Production
System parameter file is /u01/app/oracle/product/11.2.0.4/dbhome_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/product/11.2.0.4/dbhome_1/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=0.0.0.0)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 30-OCT-2023 08:43:35
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0.4/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/11.2.0.4/dbhome_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "Book" has 1 instance(s).
Instance "book", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
SYS@book> alter system register;
System altered.
$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 30-OCT-2023 08:44:02
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=0.0.0.0)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 30-OCT-2023 08:43:35
Uptime 0 days 0 hr. 0 min. 26 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0.4/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/11.2.0.4/dbhome_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "BOOKSHARE" has 1 instance(s).
Instance "book", status READY, has 2 handler(s) for this service...
Service "Book" has 2 instance(s).
Instance "book", status UNKNOWN, has 1 handler(s) for this service...
Instance "book", status READY, has 2 handler(s) for this service...
The command completed successfully
SYS@book> column NETWORK_NAME format a30
SYS@book> select * from V$SERVICES order by 1;
SERVICE_ID NAME NAME_HASH NETWORK_NAME CREATION_DATE CREATION_DATE_HASH GOAL D AQ_ CLB_G
---------- -------------- ---------- ------------ ------------------- ------------------ ------------ - --- -----
1 SYS$BACKGROUND 165959219 2013-08-24 11:37:40 0 NONE N NO SHORT
2 SYS$USERS 3427055676 2013-08-24 11:37:40 0 NONE N NO SHORT
4 BOOKSHARE 3041418781 BOOKSHARE 2023-10-18 08:49:31 1313067792 NONE N NO LONG
6 book 1062280681 book 2015-11-24 09:11:13 3631320093 NONE N NO LONG
$ rlsql -s -l scott/book@192.168.100.78:1521/book <<<@spid
SID SERIAL# PROCESS SERVER SPID PID P_SERIAL# C50
---------- ---------- ------------------------ --------- ------ ------- ---------- --------------------------------------------------
341 3 61174 SHARED 61111 20 1 alter system kill session '341,3' immediate;
--//問題再現.
4.收尾:
SYS@book> alter system set dispatchers='(PROTOCOL=TCP) (SERVICE=bookXDB)' scope=both;
System altered.
$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 30-OCT-2023 08:46:30
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=0.0.0.0)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 30-OCT-2023 08:43:35
Uptime 0 days 0 hr. 2 min. 54 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0.4/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/11.2.0.4/dbhome_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "BOOKSHARE" has 1 instance(s).
Instance "book", status READY, has 1 handler(s) for this service...
Service "Book" has 2 instance(s).
Instance "book", status UNKNOWN, has 1 handler(s) for this service...
Instance "book", status READY, has 1 handler(s) for this service...
Service "bookXDB" has 1 instance(s).
Instance "book", status READY, has 1 handler(s) for this service...
The command completed successfully
$ rlsql -s -l scott/book@192.168.100.78:1521/book <<<@spid
SID SERIAL# PROCESS SERVER SPID PID P_SERIAL# C50
---------- ---------- ------------------------ --------- ------ ------- ---------- --------------------------------------------------
1 7 61182 DEDICATED 61187 24 4 alter system kill session '1,7' immediate;
--//順便提一下,要徹底關閉共享服務,可以設定shared_servers=0.
SYS@book> show parameter shared_servers
PARAMETER_NAME TYPE VALUE
------------------ ------- -----
max_shared_servers integer 1
shared_servers integer 1
SYS@book> alter system set shared_servers=0;
System altered.
--//重啟資料庫:
$ rlsql -s -l scott/book@192.168.100.78:1521/book <<<@spid
SID SERIAL# PROCESS SERVER SPID PID P_SERIAL# C50
---------- ---------- ------------------------ --------- ------ ------- ---------- --------------------------------------------------
392 7 61528 DEDICATED 61533 23 4 alter system kill session '392,7' immediate;
$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 30-OCT-2023 09:11:01
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=0.0.0.0)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 30-OCT-2023 08:43:35
Uptime 0 days 0 hr. 27 min. 25 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0.4/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/11.2.0.4/dbhome_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "BOOKSHARE" has 1 instance(s).
Instance "book", status READY, has 1 handler(s) for this service...
Service "Book" has 2 instance(s).
Instance "book", status UNKNOWN, has 1 handler(s) for this service...
Instance "book", status READY, has 1 handler(s) for this service...
The command completed successfully
--//沒有bookXDB服務.
--//收尾:
SYS@book> alter system reset shared_servers;
System altered.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2991962/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Windows共享的那些問題Windows
- session共享問題???Session
- [20191223]關於共享記憶體段相關問題3.txt記憶體
- 關於資料共享的問題
- Web--Session共享問題WebSession
- Tomcat 共享session問題TomcatSession
- rdesktop共享剪貼簿的問題
- 共享記憶體分段問題記憶體
- [20231023]共享伺服器的問題2.txt伺服器
- windows xp共享問題解決方法Windows
- ZT:字元長度與共享問題字元
- aix 共享記憶體段問題AI記憶體
- vue-router元件複用共享$route的問題Vue元件
- 關於sql語句的遊標共享問題SQL
- 多個JVM之間,資料共享的問題?JVM
- 儲存目錄的SMB目錄共享問題
- 伺服器常見的問題伺服器
- IM伺服器的問題,急!!!伺服器
- 問一個tomcat伺服器的問題Tomcat伺服器
- wmware共享磁碟redhat 5.8掛載問題Redhat
- 多執行緒中的使用共享變數的問題執行緒變數
- SharePreference原理及跨程式資料共享的問題
- Ubuntu共享資料夾訪問許可權問題Ubuntu訪問許可權
- 解決不能訪問伺服器共享檔案的終極方案伺服器
- DHCP伺服器問題伺服器
- [20210407]分析sql語句的共享記憶體段3.txtSQL記憶體
- 遊戲伺服器存在的主要問題遊戲伺服器
- 分析伺服器延遲的問題伺服器
- 一個伺服器部署的問題伺服器
- [20120131]函式索引與取max值的問題3.txt函式索引
- vmware server 解決rac中共享磁碟問題Server
- 解決Mac無法共享網路問題Mac
- 伺服器問題 排查思路伺服器
- 華為雲伺服器配置遇到的問題伺服器
- 配置nfs伺服器出現的問題NFS伺服器
- nfs伺服器搭建和遇到的問題NFS伺服器
- 伺服器高併發訪問下的配置問題伺服器
- Linux下共享庫問題導致無法啟動SQLPLUS的問題解決LinuxSQL