Returning BLOB file size

Occasionally I'll want some form of report noting file sizes of blobs in a database.

The solution is relatively simple, and I thought I'd write it up here for a place to copy syntax each time.

APEX users also have a handy table to verify this against (apex_application_files). Well, a synonym/view that ultimately maps to the core table wwv_flow_file_objects$.

It contains a doc_size column, which is no doubt evaluated at some point during upload of (more...)

Partion Views in 11.2

Zu den ersten Ergebnissen, die Google bei der Suche nach "Partition View" liefert, gehört Oracle7 Tuning, release 7.3.3. Jenes Release 7.3 wurde 1996 veröffentlicht und seit mehr als zehn Jahren wird man bei Oracle nicht müde zu betonen, dass die "Partition Views" als Feature deprecated sind - aber offenbar funktionieren sie auch in Release 11.2 noch immer, wie ich heute beim Durchspielen eines im OTN-Forum vorgestellten Beispiels feststellen konnte. Ich spare (more...)

SQL Plan Baselines und Parse Probleme

Jonathan Lewis erinnert in seinem Blog daran, dass Baselines keinen positiven Effekt auf Parse-Probleme haben: "The first thing that the optimizer does for a query with a stored sql plan baseline is to optimize it as if the baseline did not exist." In solchen Fällen sind SQL Profiles, SQL Patches oder einfache Query-Hints möglicherweise eine bessere Lösung.

Default-Werte für Datumsintervallendpunkte

Stew Ashton, der sich in seinem Blog in der Regel mit komplexen SQL-Queries beschäftigt, hält dort ein Plädoyer für den Verzicht auf NULL-Werte bei der Angabe der minimalen und maximalen Werte für Datumsintervalle. Stattdessen spricht er sich für die Verwendung der klassischen Minimal- und Maximalwerte aus, die durch den Oracle Datentyp DATE nahegelegt werden, also den 01.01.4712 B.C. (ich nehme an, das ist Oracles Version von der Erschaffung der Welt) und (more...)

Visual Studio Freedom

Some of my students want to learn to write C++ on a Windows OS. At some point, you simply surrender to the fact that many people prefer the Windows OS as a starting point. Traditionally, I’d recommend the Microsoft Visual Studio as their learning vehicle because it’s free to our students because of our relationship with Microsoft. It’s not free to graduates. When a graduate contacts me I recommend Code::Blocks. Just recently, one ask for (more...)

SQL and date ranges: don’t use NULL

We often use NULL values in date ranges, usually in the end date to signify the indefinite future. I have decided that this is a bad idea; here are my reasons. 1) NULL should not mean anything According to the SQL standard, NULL means “unknown”. That is why you can’t really compare a NULL value to anything, […]

Thursday Thought – History & Creativity

My sister sent me this video not long after my daughter was born earlier this year - I finally watched it while cleaning up e-mails and I'm glad I did - I highly recommend you all take 2 minutes aside and just let these images of history wash through your brain.



If you think the first half had an air of familiarity, you might be thinking of this video from Carl Sagan - I certainly (more...)

Multi-Attribut-Vergleiche

Ein interessanter Hinweis von Jonathan Lewis, der auf eine Präsentation von Markus Winand bei den Trivadis CBO-Tagen zurückgeht (die ich mir auch gern angeschaut hätte, wenn ich mir dergleichen leisten könnte): in manchen RDBMS ist es möglich, mehrspaltige Vergleiche der folgenden Form durchzuführen:

where (col1, col2) < (const1, const2)

Die Logik dabei ist: das Prädikat liefert TRUE, wenn col1 < const1 ist, oder wenn gilt: col1 = const1, aber col2 < const2 (und NULL-Werte (more...)

Fedora VMWare Upgrade

New update of VMWare came out, and it is time to upgrade VMWare Tools. Here’s an update on the instructions for upgrading VMWare Tools:

  1. Navigate to the VMWare Menu, choose Virtual Machine and in the drop down menu Install VMWare Tools. This will mount a virtual CD in the Oracle Unbreakable Linux virtual machine and it launches the following dialog box:
VMware962

  1. Open a terminal session by right clicking anywhere in the desktop, and then choose (more...)

Two milestones, one offer

I stumbled across a blogging milestone while fact checking what I was going to open this post with - for me this month represents 5 years of blogging.

In that time I've learnt heaps, met new people, changed blog name, visited other cities to speak, and dived deep into APEX after a long time in Oracle Forms, published a video series & was recognised as an Oracle ACE.

Turns out Packt Publishing are celebrating (more...)

18F

Yesterday was my first day at 18F!

What is 18F? We're a small, little-known government organization that works outside the usual channels to accomplish special projects. It involves black outfits and a lot of martial arts.

Kidding! Sort of. 18F is a new agency within the GSA that does citizen-focused work for other parts of the U.S. Government, working small, quick projects to make information more accessible. We're using all the tricks: small teams, (more...)

APEX_ESCAPE, a new (and better) way of HTF.ESCAPE_SC

Last week, at the yearly ODTUG Kscope Conference, I did my presentation "Getting Started with APEX Plugin Development". After the session Patrick Wolf, Principal Member of Technical Staff for APEX, pointed out an improvement that could be made.
In the presentation I point out the need to escape the input that you get from a user of the plugin in order to protect the plugin from unwanted use, like SQL Injection, Cross Site Scripting (more...)

The APEX_JSON package: Parsing JSON in PL/SQL


As I mentioned a year ago, it looks like Apex 5.0 will include a new package called APEX_JSON for parsing and generating JSON. In this blog post, I will take a quick look at the parsing, and the next blog post will be about generating JSON output.

Since Apex 5.0 is still in Early Adopter (beta) mode and not yet released for download, we can run a query against the data dictionary (more...)

Find problems when you develop: using XRebel with Oracle ADF

Some days before ZeroTurnaround has released XRebel , a new tool to recognized problems in your web applications, when you make your developer test.

This was promising, so I give it a short try for Oracle ADF applications. For this blog I use the Summit ADF application, delivered by Oracle, but I have tried with our own application too. Test is done in JDeveloper 12.1.2.

After the download there are some easy steps (more...)

Datenmodellierungsverfahren für das Core Data Warehouse

Wieder nur ein Link: aus dem Hause Trivadis stammt das white paper Comparison of Data Modeling Methods for a Core Data Warehouse, geschrieben vom Autorenteam Maren Eschermann, Adriano Martino und Dani Schnider (dem ich gelegentlich versprochen habe, seinen Namen nicht mehr falsch zu schreiben). Das Papier erläutert die folgenden Modellierungsverfahren:
  • Dimensional Core Modeling with dimensions and fact tables (basierend auf Kimballs Methodologie)
  • Relational Core Modeling with master data versioning
  • Data Vault Modeling with Hubs, (more...)

KScope14 – on my way home

For some reasons I got lounge access here at Seattle airport when going home fra KScope14. So I can use the last couple hours here lounging comfortably writing a few words about an awesome week here.

This was my fifth consecutive KScope and I plan to go every year. That is one awesome konference for developers and it just gets better every year. I'll be at KScope15 in Florida for sure! I had a great (more...)

SQL to find World Cup matches with comebacks

Lucas Jellema is writing a great series on SQL applied to the World Cup of football / soccer. In the article about finding matches with comebacks, he challenged readers to “find ‘dramatic comebacks’ where a team was two goals behind at some stage and yet managed to win the game.” Here is my reply, since replying […]

PDF über PL/SQL erzeugen

Zur Unterstützung meines unterstützungsbedürftigen Gedächtnisses: Morton Braten zeigt einige Möglichkeiten zur Erzeugung von PDF-Reports über PL/SQL.

Creating PDF reports from PL/SQL

Do you need to create PDF reports from PL/SQL?

There are a number of options:

  • Anton Scheffer wrote a PL/SQL package called AS_PDF3 that covers all the basics: Different fonts (including TrueType), images, and tables.
  • There's the commercial PL/PDF package that has more features, such as the ability to use existing PDF documents as templates for new documents, compression, encryption, and more. There's also an extra Toolkit component which allows you to extract pages from (more...)

ODTUG Kscope 2014: Wednesday

The morning started nice, ODTUG organized breakfast with country themes. There were tables for Australia, Canada and The Netherlands. If you are Dutch you might have expected to have hagelslag or cheese, this was not the case. It was a nice and hearty American style breakfast, eggs, bacon, potatoes.
The first session of the day that I went to was by Nathan Catlow on Oracle APEX Security, an interesting topic.
Nathan pointed out that by (more...)