Oracle: Timeout idle or dead sessions

Lately in a project we had a lot of problems with idle database sessions. It turns out that the DBA did not configure any timeout for the oracle database for idle or dead sessions. This is done with the PMON process, and via SQL*Net, by the sqlnet_expire_time parameter. SQL*Net In your sqlnet.ora file add the […]

Read More

Magento: Configure Magento with ISPConfig

Some configuration settings between ISPConfig and Magento overlap, so it was necessary to fine-tune these settings. Also make sure that you use suPHP and try to prevent mod_php, which is faster but has some problems. You can simply copy them and add them to your „Apache Directives“ in the ISPConfig, but do not forget to […]

Read More

Postgres: Remote copy a database between two machines using ssh

Sometimes it might be useful to copy a postgres database between two systems. This is not a big hazel and can be done with a simple one-liner (Port 22): [crayon-5a301880197ac629382736/] and even if your ssh connection uses a different port (1234) you are good to go: [crayon-5a301880197b2337402331/]

Read More

GIT: Updating the current branch in a non-bare repository is denied…

simple

February 23, 2012

Development

No Comment

Sometimes there are days when you just forget to configure your git repository on the server and that are the days when you run in awkward errors like that: [crayon-5a30188019a0c696863508/] The fix for this is simple, just configure your git repository on the server as a bare repository: [crayon-5a30188019a12185892216/] Then remove all files and directories, […]

Read More

VirtualBox: VMDK and VDI conversion and resize

Since VirtualBox 4.0 it is possible to resize vdi disk images, that is quit simple using the following command: [crayon-5a30188019cb4014734268/] SIZE_IN_MB reflects the new disk size so if you want to increase your image to 25GB, just use: [crayon-5a30188019cba718372702/] Sometimes it happens that you do not use a vdi with VirutalBox, but a VMWare Image […]

Read More

UNIX: Jailkit – jk_init, jk_chrootsh

simple

January 25, 2012

Linux

No Comment

Sometimes you do not want to have users bugging around with your server, but only set up a shell environment where they can work. The answer for Solaris, many Linux distributions, OpenBSD, FreeBSD and MacOSX is plain and simple JailKit. Install it using the package manager of your favorite distribution or download the source from: […]

Read More

Database: Migration from SQLite to MySQL

simple

September 6, 2011

Databases

No Comment

After working with some sqlite databases for one of my iOS projects lately, I have now decided to also add an online service for the project. But how can I migrate from sqlite to MySQL? Here are the basic three steps, I figured out that are needed to extract and modify the DDL to be […]

Read More

Oracle: How to get a formatted string from a date?

simple

September 2, 2011

Development

No Comment

If you work with SQL on Oracle you sometimes want to extract additional informations from a date field and also limit this result to a distinct set. So for example to get all distinct years of a date field from a data set, you can use the following statement, which uses a subquery: [crayon-5a3018801a012929455501/] We […]

Read More

Oracle: Escape ampersand (&) characters in SQL*Plus

When importing a backup you might have run into the problem that the ampersands (&) or colon () characters are used as bind variables in PL/SQL. This is actually no real problem, as you can simply change the substitution character using the DEFINE setting in SQL*Plus: [crayon-5a3018801a3a3323155803/] The usual substitution mechanism an ampersands would trigger, […]

Read More

Oracle: Drop All Trigger and Drop All Database

To drop all triggers in a schema, simply execute: [crayon-5a3018801a77f613045230/] To get drop queries for all tables in a schema, simply execute: [crayon-5a3018801a785852926921/] or you can get drop queries for all user objects in a schema by executing: [crayon-5a3018801a789983660000/]

Read More