Sunday, February 17, 2013

Version 1.7 of Alexandria Utility Library for PL/SQL

The latest version of Alexandria, the utility library for PL/SQL, is now available for download. The previous version has been downloaded more than 2,000 times in the last 8 months.

The docs/readme.txt file contains a fairly detailed list of additions, enhancements and bug fixes. Below are some of the more noteworthy changes:

Improved installation script

You can now choose between installing the full library (close to 50 packages as of this version), by running the main /setup/install.sql script, or you can install just the core set of packages via setup/install_core.sql and then choose additional sets of packages on top of that (for example, /setup/install_microsoft.sql or /setup/install_inet.sql and so on).

Amazon S3 package enhancements

Jeffrey Kemp has submitted several functional enhancements to the S3 package which are incorporated into this version. Jeffrey has also done talks on the Alexandria Library in general and the S3 package in particular; the slides from these presentations are available here. Thanks for spreading the word, Jeff!

New packages: Icalendar, URI templates, and image utilities

A couple of new kids on the block:

  • ICALENDAR_UTIL_PKG: Lets you create Icalendar files from the database.
  • IMAGE_UTIL_PKG: Get information (such as image width and height) from JPG/GIF/PNG image files. This package is based on code from Anton Scheffer.
  • URI_TEMPLATE_UTIL_PKG: Use URI Templates to deal with "nice URLs" in PL/SQL and Apex web applications. 
I might get back to some of these topics later, in separate blog posts; here is a screenshot of the URI_TEMPLATE_UTIL_PKG package in action. (In real life, you would get the actual URI from a web request, for example via mod_plsql, and do something useful after parsing the request.)


Davide Moraschi said...

I want to thank you Morten for the invaluable work you're doing with this library. I'm impressed by the quality of your code.
good job!

Unknown said...

I would like to use the RSS_UTIL_PKG to pull in data available in RSS feeds. However, since I am behind company firewalls I believe I need to use your NTLM_HTTP_PKG to use windows authentication to access the network. Is there a way to combine these two packages so that I can access RSS feeds through PL/SQL?

Current error is:
ORA-29273: HTTP request failed
ORA-06512: at "SYS.UTL_HTTP", line 1819
ORA-12535: TNS:operation timed out
ORA-06512: at "SYS.HTTPURITYPE", line 34

Great work on this collection of packages, EXTREMELY valuable!!

Morten Braten said...

@Unknown: Instead of using httpuritype().getclob() to retrieve the RSS contents, try using ntlm_http_pkg.get_response_clob(). If that works, then just pass the clob into the RSS parsing function.

- Morten

Morten Braten said...

@Unknown: However, if the page/RSS feed you are trying to retrieve is protected by NTLM, you would probably get a "401 Unauthorized" error message instead of a "TNS: operation timed out" error... Try accessing the URL in a browser with network logging/debugging turned on, and you can see what headers the server is sending back.

- Morten

Martin D'Souza said...

Hi Morten,

Can you please update the Logger URL to: We've moved it to GitHub.



Morten Braten said...

@Martin: The link to Logger has been updated. NIce work with version 2, by the way!

- Morten