Re: best way to simulate a lost connection?

From: S R <sr_ng_at_duz.not.exist.com>
Date: Thu, 15 Jan 2009 22:47:51 +0000
Message-ID: <k2Pbl.7191$Wc1.4661_at_newsfe18.ams2>



mh_at_pixar.com wrote:
> This for RAC 10gR2.
>
> I would like to test my client-side application code that deals
> with catching and reporting a lost or broken connection to
> the database.
>
> What's the best way to simulate a connection failure?
> ALTER SYSTEM KILL SESSION '$SID,$SERIAL#' via another process?
> Is there an equivalent command that doesn't need to know
> the RAC node?
>
> Any pointers to other testing considerations appreciated.
>
> Many TIA!
> Mark
>

Looking at it from the other side, the worst problems I think to have land on anyone's desk are to do with investigating connectivity issues. Somehow there is never an easy answer. So, looking at how you might test for these you might want to look at Oracle's metaLink site, search for "connectivity issues" or "Lost contact to oracle" and you should find your way to some sort of trouble-shooting guide which you might possibly be able to use to deliberately break your connectivity (without dismantling your organisation network) so you can do your tests. Besides whenever I've seen these sort of issues, it seems to be limited to Oracle/SQL*Net, i.e. there'll be a particular application getting errors but telnet/ssh sessions are fine, so pulling a cable out or switching off the router might not be representative of what you might actually face (one day), and what you appear to want to test.

As an aside, whilst killing the session might test one sort of "lost" connection scenario, the ones you probably want to test are more network/TCP/RAC related, which are different I think from a straight forward killed session. In other words, I think when you actively kill a session Oracle goes through a certain set of internal procedures to ensure the kill is clean, whereas a sudden connection loss (as with a network loss) may be handled differently. Received on Thu Jan 15 2009 - 16:47:51 CST

Original text of this message