bulk update with exception handling

CREATE TABLE tmp_table (aaa VARCHAR2(100) NOT NULL); DECLARE TYPE t_varchar IS TABLE OF VARCHAR2(100) INDEX BY BINARY_INTEGER; a_varchar t_varchar; e_bulk_errors EXCEPTION; t_error_index PLS_INTEGER; PRAGMA EXCEPTION_INIT(e_bulk_errors,-24381); BEGIN a_varchar(1) := ‘aaa’; a_varchar(2) := NULL; a_varchar(4) := NULL; a_varchar(5) := ‘eee’; a_varchar(7) := ‘fff’; a_varchar(8) := ‘ggg’; a_varchar(9) := NULL; FORALL i IN INDICES OF a_varchar SAVE EXCEPTIONS […]


Learned something new today about timezones date with timezone indicator can be visualized as 2014-01-28T10:35:08+00:00 or 2014-01-28T10:35:08Z That Z is the same as +00:00 also called Zulu timezone. Never have been in the military service so didn’t know about that zulu thing. wiki1 wiki2  

undress raspbian

My raspberry pi with 64 gig sd card running raspbian was a bit unstable. Sometimes it took 4 or 5 tries to get it booted. And it crashed once in a while. Finally I got out of this misery by stopping the dbus. $sudo service dbus stop and prevent starting it again at next boot […]

where to find c headers

gcc lcdtest.c -Isrc/ -L./libpifacecad/ -lpifacecad -L./libmcp23s17/ -lmcp23s17 -o lcdtest fails into: lcdtest.c:1:23: fatal error: pifacecad.h: No such file or directory compilation terminated. let’s google: #include tells GCC to look where it finds the standard C headers, probably not where you have your header. #include “pifacecad.h tells GCC to look for headers in the current working […]

writing a lcd display program in c

Let’s start with the final part: how to compile: gcc -c mpddispl.c -o mpddispl.o gcc mpddispl.o /usr/lib/libmpdclient.so -o mpddispl Now the beginning. I bought a nifty display for my raspberry pi running mpd: a piface with a display:   Now what i want is just simple. Show the streamname and current song that is mpd […]

nfs mount point directory mess

Had to share some very specific directories from this machine by nfs. So I created a new directory in root: /nfsshare In here I created some mount points: Let’s say I have this directory /var/lib/users/xxx/bla/zzz containing all documents to be shared. in nfshare i create a new directory zzz with sudo mount -o bind /var/lib/users/xxx/bla/zzz […]

raspbian stripping

The raspberry pi sitting in my parents cupboard only handles some ssh and rsync stuff. I installed the default raspbian image. Now I will strip this device to a minimum bare state. This means, getting rid of all X stuff (it’s headless). First check some processes ($ps aux) I think not really needed root 1312 […]

Mount noatime or relatime

On my rasdpberry pi when i mount my usb disk (ext3 filesystem) just with mount /dev/sda1 /mnt/disk1 the disk gets io every 5 seconds jdbd2 shows up in iotop. So I remounted with -o noatime. Now the disk keeps quiet. Only backdraft is now files dont get a accesstime recorded. Now I read about relatime […]

new raspberry pi setup

Today I’m gonna setup a raspberry pi to be installed at my parents house. It runs as a headless backupmachine sitting in their meter cupboard, connected to an ADSL router modem switch (whatever). Te most important part of this setup will be, 1) How to recognize this device from anywhere out of this world and 2)How […]


Our housekeeper likes to pull plugs for vacuumcleaning (oh sorry yeah I forgot) especially the one which powers our nasses.  Besides these personal accidents, last year one of the harddisks got damaged through a very short power outage (just a fraction of a second). So to protect my nasses from these power interruptions, I bought a […]