Virtual Private Database…

Some time ago I was asked to assist in fixing or at least finding the cause of a performance problem. The application ran fine until the Virtual Private Database (VPD) policy was applied. Oracle claims there should be near zero impact on your application when you implement VPD, then how is this possible?

First of all, the policy applied was a rather complex one. A complex query should be executed to determine if the current (more...)

Query materialized view refresh timestamp

Unlike my lengthy posts, this is really a quick one. Alright, so how do you get to know when your materialized view got refreshed? Well, no biggies. There are bunch of dictionary views who capture refresh date but none of them give you timestamp. For fast refresh, you can work with SCN or timestamp based MView … Continue reading

Application Item Prefix Usage

I was constructing a fresh app for a presentation idea and I came to think about the prefix people use for Application Items in Oracle APEX.

I've seen a few variations used, and upon asking the question on Twitter (as a poll limited to 4 options), some came back with a few other suggestions.

The final tally based on the replies (we'll (more...)

Oracle FROM_TZ Function with Examples

In this article, I’ll explain what the Oracle FROM_TZ function is and show you some examples. Purpose of the Oracle FROM_TZ Function The purpose of the FROM_TZ function is to convert a TIMESTAMP value and a specified TIME ZONE to a TIMESTAMP WITH TIME ZONE value. It seems like a simple data conversion function, but […]

Bloom Pruning im Ausführungsplan

Maria Colgan hat mal wieder einen Artikel geschrieben, der sich nicht unmittelbar mit ihrem aktuellen Tätigkeitsfeld In-Memory beschäftigt, sondern ihr altes Thema betrifft: die Strategien des Optimizers. Im Artikel zeigt sie einen Plan, der in der Name-Spalte zwei Bloom Filter Erzeugungen aufführt (JOIN FILTER CREATE, PART JOIN FILTER CREATE), aber nur die Verwendung eines der beiden Filter. Der zweite Bloom Filter erscheint in den Spalten Pstart und Pstop und wird zum Partition Pruning verwendet (also (more...)

Oracle TZ_OFFSET Function with Examples

The Oracle TZ_OFFSET function is a useful datetime function. Learn how to use this function and see some examples in this article. Purpose of the Oracle TZ_OFFSET Function The purpose of the TZ_OFFSET function is to display a number that indicates the number of hours from UTC that a specified time is. You can specify […]

DB_LINK w/o tnsnames.ora

A question popped up, which I thought was interesting. How can you create a DB_LINK in Oracle without the DBA changing the tnsnames.ora file? It’s actually quite easy, especially if the DBA sets the TNS address name the same as the instance’s service name or in older databases SID value.

  1. Do the following with the tnsping utility:
    tnsping mohawk

    It should return this when the server’s hostname is mohawk and domain name is techtinker. (more...)

OPatch 12c: emocmrsp gone missing

Last week, the quarterly PSU came out, and just a few hours later I tried to apply it to a Oracle Restart + DB system under OL 6.7. This would have run smoothly if it wasn’t for the fact that this was the first patch for this system and therefore I needed to create a OCM […]

How to Find the Row That Has the Maximum Value for a Column in Oracle

Do you need to find the data for a row which has the maximum value for a specific column in Oracle? Learn how to do it and see some alternative answers in this article. The Table Structure Let’s say you have a table called sales_volume that looks like this: CITY START_DATE SALES El Paso 27/May/15 […]

Dot Qualify Everything?

Minimal privileges for Amazon S3 backup user

This is a follow-up to an old post I did about how to backup Oracle database schemas to Amazon S3 using PL/SQL.


In short, the packages provided in the Alexandria Utility Library for PL/SQL allow you to set up a schema-level backup of files from your database to Amazon's Simple Storage Service (S3).

At the end of that article I mentioned that you should use AWS Identity and Access Management (IAM) to create a separate (more...)

Partial Indexes für partitionierte Tabellen

Dani Schnider hat zuletzt eine dreiteilige Serie zur Verwendung partieller Indizes veröffentlicht. Dabei stellt sich als erstes die Frage: was ist ein Partial Index überhaupt? Die Antwort lautet: Partielle Indizes werden nur auf einer Teilmenge der Partitionen einer partitionierten Tabelle erzeugt: entweder, um die Ladeprozesse für aktive Partitionen nicht zu beeinträchtigen - in diesem Fall verzichtet man auf eine Indizierung der aktuellen Daten; oder um umgekehrt die Zugriffe auf die aktuellen Daten durch Indizes zu (more...)

Oracle INITCAP Function with Examples

The Oracle INITCAP function is a handy string manipulation function. Learn what it does and see some examples in this article. Purpose of the Oracle INITCAP Function The Oracle INITCAP function translates a specified string into another string which has the first letter of each word capitalised, and all other letters in lower case. The […]

Oracle LOWER Function with Examples

In this article, I’ll take a look at the Oracle LOWER function, explain how it works, and see some examples. Purpose of the Oracle LOWER Function The LOWER function converts all letters within the specified string to lower case.   Syntax The syntax for the Oracle LOWER function is: LOWER ( input_string )   Parameters […]

Where is the Data Warrior Now?

Hi folks. Time to update y’all on some upcoming speaking engagements for this summer and fall. Here are a few talks recently scheduled: Houston DAMA When: August 9, 2016 1:30 PM Where: Salon Consulting, 2200 Post Oak Boulevard, Suite 1450 , Houston, TX Topic: Harnessing the Elasticity of the Cloud for Analytics with Snowflake and Tableau Register: Houston […]

Hint-Verwendung zur Bestimmung der Join-Reihenfolge

Brendan Furey erläuert in seinem Blog die Möglichkeiten, die Oracle bietet, die Join-Reihenfolge über Hints zu beeinflussen. Darin weist er zunächst darauf hin, dass der USE_HASH Hint eigentlich nur einen Parameter benötigt und nicht die Angabe der beiden Aliase der Tabellen, die man miteinander verknüpfen will: bei der Angabe von zwei Aliasen betrachtet Oracle dies als zwei Hints und wird folglich einen der beiden übergehen. Welcher der Hints nicht berücksichtigt wird, hängt von der Reihenfolge (more...)

Spreadsheet-like Totals and Subtotals

We very often make spreadsheets with subtotals for each row and for each column. Someone on the OTN forum asked how to produce data in this format. I answered using the cool CUBE function.

Quote of the Day: Mark Twain

It is better to deserve honors and not have them         than to have them and not deserve them. — Mark TwainFiled under: Quotes Tagged: Mark Twain, quote of the day, quotes

Staleness IMPORT für Materialized Views in all_mviews nach data pump Import

Eine kurze Notiz, da ich bei meiner Recherche im Netz nicht arg viel zum Thema gefunden habe: durch den Transport einer Materialized View über data pump (expdp - impdp) werden zwar die Daten des Segments transportiert, aber die MView wird nicht mehr für Query Rewrite verwendet und auch ein Fast Refresh ist nicht mehr möglich und scheitert an einem Fehler ORA-12034:
ORA-12034: materialized view log on "XXX"."YYY" younger than last refresh
An dieser Stelle (more...)

What should I know about SQL?

Chris Saxon from the Developer Advocates group asked the following question on Twitter.

My immediate thought regarded features I'd be disappointed to live without. Looking at some other responses I realise that the answer matches Tom Kyte's creed: "it depends".

Here is a collection of responses that I think sums(sql) really well, (more...)