[20200218]無ENABLE=BROKEN在連線串中3.txt

lfree發表於2020-02-18

[20200218]無ENABLE=BROKEN在連線串中3.txt

--//上午測試在連線串中加入與不加入ENABLE=BROKEN的情況,測試有點亂,我下午換1個角度測試:

1.環境:
SCOTT@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

# echo /proc/sys/net/ipv4/tcp_keepalive* | xargs   -n 1  strings -1 -f
/proc/sys/net/ipv4/tcp_keepalive_intvl: 10
/proc/sys/net/ipv4/tcp_keepalive_probes: 4
/proc/sys/net/ipv4/tcp_keepalive_time: 20

2.測試連線串無ENABLE=BROKEN的情況:

$ rlwrap sqlplus  scott/book@"(DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=book)(SERVER = DEDICATED))(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)))"

SCOTT@book> @ spid
       SID    SERIAL# PROCESS                  SERVER    SPID       PID  P_SERIAL# C50
---------- ---------- ------------------------ --------- ------ ------- ---------- --------------------------------------------------
         3        903 51215                    DEDICATED 51217       24         47 alter system kill session '3,903' immediate;

--//可以從這裡確定sqlplus程式號=51215(對應顯示PROCESS),oraclebook程式號=51217(對應顯示SPID).

$ seq 1000 | xargs -IQ bash -c "netstat -npo 2>/dev/null | egrep '51217|51215'| egrep 'oraclebook|sqlplus' ;sleep 1"
--//當前連線正常的情況下
tcp        0      0 127.0.0.1:1521              127.0.0.1:6342              ESTABLISHED 51217/oraclebook    keepalive (0.61/0/0)
tcp        0      0 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       off (0.00/0/0)
tcp        0      0 127.0.0.1:1521              127.0.0.1:6342              ESTABLISHED 51217/oraclebook    keepalive (9.60/0/0)
tcp        0      0 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       off (0.00/0/0)
tcp        0      0 127.0.0.1:1521              127.0.0.1:6342              ESTABLISHED 51217/oraclebook    keepalive (8.58/0/0)
tcp        0      0 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       off (0.00/0/0)
tcp        0      0 127.0.0.1:1521              127.0.0.1:6342              ESTABLISHED 51217/oraclebook    keepalive (7.56/0/0)
tcp        0      0 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       off (0.00/0/0)
tcp        0      0 127.0.0.1:1521              127.0.0.1:6342              ESTABLISHED 51217/oraclebook    keepalive (6.53/0/0)
tcp        0      0 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       off (0.00/0/0)
tcp        0      0 127.0.0.1:1521              127.0.0.1:6342              ESTABLISHED 51217/oraclebook    keepalive (5.51/0/0)
tcp        0      0 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       off (0.00/0/0)
tcp        0      0 127.0.0.1:1521              127.0.0.1:6342              ESTABLISHED 51217/oraclebook    keepalive (4.49/0/0)
tcp        0      0 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       off (0.00/0/0)
tcp        0      0 127.0.0.1:1521              127.0.0.1:6342              ESTABLISHED 51217/oraclebook    keepalive (3.47/0/0)
tcp        0      0 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       off (0.00/0/0)
tcp        0      0 127.0.0.1:1521              127.0.0.1:6342              ESTABLISHED 51217/oraclebook    keepalive (2.45/0/0)
tcp        0      0 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       off (0.00/0/0)
tcp        0      0 127.0.0.1:1521              127.0.0.1:6342              ESTABLISHED 51217/oraclebook    keepalive (1.42/0/0)
tcp        0      0 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       off (0.00/0/0)
tcp        0      0 127.0.0.1:1521              127.0.0.1:6342              ESTABLISHED 51217/oraclebook    keepalive (0.41/0/0)
tcp        0      0 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       off (0.00/0/0)
tcp        0      0 127.0.0.1:1521              127.0.0.1:6342              ESTABLISHED 51217/oraclebook    keepalive (9.40/0/0)
--//注意最後1列。伺服器程式對應的是keepalive,而客戶端程式對應的是off。
# iptables -I INPUT 1 -p tcp --dport 6342 -j REJECT

tcp        0      0 127.0.0.1:1521              127.0.0.1:6342              ESTABLISHED 51217/oraclebook    keepalive (0.07/0/0)
tcp        0      0 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       off (0.00/0/0)
tcp        0      0 127.0.0.1:1521              127.0.0.1:6342              ESTABLISHED 51217/oraclebook    keepalive (9.06/0/1)
tcp        0      0 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       off (0.00/0/0)
tcp        0      0 127.0.0.1:1521              127.0.0.1:6342              ESTABLISHED 51217/oraclebook    keepalive (8.03/0/1)
tcp        0      0 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       off (0.00/0/0)
tcp        0      0 127.0.0.1:1521              127.0.0.1:6342              ESTABLISHED 51217/oraclebook    keepalive (7.01/0/1)
tcp        0      0 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       off (0.00/0/0)
tcp        0      0 127.0.0.1:1521              127.0.0.1:6342              ESTABLISHED 51217/oraclebook    keepalive (5.99/0/1)
tcp        0      0 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       off (0.00/0/0)
tcp        0      0 127.0.0.1:1521              127.0.0.1:6342              ESTABLISHED 51217/oraclebook    keepalive (4.97/0/1)
tcp        0      0 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       off (0.00/0/0)
tcp        0      0 127.0.0.1:1521              127.0.0.1:6342              ESTABLISHED 51217/oraclebook    keepalive (3.94/0/1)
tcp        0      0 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       off (0.00/0/0)
tcp        0      0 127.0.0.1:1521              127.0.0.1:6342              ESTABLISHED 51217/oraclebook    keepalive (2.92/0/1)
tcp        0      0 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       off (0.00/0/0)
tcp        0      0 127.0.0.1:1521              127.0.0.1:6342              ESTABLISHED 51217/oraclebook    keepalive (1.90/0/1)
tcp        0      0 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       off (0.00/0/0)
tcp        0      0 127.0.0.1:1521              127.0.0.1:6342              ESTABLISHED 51217/oraclebook    keepalive (0.88/0/1)
tcp        0      0 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       off (0.00/0/0)
tcp        0      0 127.0.0.1:1521              127.0.0.1:6342              ESTABLISHED 51217/oraclebook    keepalive (9.87/0/2)
tcp        0      0 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       off (0.00/0/0)
tcp        0      0 127.0.0.1:1521              127.0.0.1:6342              ESTABLISHED 51217/oraclebook    keepalive (8.85/0/2)
tcp        0      0 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       off (0.00/0/0)
tcp        0      0 127.0.0.1:1521              127.0.0.1:6342              ESTABLISHED 51217/oraclebook    keepalive (7.83/0/2)
tcp        0      0 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       off (0.00/0/0)
tcp        0      0 127.0.0.1:1521              127.0.0.1:6342              ESTABLISHED 51217/oraclebook    keepalive (6.80/0/2)
tcp        0      0 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       off (0.00/0/0)
tcp        0      0 127.0.0.1:1521              127.0.0.1:6342              ESTABLISHED 51217/oraclebook    keepalive (5.78/0/2)
tcp        0      0 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       off (0.00/0/0)
tcp        0      0 127.0.0.1:1521              127.0.0.1:6342              ESTABLISHED 51217/oraclebook    keepalive (4.76/0/2)
...
tcp        0      0 127.0.0.1:1521              127.0.0.1:6342              ESTABLISHED 51217/oraclebook    keepalive (9.47/0/4)
tcp        0      0 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       off (0.00/0/0)
tcp        0      0 127.0.0.1:1521              127.0.0.1:6342              ESTABLISHED 51217/oraclebook    keepalive (8.45/0/4)
tcp        0      0 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       off (0.00/0/0)
tcp        0      0 127.0.0.1:1521              127.0.0.1:6342              ESTABLISHED 51217/oraclebook    keepalive (7.42/0/4)
tcp        0      0 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       off (0.00/0/0)
tcp        0      0 127.0.0.1:1521              127.0.0.1:6342              ESTABLISHED 51217/oraclebook    keepalive (6.40/0/4)
tcp        0      0 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       off (0.00/0/0)
tcp        0      0 127.0.0.1:1521              127.0.0.1:6342              ESTABLISHED 51217/oraclebook    keepalive (5.38/0/4)
tcp        0      0 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       off (0.00/0/0)
tcp        0      0 127.0.0.1:1521              127.0.0.1:6342              ESTABLISHED 51217/oraclebook    keepalive (4.36/0/4)
tcp        0      0 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       off (0.00/0/0)
tcp        0      0 127.0.0.1:1521              127.0.0.1:6342              ESTABLISHED 51217/oraclebook    keepalive (3.34/0/4)
tcp        0      0 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       off (0.00/0/0)
tcp        0      0 127.0.0.1:1521              127.0.0.1:6342              ESTABLISHED 51217/oraclebook    keepalive (2.31/0/4)
tcp        0      0 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       off (0.00/0/0)
tcp        0      0 127.0.0.1:1521              127.0.0.1:6342              ESTABLISHED 51217/oraclebook    keepalive (1.29/0/4)
tcp        0      0 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       off (0.00/0/0)
tcp        0      0 127.0.0.1:1521              127.0.0.1:6342              ESTABLISHED 51217/oraclebook    keepalive (0.27/0/4)
tcp        0      0 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       off (0.00/0/0)
tcp        0      0 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       off (0.00/0/0)
tcp        0      0 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       off (0.00/0/0)
tcp        0      0 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       off (0.00/0/0)
tcp        0      0 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       off (0.00/0/0)
tcp        0      0 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       off (0.00/0/0)
tcp        0      0 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       off (0.00/0/0)
tcp        0      0 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       off (0.00/0/0)
tcp        0      0 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       off (0.00/0/0)
--//探測4次,每次10秒。oraclebook對應程式號51217消失5。
--//在客戶端執行sql語句:
SCOTT@book> select sysdate from dual ;

--//伺服器程式已經不再了。掛起!!
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (0.10/0/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (0.29/2/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (0.88/3/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (3.10/4/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (2.07/4/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (1.05/4/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (0.03/4/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (5.48/5/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (4.46/5/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (3.43/5/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (2.41/5/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (1.39/5/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (0.37/5/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (12.29/6/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (11.27/6/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (10.24/6/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (9.22/6/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (8.20/6/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (7.18/6/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (6.16/6/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (5.13/6/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (4.11/6/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (3.09/6/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (2.07/6/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (1.04/6/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (0.02/6/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (24.87/7/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (23.85/7/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (22.82/7/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (21.80/7/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (20.78/7/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (19.76/7/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (18.73/7/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (17.71/7/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (16.69/7/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (15.67/7/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (14.64/7/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (13.62/7/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (12.60/7/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (11.58/7/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (10.57/7/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (9.54/7/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (8.52/7/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (7.50/7/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (6.48/7/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (5.46/7/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (4.43/7/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (3.41/7/0)
.....
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (51.09/8/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (50.07/8/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (49.05/8/0)
..
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (0.00/8/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (102.58/9/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (101.56/9/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (100.53/9/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (99.51/9/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (98.49/9/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (97.47/9/0)
...
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (0.38/9/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (119.60/10/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (118.57/10/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (117.55/10/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (116.53/10/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (115.51/10/0)
...
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (1.04/10/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (0.02/10/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (119.30/11/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (118.28/11/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (117.26/11/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (116.24/11/0)
...
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (0.75/11/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (18446744073.44/11/0) ->不知道什麼回事。
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (119.01/12/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (117.99/12/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (116.97/12/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (115.95/12/0)
...
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (0.46/12/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (119.74/13/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (118.72/13/0)
...
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (1.86/13/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (0.84/13/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (18446744073.52/13/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (119.09/14/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (118.07/14/0)
...
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (2.59/14/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (1.57/14/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (0.56/14/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (119.84/15/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (118.82/15/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (117.80/15/0)
...
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (9.46/15/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (8.44/15/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (7.42/15/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (6.40/15/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (5.37/15/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (4.35/15/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (3.33/15/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (2.31/15/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (1.28/15/0)
tcp        0    306 127.0.0.1:6342              127.0.0.1:1521              ESTABLISHED 51215/sqlplus       on (0.26/15/0)
^C
--//可以發現在連線串無ENABLE=BROKEN情況下,服務程式中斷的情況下,要探測15次,開始時間間隔很短,最後時間間隔增加到120秒。
SCOTT@book> select sysdate from dual ;
select sysdate from dual
*
ERROR at line 1:
ORA-03113: end-of-file on communication channel
Process ID: 51217
Session ID: 3 Serial number: 903

總結:
可以看出在連線串中加入ENABLE=BROKEN是不錯的選擇。寫一篇測試使用ENABLE=BROKEN的情況,不然寫的有點長。



來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2676091/,如需轉載,請註明出處,否則將追究法律責任。

相關文章