About downloading files from an Apex page without using download links

Always check out the original article at http://www.oraclequirks.com for latest comments, fixes and updates. Yesterday I needed to download a file as the final step in processing a user request involving a tabular form. For some reason this requirement is somewhat unusual if you look at the most typical scenarios where you either download files stored in a table by means of report links or a

Zusammenspiel von log writer und foreground Prozessen beim Commit

Wenn Frits Hoogland, dessen Beiträge in der Regel ziemlich komplexe Analysen beinhalten, seinen Artikel How the log writer and foreground processes work together on commit mit den Worten beginnen lässt "warning: this is a rather detailed technical post on the internal working of the Oracle database’s commit interactions between the committing foreground processes and the log writer", dann sollte ich so einen Hinweis vielleicht lieber ernst nehmen. Nach der wiederholten Lektüre des Textes bin (more...)

ORDS Java heap space OutOfMemoryError

I recently ran into a problem with an Apex application running on ORDS on Tomcat. The application has a page with a custom tabular form (built using the apex_item package). When this page is submitted, the form values are stored in the "g_fxx" arrays (g_f01, g_f02, etc).

The problem was that when the number rows (and therefore the number of elements in the arrays) got too big, the server would respond with a HTTP 500 (more...)

Oracle Database Developer Choice Awards Voting Status

The Oracle Database Developer Choice Awards voting will go on until October 15th 2015. If you haven't already, you should go vote now!

Here is the present status of how many votes have been submitted per category, including how many votes the category has increased with since "approximately yesterday" (since last time I downloaded the data, which I plan to do approximately daily ;-), and including how many votes the category has increased with since (more...)

Scraping and querying Oracle Database Developer Choice Awards votes – Part 2

In Part 1 I demonstrated how to "scrape" data from the live webpages with the votes of the Oracle Database Developer Choice Awards. Unfortunately those webpages are not ideal for scraping, so I promised a workaround. Here I do a semi-manual scraping af data by using a browser to retrieve the actual HTML, save it to a file, and then let the code parse out the data from the file.

In the live version, the (more...)

Scraping and querying Oracle Database Developer Choice Awards votes – Part 1

You know about the Oracle Database Developer Choice Awards voting, right? If not, then go vote now, please, and then come back and read on :-)

I want to be able to query the voting status, who is ranked what in each category and so on. But I don't want to type in votes in a table, especially not when they change all the time. Instead I'd like to query the live data in (more...)

Estimate_Percent und Histogramme

Dass die Sample-Größe bei der Statistikerfassung via dbms_stats ein schwieriges Thema ist, habe ich wohl schon gelegentlich erwähnt - bzw. die Artikel anderer Autoren nacherzählt, die darüber geschrieben haben. Und ein besonders heikler Teilbereich dieses Themas sind die Histogramme. Und wahrscheinlich gehe ich auf den neuen Scratchpad-Artikel von Jonathan Lewis hier vor allem deshalb noch einmal intensiver ein, weil der Herr Lewis im zugehörigen OTN-Thread meine Einschätzung des gegebenen Falls bestätigt hat - und lobende (more...)

The Data Warrior Goes to Oracle Open World 2015 (#OOW15)

Yes boy and girls, it is that time of year again. Time for the BIG show in San Francisco – OOW15 I will as usual, attend, but only for a few days this year (been away from home too much). My Talk I will be presenting my session Worst Practices in Data Warehouse Design (UGF9985) […]


Often, the biggest problem with regular expressions is that those who use them sometimes don’t use them correctly. A great example occurs in the Oracle Database with the REGEXP_LIKE function. For example, some developer use the following to validate whether a string is a number but it only validates whether the first character is a number.

  lv_input  VARCHAR2(100 (more...)

Master Notes auf MOS

Jonathan Lewis hat in seinem Blog eine Liste mit Master Notes erstellt, die als Dokumente in der "Knowledge Base" des Oracle-Supports (MOS, die Älteren kennen es noch als Metalink) zu finden sind. Dabei handelt es sich um konzeptionelle Erläuterungen zu zentralen Mechanismen der Datenbank - enthalten sind solche Themen wie "Overview of Data Dictionary (1500058.1)", "Privileges And Roles (1347470.1)", "Overview of Oracle Background Processes (1503146.1)" etc. Dazu gibt er noch den folgenden (more...)

Create MySQL Index

Indexes are separate data structures that provide alternate pathways to finding data. They can and do generally speed up the processing of queries and other DML commands, like the INSERT, UPDATE, REPLACE INTO, and DELETE statements. Indexes are also called fast access paths.

In the scope of the InnoDB Database Engine, the MySQL database maintains the integrity of indexes after you create them. The upside of indexes is that they can improve (more...)

Oracle Developer Cloud Service: Protected Git Branches

In this video I will show you how easy it is to protect your Git Branches.

Generating JSON from SQL cursor

It appears there will be a good 1001 uses for the APEX_JSON package in APEX 5, here is one of them.

Previously I had an AJAX PL/SQL callback that returned a relatively simple JSON string, using the LISTAGG technique described by Lucas here.
l_json varchar2(32767);
select listagg('{"id":"'||version||'","content":"'||version||'.x"}',',') within group (order by null) json
into l_json
from (
select distinct substr(version,1,1) version
from apex_timeline
order by version

end getGroups;

Review: The Martian

I think we have a new genre of films for those consumers yearning for science and exploration.

First Gravity took us on a cinematographic journey into low earth orbit.
Then Interstellar took us on an inception style ride.
If you liked these you may enjoy Europa Report, which has a 2001 feel to it.

Now we have The Martian, which only a few years ago was still in the imagination of write Andy (more...)

My sessions recommendations for JavaOne ’15 and OOW ’15

JavaOne SF 2015  Session recommendations

High Availability with Java EE Containers, JDBC, and Java Connection Pools [BOF7732]
Monday, Oct 26, 8:00 p.m. | Parc 55—Mission

Modern, Portable JavaScript Stored Procedures with Nashorn [CON4405]

Java Connection Pool Performance and Scalability with Wait-Free Programming [CON2158]
Wednesday, Oct 28, 4:30 p.m. | Hilton—Continental Ballroom 1/2/3

OOW SF 2015 - Session recommendations

Java Virtual Machine Cookbook [UGF2720]

Oracle database developer choice awards

I've been selected as a finalist in the 2015 Oracle Database Developer Choice Awards...! September 2015

Wissenswertes zum Umgang mit ORM-Tools

Sigrid Keydana hat für das diesjährige Trivadis TechEvent eine sehr schöne Präsentation zu den Möglichkeiten und Schwierigkeiten des Einsatzes von Object Relational Mapping (ORM) Tools erstellt, in der sie unter anderem erklärt:
  • warum Entwickler überhaupt auf die Idee kommen, dergleichen einzusetzen.
  • wo die Schwierigkeiten bei der Abbildung von Klassen auf Datenbankobjekte liegen ("Object-Relational Impedance Mismatch").
  • welche Vorgehensweisen beim data fetching zur Verfügung stehen und worauf man dabei zu achten hat (Lazy vs. Eager Fetch, das (more...)

Sending SMS text messages from PL/SQL

Do you need to send SMS (Short Message Service) text messages from your Oracle database using PL/SQL? This is actually quite easy to do, the only hard part is deciding on which SMS gateway to use. You need to sign up with a gateway provider to get a username and password to use the gateway, and you typically pay some cents for each message you send.

Do a google search for "sms gateway api (more...)

Oracle Database Developer Choice Award Nominee = Me

Oracle is celebrating the Oracle Community by having us developers nominate and vote for
Oracle Database Developer Choice Awards to our fellow developers in five database development technologies:

The nomination period is over and it has been possible to vote since September 15th. Voting is open until October 15th and winners will be announced during Oracle OpenWorld 2015.

The nominees are all active in the Oracle Community helping others as (more...)

SQL*Plus Tricks

Have you ever wondered how to leverage substitution variables in anonymous block programs? There are several tricks that you can use beyond passing numeric and string values to local variable. The generic default appears to take a number unless you cast it as a string but that’s not really the whole story. The first two are standard examples of how to use numeric and string substitution values.

The following accept a numeric substitution value: