Refresh Multiple Materialized Views in One Go: No Data Found

To refresh multiple Materialized Views you can use the DBMS_MVIEW package, with the procedure aptly named Refresh. One method is to provide a comma-separated list of Materialized View names, or you can use an DBMS_UTILITY.UNCL_ARRAY to achieve the same objective.
When using the latter method, I stumbled upon this oddity (which is not in the current documentation, or at least I couldn't find it).

The procedure that I initially wrote was the following:

create (more...)

Function Based Indexes und CURSOR_SHARING

Randolf Geist erläutert in seinem Blog einige interessante Details zum Zusammenspiel der Cursor-Sharing-Optionen Force und Similar (deprecated) - bei denen die verwendeten Literale durch Bindewerte ersetzt werden - mit funktionsbasierten Indizes (= Function Based Indexes; aka FBI). Grundsätzlich gilt dabei, dass FBIs durch die genannten Cursor-Sharing-Varianten unwirksam werden. Aber zumindest für den Bereich der Releases bis gibt es bestimmte Sonderfälle mit ergänzender Built-in-Logik, die die FBI-Verwendung der (more...)

SQL Brainteasers: Guess the Card Game

In celebration of my trip to Vegas last week, here’s clues to card games in SQL form:

-- Q 1
select surname || first_name
from   actors
where  films in (
  'Kung Fu Panda',
  'Nacho Libre',
  'King Kong'

-- Q 2
select description
from   dishonest_act;

-- Q 3
select (select name 
        from   elements 
        where atomic_number = 79) || 
       (em / 2)
from   hinged_barrier;

-- Q 4
select replace(name, chr(107), chr(116))


Planning out my year, I decided to take the Oracle OCP and MySQL OCP exams. I checked for review books and was pleasantly surprised to find the soon to be released OCP MySQL Database Administrator Exam Guide (Exam 1Z0-883). However, I noticed that the book was actually prepared for the obsolete and discountinued Exams 1Z0-870, 1Z0-873, and 1Z0-874.

There isn’t an alternative review book for the OCP MySQL 5.6 Developer or Database Administrator (more...)

Thoth Gateway moved to GitHub, now supports Apex 5.0

As with the Alexandria PL/SQL Utility Library, the source code for the Thoth Gateway, a mod_plsql and Apex Listener/ORDS equivalent for Microsoft IIS, now has a new home on GitHub. This should make it easy for anyone to look at and perhaps contribute to the code.

If you don't care about the source code, you can head straight to the releases page to download just the binaries. Updated installation instructions for IIS 8 will (more...)

Add zsh to Fedora

One of my students requested an option to the bash shell. It was interesting to hear that he wanted me to instal the zsh in my Fedora image.

This post shows how to add the zsh to my Fedora image because I already release a new one for the term without the zsh shell. You use the yum utility as the root user to install the zsh library:

yum install -y zsh

It should produce (more...)

Is MERGE a bug?

A few years back I pondered whether DISTINCT was a bug.

My premise was that if you are depending on DISTINCT to return a correct result set, something is seriously wrong with your table design. I was reminded of this again recently when I ran across Kent Graziano's post on Better Data Modeling: Are you making these 3 beginner mistakes in your data models?. Specifically:
Instead of that, you should be defining a natural, or (more...)

#C15LV Collaborate’15 updates!!

Hi All, Last week, I registered my presence at Collaborate’15 in Las Vegas as a speaker, attendee and at Oracle demo booth duty. It was an awesome experience meeting some polished brains and smart minds. After the first day of registration, I attended the #DBIM12c session by Maria Colgan, #DB12c Multitenant by John McHugh and #Exadata session … Continue reading

The Oracle APEX Talkshow
Not only has Juergen been adding style, pride and awareness to laptops worldwide, he's also launched a podcast.

I love podcasts. I listen to a few good science shows every week and I've been looking for some decent software related shows, and this one hits the subject matter right on the head.

Juergen states he hopes to interview many developers from the APEX team, offering perhaps a recording per month. Not limiting (more...)

Quote of the Day: We cannot direct the wind…

We cannot direct the wind… But we can adjust the sails! Are you heading where you want to, or letting the wind blow you about? Talk the helm of your life and set a course. Happy Monday! Kent The Data Warrior P.S. It is almost time for the 2nd Annual World Wide Data Vault Consortium […]

apeks sticker, check.

There are some stickers are out there causing quite the sensation in the Oracle APEX Twitter community. Check it out and join the conversation.

A couple of weeks ago I received my sticker from the master dealer, Juergen, so I thought I'd share my pimped up laptop, complete with sticker friend.

Pimp my laptop
Fun fact: the photo was taken on the same grass that formed my blog's title image.

And now I also learn (more...)

Postgres FDW-Zugriff auf Oracle

Ein kleines Syntaxbeispiel zur Definition eines Foreign Data Wrappers (FDW) in postgres. Ein paar grundsätzlichere Erläuterungen zum Thema hatte ich hier vor längerer Zeit notiert, dabei aber nur FDW-Definitionen mit Zugriff von einer postgres-Datenbank auf eine andere postgres-Datenbank untergebracht. Hier folgt eine kurze Zusammenfassung der Schritte, die nötig waren, um einen postgres-FDW-Zugriff auf eine Oracle-Datenbank einzurichten:

1. Download der zugehörigen Komponenten, die hier zu finden sind. Der Download enthält die Kontrolldatei (oracle_fdw.control) und (more...)

Oracle Cleanup a Schema

Back in January 2014, I wrote a script to cleanup an Oracle student schema. It worked well until I started using APEX 4 in my student schema. You create the following 75 objects when you create an APEX 4 schema.

------------ -------
TABLE		  17
INDEX		  28
LOB		   9

Here’s the modified script that ignores the objects created automatically by Oracle APEX when you create a student (more...)

Ruby Thin Web Server

Somebody suggested that I try out thin, “A fast and very simple Ruby web server.” So, I thought it might be interesting to test, and a simplification over Rails to demonstrate an small Ruby MVC pattern.

Installing thin seemed straight forward as a gem installation, like

gem install thin

The initial install didn’t work out of the box because I’d neglected to install the gcc-c++ library. It raised the following errors:

Fetching: eventmachine-1. (more...)

Find a string in files

From time to time, folks ask questions about how to solve common problems in Linux or Unix. Today, the question is: “How do I find a list of files that contain a specific string?” There are two alternatives with the find command, and the following sample searches look for files that contain a sqlite3 string literal.

  • Search for only the file names:
find . -type f | xargs grep -li sqlite3

Or, the more verbose:

Ruby-MySQL Columns

Last week I posted how to configure and test Ruby and MySQL. Somebody asked me how to handle a dynamic list of columns. So, here’s a quick little program to show how to read the list of column:

require  (more...)

Java-MySQL Program

It turns out that configuring Perl wasn’t the last step for my student instance. It appears that I neglected to configure my student instance to support Java connectivity to MySQL. This post reviews the configuration of Java to run programs against MySQL. It also covers the new syntax on how you register a DriverManager, and avoid Java compilation errors with the older syntax.

In prior posts, I’ve shown how to use Perl , PHP (more...)

APEX 5: forgot the images?

On my play environment I usually use Oracle APEX with the Embedded PL/SQL Gateway, just because it's so easy.
When a new version of APEX is released, just like everybody else, I upgrade my play environment.
After the apexins.sql script is run, I always want to start playing with it immediately. Usually it is at this point where I just see a blank page... scratching my head wondering why it is not running,... having (more...)

Table Functions (Steven Feuerstein)

Wenn ich an PL/SQL denke, ist meine erste Assoziation dazu der Name Steven Feuerstein. Nun denke ich nicht furchtbar oft on PL/SQL, aber wenn der Herr Feuerstein über ein Thema schreibt, dem ich mit einer gewissen Regelmäßigkeit begegne, dann ist das allemal eine Verlinkung und Zusammenfassung der zugehörigen Artikel wert:

Oracle Application Express (APEX) 5.0 available for download

The best Oracle Application Express edition of all times has finally landed. Info & details in Apex's official blog. Enjoy.