MV-Refresh mit out_of_place Parameter in 12c

Und wieder verweise ich auf Jonathan Lewis, der diesmal eine interessante neue (12c) Refresh-Option für Materialized Views vorstellt, die durch den Parameter out_of_place aufgerufen wird. Die Idee dabei ist sehr einfach: im Rahmen des Refreshs wird eine zusätzliche Hilfstabelle erzeugt und gefüllt, die dann am Ende der Operation gegen das bisher zur MV gehörende Segment ausgetauscht wird (über eine interne Folge von Rename-Operationen). Das Verfahren entspricht grundsätzlich einem Workaround, den der Herr Lewis in (more...)

Frequenz des ASH/AWR Samplings

Noch einmal Jonathan Lewis, diesmal mit einer Erläuterung des ASH- und AWR-Samplings von Session-Informationen:
  • einmal in jeder Sekunde werden die Informationen zu aktiven Sessions (state = 'ACTIVE') aus v$session nach v$active_session_history kopiert.
  • diese Snapshots werden als Sample bezeichnet.
  • ein Zehntel dieser Datensätze wird in der entsprechenden AWR-Tabelle dba_hist_active_sess_history persistiert.
  • Es handelt sich aber nicht um jeden zehnten Datensatz, sondern um die Datensätze der zehnten Sekunde. Im Ergebnis sieht die enthält die AWR-Tabelle also einen (more...)

ANSI Join Syntax und das 1000-Spalten-Limit

Mein Titel klingt mal wieder wie der Name einer eher lieblos fortgeschriebenen Krimi-Serie, aber wahrscheinlich gelingt es mir eher, den Eintrag über eine solche Überschrift wiederzufinden, als anhand des Titels ANSI expansion, den Jonathan Lewis seinem Artikel gegeben hat, den ich hier abkürzend nacherzähle. Worum es geht ist Folgendes: im OTN-Forum wurde ein gut beschriebener Testfall vorgelegt, in dem ein ANSI-Join (mit recht breiten Views) in 12c (aber nicht in 11g) einen Fehler "ORA-01792: (more...)

Why I can’t do webinars

This is why I can't do webinars from my current home.

Ookla Speed Test Result

The upload speed is no doubt way too slow to cater for voice and screencast. Unfortunately I also seem to be in quite the dead spot for 4G wireless connection.

Download speed might be enough to support the streaming services recently launched in Australia, but I know ABC's iView does stutter occasionally so I think I'll still have to wait (more...)

Visualizing Statspack “Average Active Sessions” in SQL Developer

This is the second post in my mini-series on leveraging SQL Developer Reports for DBA tasks, today with visualizing Average Active Sessions (AAS). In this article I’ll cover What AAS is and how to interpret it How to build a basic line graph in SQL Developer How to extend the graph with detailed child reports (Time […]

Migrating To Oracle Using Custom Object Names

Sybase , SQL  Server and other databases allow for long identifier names.
Oracle allows for a maximum of 30 Bytes when naming objects like  users, tables, ...
When it comes to migrating objects to Oracle,  SQL Developer will truncate the object names and resolve clashes with unique names.

Say for example you have two tables called

  • Application_Name_SubArea_Name_SpecificAreaName_Table_Table1
  • Application_Name_SubArea_Name_SpecificAreaName_Table_Table2


Oracle SQL Developer will convert these to

  • Application_Name_SubArea_Name_S
  • Application_Name_SubArea_Name_1
This default new name may not be to your (more...)

What’s this ‘WHERE 1=1′?

Since some time I have been adding WHERE 1=1 to all my queries.
I get queries like this:

SELECT *
  FROM emp e
 WHERE 1=1
   AND e.ename LIKE 'A%'
   AND e.deptno = 20

Lots of people ask me what’s the use of this WHERE 1=1.

You know I like to type as little as possible but here I am typing a lot of extra characters. And yet, it makes my development life a (more...)

Join Tables on Date Ranges

A recent question on the OTN SQL forum asked how best to join two tables related by ID and date range, in order to insert one row per date into a data warehouse. One solution was to expand the data from each table, creating one row per date, then join on date. I think it's more efficient to join on date range, then expand.

An Irish Blessing (for my friends at #OUG_IRE)

Maybe a day or so late (for St Patrick’s Day) but a bunch of my Oracle pals (#ACEs and #ACEDs) are all over in Dublin at an Oracle User Group event (#oug_ire on Twitter) so this seemed appropriate. Looks like they are having a good event (based on the tweets), with a fun evening to […]

Season’s readings

Have you discovered the OTech Magazine yet?

This magazine is a brainchild of Douwe Pieter van den Bos and is now five quarterly issues young. The "Winter 2014" is a bumper issue this time, plenty of reading during various downtime that's typically afoot. The season in particular deserves quotes, since outside my home it's currently 39C.

I hope to publish something again next issue, should I find the time between a couple of other projects. (more...)

apex.oracle.com upgrades to 5.0 this Friday

There was movement at the station, for the word had passed around
That the APEX version 5 will become available.

I've jumped the gun before, but this message is taken direct from the apex.oracle.com site:


No doubt you've heard the news already, but I had to chuckle a little today as I did about an hour's work on a 3.2 environment. After playing with APEX 5 EA3, it was like jumping (more...)

SQL Developer 3 and Timestamp Conversion

I shouldn’t be using an old version of SQL Developer like v3 (3.2.10.09) anyway but… cut a long story short … I am.
I’ve also got v4 which doesn’t display the same problem

Just pointing out an oddity whilst investigating something for someone:

with x as 
(select to_date('28-MAR-2015 01:30','DD-MON-YYYY HH24:MI') dt1
 ,      to_date('29-MAR-2015 01:30','DD-MON-YYYY HH24:MI') dt2
 from   dual)
select sessiontimezone
,      dt2 "date"
,      cast(dt2 as timestamp) "timestamp"
,      to_Char(cast(dt2 as timestamp),'DD-MON-YYYY  (more...)

Function Based Index mit Trunc-Funktion für Date-Spalten

Franck Pachot erwähnt eine interessante Verbesserung in der Behandlung von Indizes in jüngeren Oracle-Versionen: seit 11.2.0.2 können funktionsbasierte Indizes, die die Trunc-Funktion für ein Datum beinhalten, auch verwendet werden, um eine Query zu unterstützen, in der auf das Datum ohne die Funktion eingeschränkt wird (also z.B. über einen Datums-Range). Das ist in der Beschreibung einmal mehr unhandlich, sollte aber durch ein kleines Beispiel leicht zu verdeutlichen sein:

drop table t;

create (more...)

Better Data Modeling: The Book

Trying to be as productive as possible during my infrequent down time, I just published another Kindle book with some of my best tips for Oracle Data Modeler. it is called Better Data Modeling: Tips for Enhancing Your Use of Oracle SQL Developer Data Modeler. If you are one of the 3.5 million users (or […]

Visualizing Statspack Performance Data in SQL Developer

If you run Oracle Standard Edition or haven’t licenced Diagnostics Pack for Enterprise Edition, then you don’t have AWR and ASH Data available. This is when Statspack, the predecessor of AWR, comes in handy to keep a history of database performance metrics. But although Oracle still deliver Statspack with their recent DB releases (yes, even in […]

Hybrid Hash Distribution für Parallele Operationen in 12c

Randolf Geist hat in jüngerer Vergangenheit einige Artikel zu den in 12c eingeführten Features mit Bezug zur Parallel Execution geschrieben. Darunter findet man:

All commenters now welcome

I've finally bitten the bullet and disabled the Google+ commenting mechanism from this blog. I promised this in my 2014 annual review, and I figure I might as well not wait.

When Google announced they would integrate Google+ with blogger, it sounded like a good idea at the time. However it required that commenters needed a Google+ account as opposed to having a number of authentication options.

Unfortunately this means the many comments made (more...)

Perth Breakfast Meeting – APEX5 + JSON + Food

Do you live in Perth, Western Australia?
Do you use Oracle Application Express?
Are you interested in seeing how easy it is to extend the product?
Keen to see APEX 5 in action?

Please tell me you're free for breakfast on Tuesday March 24. You'll be out by 9am feeling glad you came. Visit the event details page for the abstract, it's inspired by a book I'm currently writing ;p


MAR
24

AUSOUG: Add Awesome (more...)

Adjusting Interactive Reports – learning from mistakes

Sometimes I come across code where it's obvious someone has taught themselves APEX, then worked through a problem to come up with a solution - but they went a long way.

Today's situation required data in an interactive report to not wrap the output. I thought it'd be worth sharing because a few lessons might be demonstrated along the way for newer developers.

Here is the long way:


1) Add this to the Page Load (more...)

Komprimierung in Oracle Versionen und Varianten

Noch mal Franck Pachot - diesmal mit einer schönen Darstellung der Verfügbarkeit unterschiedlicher Komprimierungs-Features in den Oracle-Releases und Editionen:
  • NOCOMPRESS: die einzige Option in der Standard-Edition.
  • BASIC COMPRESSION for bulk load: gibt es in der Enterprise Edition seit 9i und erfordert nicht die Lizenzierung zusätzlicher Optionen. In 12c lautet die offizielle Syntax zur Verwendung: ROW STORE COMPRESS BASIC; das schlichte Schlüsselwort COMPRESS funktioniert aber auch noch.
  • ADVANCED COMPRESSION for OLTP: seit 11g verfügbar; seit 12c ist (more...)