Site icon Database Tutorials

Session Statistics

In today’s article, I will be giving you information about active, inactive and other Session Statistics in the database.

Active Session Statistics

1. We can collect active session statistics in the database as follows.

Active – Inactive Session Statistics (Hourly)

1. We can obtain hourly MAX and AVG Session statistics in the database with the query below.

Number of Sessions that are Inactive for a Long Time (1 hour)

1. The number of INACTIVE sessions longer than one hour and the program they came from can be found below.

6 rows selected.

2. INACTIVE sessions detailis more than 1 hour.

Long-running database operations

1. We can list the long-running operations in the database as follows.

2. We can query the estimated time when the running queries will finish by adding another column to the query above.

For example, for RMAN, this query could be as follows.

CPU Usage Of The User

1. Total CPU usage of ACTIVE users in the database can be displayed as follows.

12 rows selected.

Exit mobile version