3

Is there an way to simulate a db connection timeout?

I'm encountering problems with a timeouted db connection on a productive system and need to simulate a similar situation.

4

2 回答 2

0

可以模拟的一种方法是直接在数据库中终止连接:

甲骨文:

select * from v$session
where machine like '%machinename%'
order by sid desc

-- SID, SERIAL
alter system kill session '1080,16345'
于 2011-11-30T13:36:11.647 回答
0

尝试连接到不存在的主机或端口,您将获得连接超时。

于 2018-10-31T01:44:11.833 回答