13-2 Oracle Fusion Middleware Configuring and Managing JDBC Data Sources for Oracle WebLogic Server
13.1.2 Prepared Statement Cache Statistics
You can view run-time statistics for a prepared statement cache via the Administration Console or through the JBCDataSourceRuntimeMBean. For more information, see
JDBCDataSourceRuntimeMBean in the Oracle WebLogic Server MBean Reference.
13.2 Collecting Profile Information
If the statistics that you are seeing indicate that there is a problem in your WebLogic Server domain, you can configure any data source to collect profile information to help
you pinpoint the source of the problem. The collected profile information is stored in records in the WLDF Archive. The fields contain different information for different
profile types, as described in the sections that follow.
When configuring your data source for profiling, you must specify the interval at which profile data is harvested Harvest Frequency Seconds; if the interval is
set to 0, harvesting of data is disabled. For more information, see Configuring the Harvester for Metric Collection in Configuring and Using the Diagnostics Framework for
Oracle WebLogic Server.
13.2.1 Profile Types
You can choose to profile the following information about data sources and the prepared statement cache, as described in the next sections of this document:
■
Connection Usage PROFILE_TYPE_CONN_USAGE_STR
■
Connection Reservation Wait PROFILE_TYPE_CONN_RESV_WAIT_STR
■
Connection Reservation Failed PROFILE_TYPE_CONN_RESV_FAIL_STR
■
Connection Leak PROFILE_TYPE_CONN_LEAK_STR
■
Connection Last Usage PROFILE_TYPE_CONN_LAST_USAGE_STR
■
Connection Multithreaded Usage PROFILE_TYPE_CONN_MT_USAGE_STR
■
Statement Cache Entry PROFILE_TYPE_STMT_CACHE_ENTRY_STR
■
Statements Usage PROFILE_TYPE_STMT_USAGE_STR
13.2.1.1 Connection Usage PROFILE_TYPE_CONN_USAGE_STR
Enable connection usage profiling to collect information about threads currently using connections from the pool of connections in the data source. This profile information
can help determine why applications are unable to get connections from the data source.
The record contains the following information:
■
PoolName - name of the data source to which this connection belongs
■
ID - connection ID
■
User - stack trace of the thread using the connection
Note: By default, enabling connection usage profiling on its own will not
provide a stack trace of the threads using the connections. To obtain this information you must enable profiling of connection leaks in addition to
enabling connection. For more information about profiling connection leaks see
Section 13.2.1.4, Connection Leak PROFILE_TYPE_CONN_LEAK_STR.
Monitoring WebLogic JDBC Resources 13-3
■
Timestamp - time stamp showing when the connection was given to the thread
13.2.1.2 Connection Reservation Wait PROFILE_TYPE_CONN_RESV_WAIT_STR
Enable connection reservation wait profiling to collect information about threads currently waiting to reserve a connection from the data source. This profile
information can help determine why applications are unable to get connections from the data source or to wait for connections. The record contains the following
information:
■
PoolName - name of the data source to which this connection belongs
■
ID - thread ID
■
User - stack trace of the thread waiting for the connection
■
Timestamp - time stamp showing when the thread started waiting for a connection
13.2.1.3 Connection Reservation Failed PROFILE_TYPE_CONN_RESV_FAIL_STR