Using dynamic variables for shell scripting

So you may ask, why go through all the trouble?

Have you ever had to move scripts from one directories to another to find out the script is now broken?

This is due to the hard coding of the location for SQL script in the shell script.

When possible, I would like to separate shell / SQL scripts so they can be run individually and easier for debugging.

Don’t you hate it when copy/paste SQL (more...)

Using sed to format controlfile trace

Do you find it cumbersome having to format controlfile trace?

For the most part, it’s a manual and tedious process.

Using sed, it may be possible to automate task.

RESUSE overwrites existing controlfile trace.

alter database backup controlfile to trace as ‘/tmp/cf.sql’ REUSE RESETLOGS;

ARROW:(SYS@hawklas):PRIMARY> alter database backup controlfile to trace as '/tmp/cf.sql' RESETLOGS;
alter database backup controlfile to trace as '/tmp/cf.sql' RESETLOGS
ERROR at line 1:
ORA-01277: file '/tmp/cf.sql'  (more...)

How the log writer and foreground processes work together on commit.

(warning: this is a rather detailed technical post on the internal working of the Oracle database’s commit interactions between the committing foreground processes and the log writer)

After the Trivadis Performance days I was chatting to Jonathan Lewis. I presented my Profiling the log writer and database writer presentation, in which I state the foreground (user/server) process looks at the commit SCN in order to determine if its logbuffer contents are written to disk by (more...)

OEL/RHEL 7 – firewalld

How cool is getting Linux. Hope soon to not look like a Windows. If they put a butterfly or shiny window in the “start menu” I’m out of the game. The “new” firewalld is cool and dynamic, but my servers are square, boring and static. Maybe if I’m using RHEL/OEL 7 in my laptop it […]

SLES shell script to check required os packages according to documentation before starting oracle forms & reports installation


If you try to install oracle forms & reports on SLES 11.3 than despite all installer checks are passed maybe you get a message like:

Error in invoking target ‘install’ of makefile ‘<FR_HOME>/sqlplus/lib/’.

The reuirement check of the installer shows only missing openmotif classes which are not really required on SLES (see Doc ID 1567715.1), but no problems with a compiler or something similar.

Checking for binutils-2.19-11. (more...)

Patching Fun: GI and Database Patches

So, it has been some time since I have patched a database. Patching seemed necessary in a 12c database used for testing, as it was having some crashing issues. As the database and GI home were both un-patched, it seemed worthwhile to just apply the latest set of patches rather than spend (more) time troubleshooting the issue. This is a CDB database on Oracle Linux 6.5, 64 bit. This is (more...)

Web Pages Not Databases – Part 2: Fail2ban, Apache, IP Addresses, Linux, SELinux

August 23, 2015 (Back to the Previous Article in this Series) I started using Linux in 1999, specifically Red Hat Linux 6.0, and I recall upgrading to Red Hat Linux 6.1 after downloading the files over a 56k modem – the good old days.  I was a little more wise when I upgraded to another […]

Installing the Oracle database in docker

This blogpost is about how to install and run the Oracle database in docker. Please mind this is not an officially supported virtualisation platform for the Oracle database. This is a proof of concept setup.

Linux host setup.
In my setup, I used a linux host, freshly installed with Oracle Linux 6.7, which is going to be used as docker server. Please mind you need to leave diskspace (or a disk device) unused for (more...)

Preparing a Oracle Linux for a Vagrant box

This post is an overview of an installation and configuration process of the Oracle Linux, which will be used as a machine “box” for Vagrant software using a Virtual Box platform.

Post itself is divided into two parts:

  1. Oracle Linux installation (points 1 to 12)
  2. Vagrant box configuration (points 13 to 16)

Part 1 – Oracle Linux installation


1. Create a new Virtual Machine - machine name will be used later to create Vagrant (more...)

Generation of VM image for Oracle Event Processor and Stream Explorer using Vagrant and Puppet

In this article, I will introduce a set of Vagrant and Puppet configuration files that automate the creation of a Linux Virtual Box VM with Oracle Event Processor and Stream Explorer installed in it. The installation process that is automated in this article is described in all its manual glory in my earlier article: Oracle StreamExplorer and Oracle Event Processor – installation instructions to quickly get going, that describes which files to download, which (more...)

Oracle StreamExplorer and Oracle Event Processor – installation instructions to quickly get going

This article discusses the installation of Oracle Event Processor 12c on Linux 64bit and the subsequent installation of Stream Explorer on top of OEP 12c. This article assumes Linux 64bit as the operating system. More specifically: it assumes the environment that can be produced following the instructions in my article Quickly produce a Linux 64 bit Ubuntu 14.04 Desktop environment using Vagrant and Puppet – as starting point for Oracle installations – Ubuntu 14. (more...)

CloneDB in Oracle

I personally really like CloneDB, a way to thin-clone an Oracle database over NFS. This can be quite interesting, and I wanted to update my blog for (April PSU). Tim Hall has a good example for and later, and I covered cloneDB it in the Consolidation Book in some detail as well.

My setup is as follows:

  • server3 (Oracle Linux 7.1) uses Oracle Restart and has (more...)

Oracle’s ASM Filter Driver Revisited


Almost exactly a year ago I published a post covering my first impressions of the ASM Filter Driver (ASMFD) released in Oracle, followed swiftly by a second post showing that it didn’t work with 4k native devices.

When I wrote that first post I was about to start my summer holidays, so I’m afraid to admit that I was a little sloppy and made some false assumptions toward the end – assumptions (more...)

Little things worth knowing: Data Guard Broker Setup changes in 12c

One of the problems I have seen when deploying Data Guard for systems such as RAC One Node and policy managed databases was the static listener configuration you needed in 11.2. This has changed with 12c for the better if you are using Grid Infrastructure.

In the section about static listener registration a little addendum can be found (thanks to Patrick Hurley/@phurley for pointing this out to me!):

“A (more...)

The Leap Second is No Laughing Matter (if you have java on an older Linux kernel)

Earlier this month we began getting frequent email warnings from our EM12c server that some agents were experience read time outs. Then we saw that the emagent java process was using A LOT of CPU, regularly around 500% but sometimes as high as 800% as seen from "top". Restarting the agent did nothing.

I opened an SR with Oracle Support, where I was first instructed to apply a JDBC patch and then a PSU agent (more...)

Oracle 12 and latches

Oracle DBAs who are so old that they remember the days before Oracle 11.2 probably remember the tuning efforts for latches. I can still recall the latch number for cache buffers chains from the top of my head: number 98. In the older days this was another number, 157.

But it seems latches have become less of a problem in the modern days of Oracle 11.2 and higher. Still, when I generate heavy (more...)

Installing Oracle XE, ORDS and Apex on CentOS – Part Four: Stress testing

This is part four in a series of blog posts about how to install Oracle 11g Express Edition (XE) with Oracle Application Express (Apex) on a CentOS Linux server, with Apex served by Oracle REST Data Services (ORDS) running on top of Tomcat and Apache.

After setting up a small CentOS server with Oracle Express Edition (XE), I wanted to stress test it to see how much load such a barebones installation can handle. In (more...)

Installing Oracle XE, ORDS and Apex on CentOS – Part Three: Additional configuration

This is part three in a series of blog posts about how to install Oracle 11g Express Edition (XE) with Oracle Application Express (Apex) on a CentOS Linux server, with Apex served by Oracle REST Data Services (ORDS) running on top of Tomcat and Apache.

By now, you should have a working installation of CentoOS with Oracle XE, Apex, ORDS, TomCat and Apache. There are still some additional configuration and optimization we should do, which (more...)

How long does a logical IO take?

This is a question that I played with for a long time. There have been statements on logical IO performance (“Logical IO is x times faster than Physical IO”), but nobody could answer the question what the actual logical IO time is. Of course you can see part of it in the system and session statistics (v$sysstat/v$sesstat), statistic name “session logical reads”. However, if you divide the number of logical reads by the total time (more...)

Linux Annoying Defaults

So why does Linux have an alias for “ls” which turns on colour, by default, making some text impossible to read? eh?

alias ls=’ls –color=auto’

To stop this temporarily, you can “unalias ls”, but to stop it permanently for everyone:

vi /etc/profile.d/

comment out the line:

alias ll='ls -l --color=auto' 2>/dev/null
alias l.='ls -d .* --color=auto' 2>/dev/null
# alias ls='ls --color=auto' 2>/dev/null

And that’s it. Cured for life.


While I’m on, why (more...)