Tuesday 21 January 2014

ORA-03114: not connected to ORACLE

There are multiple scenarios that cause this error. Check the following list of solutions:

1. Verify there is no firewall or router setting which terminates connections which are active for longer than x minutes.

2. Verify there is no firewall or router setting which terminates connections which are idle for longer than x minutes.

3. Verify the Oracle configuration. Let the database send a packet every x minutes, so that the firewall, router, etc does not close the connection due to being 'idle'.
1. The Oracle documentation lists the following details for the  sqlnet.ora parameter: SQLNET.EXPIRE_TIME

Purpose:
Use parameter SQLNET.EXPIRE_TIME to specify the time interval, in minutes, to send a probe to verify that client/server connections are active. Setting a value greater than 0 ensures that connections are not left open indefinitely, due to an abnormal client termination. If the probe finds a terminated connection, or a connection that is no longer in use, it returns an error, causing the server process to exit. This parameter is primarily intended for the database server, which typically handles multiple connections at any one time.
Limitations on using this terminated connection detection feature are:
 
- It is not allowed on bequeathed connections.
 
- Though very small, a probe packet generates additional traffic that may downgrade network performance.
 
- Depending on which operating system is in use, the server may need to perform additional processing to distinguish the connection probing event from other events that occur. This can also result in degraded network performance.

Default:  0
Minimum Value: 0
Recommended Value: 10
Example:
SQLNET.EXPIRE_TIME=10
Perform the following test:
  • Stop your Oracle database instance
  • Edit the $ORACLE_HOME/network/admin/sqlnet.ora file and add SQLNET.EXPIRE_TIME=3
  • Restart the Oracle database instance
  • Do a full connect with the Oracle WP driver via ODBCTest as SYSTEM/MANAGER
  • Execute the following stored procedure: {call dbms_lock.sleep(3000)} (sleeps for 50 minutes). Adapt the value to your needs.
2. Check the Oracle setting connection idle time limit.
  • This can be set in the Oracle Enterprise Manager Console.
  • Select the database you are using and click down to the "security\profile\\idle time".
  • Setting this to something lower than 60 minutes will cause the user to be disconnected after that XX minutes of inactivity.

No comments:

Post a Comment