6

I read on MOS Doc ID 1945619.1 that starting with the 12.1.3 Oracle HTTP Server (OHS), the mod_plsql feature has been deprecated and will not be included with the 12.2 Oracle HTTP Server.

For the future, Oracle recommends moving to Oracle REST Data Services (formerly known as Oracle APEX Listener) as an alternative to mod_plsql.

Our shop have a lot of mod_plsql applications (i.e. applications written usinjg HTP/HTF packages) in production. Since I don't know anything about Oracle REST Data Services I'm asking you if we can migrate the old applications to this new product without changing the code.

Thank you.

Kind regards, Cristian

Cristian Veronesi
  • 300
  • 1
  • 3
  • 15

4 Answers4

2

My shop is pretty much in the same situation as you are. We also have some very large mod_plsql/htp based applications and will have to migrate to the Oracle REST Data Services at some point.

We have already spend quite some time in testing different ORDS configuration and our overall conclusions are:

  • only APEX applications are fully supported
  • key functionality is still available
  • harder to configure and maintain
  • slight performance degradation
  • some mod_plsql configuration options do no longer exist or have changed

The biggest problems we are currently facing (and actually preventing us from switching to ORDS) are some restrictions when using non-APEX (pure HTF/HTP) applications. We already filed some SR's because some functionality in ORDS (for example the file upload and download API) is only available when running an APEX application.

doberkofler
  • 9,511
  • 18
  • 74
  • 126
  • Thank you materialdreams for this precious info. Can you please add a comment if your SR's will be resolved with a new ORDS version or patch? – Cristian Veronesi Aug 07 '15 at 12:41
2

Doug McMahon (Oracle employee) has a great open source module for Apache. Apache PL/SQL Gateway Module (mod_owa)

https://oss.oracle.com/projects/mod_owa/dist/documentation/modowa.htm

I am using it in a production environment and I highly recommend it. It's really fast and rock solid.

You need to do some compiling but it's worth it being able to use Apache 2.4 and mod_plsql.

Steps:

  1. download httpd 2.4.? from apache.org + extract
  2. If Centos 6 or less download apr and apr-util
  3. configure with enable-so, make and make install

    ./configure --enable-so --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr

  4. Download mod_owa + unzip

  5. create empty directory. Copy all files from "apache24" into new folder. Copy all files from "src" to new folder

  6. enter new folder and edit modowa.mk <-- important add $ORACLE_HOME, edit APACHE_TOP

  7. Copy mod_owa.so to apache's modules

  8. Add a modowa.conf in Apache's conf/ dir.

Example modowa.conf:

loadModule owa_module modules/mod_owa.so

<Location /pls>
    Options        None
    SetHandler     owa_handler
    OwaUserid      user/pass
    OwaNLS         AMERICAN_AMERICA.AL32UTF8
    OwaPool        100
    OwaStart       "package.procedure"
    OwaDocProc     "wwv_flow_file_mgr.process_download"
    OwaDocTable    photos_upload BLOB_CONTENT
    OwaUploadMax   50M
    OwaCharset     "utf8"
    order          deny,allow
    allow          from all
    OwaReset       LAZY
    OwaCharsize    4
    OwaFlex        package.procedure
    OwaHttp        REST 
</Location>

Before starting httpd ORACLE_HOME, NLS_LANG needs to be set (ORACLE_SID also if local). It needs access to an Oracle Home with libclntsh.so. (Oracle client will do).

I simply added oracle.conf (one line full path to oracle home/lib) under /etc/ld.so.conf.d (+ ldconfig)

Really scalable and a much cleaner setup then OHS.

Olafur Tryggvason
  • 4,761
  • 24
  • 30
  • Thank you Olafur. I'm reading the docs. It says that a particular area of incompatibility is file uploading and downloading. Did you test these features? – Cristian Veronesi Aug 26 '15 at 07:41
  • Yes, Doug says that semi large files are fine. (up to 10 Mb.) I can confirm that they work just fine. (One site accepts very large images and stores them as ordimage for processing). I haven't tested files that are many Gb and up. – Olafur Tryggvason Aug 26 '15 at 08:51
  • Yes, the system is built with US7ASCII in mind. Use the "OwaCharSize 4" for UTF8 – Olafur Tryggvason Aug 26 '15 at 10:38
  • Sorry, I deleted my previous comment because it was vague. The problem was an htp.print() statement. I solved by adding "OwaCharSize 4". Thanks again. – Cristian Veronesi Aug 26 '15 at 10:42
  • You'll find that this is much faster then OHS. And the scalability is enormous. For large deployments I have 1 nginx server in front for external traffic (there I handpick what procedures/packages are available. 2-4 Apache servers in the middle, stripped of everything except mod_owa for speed. (with the ability to add more if needed). Large Oracle DB in the end. – Olafur Tryggvason Aug 26 '15 at 11:34
  • Wow! I stumbled upon this post when realizing Oracle now has removed* mod_plsql completely from the latest OHS version. I've been looking at owa_mod in the past, but it didn't feel "quite there yet". Reading this post makes me think again! I really hope it's as simple as Olafur says, in that case I owe you a case of beer! * I can't for the life of me understand how Oracle can get away with this. We've been using mod_plsql for 18+ years, and we're surely not alone! – elgholm Feb 22 '16 at 12:40
  • Of course you are not alone. It is a very good setup. Fast and secure. This is a fine alternative to running a ~500mb OHS – Olafur Tryggvason Feb 24 '16 at 00:08
  • Hello Olafur. Still playing with mod_owa in a test environment. Today I got this error while trying to upload a binary file using the OwaDocTable option. Same code works with mod_plsql. SQL ERROR `Error 1460 calling procedure:` `ORA-01460: unimplemented or unreasonable conversion requested` `The last SQL statement executed was:` begin insert into ATEC2_SCHEMA.UPLOADS (NAME, MIME_TYPE, DOC_SIZE, DAD_CHARSET, LAST_UPDATED, CONTENT_TYPE, BLOB_CONTENT) values (:B1, :B2, :B3, :B4, SYSDATE, 'BLOB', empty_blob()) returning BLOB_CONTENT into :B5; end; – Cristian Veronesi Jul 05 '16 at 14:20
1

The biggest hurdle to get over is setting up Oracle Rest Services (ORS) and securing it. Once this is done, your web toolkit apps will work the same. The url may slightly change, so if you've referenced URLs using full paths as opposed to relative paths you might need modify code.

I am not sure if ORS is as powerful as Apache in areas like mod_rewrite, mod_proxy, virtual hosts with multiple ip addresses, etc...

Brian McGinity
  • 5,777
  • 5
  • 36
  • 46
0

Another open source alternative is tox.

dacracot
  • 22,002
  • 26
  • 104
  • 152