Professional Documents
Culture Documents
sql-monitor-brief
sql-monitor-brief
sql-monitor-brief
opposed to other types of CPU consumption. In Oracle Database 19c the format of SQL • Oracle is deprecating
Flash-based Oracle
Monitor active reports has changed to Java JET technology and no longer uses Flash. Enterprise Manager
Express
How Do I Access Active SQL Monitor Reports?
Active SQL Monitor reports can be accessed directly from Enterprise Manager Cloud
Control or Enterprise Manager Database Express (EM Express) using the "Monitored SQL"
tab from the Performance Hub (accessed from the Performance menu). SQL Monitor
reports can also be accessed through SQL Developer, but the format is not the same as an
active SQL Monitor report. The following shows how to select an active SQL monitor
report from EM Express:
Alternatively, active SQL monitor reports can be created using the PL/SQL function
dbms_sql_monitor.report_sql_monitor() using the "active" report type. For example, the
following SQL*Plus script shows how to generate an active report for the statement that
was monitored last by Oracle:
set trimspool on
set trim on
set pagesize 0
set linesize 32767
set long 1000000
set longchunksize 1000000
spool sqlmon_active.html
select dbms_sql_monitor.report_sql_monitor(
report_level=>'ALL',type=>'ACTIVE')
from dual;
spool off
By default, SQL Monitor will only monitor plans that are 300 lines or less. This can be
increased with the parameter _SQLMON_MAX_PLANLINES (MOS Note: 1613163.1).
You can also change the default run time threshold of 5 seconds with the parameter
_SQLMON_THRESHOLD.
And this can also be seen in the individual execution line activity as well. We see that the
TABLE ACCESS INMEMORY FULL scan of the LINEORDER table in line 6 accounted for
100% of the activity and was all attributed to "Cpu: in memory":
The ability to differentiate between CPU time spent "in memory" and other CPU time can
take the guess work out of determining whether Database In-Memory was used and help
identify where time was spent during the SQL execution.
Cell Memory
Active SQL Monitor reports can also show the benefits of Database In-Memory usage in
Exadata Smart Flash Cache (i.e., Cell Memory). Since this usage occurs on the Storage
Servers the usage is displayed when clicking on the binocular's icon in the same way that
benefits like In-Memory join groups or In-Memory vectorized joins are displayed. The
4 Business / Technical Brief / Real-Time SQL Monitoring and Oracle Database
In-Memory / Version 1.10
Copyright © 2023, Oracle and/or its affiliates / Public
following is an example that shows the information available from a TABLE ACCESS
STORAGE FULL when clicking on the binocular's icon on line 22:
Notice the statistics "Columnar cache saved bytes", "Flash cache bytes" and "IM Capacity
bytes". These statistics are documented in the Oracle Exadata System Software User's
Guide and show that data was read in Database In-Memory format from the Exadata
Smart Flash Cache. Note that this is only available on Exadata when Database In-Memory
has been enabled (i.e., INMEMORY_SIZE > 0 or
INMEMORY_FORCE=CELLMEMORY_LEVEL).
Connect with us
Call +1.800.ORACLE1 or visit oracle.com. Outside North America, find your local office at: oracle.com/contact.
Copyright © 2023, Oracle and/or its affiliates. All rights reserved. This document is Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be
provided for information purposes only, and the contents hereof are subject to change trademarks of their respective owners.
without notice. This document is not warranted to be error-free, nor subject to any other
Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC
warranties or conditions, whether expressed orally or implied in law, including implied
trademarks are used under license and are trademarks or registered trademarks of SPARC
warranties and conditions of merchantability or fitness for a particular purpose. We
International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or
specifically disclaim any liability with respect to this document, and no contractual
registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open
obligations are formed either directly or indirectly by this document. This document
Group. 0120
may not be reproduced or transmitted in any form or by any means, electronic or
mechanical, for any purpose, without our prior written permission. Disclaimer: If you are unsure whether your data sheet needs a disclaimer, read the revenue
recognition policy. If you have further questions about your content and the disclaimer
This device has not been authorized as required by the rules of the Federal
requirements, e-mail REVREC_US@oracle.com.
Communications Commission. This device is not, and may not be, offered for sale or
lease, or sold or leased, until authorization is obtained.