Archive for the ‘Oracle’ Category

Substitution Variables over a Database Link in APEX

Situation: APEX 3.1.2 on a 9.2.0.6.0 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) */
e.ename
, d.dname
from emp e
, dept@remote d
where d.id = 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) */
e.ename
, d.dname
from emp e
, dept@remote d
where d.id = 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.

Post to Twitter

 

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” :)

Post to Twitter

 

TNS_ADMIN for multiple Oracle Homes

Last week I tried to install Oracle Forms 11g. This install created a new Oracle_Home on my computer, which resulted in my database not starting up anymore.
The cause of this was, that my computer did not pick up the right tnsnames.ora file anymore, but instead it picked up the new tnsnames.ora that was created during my Forms installation.

To avoid having to have multiple copies of the same tnsnames.ora file on your computer, you can create a registry key in all Oracle_Homes. This will force your computer to pick up the same file for all your Oracle_Homes and thus allow you to have just a single copy of tnsnames.ora to manage.

To do this, start the Windows Registry editor by using Start -> Run -> Regedit and find your Oracle_Homes under HKEY_LOCAL_MACHINE -> SOFTWARE -> ORACLE and rightclick on your Oracle_Home entry. Choose New -> String Value and enter the required information similar to the following screenshot (directory on harddrive may differ on your computer).

TNS_ADMIN registry entry

The registry key is called TNS_ADMIN and it’s value is the location of your tnsnames.ora file on the harddrive.
But remember to only add this key to the Oracle_Homes that do not contain your central tnsnames.ora.

Post to Twitter

 

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.

Post to Twitter

 

Oracle Netherlands 25 years

This year is the 25th anniversary of Oracle’s branch in The Netherlands. For this occasion Oracle has organised an event in Aalsmeer on november 19th.
My employer Whitehorses is a silver sponsor for this event. You can visit our stand for more information on the company and how we can help you solve your IT-problems.
For more information visit the event’s website.

Post to Twitter

 

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: http://www.oracle.com/technology/products/database/application_express/html/apex_listener_download.html

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.

Post to Twitter

 

Oracle buys Sun Microsystems

Oracle buys Sun

Oracle buys Sun

It has finally happened. Sun has been taken over. Not by IBM, but by Oracle!

This move implies that Larry Ellison has big plans in his competetive struggle with Microsoft. Because with Sun come a lot of nice bonusses. The operating system of Solaris, SPARC hardware platform, VirtualBox, the Java programming language and the MySQL database just to name a few. And not to forget: OpenOffice.
Oracle can now offer services on every level from hardware to software. From small companies to large multinationals. Maybe in the future we will run an Oracle Operating System and write our documents in Oracle Open Office on our Oracle Desktop Machine…

Time will tell…

More info: http://www.sun.com/aboutsun/media/presskits/2009-0420/index.jsp

Post to Twitter

 

Join the Quest

I found this great game from Oracle. It’s a test of knowledge about the Oracle database and it looks fun.
You can find it at http://db-quest.com/

Can you beat the highscore?

Post to Twitter

 
Get Adobe Flash player