问答文章1 问答文章501 问答文章1001 问答文章1501 问答文章2001 问答文章2501 问答文章3001 问答文章3501 问答文章4001 问答文章4501 问答文章5001 问答文章5501 问答文章6001 问答文章6501 问答文章7001 问答文章7501 问答文章8001 问答文章8501 问答文章9001 问答文章9501

ORA-03135连接失去联系

发布网友 发布时间:2022-05-01 04:42

我来回答

2个回答

懂视网 时间:2022-04-10 15:32

[20180123]测试SQLNET.EXPIRE_TIME参数.txt

--//曾经写过一篇linux内核网络参数测试tcp_keepalive,链接http://blog.itpub.net/267265/viewspace-2138391/
--//测试服务端会定时发起连接监测与client的连接状态.

参数解析:
/proc/sys/net/ipv4/tcp_keepalive_time    当keepalive起用的时候,TCP发送keepalive消息的频度。默认是2小时。
/proc/sys/net/ipv4/tcp_keepalive_intvl   当探测没有确认时,keepalive探测包的发送间隔。缺省是75秒。
/proc/sys/net/ipv4/tcp_keepalive_probes  如果对方不予应答,keepalive探测包的发送次数。缺省值是9。

--//我发现我遗漏的一种情况的测试,使用SQLNET.EXPIRE_TIME参数,这个参数与前面的内核参数意思差不多.定时监测服务端与客户端连
--//接情况.但是注意这种测试是有服务端发起,一些状态防火墙不允许这样的包通过,我们的分院与总院正好有这样的环境,不知道是否网管
--//配置错误,正好利用这个环境测试看看.主要目的测试设置SQLNET.EXPIRE_TIME情况下,如果无法连上client,是否探测多次,间隔时间是多少.
--//知道这些数值对于理解我遇到的一个问题帮助很大,另发文写一篇blog.

1.环境:
--//服务端IP:192.168.100.106
--//客户端IP:192.168.90.14
--//服务端:
# echo /proc/sys/net/ipv4/tcp_keepalive* | xargs   -n 1  strings -1 -f
/proc/sys/net/ipv4/tcp_keepalive_intvl: 75
/proc/sys/net/ipv4/tcp_keepalive_probes: 9
/proc/sys/net/ipv4/tcp_keepalive_time: 7200

--//客户端
# 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: 200

--//在sqlnet.ora文件中配置
sqlnet.expire_time = 5

2.测试:
--//客户端使用sqlplus连接数据库:
xxxxx>
SELECT s.sid, s.serial#, s.process, s.server, p.spid, p.pid, p.serial# p_serial#,‘alter system kill session
       ‘‘‘||s.sid||‘,‘||s.serial#||‘‘‘‘||‘ immediate;‘ c50
  FROM v$session s, v$process p
 WHERE s.sid in (
        SELECT sid
          FROM v$mystat
 WHERE rownum  = 1)
   AND s.paddr = p.addr;

       SID    SERIAL# PROCESS                  SERVER    SPID       PID  P_SERIAL# C50
---------- ---------- ------------------------ --------- ------ ------- ---------- --------------------------------------------------
      6656      50071 22214                    DEDICATED 6980        69        200 alter system kill session ‘6656,50071‘ immediate;

--//确定服务端进程号=6980
--//服务端:
# lsof -i -P -n | grep "6980 oracle"
oracle      6980 oracle    8u  IPv4 3826220323      0t0  UDP 127.0.0.1:58395
oracle      6980 oracle   14u  IPv4 3826216194      0t0  UDP 127.0.0.1:58118
oracle      6980 oracle   18u  IPv4 3826173598      0t0  TCP 192.168.100.106:1521->192.168.90.14:41203 (ESTABLISHED)

--//确定client的端口号41203.

# tcpdump -i bondeth0 host 192.168.90.15 and port 41203 -nn -vv
tcpdump: listening on bondeth0, link-type EN10MB (Ethernet), capture size 96 bytes

--//客户端执行一些sql语句以后:
xxxxx> select sysdate from dual ;
SYSDATE
-------------------
2018-01-23 11:52:58

--//客户端打开监测:(注意网络接口不要选择错误!!我测试环境是是bond1):
# tcpdump -i bond1 host 192.168.90.14 and port 41203 -nn -vv
tcpdump: listening on bond1, link-type EN10MB (Ethernet), capture size 65535 bytes
...

--//服务端打开监测:
# tcpdump -i bondeth0 host 192.168.90.14 and port 41203 -nn -vv
tcpdump: listening on bondeth0, link-type EN10MB (Ethernet), capture size 96 bytes
11:52:58.146050 IP (tos 0x0, ttl  61, id 37349, offset 0, flags [DF], proto: TCP (6), length: 346) 192.168.90.14.41203 > 192.168.100.106.1521: P 64396777:64397083(306) ack 1905633603 win 368
11:52:58.146419 IP (tos 0x0, ttl  64, id 25005, offset 0, flags [DF], proto: TCP (6), length: 418) 192.168.100.106.1521 > 192.168.90.14.41203: P 1:379(378) ack 306 win 330
11:52:58.147109 IP (tos 0x0, ttl  61, id 37350, offset 0, flags [DF], proto: TCP (6), length: 40) 192.168.90.14.41203 > 192.168.100.106.1521: ., cksum 0x0860 (correct), 306:306(0) ack 379 win 386
11:52:58.148255 IP (tos 0x0, ttl  61, id 37351, offset 0, flags [DF], proto: TCP (6), length: 61) 192.168.90.14.41203 > 192.168.100.106.1521: P, cksum 0xe25b (correct), 306:327(21) ack 379 win 386
11:52:58.148361 IP (tos 0x0, ttl  64, id 25006, offset 0, flags [DF], proto: TCP (6), length: 212) 192.168.100.106.1521 > 192.168.90.14.41203: P 379:551(172) ack 327 win 330
11:52:58.188314 IP (tos 0x0, ttl  61, id 37352, offset 0, flags [DF], proto: TCP (6), length: 40) 192.168.90.14.41203 > 192.168.100.106.1521: ., cksum 0x078d (correct), 327:327(0) ack 551 win 404
---//等待看看:
--//因为网关配置成状态防火墙的形式,从服务端发起的连接都会被拒接..等看看.
--//已经过了200秒,说明client的内核参数tcp_keepalive_*对于连接的服务端无用.也就是client不会主动发起连接测试.
12:07:20.096941 IP (tos 0x0, ttl  64, id 25007, offset 0, flags [DF], proto: TCP (6), length: 50) 192.168.100.106.1521 > 192.168.90.14.41203: P, cksum 0x3fee (incorrect (-> 0x01ab), 551:561(10) ack 327 win 330
12:07:20.311391 IP (tos 0x0, ttl  64, id 25008, offset 0, flags [DF], proto: TCP (6), length: 50) 192.168.100.106.1521 > 192.168.90.14.41203: P, cksum 0x3fee (incorrect (-> 0x01ab), 551:561(10) ack 327 win 330
12:07:20.742391 IP (tos 0x0, ttl  64, id 25009, offset 0, flags [DF], proto: TCP (6), length: 50) 192.168.100.106.1521 > 192.168.90.14.41203: P, cksum 0x3fee (incorrect (-> 0x01ab), 551:561(10) ack 327 win 330
12:07:21.604392 IP (tos 0x0, ttl  64, id 25010, offset 0, flags [DF], proto: TCP (6), length: 50) 192.168.100.106.1521 > 192.168.90.14.41203: P, cksum 0x3fee (incorrect (-> 0x01ab), 551:561(10) ack 327 win 330
12:07:23.328394 IP (tos 0x0, ttl  64, id 25011, offset 0, flags [DF], proto: TCP (6), length: 50) 192.168.100.106.1521 > 192.168.90.14.41203: P, cksum 0x3fee (incorrect (-> 0x01ab), 551:561(10) ack 327 win 330
12:07:26.777395 IP (tos 0x0, ttl  64, id 25012, offset 0, flags [DF], proto: TCP (6), length: 50) 192.168.100.106.1521 > 192.168.90.14.41203: P, cksum 0x3fee (incorrect (-> 0x01ab), 551:561(10) ack 327 win 330
12:07:33.672394 IP (tos 0x0, ttl  64, id 25013, offset 0, flags [DF], proto: TCP (6), length: 50) 192.168.100.106.1521 > 192.168.90.14.41203: P, cksum 0x3fee (incorrect (-> 0x01ab), 551:561(10) ack 327 win 330
12:07:47.448449 IP (tos 0x0, ttl  64, id 25014, offset 0, flags [DF], proto: TCP (6), length: 50) 192.168.100.106.1521 > 192.168.90.14.41203: P, cksum 0x3fee (incorrect (-> 0x01ab), 551:561(10) ack 327 win 330
12:08:15.032451 IP (tos 0x0, ttl  64, id 25015, offset 0, flags [DF], proto: TCP (6), length: 50) 192.168.100.106.1521 > 192.168.90.14.41203: P, cksum 0x3fee (incorrect (-> 0x01ab), 551:561(10) ack 327 win 330
12:09:10.136405 IP (tos 0x0, ttl  64, id 25016, offset 0, flags [DF], proto: TCP (6), length: 50) 192.168.100.106.1521 > 192.168.90.14.41203: P, cksum 0x3fee (incorrect (-> 0x01ab), 551:561(10) ack 327 win 330
12:11:00.472405 IP (tos 0x0, ttl  64, id 25017, offset 0, flags [DF], proto: TCP (6), length: 50) 192.168.100.106.1521 > 192.168.90.14.41203: P, cksum 0x3fee (incorrect (-> 0x01ab), 551:561(10) ack 327 win 330
12:13:00.792400 IP (tos 0x0, ttl  64, id 25018, offset 0, flags [DF], proto: TCP (6), length: 50) 192.168.100.106.1521 > 192.168.90.14.41203: P, cksum 0x3fee (incorrect (-> 0x01ab), 551:561(10) ack 327 win 330
12:15:01.112403 IP (tos 0x0, ttl  64, id 25019, offset 0, flags [DF], proto: TCP (6), length: 50) 192.168.100.106.1521 > 192.168.90.14.41203: P, cksum 0x3fee (incorrect (-> 0x01ab), 551:561(10) ack 327 win 330
12:17:01.432397 IP (tos 0x0, ttl  64, id 25020, offset 0, flags [DF], proto: TCP (6), length: 50) 192.168.100.106.1521 > 192.168.90.14.41203: P, cksum 0x3fee (incorrect (-> 0x01ab), 551:561(10) ack 327 win 330
12:19:01.752399 IP (tos 0x0, ttl  64, id 25021, offset 0, flags [DF], proto: TCP (6), length: 50) 192.168.100.106.1521 > 192.168.90.14.41203: P, cksum 0x3fee (incorrect (-> 0x01ab), 551:561(10) ack 327 win 330
12:21:02.072411 IP (tos 0x0, ttl  64, id 25022, offset 0, flags [DF], proto: TCP (6), length: 50) 192.168.100.106.1521 > 192.168.90.14.41203: P, cksum 0x3fee (incorrect (-> 0x01ab), 551:561(10) ack 327 win 330

--//在出现以上数据包过程中,在服务端执行如下:
--//服务器:
# netstat -otun | egrep ‘Active|Proto|192.168.90.14:41203‘
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       Timer
tcp        0     10 192.168.100.106:1521        192.168.90.14:41203         ESTABLISHED on (52.68/10/0)
..
# netstat -otun | egrep ‘Active|Proto|192.168.90.14:41203‘
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       Timer
tcp        0     10 192.168.100.106:1521        192.168.90.14:41203         ESTABLISHED on (103.27/12/0)

# netstat -otun | egrep ‘Active|Proto|192.168.90.14:41203‘
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       Timer
tcp        0     10 192.168.100.106:1521        192.168.90.14:41203         ESTABLISHED on (90.45/12/0)

# netstat -otun | egrep ‘Active|Proto|192.168.90.14:41203‘
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       Timer
tcp        0     20 192.168.100.106:1521        192.168.90.14:41203         ESTABLISHED on (18446744073.51/14/0)
--//中间不知道为什么冒出这个大的值.
# netstat -otun | egrep ‘Active|Proto|192.168.90.14:41203‘
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       Timer
tcp        0     20 192.168.100.106:1521        192.168.90.14:41203         ESTABLISHED on (72.29/15/0)

...
# netstat -otun | egrep ‘Active|Proto|192.168.90.14:41203‘
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       Timer
--//这时连接已经断开在服务端.

--//说明关于netstat -o 参数的解析参考连接:http://blog.itpub.net/267265/viewspace-2138396/
--//The interpretation of field is, first field = timer countdown value, second field = no. of retransmissions,
--//third field = number of keepalive probes sent.
--//可以发现前面的第1字段逐渐减少,而第2字段增加后,第1字段重新记录.

--//客户端:
# netstat -otun | egrep ‘Active|Proto|192.168.90.14:41203‘
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       Timer
tcp        0      0 192.168.90.14:41203         192.168.100.106:1521        ESTABLISHED off (0.00/0/0)

# netstat -otun | egrep ‘Active|Proto|192.168.90.14:41203‘
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       Timer
tcp        0      0 192.168.90.14:41203         192.168.100.106:1521        ESTABLISHED off (0.00/0/0)

# netstat -otun | egrep ‘Active|Proto|192.168.90.14:41203‘
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       Timer
tcp        0      0 192.168.90.14:41203         192.168.100.106:1521        ESTABLISHED off (0.00/0/0)
--//而客户端的连接还在.

--//客户端,在客户端监测:
tcpdump: listening on bond1, link-type EN10MB (Ethernet), capture size 65535 bytes
...
12:27:17.961544 IP (tos 0x0, ttl 64, id 37353, offset 0, flags [DF], proto TCP (6), length 346) 192.168.90.14.41203 > 192.168.100.106.1521: Flags [P.], cksum 0x4116 (incorrect -> 0xfb4b), seq 64397104:64397410, ack 1905634153, win 404, length 306
12:27:18.166180 IP (tos 0x0, ttl 64, id 37354, offset 0, flags [DF], proto TCP (6), length 346) 192.168.90.14.41203 > 192.168.100.106.1521: Flags [P.], cksum 0x4116 (incorrect -> 0xfb4b), seq 0:306, ack 1, win 404, length 306
12:27:18.576173 IP (tos 0x0, ttl 64, id 37355, offset 0, flags [DF], proto TCP (6), length 346) 192.168.90.14.41203 > 192.168.100.106.1521: Flags [P.], cksum 0x4116 (incorrect -> 0xfb4b), seq 0:306, ack 1, win 404, length 306
12:27:19.396154 IP (tos 0x0, ttl 64, id 37356, offset 0, flags [DF], proto TCP (6), length 346) 192.168.90.14.41203 > 192.168.100.106.1521: Flags [P.], cksum 0x4116 (incorrect -> 0xfb4b), seq 0:306, ack 1, win 404, length 306
12:27:21.036150 IP (tos 0x0, ttl 64, id 37357, offset 0, flags [DF], proto TCP (6), length 346) 192.168.90.14.41203 > 192.168.100.106.1521: Flags [P.], cksum 0x4116 (incorrect -> 0xfb4b), seq 0:306, ack 1, win 404, length 306
12:27:24.316166 IP (tos 0x0, ttl 64, id 37358, offset 0, flags [DF], proto TCP (6), length 346) 192.168.90.14.41203 > 192.168.100.106.1521: Flags [P.], cksum 0x4116 (incorrect -> 0xfb4b), seq 0:306, ack 1, win 404, length 306
12:27:30.876176 IP (tos 0x0, ttl 64, id 37359, offset 0, flags [DF], proto TCP (6), length 346) 192.168.90.14.41203 > 192.168.100.106.1521: Flags [P.], cksum 0x4116 (incorrect -> 0xfb4b), seq 0:306, ack 1, win 404, length 306
12:27:43.996189 IP (tos 0x0, ttl 64, id 37360, offset 0, flags [DF], proto TCP (6), length 346) 192.168.90.14.41203 > 192.168.100.106.1521: Flags [P.], cksum 0x4116 (incorrect -> 0xfb4b), seq 0:306, ack 1, win 404, length 306
12:28:10.236177 IP (tos 0x0, ttl 64, id 37361, offset 0, flags [DF], proto TCP (6), length 346) 192.168.90.14.41203 > 192.168.100.106.1521: Flags [P.], cksum 0x4116 (incorrect -> 0xfb4b), seq 0:306, ack 1, win 404, length 306
12:29:02.716433 IP (tos 0x0, ttl 64, id 37362, offset 0, flags [DF], proto TCP (6), length 346) 192.168.90.14.41203 > 192.168.100.106.1521: Flags [P.], cksum 0x4116 (incorrect -> 0xfb4b), seq 0:306, ack 1, win 404, length 306
12:30:47.676172 IP (tos 0x0, ttl 64, id 37363, offset 0, flags [DF], proto TCP (6), length 346) 192.168.90.14.41203 > 192.168.100.106.1521: Flags [P.], cksum 0x4116 (incorrect -> 0xfb4b), seq 0:306, ack 1, win 404, length 306
12:32:47.677461 IP (tos 0x0, ttl 64, id 37364, offset 0, flags [DF], proto TCP (6), length 346) 192.168.90.14.41203 > 192.168.100.106.1521: Flags [P.], cksum 0x4116 (incorrect -> 0xfb4b), seq 0:306, ack 1, win 404, length 306
12:34:47.676459 IP (tos 0x0, ttl 64, id 37365, offset 0, flags [DF], proto TCP (6), length 346) 192.168.90.14.41203 > 192.168.100.106.1521: Flags [P.], cksum 0x4116 (incorrect -> 0xfb4b), seq 0:306, ack 1, win 404, length 306
12:36:47.676446 IP (tos 0x0, ttl 64, id 37366, offset 0, flags [DF], proto TCP (6), length 346) 192.168.90.14.41203 > 192.168.100.106.1521: Flags [P.], cksum 0x4116 (incorrect -> 0xfb4b), seq 0:306, ack 1, win 404, length 306
12:38:47.676172 IP (tos 0x0, ttl 64, id 37367, offset 0, flags [DF], proto TCP (6), length 346) 192.168.90.14.41203 > 192.168.100.106.1521: Flags [P.], cksum 0x4116 (incorrect -> 0xfb4b), seq 0:306, ack 1, win 404, length 306
12:40:47.676464 IP (tos 0x0, ttl 64, id 37368, offset 0, flags [DF], proto TCP (6), length 346) 192.168.90.14.41203 > 192.168.100.106.1521: Flags [P.], cksum 0x4116 (incorrect -> 0xfb4b), seq 0:306, ack 1, win 404, length 306

--//同时在客户端执行sql命令:
xxxxx> select sysdate from dual ;
--//挂起..由于服务端连接已经不存在了,最后报如下错误:
*
ERROR at line 1:
ORA-03113: end-of-file on communication channel
Process ID: 6980
Session ID: 6656 Serial number: 50071


--//客户端:
# netstat -otun | egrep ‘Active|Proto|192.168.90.14:41203‘
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       Timer
tcp        0    306 192.168.90.14:41203         192.168.100.106:1521        ESTABLISHED on (6.85/7/0)

# netstat -otun | egrep ‘Active|Proto|192.168.90.14:41203‘
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       Timer
tcp        0    306 192.168.90.14:41203         192.168.100.106:1521        ESTABLISHED on (13.09/9/0)

# netstat -otun | egrep ‘Active|Proto|192.168.90.14:41203‘
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       Timer

--//可以看到timer列后面的变化..看到的情况与服务器前面的情况一样.

3.分析时间变化:

12:07:20.096941
11:52:58.188314
--//间隔15*60+20-58 = 862秒,为什么不是SQLNET.EXPIRE_TIME*2分钟=5*2*60 = 600秒呢?

create table t ( a timestamp);
insert into t values (‘2018-01-23 12:07:20.096941‘);
insert into t values (‘2018-01-23 12:07:20.311391‘);
insert into t values (‘2018-01-23 12:07:20.742391‘);
insert into t values (‘2018-01-23 12:07:21.604392‘);
insert into t values (‘2018-01-23 12:07:23.328394‘);
insert into t values (‘2018-01-23 12:07:26.777395‘);
insert into t values (‘2018-01-23 12:07:33.672394‘);
insert into t values (‘2018-01-23 12:07:47.448449‘);
insert into t values (‘2018-01-23 12:08:15.032451‘);
insert into t values (‘2018-01-23 12:09:10.136405‘);
insert into t values (‘2018-01-23 12:11:00.472405‘);
insert into t values (‘2018-01-23 12:13:00.792400‘);
insert into t values (‘2018-01-23 12:15:01.112403‘);
insert into t values (‘2018-01-23 12:17:01.432397‘);
insert into t values (‘2018-01-23 12:19:01.752399‘);
insert into t values (‘2018-01-23 12:21:02.072411‘);
commit;

column interval format 00000.999999

WITH x
     AS (SELECT a - n_a interval
           FROM (  SELECT a, LAG (a) OVER (ORDER BY a) n_a
                     FROM t
                 ORDER BY a)
          WHERE n_a IS NOT NULL)
SELECT   EXTRACT (DAY FROM interval) * 86400
       + EXTRACT (HOUR FROM interval) * 3600
       + EXTRACT (MINUTE FROM interval) * 60
       + EXTRACT (SECOND FROM interval)
          interval
  FROM x;
 
     INTERVAL
-------------
 00000.214450
 00000.431000
 00000.862001
 00001.724002
 00003.449001
 00006.894999
 00013.776055
 00027.584002
 00055.103954
 00110.336000    
 00120.319995
 00120.320003
 00120.319994
 00120.320002
 00120.320012
15 rows selected.

--//开始间隔0.21秒,以后间隔2倍递增.到110秒后,按照120秒间隔.另外一组数据测试如下,结果惊人的相似.

     INTERVAL
-------------
 00000.204636
 00000.409993
 00000.819981
 00001.639996
 00003.280016
 00006.560010
 00013.120013
 00026.239988
 00052.480256
 00104.959739
 00120.001289
 00119.998998
 00119.999987
 00119.999726
 00120.000292
15 rows selected.

--//最大与最小的间隔
WITH x AS (SELECT MAX (a) - MIN (a) interval FROM t)
SELECT SUM
       (
            EXTRACT (DAY FROM interval) * 86400
          + EXTRACT (HOUR FROM interval) * 3600
          + EXTRACT (MINUTE FROM interval) * 60
          + EXTRACT (SECOND FROM interval)
       )
          interval_sum
  FROM x;

INTERVAL_SUM
------------
   809.71492   <== client测试的结果    

INTERVAL_SUM
------------
   821.97547   <== 服务端测试结果.

--//换一句话讲,如果client端不kill掉,大约需要81X 秒才退出出现提示符号.

--//我这里测试服务端请求认证后的情况,这时服务器连接已经断开,如果在确认期间,客户端执行命令呢? 会发生什么情况呢?看下一篇blog.
--//也许你抱怨无法模拟以上测试,实际上很简单在服务端使用tmux,screen打开会话(这样网络断开,命令可以一直在运行),再执行以上命
--//令,在客户端执行sql语句后,拔掉网线,等待足够的时间就能模拟我的测试结果.

[20180123]测试SQLNET.EXPIRE_TIME参数.txt

标签:利用   rac   lte   nic   inux   timestamp   list   roc   creat   

热心网友 时间:2022-04-10 12:40

由于该错误只在夜间主库做备份的时候发生,加上带宽因素,起先没有考虑处理问题.但在查看了日志里收藏的其他两篇文章后,发现该问题即使对异地standby也是有可能解决的.文中提到在standby的sqlnet.ora文件中设置SQLNET.EXPIRE_TIME参数,用来保持primary与standby的连接.按照这个提示,在异地standby上设置SQLNET.EXPIRE_TIME=10.重新启动listner.经过几天的的观察,错误没有再发生.

SQLNET.EXPIRE_TIME:

参数出处:

$ORACLE_HOME/network/admin/sqlnet.ora -> expire_time

时间单位:

分钟

取值范围:

大于0

默认取值:



用途解释:

死联接检测DCD(Dead Connection Detection)是 SQL*NetV2.1 和此版本以后的一个新特性, 当它检测到对方 c/s 或者s/s 联接意外终止时, 释放相关占用的资源。

DCD 起初是专为客户机没有从会话中断开联接的情况下断电的环境设计的。

DCD由服务端开始建立联接。 这时候SQL*Net 从参数文件中读取变量, 设置一个定时器定时产生信号。 这个时间间隔是sqlnet.ora文件中的SQLNET.EXPIRE_TIME提供的。

当定时器设定的时间到了之后, 服务器上的SQL*Net 发送一个探测包到客户端。(如果是数据库联接, 目的端的服务器发送探测包到另一端)。 探测包是由空的SQL*Net包组成, 不体现SQL*Net层任何数据, 但会在下一层的网络协议中产生数据流量。

如果客户端的联接仍然是活动的, 探测包被丢弃,计时装置复位。 如果客户端异常断掉,服务器将收到由发送探测包的调用发出的错误。

参考资料:http://2005yijian.blog.163.com/blog/static/48949052008127102444995/

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com
灵显的意思是什么 安国药王庙结构 显灵宫建筑构造 煤炭储量储量计算 大容量塑料水杯可以用开水烫吗 大容量塑料水杯能不能用开水烫 辽宁朝阳一日游去哪里比较好 ...电脑打开后出现一个对话框影响正常开机不知道怎样解决 哪些可以关掉,这些英文是什么意思? 企业应对网络舆情攻略:10个危机公关应对策略,有效解决 兔宝宝石氏名字寓意好字 我仪器上出现ORA-01033: ORACLE initialization or shutdown in progress提示, ...initialization or shutdown in progress 解决方法,求解... 请教~出现错误提示:ora-01033:oracle initialization or shutdown in... ...并报正在连接...ORA-01033: 。。。您有什么办法给解决下_百度... 使命召唤online怎么查询KDA? ORA-01033: ORACLE initialization or shutdown in progress 使命召唤生涯中战斗数据依据的是什么? 腾讯游戏助手,使命召唤online里面,KDA值的曲线横轴代表什么? 王者荣耀KDA多少为正常 使命召唤ol的帧数75至90正常吗 使命召唤6多少帧数算流畅? 使命召唤OL你们战力是多少 使命召唤手游为什么Kd值越打越低? 英雄联盟里KDA多少算正常? csgo的kda多少正常 《英雄联盟》KDA多少算正常 女朋友说三年又三年我感觉你对我都不重视,女朋友这些话是暗示我吗女朋友28我25? cod17kd多少算高 我叫异地女朋友等我五年了女朋友也答应了我女朋友已经等了我两年多了女朋友却说三年又三年我感觉? 我叫 横琴裕甄投资基金合伙企业(有限合伙)怎么样? 数据库报错ORA-01013 ora-00054: 资源正忙, 但指定以 nowait 方式获取资源如何解决 小米5的5g wifi只有几十兆 小米5的wifi真的很差吗 小米5的WIFI信号真的好差,有跟我一样的吗 〖小米5〗最近连接wifi网速变得很慢是怎么 小米5的wifi为什么这么辣鸡 小米5的WiFi信号为什么那么弱 小米5最近连接wifi网速变得很慢是怎么回事? 小米5wifi信号很差 为什么小米5的wifi信号不稳定? 〖小米5〗讲道理,为什么我手机WIFI网速特别慢 红米旗舰机是什么? 美的电饭煲会粘锅吗? ORACLE怎样把字符串转成时间格式 跪求好心人分享炫彩电脑优化软件 V2.3.7 绿色版软件免费百度云资源 PEONKSE厨房电器的电饭锅会不会粘锅啊? 我想买点理财产品,但不太懂理财,想要个好点的理财方案,大家可以给我推荐一下吗? 手里有点闲钱想买理财,但是理财产品太多了不知道如何选择怎么办? 想问一下绿色下载的软件是什么意思?荒野行动pc是绿色下载的吗?就是那种不依赖注册表的软件它是吗