SQL DEVELOPER DATABASE REPORT GENERATION

Hi Readers, in this blogpost i am sharing use case of SQL DEVELOPER to generate reports related to database activity –

sql developer version – 21.4.2.018

db version – 12cR2

For example – If we want to monitor inactive/active sessions in real-time and also share report snaps every hour to our team.

QUERY i used to generate/monitor inactive sessions report –

select username,inst_id,count(*)AS INACTIVE_COUNT from gv$session where status=’INACTIVE’ and username NOT IN (‘SYS’,'(null)’) group by username,inst_id order by 3 desc;

select the query in sql developer and right click on it – choose create-report.

Now, fill the details as shown below, choose db connection name on top right and click the green icon near advanced option to verify expected results. Choose the refresh rate in seconds to see real-time values in form of varying bar lengths.

Once you verify report stats, click on apply. This report is saved as user defined report and you can run it quickly for all saved database connections.

To access user-defined reports, click on view and go to reports –

go to user defined reports section –

You can also add title to graph,adjust fonts and bar colors.

To do same, right click on report name and choose edit

Save the report with timestamp in html format –

right click on report name and choose HTML option. specify html file location and click on include timestamp option.

HTML Report snap will generate and saved to local disk as shown below –

You can also name X or Y axis for better understanding –


Leave a comment

Design a site like this with WordPress.com
Get started