Open Fedora Port 80

After installing the LAMP stack on Fedora, you need to open port 80 in the Firewall to access the PHP programs on the Fedora instance from external servers. You can open a firewall port by launching the firewall-config application as the root user with the following syntax:

firewall-config

The firewall-config utility opens the following dialog message:

FedoraFirewall1

Click on the Ports tab, and you’ll see the following:

FedoraFirewall2

Click on Add button to add a port (more...)

Fedora Install LAMP

My students wanted an extra credit assignment, so I thought a LAMP configuration and test would be appropriate. The only problem was I hadn’t added it to their course VMware instance. So, here are the instructions to install Apache2, PHP, and MySQLi for a complete LAMP stack.

The post builds on my Fedora Install of MySQL and MySQL Workbench on Fedora posts from last year. It also presumes that you’ve installed a studentdb database but (more...)

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...)

Lowercase Table Names

A student posed the question about why table names are case sensitive. That’s because case insensitive table names are the default installation, as qualified in the MySQL documentation. You can verify that with the following query:

SELECT CASE
         WHEN @@lower_case_table_names = 1 THEN
           'Case insensitive tables'
         ELSE
           'Case sensitive tables.'
         END AS "Table Name Status";

The default value returned is:

+------------------------+
| Table Name Status      |
+------------------------+
| Case sensitive tables. |
+------------------------+
 (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 […]

PostgreSQL Types

PostgreSQL like Oracle supports record data types but unlike Oracle, PostgreSQL doesn’t support collections of record data types. Here’s an example of how to define a PostgreSQL composite data type, and how to use it as a column’s data type.

CREATE TYPE address_type AS
( street_address  VARCHAR
, city            VARCHAR
, state           VARCHAR
, zip_code        VARCHAR );

Then, you define an ADDRESS table, like:

CREATE TABLE address
( address_id      SERIAL
, address_struct  ADDRESS_TYPE ) (more...)

PostgreSQL Auto IDs

PostgreSQL’s approach to automatic numbering, is simpler than Oracle, MySQL, and Microsoft SQL Server. For example, you have a two-step process with Oracle, MySQL, and Microsoft SQL Server. First, you create an Oracle table with the GENERATED AS IDENTITY clause, a MySQL table with the AUTO_INCREMENT clause, and a Microsoft SQL Server table with the IDENTITY(1,1) clause. Then, you need to write an INSERT statement like:

  1. Oracle’s INSERT statement excludes the auto-incrementing column from the (more...)

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 […]