Generating HTML Reports from SQL*Plus

通过Logminer分析归档日志时,导出的数据无格式,在notepad中不容易分析,将其输出为HTML格式。

SQL> set markup html on
SQL> spool version.html
<br>
SQL&gt; select * from v$version;
<br>
<p>
<table border=’1′ width=’90%’ align=’center’ summary=’Script output’>
<tr>
<th scope="col">
BANNER
</th>
</tr>
<tr>
<td>
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 – Production
</td>
</tr>
<tr>
<td>
PL/SQL Release 11.2.0.1.0 – Production
</td>
</tr>
<tr>
<td>
CORE    11.2.0.1.0      Production
</td>
</tr>
<tr>
<td>
TNS for 32-bit Windows: Version 11.2.0.1.0 – Production
</td>
</tr>
<tr>
<td>
NLSRTL Version 11.2.0.1.0 – Production
</td>
</tr>
</table>
<p>

SQL&gt; spool off
<br>
SQL&gt; set markup html off

生成网页如下所示,非常给力!

image

普人特福的博客cnzz&51la for wordpress,cnzz for wordpress,51la for wordpress