项目作者: jonheller1

项目描述 :
Oracle SQL query to display database activity.
高级语言: PLSQL
项目地址: git://github.com/jonheller1/SQL_Activity_Chart.git
创建时间: 2016-06-21T21:06:27Z
项目社区:https://github.com/jonheller1/SQL_Activity_Chart

开源协议:

下载


SQL Activity Chart - 1.3.0

SQL Activity Chart is an Oracle SQL query that displays all SQL activity for a database for a configurable amount of time. It’s sort of a cross between an AWR report and an ASH report.

The text-only format makes it less pretty than other tuning tools. But the text format also allows it to fit much more data on a single page, and makes it easier to share.

Example

The example below shows all the sections and features. Reports are usually a few hundred lines long. For brevity, some of the large sections with “...“.

  1. SQL Activity chart.
  2. Generated for TESTDB on 2016-06-21 16:18.
  3. Sample Period SQL (one case-sensitive letter per active session, see SQL Key at bottom)
  4. ---------------------------------------------------------------
  5. 2016-06-21 12:00 | AAAAAAAB
  6. 2016-06-21 12:03 | AAAAAA
  7. 2016-06-21 12:05 | AC
  8. 2016-06-21 12:08 | D
  9. 2016-06-21 12:10 | D~
  10. ...
  11. 2016-06-21 15:57 | A
  12. ---------------------------------------------------------------
  13. SQL Key - Statements are ordered by most active first
  14. =================================================================================================================================================================
  15. | ID| Username | SQL_ID | SQL Text | Samples | Sample counts per event (ordered by most common events first) |
  16. =================================================================================================================================================================
  17. | A | ALICE | gwnkpgwbyfmuc | UPDATE /*+ parallel(4) */ ALICE.SOME_TABLE ... | 1364 | CPU (1364) |
  18. | B | BOB | 7nwq7d737vgj4 | INSERT INTO BOB.SOME_TABLE ... | 22 | CPU (16),db file sequential read (6) |
  19. | C | ALICE | 1qngyg2nhh7b2 | SELECT /*+ parallel(4)*/ SUM(BYTES) AS TOTAL_BYTES | 20 | db file sequential read (17),CPU (3) |
  20. | D | SYS | 196mqnmxgxpv1 | select ... | 17 | control file sequential read (15),CPU (2) |
  21. ...
  22. | ~ | other | other | activity not caused by one of the Top N queries | | |
  23. =================================================================================================================================================================

How to Install and Run

Copy and paste the entire query into an IDE. Modify the time stamps and the number of time chunks in the configuration table at the top of the query. Run the whole query and view the results in a fixed-width editor.

License

This program is licensed under the LGPLv3.