DevArt Bulk Data Insertion into an Oracle Database

There are some possibilities to bulk insert data. For my tests I inserted 1'500 rows containing some strings.

  • Use the Context: 50 seconds
  • Use ArrayBinding: 43 seconds
  • Use the OracleLoader class: 14 seconds

It seems that the OracleLoader is the fastes way to do this.


Oracle SQL Fast Retrieval of CLOBS

If a table contains CLOBS, depending on the method you use to connect, usually the CLOB-columns just return a handle that will trigger another connection/query to the database in order to retrieve the value. This makes it really slow. An easy way to speed it up is to retrieve everything which is small enough as string value. A string value however is limited to 4'000 characters. Thus you need to issue two queries:


Import local subversion repository to git

If you want to import a local subversion repository (maybe a dump) to git you can do this quite easily:

First you need to map the Subversion commit authors to Git commiters. For you just create a textfile author-mapping.txt:


And then you run the following commands:


Mangled Names on Synology Diskstation

From time to time I noticed strange filenames on the Synology Diskstation. Names like BGELMF~0. They always had a tilde. Those strange names are called mangled names. Samba has a feature to provide them to bad clients. Unfortunately this can also lead to "renaming" those files.

It is better to prevent this behavior altogether. To do this you need to connect over SSH to your diskstation and then you need to login as root.

Issue the following commands:

cd /usr/syno/etc
vi smb.conf

Now insert the following line in the section global:


Exact Copies for Backups

In order to create a backup you should first of all make an exact copy

rsync -aHAX --delete /srcfolder /dstfolder

And then also check if the copy is indeed complete and exact:

diff -r /srcfolder /dstfolder


Drupal PHP Fatal error Call to a member function getElementsByTagName()

I suddenly started getting the following error:

PHP Fatal error:  Call to a member function getElementsByTagName() on a non-object in public_html/drupal/modules/filter/filter.module on line 1122

I checked what there is on line 1122. I could clearly see that the error needs to happen because $body_node was null. For a quick fix I just implemented a null check as follows:


Create a pdf from pictures

Sometimes I receive scanned documents as numbered jpeg pictures. It would be a lot more handy to have a single pdf file containing all those images. This can easily be done using bash:

convert PartOfTheDocument*.jpg WholeDocument.pdf


Interesting Swiss Maps

They always hide interesting stuff on You need to search "somewhere" for additional layers. One nice layer is the Zeitreihen layer because it allows anyone to see the maps from the 80s and 90s. Those maps (1:25'000) have a lot more detail than the ones used today. Today lots of small routes for example inside of forests are not visible anymore.

Check it here: Swiss Map from 1844 till 2012


Backup all MySQL Databases of a User

The following script can be used to backup all MySQL-Databases of a user each in it's own compressed. sql file inside a folder with todays date:


Using SSH to copy files between systems

Copy something from this system to some other system:

scp /path/to/local/file username@hostname:/path/to/remote/file

Copy something from some system to some other system:

scp username1@hostname1:/path/to/file username2@hostname2:/path/to/other/file

Copy something from another system to this system:



Subscribe to RSS