user710818
user710818

Reputation: 24248

How in Oracle kill user session silent or reproduce error 17410?

I need to test robustness of my application for problem with network. But I don't have access to network physically. I have only access to Oracle as SYS. Does it possible may be silent kill user session so when application try to get data from connection jdbc driver will generate error 17410 ?

oracle: No more data to read from socket 

When I try to kill session by sid - oracle send alert about killed session and this is not 17410 error.

Upvotes: 1

Views: 1929

Answers (2)

jva
jva

Reputation: 2807

You can raise any error code with PRAGMA EXCEPTION_INIT.

DECLARE
  e_no_more_data EXCEPTION
  pragma exception_init( e_no_more_data , -17410  );
BEGIN
  RAISE e_no_more_data;
END;
/

Don't know if it really simulates the error.

Upvotes: 1

Rajesh Chamarthi
Rajesh Chamarthi

Reputation: 18808

If you have access to only the database and you know the SID and Serial of the session you are trying to kill, you can issue

ALTER SYSTEM KILL SESSION 'sid,serial#';

Check this link for more options.

http://www.oracle-base.com/articles/misc/killing-oracle-sessions.php

Upvotes: 0

Related Questions