Print Thread
All HTML reports from Session window are named "HTML Window - SQL Monitoring Report"
#52324 10/21/15 12:06 PM
Joined: Sep 2003
Posts: 387
London, UK
Member
OP Offline
Member
Joined: Sep 2003
Posts: 387
London, UK
After noticing that Session Browser detail tabs now support HTML, I added one to display the current execution plan. It works, but the window title is "HTML Window - SQL Monitoring Report". (Not a big deal, but just thought I'd mention it.)

btw as an enhancement request for Marco's list, it would be nice to have some more display options, e.g. automatically open in a new HTML window or an external application, configurable for each detail tab.

In case anyone's interested, the code is:
Code
select '<!DOCTYPE HTML>
<html>
<head>
<title>Execution plan for SQL ID '|| :sql_id ||'</title>
<link href="M:\Web\css\clearlight.css" type="text/css" rel="stylesheet">
<script type="text/javascript" src="M:\Web\js\prettify.js"></script>
<script type="text/javascript" src="M:\Web\js\lang-plsql.js"></script>
</head>
<body onload="prettyPrint();">
<pre class="prettyprint linenums lang-plsql">' ||
rtrim(xmlagg(xmlelement(e,plan_table_output,chr(10)).extract('//text()') order by null).GetClobVal(),',')
|| '</pre></body></html>' as sql_plan_html
from   table(dbms_xplan.display_cursor(:sql_id, :sql_child_number, 'ADVANCED -PROJECTION'))

The CSS and JavaScript are from my Oracle-enabled cut of Google Code Prettifier, here:
github.com/williamrobertson/code-prettify

Last edited by William Robertson; 10/22/15 11:37 AM.
Re: All HTML reports from Session window are named "HTML Window - SQL Monitoring Report"
William Robertson #52330 10/22/15 09:17 AM
Joined: Aug 1999
Posts: 22,232
Member
Offline
Member
Joined: Aug 1999
Posts: 22,232
We'll fix it.


Marco Kalter
Allround Automations
Re: All HTML reports from Session window are named "HTML Window - SQL Monitoring Report"
Marco Kalter #52335 10/22/15 11:36 AM
Joined: Sep 2003
Posts: 387
London, UK
Member
OP Offline
Member
Joined: Sep 2003
Posts: 387
London, UK
Thanks! There are quite a few uses for HTML in the Session Browser such as ASH and AWR reports, so this is really useful. The ability to open in an external browser (as already provided for CLOBs) would be really useful - for example ADDM reports won't be very readable in a default session browser tab (that's if we key an ADDM report to an active session, not that I've tried yet but it's on my list.)

Re: All HTML reports from Session window are named "HTML Window - SQL Monitoring Report"
William Robertson #62755 11/14/21 01:22 PM
Joined: Sep 2003
Posts: 387
London, UK
Member
OP Offline
Member
Joined: Sep 2003
Posts: 387
London, UK
I see this fix didn't make it into 14.0.6 frown


Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.073s Queries: 15 (0.023s) Memory: 2.5145 MB (Peak: 3.0405 MB) Data Comp: Off Server Time: 2024-06-17 09:05:22 UTC
Valid HTML 5 and Valid CSS