Thursday, August 25, 2016

ORA-03114 and ORA-03137

Oracle Version: 11.2.0.1
Client sessions disconnected due to error "ORA-03114: Not Connected to Oracle".
In Alert log ORA-03137 is detected: "ORA-03137: TTC protocol internal error : [12333] [8] [57] [48] [] [] [] [] ".


This has been reported in unpublished bug:8625762 ORA-3137 [12333] due to bind data not read from wire, in which case ORA-3137 [12333] can occur intermittently for SQL which uses user binds due to bind data being left unread on the Net connection.

The bug suggests the workaround of setting "_optim_peek_user_binds"=false to avoid this problem (workaround to be used with caution as it can affect execution plans chosen by CBO).

In order not to change the setting on system wide to avoid execution plan changing for other users, can create a logon trigger for affected users sessions only:
CREATE OR REPLACE TRIGGER SET_PEEKUSERBINDS_ONLOGIN AFTER LOGON ON DATABASE
DECLARE
uname VARCHAR2(30);
app VARCHAR2(30);
cmmd VARCHAR2(64);
BEGIN
cmmd:='alter session set "_OPTIM_PEEK_USER_BINDS"=FALSE';
uname:=SYS_CONTEXT('USERENV','SESSION_USER');
app := upper(SYS_CONTEXT('USERENV','MODULE'));
IF uname = 'USERNAME' then
   EXECUTE IMMEDIATE cmmd;
END IF;
EXCEPTION
WHEN OTHERS THEN
NULL;
END;
/

No comments:

Post a Comment