Infrastructure at your Service

All posts by Daniel Westermann

Daniel Westermann
Senior Consultant and Technology Leader Open Infrastructure

Daniel Westermann has more than 10 years of experience in management, engineering and optimization of databases and infrastructures. He is specialized in Oracle Technologies as Performance Optimization and Tuning, Standardization, Backup & Recovery, in High Avaibility solutions as Oracle Real Application Clusters (RAC), Oracle Data Guard, Oracle Grid Infrastructure, as well as in storage technologies as Oracle Automatic Storage Management (ASM). Daniel Westermann is Oracle Certified Professional 10g/11g/12c. He is also a PostgreSQL Plus 9.0 Professional and a Postgres Advanced Server 9.4 Professional. Prior to dbi services, Daniel Westermann was Management System Engineer at LC SYSTEMS-Engineering AG in Basel. Before that, he worked as Oracle Developper & Project Manager at Delta Energy Solutions AG in Basel (today Powel AG). Daniel Westermann holds a diploma in Business Informatics (DHBW, Germany). His branch-related experience mainly covers the pharma industry, the financial sector, energy, lottery, telecommunications.
Daniel Westermann

ACFS 12.1.0.2 on Oracle Linux 7.1

By | Database Administration & Monitoring | 2 Comments

Recently we wanted to create an ACFS filesystem on a brand new 12.1.0.2 GI installation on Oracle Linux 7.1. According to the documentation this should not be an issue as “Oracle Linux 7 with the Unbreakable Enterprise kernel: 3.8.13-33.el7uek.x86_64 or later” is supported. The “or later” is the important point. In our case: uname -a Linux racp1vm1 3.8.13-55.1.6.el7uek.x86_64 #2 SMP Wed Feb 11 14:18:22 PST 2015 x86_64 x86_64 x86_64 GNU/Linux   Should be fine as…

Read More
Daniel Westermann

Testing the just released PostgreSQL 9.5 Alpha in a docker container

By | Database Administration & Monitoring | One Comment

On the 2cnd of July the PostgreSQL Global Development Group released an alpha version of the upcoming PostgreSQL 9.5. The same day, Josh Berkus, another of those PostgreSQL core team members released a docker image for testing this alpha release. It’s never been that easy to get started with PostgreSQL or testing new features. If you are on Linux the docker packages should be available for your distribution. For Oracle Linux 7.1 make sure that…

Read More
Daniel Westermann

Indexing for like/similarity operations

By | Database Administration & Monitoring | One Comment

Indexing queries for like/similarity conditions is not that easy with the usual index types. The only option you have with btree indexes (especially if the wild-card is at the beginning of the filter) is to create a partial index on that columns for a very specific query. Let’s do a simple example with a btree index. The test data: drop table if exists t1; create table t1 ( a varchar(50) ); insert into t1 (…

Read More
Daniel Westermann

Quickly create a hundred databases and users

By | Database Administration & Monitoring | One Comment

Do you need a hundred databases and users for training etc. in PostgreSQL? Just a few lines of code: [postgres8@oel7 data]$ cat create_databases.sh #!/bin/bash NUMOFDBS=100 for i in `seq ${NUMOFDBS}`; do psql -q -c “create user u${i} UNENCRYPTED password ‘u${i}’ NOCREATEDB NOCREATEROLE NOCREATEUSER” postgres createdb -O u${i} db${i} done Execute it and you are ready: [postgres8@oel7 data]$ time ./create_databases.sh real 1m37.825s user 0m0.143s sys 0m0.109s Have a look at the databases and its owners: postgres=#…

Read More
Daniel Westermann

Swiss Postgres Conference 2015

By | Database Administration & Monitoring | No Comments

At the 26th of June I had the chance to attend the second Swiss Postgres Conference at the HSR Rapperswil. It was packed with interesting sessions. Magnus Hagander, a well known community member, started by giving an overview of PostgreSQL Europe. Then I joined Hans Schönig for learning how to write aggregate functions in PostgreSQL. Honestly I did not understand all of it but at least I am now aware of what you can do…

Read More
Daniel Westermann

another way to list invalid objects

By | Database Administration & Monitoring | One Comment

How often did I type a query like this to list the invalid objects in a database? select count(*) from dba_objects where status ‘VALID'; — and user in/not in Today I learned another way to do the same. There is a view called dba_invalid_objects. Surprisingly the view is not listed in the official 12c database reference. It is however mentioned in the upgrade guide. Let’s do some tests. Currently I do not have any invalid…

Read More
Daniel Westermann

When a function returns a collection: can you directly reference the index of the returned collection?

By | Database Administration & Monitoring | One Comment

As I am still interested in PLSQL I browsed the documentation some days ago and learned something new which is about functions returning collections. Here is a simple test case: Let’s create a simple package, specifying on collection and one function: create or replace package pkg1 as type t1 is table of number index by pls_integer; function f1 ( a number ) return t1; end pkg1; / create or replace package body pkg1 as function…

Read More
Daniel Westermann

ODA workshop at Arrow ECS

By | Database Administration & Monitoring | One Comment

On the 16th and 17th of June David Hueber, Georges Grey and myself had the chance to attend the ODA hands on workshop at Arrow ECS. Lead Trainer Ruggero Citton (Oracle ODA Product Development) did the first day with plenty of theory and examples. On the second day we had the opportunity to play on a brand new ODA X5-2: [root@odax50 ~]# oakcli show server Power State : On Open Problems : 0 Model :…

Read More
Daniel Westermann

What is more efficient: arrays or single columns values? – oracle

By | Database Administration & Monitoring | One Comment

In the last post on this topic it turned out that using an array as a column type needs more space than using a column per value in PostgreSQL. Now I’ll do the same test case in Oracle. As with the PostgreSQL test case I’ll create two test tables in Oracle: One using 10 columns and one just using one column of type varray: SQL> create table single_values ( a number, b number, c number,…

Read More
Daniel Westermann

What is more efficient: arrays or single column values?

By | Database Administration & Monitoring | One Comment

In PostgreSQL ( as well as in other rdbms ) you can define columns as arrays. What I wondered is: What is more efficient when it comes to space: Creating several columns or just creating once column as array? The result, at least for me, is rather surprising. First, let’s create a table with columns of type int: postgres=# create table single_values ( a int, b int, c int, d int, e int, f int,…

Read More