How to monitor OracleDB ACTIVE/INACTIVE Sessions on WebLogic?

WLSDM for WebLogic
Jan 24, 2019 · 2 min read

WebLogic contains lots of inbox JDBC MBeans to monitor DB transactions. The most important ones are;

  • ActiveConnectionsCurrentCount @ JDBCDataSourceRuntimeMBean
  • ActiveConnectionsAverageCount @ JDBCDataSourceRuntimeMBean
  • WaitingForConnectionCurrentCount @ JDBCDataSourceRuntimeMBean
  • ConnectionDelayTime @ JDBCDataSourceRuntimeMBean
  • FailedReserveRequestCount @ JDBCDataSourceRuntimeMBean
  • LeakedConnectionCount @ JDBCDataSourceRuntimeMBean

These are available on Data Sources dashboard on WLSDM console.

If you are good at Database Administration or want to work close with DBA; Here is a recipe to reflect your DB knowledge to WLSDM dashboards and understand what’s going on at your main DB that WebLogic connects over JDBC driver.

Case: Monitoring ACTIVE/INACTIVE Oracle Database Sessions on WebLogic?

I have prepared a short screencast tutorial about monitoring DB sessions on WebLogic. It can be extended by adding machine, inst_id fields from gv$session and gv$sqlarea.

select  
status, count(*)
from
gv$session
group by status
order by 1

You can use below SQL on Oracle Database for your reference to understand what is going on at your Oracle database then reflect and visualize it on WLSDM dashboards.

select s.inst_id,'alter system kill session'||''''||sid||','||serial#||''''||',@'||s.inst_id||''''||';',q.SQL_ID,q.HASH_VALUE,lower(s.username) ora_user,s.machine,s.sid, s.serial#,q.sql_text, s.event#, s.event,  
q.executions, q.cluster_wait_time, q.plsql_exec_time, q.java_exec_time, q.rows_processed, q.cpu_time, q.elapsed_time,s.osuser
from gv$session s, gv$sqlarea q
where s.status='ACTIVE'
and
q.hash_value = s.sql_hash_value
and q.address = s.sql_address
and s.type!='BACKGROUND'

Watch this short screencast tutorial then understand how to monitor Oracle DB sessions, understand how WebLogic datasource MBeans behave under load? Very useful and educational screencast to understand WebLogic and Oracle Database behavior while working together.

Sreencast GIF File URL: Simply download and share with your team members.
http://blog.wlsdm.com/content/images/2017/06/oracledatabasesessionmonitoringweblogicwlsdmdevops_mbean.gif

Approximately: 40MB GIF File (High Quality Screencast)

Watch Screencast Tutorial and WebLogic/OracleDB Interactions:

WLSDM for WebLogic

Native Oracle WebLogic Monitoring WLSDM is developed by the best WebLogic developers for the best WebLogic administrators to support mission critical HA domains. Supports all plain WebLogic and Fusion Middleware (FMW) WebLogic domains. Download now! https://wlsdm.com/download

WLSDM for WebLogic

Written by

WLSDM for WebLogic

Native Oracle WebLogic Monitoring WLSDM is developed by the best WebLogic developers for the best WebLogic administrators to support mission critical HA domains. Supports all plain WebLogic and Fusion Middleware (FMW) WebLogic domains. Download now! https://wlsdm.com/download

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store