Where does the log writer spend its time on?

Uncategorized
| Jan 2, 2020

The Oracle database log writer is the process that fundamentally influences database change performance. Under normal circumstances the log writer must persist the changes made to the blocks before the actual change is committed. Therefore, it’s vitally important to understand what the log writer is exactly doing. This is widely known by the Oracle database community.

The traditional method for looking at log writer performance is looking at the wait event ‘log file parallel write’ (more...)

Oracle wait event ‘log file parallel write’ change

Uncategorized
| Dec 31, 2019

This post is about a change in how the time is measured for the event ‘log file parallel write’. This is important for the performance tuning of any change activity in an Oracle database, because with the default commit settings, a foreground session that commits changes waits in the wait event ‘log file sync’, which is a wait on logwriter activity, for which the wait event ‘log file parallel write’ always has been the indicator (more...)

Linux Shell Script – passing arguments to functions and returning and capturing results

Uncategorized
| Dec 18, 2019

Developing Linux Shell Scripts is just not the same as programming in modern programming language. At least to me, it still feels novel and at times a bit weird. I am currently engaged in some scripting that requires the use of functions. That is all well, but I want to pass input parameters into my functions (instead of relying on global variables) and I would like to be able to receive the result from a (more...)

Installing Microsoft SQL Server 2019 on Linux, Part II

Uncategorized
| Dec 12, 2019

This is a 2-part blog post, the first in the series can be found on the Microsoft SQL Server blog here.

The recently released SQL Server 2019 on Linux includes several updated features, including replication, support for Microsoft Distributed Transaction Coordinator, and Change Data Capture (CDC) support. If you’re running SQL Server 2017 on Linux, these are great reasons to upgrade to SQL Server 2019 to take advantage of these updates.

Microsoft SQL Server 2019 (more...)

Tips’n’tricks: finding the (injected) private key pair used in Vagrant boxes

Uncategorized
| Dec 12, 2019

In an earlier article I described how you could use SSH keys to log into a Vagrant box created by the Virtualbox provider. The previous post emphasised my preference for using custom Vagrant boxes and my own SSH keys.

Nevertheless there are occasions when you can’t create your own Vagrant box, and you have to resort to the Vagrant insecure-key-pair-swap procedure instead. If you are unsure about these security related discussion points, review the documentation (more...)

PostgreSQL Creating Schema

Uncategorized
| Dec 10, 2019

The process of creating a schema requires you grant the CREATE ON DATABASE privilege to the user as the postgres user. You use the following syntax:

GRANT CREATE ON DATABASE videodb TO student;

As the student user, you create the app schema with the following syntax:

CREATE SCHEMA app;

Then, you can query the result as follows:

SELECT   * 
FROM     pg_catalog.pg_namespace
ORDER BY nspname;

You should see the following:

      nspname       | nspowner |               nspacl                
 (more...)

Microsofts Visual Studio Code on Linux

Uncategorized
| Dec 10, 2019
On the last weekend i was wondering, what kind of IDE i can use for doing some small programs with javascript. My first idea was eclipse, but a friend mentioned Microsofts Visual Studio Code:
 So i opened https://code.visualstudio.com/ and got
So i downloaded the .deb and after a dpkg -i of that file i was able to run Visual Studio Code on my Linux machine:
schroff@zerberus:~$ code 
The startup was amazing fast - (more...)

Bash aliases for SQLcl

Uncategorized
| Dec 9, 2019

I have quite many different databases and would like to log in to them from my linux box using my AD username and password. Creating tnsnames.ora aliases for all of them is too much work, I’d like to just specify hostname and service from command line.

Bash aliases to the rescue, but simple alias is not enough in this case, so just take it as an example how can more complex aliases be created (more...)

Tips’n’tricks: understanding “too many authentication failures” in SSH

Uncategorized
| Dec 9, 2019

Virtualbox VMs powered by Vagrant require authentication via SSH keys so you don’t have to provide a password each time vagrant up is doing its magic. Provisioning tools you run as part of the vagrant up command also rely on the SSH key based authentication to work properly. This is documented in the official Vagrant documentation set.

I don’t want to use unknown SSH keys with my own Vagrant boxes as a matter of principle. (more...)

PostgreSQL WITH to INSERT

Uncategorized
| Dec 3, 2019

This demonstrates how you insert results from a common table expression (CTE) in a leading WITH clause. I thought it would be a nice add since the existing tutorials didn’t have an example.

Create the message table, like this:

CREATE TABLE message
( message_id    SERIAL
, message_text  VARCHAR );

Now, here’s a CTE with a two fabricated rows:

WITH cte AS
( SELECT 'x-ray' AS msg
  UNION ALL
  SELECT 'MRI' AS msg )
INSERT INTO  (more...)

Create a Vagrant box with Oracle Linux 7 Update 7 Server with GUI

Uncategorized
| Dec 2, 2019
Yesterday and today I have been attending the UKOUG TechFest '19 in Brighton. And it got me eager to try things out. For instance with new Oracle DB 19c features. And therefor I should update my vagrant boxes to be able to install one. But I realized my basebox is still on Oracle Linux 7U5, and so I wanted to have a neatly fresh, latest OL 7U7 box.

Use Oracle's base box

Now, last year (more...)

Linux ser2net: no connection to /dev/ttyUSB0

Uncategorized
| Dec 1, 2019
If you are running some java application on a Linux box (especially ARM architecture) and this application accesses the serial interface (/dev/ttyUSB0, /dev/ttyUSB1 or just /dev/ttyX), then a easy way to do this, is running ser2net.

For all who are not familiar with the serial port:
https://en.wikipedia.org/wiki/Serial_port



But there is one tricky thing, you have to consider when using ser2net:

Inside ser2net.conf you will find some lines like this here:

15000:raw:0:/dev/ttyUSB0:9600 8DATABITS (more...)

Failed Installation of MSSQL-CLI on Ubuntu

Uncategorized
| Nov 26, 2019

So you want to run mssql-cli on Ubuntu Linux, but you received a number of errors and even if you got through some errors, you’re still stuck?

I’m here to try to help you get through them and hopefully I’ve captured them all.  Trust me, the Oracle DBAs have been here-  our databases and tools failed for a very long time until Linux administrators came to know what we needed and started to build (more...)

Install AWS CodeDeploy Agent on Linux

Uncategorized
| Nov 25, 2019
AWS CodeDeploy Agent is the agent that runs deploy jobs on EC2 instances. Before a CodeDeploy job will run you’ll need to make sure the agent is installed, running, and has the correct IAM permissions to execute. Installation is straight forward on Linux and will have your agent up and running in no time. The

Script To Install AWS CodeDeploy Agent on Linux

Uncategorized
| Nov 25, 2019
Here is the script for installing the AWS CodeDeploy agent on Ubuntu. See the full description here.

PostgreSQL Upsert Advanced

Uncategorized
| Nov 25, 2019

Nine years after writing how to use the MERGE statement in Oracle, I am writing how you implement an UPSERT statement in PostgreSQL. I wrote an initial post going over the basics of PostgreSQL’s upsert implementation of the INSERT statement with an DO UPDATE clause and a DO NOTHING clause.

I thought it was interesting that the PostgreSQL Upsert Using INSERT ON CONFLICT Statement web page didn’t cover using a subquery as the source for (more...)

PostgreSQL Upsert Intro

Uncategorized
| Nov 24, 2019

Oracle and SQL Server use the MERGE statement, MySQL uses the REPLACE INTO statement or ON DUPLICATE KEY, but PostgreSQL uses an upsert. The upsert isn’t a statement per se. It is like MySQL’s INSERT statement with the ON DUPLICATE KEY clause. PostgreSQL uses an ON CONFLICT clause in the INSERT statement and there anonymous block without the $$ delimiters.

The general behaviors of upserts is covered in the PostgreSQL Tutorial. It has the (more...)

How to run a java software which needs RXTX on a raspberry pi

Uncategorized
| Nov 23, 2019
In my last posting i wrote about migrating my aircraft noise measurement station to alpine linux. There i had some problems with getting the RXTX library for Java running on a linux, which uses musl and not GNU libc6.

Why does my java application require RXTX? As stated on the RXTX page:
RXTX is a Java library, using a native implementation (via JNI), providing serial and parallel communication for the Java Development Toolkit (JDK).
Now (more...)

Ansible Tips’n’tricks: rebooting Vagrant boxes after a kernel upgrade

Uncategorized
| Nov 22, 2019

Occasionally I have to reboot my Vagrant boxes after kernel updates have been installed as part of an Ansible playbook during the “vagrant up” command execution.

I create my own Vagrant base boxes because that’s more convenient for me than pulling them from Vagrant’s cloud. However they, too, need TLC and updates. So long story short, I run a yum upgrade after spinning up Vagrant boxes in Ansible to have access to the latest and (more...)

Alpine Linux, Oracle Java JDK and musl?! – why it does not work…

Uncategorized
| Nov 17, 2019
Sometime ago i did some work with Alpine Linux (s. here) and i was impressed how tiny this Linux distro was and how fast it was running.


So i decided after nearly 6 years of running an aircraft noise measuring station (for dfld.de) with Ubuntu to change to Alpine Linux.

This station runs a software on Java and needs RXTX, because the microphone is connected via USB and is read over (more...)