You are now on my old blog. Please update your bookmarks to my new blog

23 May 2006


mod_plsql is an oracle module for Apache. Let's do it from A to Z.

I install HTTP server. In 10g, it is located on the companion cd and requires a separate oracle home.

I copy my tnsnames.ora in COMPANIONHOME/network/admin

Then, I configure COMPANIONHOME/Apache/modplsql/conf/dads.conf

<Location /helloworld>
SetHandler pls_handler
PlsqlDatabaseUsername scott
PlsqlDatabasePassword tiger
PlsqlDatabaseConnectString LSC01

I create my procedure
create or replace procedure helloworld is begin htp.bold('hello world'); end;

I start my Apache server
$ORACLE_HOME/opmn/bin/opmnctl startproc ias-component=HTTP_Server

I open my browser
firefox http://localhost:7780/helloworld/scott.helloworld

So easy!


Blogger gonen said...

what about example of dbms_epg , configuration ?

23/5/06 16:19  
Anonymous Pete Finnigan said...

Hi Laurent,

Nice simple example BUT what about security. I always advise people to disable the HTTP servers shipped with Oracle unless there is a pressing business need to use them. If they are needed then many more steps are needed to ensure that they are hardened.

Any web based service enabled on a database server is potentially another target for an attacker.



23/5/06 18:31  
Blogger Laurent Schneider said...

Pete, this was part of a platform migration (AIX->Solaris), where the "security" is not in the discussion today. But I prefer not to have any service except SSH running on my db server.

23/5/06 23:37  
Anonymous Anonymous said...

what? not even a database?

26/5/06 20:09  
Blogger Laurent Schneider said...

good point, I need a listener too!

26/5/06 21:04  
Blogger Laurent Schneider said...

by the way, the http can be located on a different machine than the db server

6/6/06 12:32  
Anonymous Aino Andriessen said...

As of 10gR2, mod_plsql is part of the built-in webserver. DAD configuration is done with the dbms_epg package. So you don't even need an applicationserver anymore ;-).
The built-in webserver is part of Oracle XMLDB and is subject to that security implementation.

6/6/06 15:38  
Anonymous Anonymous said...

Hello, I have some problem with mod_plsql, I want to be able to make a Hello World application with OHS from Oracle Application Server 10g Release 3 but it don't have in it's browser enterprise manager a PL/SQL, DAD, etc references...
What can I do?
I'm on Windows Pro with SP 2

30/6/06 13:25  

Post a Comment

<< Home