Skip to Main Content
  • Questions
  • Monitoring scripts for Standard Edition

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Vikas.

Asked: January 08, 2019 - 10:31 am UTC

Last updated: January 09, 2019 - 7:48 am UTC

Version: 12c R2 Standard Edition

Viewed 1000+ times

You Asked

Hi Tom

As always thanks in advance.

Environment is 12c R2 SE.

1 -> Need help to build a script to monitor and collect the total execution time of multiple SQL_ID at different intervals of time. Please guide me the views or tables and linking between them.

Checked from v$SQL -- giving average from starting (can do the math of taking out incremental average and calculating from it but still some times giving multiple entries for same SQL.)

DBA_HIST_SQLSTAT empty.

example--
table 1 --> SQL_ID | Timestamp | total_time_taken_to_execute
table 2 --> SQL_ID | Timestamp | no._of_time_executed_in_last_1_hour

or single table

table 1 --> {SQL_ID | start time |end time } in last 1 hour

2 ->Need help to Find out How many times SQL_ID is executed and from which os_user in specific interval of time.

example--

table 3 --> {SQL_ID | start time | os_user } in last 1 hour

3 -> Any script for standard edition which according to you might help in proactive monitoring and performance.Help on 3rd point is highly appreciated.( As I know this question is not worthy of your time )

Regards
Vikas Dixit

with LiveSQL Test Case:

and Connor said...

Look at using v$sqlstats instead of v$sql. Its more efficient and holds data longer.

But rather than building your own stuff, in terms of tools, for SE a popular option is Statspack. It was "obsoleted" by AWR etc by still a very useful suite of utilities.

https://docs.oracle.com/cd/B10501_01/server.920/a96533/statspac.htm#34837

There are also a plethora of free and commercial tools out there. A friend Kyle put a list together a while back - its a little out of date, but a good place to start

http://datavirtualizer.com/best-oracle-performance-tools/

Is this answer out of date? If it is, please let us know via a Comment

More to Explore

Performance

Get all the information about database performance in the Database Performance guide.