Presenting at OGh APEX World 2015

On March 25th 2015 at the beautiful venue of the former cruise ship SS Rotterdam, the next edition of APEX World by the Dutch Oracle Users Group (OGh) will take place.

SS Rotterdam

There is a long list of very interesting speakers there. David Peake, Steven Feuerstein, Joel Kallman, Dimitri Gielis, John Scott and Peter Raganitsch, just to name a few, have been selected to deliver presentations and keynotes at this event. And I’m proud to say that my name is also on that list.

I’m planning to do a presentation based on the following abstract:

APEX and SOA – The best of two worlds
Many companies have invested in an APEX application or a Service Oriented Architecture. But why not use both? In this presentation we will see the possibilities offered by APEX and the Oracle SOA Suite to communicate and integrate with eachother.

I hope to see a lot of familiar faces there and also a lot of new faces that want to learn more about this subject.

If you would like to attend, more information can be found on the OGh website. There are still some seats left, but they are going fast!

Substitution Variables over a Database Link in APEX

Situation: APEX 3.1.2 on a database linking to Siebel.

When I was building a report on 2 tables, one local and one remote, I noticed a very big performance issue. I thought I had solved this by adding a DRIVING_SITE hint, but this wasn’t enough.

The query looked something like this:

select /*+ DRIVING_SITE(e) */
, d.dname
from emp e
, dept@remote d
where = e.dept_id
and d.loc = :P2_DEPT_LOC

In the page, a user can select a Department Location and press a button. The report data is then generated based on this selected location.

To debug this, I started investigating trace files on the remote database. What I immediately noticed was, that the Substitution Variable :P2_DEPT_LOC wasn’t replaced by it’s value that was selected in the APEX page. So that was the problem.

To solve this, I simply had to replace the way the Substitution Variable was called. The query was changed to:

select /*+ DRIVING_SITE(e) */
, d.dname
from emp e
, dept@remote d
where = e.dept_id
and d.loc = '&P2_DEPT_LOC.'

And everything was okay. The time it took to load the page changed from 45 minutes to 0.05 seconds.

But be aware! This kind of solutions opens the door for SQL Injection, so make sure that you handle the input before parsing the query.

Review: Oracle Application Express 3.2 – The Essentials and More

For the past few months I’ve been working together with Marcel van der Plas on a new book that will cover APEX 4.0. But the Application Express 3.2 community is still very much alive.
In May of this year the authors Arie Geller and Matthew Lyon have published a book at Packt Publishing describing some (or most) of the essential features of APEX 3.2. Since I am writing for the same publisher, I have been asked to review the book and give my opinion.

After reading the book description on the internet and on the cover, I was expecting a book that would introduce the reader softly into the world of developing web applications with APEX. So I did what I usually do with a new tech book; I opened it at a random page and start browsing it for a while.

To my big surprise, it scared the living daylights out of me!

Instead of reading the usual descriptions of APEX features that I’ve learned to know in the past few years, I found pages and pages full of stuff I didn’t know! Was there so much that I could still learn? After so many projects, posting blogs, writing my book, could it be that APEX holds many more secrets?

The answer to that would be simply yes. This book taught me new ways of working with APEX. But how did they do that?

From the beginning of the book, the authors are comfortable in mixing the basics with many advanced features. They are not afraid to describe a simple task as creating a new item with an example of javascript calls.
But this is also a bit of a problem with a part of the book. Because the authors have tried to tell -everything- there is to know about APEX, they had to make compromises in how to describe the different aspects. This often results in quickly stepping over the more simple descriptions and start on the advanced bits. Because of this the book looks not as suitable for beginning developers as I would expect.
But don’t let this scare away the developers just starting with Application Express, the book is in fact suited for beginners and advanced users alike. If you can read past the bits that aren’t up your alley, there are many gems to be found for any developer.

Arie and Matthew have described a huge number of subjects in the book. They not only covered the programming side of APEX, but also the server architecture and configuration of the APEX environment.
The subject that immediately drew my attention is Globalization and Localization. Since I’ve had experience in that field, I read this chapter with extra interest. As a bonus Arie explained a great deal about creating right-to-left applications in the next chapter. This is his area of expertise and you can tell by the chapter. A very thorough description, with smart solutions for every developer that needs to make his or her application available for right-to-left reading users.

It’s impossible to describe all chapters of the book, simply because there is so much in the book. The 24 chapters will lead you through all parts of Application Express 3.2 and guide you in building applications and configuring the building environment. I recommend this book as a good read for anyone that is working with or is thinking of working with Application Express.

If this review made you curious about “Oracle Application Express 3.2 – The Essentials and More”. You can buy the book directly at the website of Packt as a hard-copy or eBook.

Passed APEX 3.2 Beta Certification

Oracle Application Express Developer Certified Expert Logo

Yesterday I returned from my summer vacation in the French town of Pierrefite-sur-Sauldre. Me and my family spend 2 wonderful weeks in the Alicourts resort.

This morning I opened my e-mail for the first time and found a nice little surprise from the Oracle Certification Program.
A while ago (in february) I participated in the Application Express 3.2 certification beta program. I took the exam in Utrecht and waited for the beta period to end.
The e-mail I received from Oracle and Pearson VUE contained a link to my Score Report. The verdict was: Passed!

So now I’m officially certified in “1Z1-450: Oracle Application Express 3.2: Developing Web Applications” or Oracle Application Express Developer Certified Expert for “short” :)

“Oracle Application Express 3.2 – The Essentials and More” book published

Last week a new APEX book was published. It was written by Arie Geller and Matthew Lyon. It’s on the current version of APEX and covers basic and advanced features of Application Express 3.2.

I will post a review somewhere in the coming weeks, but since the publisher is the same that will be bringing out my own APEX 4.0 book later this year, I wanted to let you know that this is out there. You can find more information at the website of
Packt Publishing

APEX 4.0 New Features

I did another Whitebook (in dutch). This time the subject is New Features in the APEX 4.0 Early Adopters release.
You can find it at the Whitehorses website.

By the way; besides this personal blog I also publish articles on the blog at the Whitehorses site together with the other Oracle, Java and SOA specialists of the company. These blogs are in english. A direct link to the list of my blogs is in my profile.

New Whitebook and blog

For my employer Whitehorses I have written a new Whitebook on Application Translations in APEX. This Whitebook was written together with colleague Ome-B, the owner of and author of the book Oracle Application Express Forms Converter.

Following up on this Whitebook I have posted a blog at, to explain how these translations work in the early adopters release of APEX 4.0.

Configure APEX in Oracle 11g

Application Express comes packaged with the OracleXE and Oracle11g database versions. In XE you can get started with APEX right away. In 11g the embedded PL/SQL gateway has to be configured first. These steps take you through the process of running the configuration script apxconf.sql.
Running this script enables you to configure the port for the Oracle XML DB HTTP server and to specify a password for the Oracle Application Express ADMIN account. Then you unlock the ANONYMOUS account.

Perform the following steps:

1. Open a terminal window and enter the following commands:

cd $ORACLE_HOME/apex
sqlplus sys/ as sysdba

2. Enter an administrator password for the Application Express Administrator account and press Enter.

3. Enter 8080 for the port for the XDB HTTP server and press Enter. This is also the default port. Change this number when another application (eg. Tomcat) is running on the same port. Keep in mind that ports below 1024 are not advisable when running Linux/Unix.
(The embedded PL/SQL gateway has now been configured.)

4. Unlock the anonymous user. From your terminal window, enter the following command:


And now you’re all set to start developing APEX applications in 11g.

When you later want to change the port on which APEX is configured, you can run the following command:
If you want to check what the current port is, use the following query:
select dbms_xdb.gethttpport from dual;

For more information, visit the Oracle site at

Using audit columns with APEX

It’s good practice to use audit columns in Oracle to see which user created or modified certain records. Application Express is not different.

Filling audit columns is usually done using Before Insert and Before Update triggers on the related tables. These columns usually are Created_Date, Created_User, Modified_Date and Modified_User. Both date columns are filled with Sysdate, but the user columns are a bit different.

In most environments you can suffice with using the database user by setting the column like this:

:NEW.Created_User := USER;

In Application Express applications that’s not enough when you have an authentication scheme based on a user table. In that case you would like to see the application user that inserted or updated the record in you audit.
A simple and smart way to do this is by using the v() construction in your trigger like this:

:NEW.Created_User := nvl(v('APP_USER'),USER);

When you use this kind of code in your triggers, the audit user is filled with the user that was logged into the application. But when the record is altered directly on the database, you will see the database user.

Application Express Listener available

Oracle has put the Application Express Listener up for download. It’s an early adopters release, so it’s not supported, but I think it’s still worth giving a try.

The download is available at:

I think it’s a very significant change in Apex. This allows developers to use their existing web server (like Tomcat or Weblogic), instead of Oracle HTTP Server/mod_plsql or the XDB HTTP protocol server/embedded PL/SQL gateway.

Read the Installation Guide for more information.