Call for Oracle support & training (800) 766-1884
Free Oracle Tips

Home
 
Corporate Oracle Training
Custom Oracle Training
Oracle New Features Training
Advanced Oracle DBA Classes
Oracle Tuning Courses
Oracle Tips & Tricks
Oracle Training Links
Oracle Training Links
Oracle Training Links

We are top for USA Oracle Training Clients

 

Free Oracle Tips


 
HTML Text AOL

Free Oracle App Server Tips


 
HTML Text

Oracle support

Oracle training

Oracle tuning

Rednecks!

Remote Oracle

Custom Oracle Training

Donald K. Burleson

Oracle Utilities Tips

PL/SQL Server Pages (PSP)

Executing the PSP from SQL*Plus

The PSP can be executed from SQL*Plus, and using the owa_util package, the HTML output will be displayed. When accessing the owa_util package from SQL*Plus, package variables need to be initialized first, otherwise an error will occur on the first execution. Subsequent executions will work fine, just not the first one. To get around this limitation of the owa utilities, add the following code to the login.sql script located in the $ORACLE_HOME/sqlplus/admin directory.

DECLARE
name_arr OWA.VC_ARR;
value_arr OWA.VC_ARR;
BEGIN
OWA.INIT_CGI_ENV(0, NAME_ARR, VALUE_ARR);
END;
/

Now the PSP execution will be successful on the first attempt:

SQL> set serveroutput on
SQL> execute parmlistpsp;

PL/SQL procedure successfully completed.

SQL> execute owa_util.showpage;

<HTML>
<HEAD><TITLE>This is a PSP Page!</TITLE></HEAD>
<BODY>
This is a
list of current database parameters: <BR><BR>

<TR>

<TD>O7_DICTIONARY_ACCESSIBILITY</TD>
=
<TD>FALSE</TD><BR>
</TR>


<TR>
<TD>active_instance_count</TD>
=
<TD>null</TD><BR>
</TR>

<TR>
<TD>aq_tm_processes</TD>
=

<TD>1</TD><BR>
</TR>7

<TR>
<TD>archive_lag_target</TD>
=
...


Notice from the output above that the text is pure HTML. Oracle executed our query and formatted the HTML including the data returned from the query. The next step is to access this HTML from a web browser.


To learn more about these techniques, see the book "Advanced Oracle Utilities: The Definitive Reference". 

You can buy it directly from the publisher and get instant access to the code depot of utilities scripts.
 

 

 

 
 
 

Oracle performance tuning book

 

 

Oracle performance tuning software

 
Oracle performance tuning software
 
Oracle performance Tuning 10g reference poster
 
Oracle training in Linux commands
 
Oracle training Excel
 
 
 
 
 
email BC:


Copyright © 1996 -  2014 by Burleson Inc. All rights reserved.

Oracle® is the registered trademark of Oracle Corporation.