Some performance issues can be related to an excessive amount of database connections. The following areas can be checked to adjust the number of Oracle Database connections from E1.
1- Using different server names for the same Oracle database TNS name (ERPPD).
Using a different server name will cause additional, unnecessary connections. The server name and TNS names must both match, in a case-sensitive compare, before JDB will re-use an existing connection.
Within the “Work With Data Sources” application, if the “Data Source Use” is “DB” (not “SVR”), and the “Data Source Type” is “O” (for Oracle), then, for each occurrence of a specific “TNS/ODBC/JDBNET Data Source” value, it should repeat the same “Server Name” value.
The easiest way accomplish this during setup, is to use the server name where the Oracle database is located. If there are multiple server pathways to get to the same database, they should arbitrarily pick one, and use it consistently. The EnterpriseOne code passes the TNS name to Oracle, but not the server name, so Oracle will use the server path that is configured in the Oracle TNSNAMES.ORA file (or Oracle Names Server, if used).
The same TNS and server names should be used in the JDE.INI files, as those that are shown in the “Work With Data Sources” application. Under “[DB SYSTEM SETTINGS]“, the .INI “Database=” is the same value as the “TNS/ODBC/JDBNET Data Source” value in the app, and the .INI “Server=” is the same value as the “Server Name” value in the app.
2- OracleServerHandleReuse - Jde.ini setting
This JDE.INI setting is no longer used. The Oracle server handles are no longer used for multiple connections. Although it is supposed to be a performance benefit to re-use the server handles, the Oracle database does not do sufficient locking to prevent conflicts between connections on the same server handle.The conflicts can show up under very high database usage, and only from a few applications.
In cases where the above has been looked at and still is considered that there are too many connections to the DB per user here are some recommendations:
a) Timer Initiated Disconnect or Dead Connection Detection (SQL*Net release 2.1 and later only).
Dead connection detection is a feature that allows SQL*Net to identify connections that have been left hanging by the abnormal termination of a client. On a connection with Dead Connection Detection enabled, a small probe packet is sent from server to client at a user-defined interval (usually several minutes). If the connection is invalid (usually due to the client process or machine being unreachable), the connection will be closed when an error is generated by the send operation, and the server process will exit.
This feature minimizes the waste of resources by connections that are no longer valid. It also automatically forces a database rollback of uncommitted transactions and locks held by the user of the broken connection.
Specify the SQLNET.EXPIRE_TIME=n parameter in your SQLNET.ORA file (usually in $ORACLE_HOME/network/admin). This parameter will instruct SQL*Net to send a probe through the network to the client every n minutes, if the client doesn’t respond, it will be killed.
NOTE: This parameter is only useful on the database server side, specifying it on a client workstation will have no effect.
b) JDBJ.INI maxConnections. JAS specific
maxConnection parameter in the jdbj.ini
This value is the total number of db connections for dbusers per data source. Additional database connection requests beyond this value will be queued for the next available connection. If this value is exceeded, the user request will fail generating JDBC errors in the jas.log.This value can also be monitored in SAW on the statistics tab, connection utilization. A connection pool hit ratio approaching 100% is optimum and indicates that most of the connections are serviced from the pool. Set the value to the maximum number of JDBC database connections you want to allow for the system.Default is 50. Begin with a ratio of 4 users per connection and adjust from there. User characteristics will influence this parameter.
Sample of the jdbj.ini section
[JDBj-CONNECTION POOL]
minConnection=5
maxConnection=50
initialConnection=5
poolGrowth=5
c) Run a script on the database server, each node with incoming connections grouped by
1) db user
2) program
3) machine name
Scripts:
select username, count(*)
from v$session
group by username;
select machine count(*)
from v$session
group by machine;
select program, count(*)
from v$session
group by program;
this way we can find out whats the source of incoming connections and forward this to developers to take corrective steps if there’s a need for it.
d) JDBJ.INI resultSet. JAS specific resultSet parameter in the jdbj.ini
Increasing the ResultSet timeout will cause the connection to stay dedicated to the given user, which means that connections are not able to be shared between users and it results in new connections to Database.
In no case should the resultSet be more than 2 minutes,
When the resultSet expires the user gets a warning that they have to press Find again to renew the Grid resultSet
e) Number of Database Proxy Users and DataSources
A Database Connection Pool is keyed off Proxy User and DataSource, so if we have a high number of Proxy user /Datasource combinations it will result in as many Database Connection Pools. Connections to Database cannot be shared across Connection Pools which results in higher number of Connections to Database.