Tuesday 18 February 2014

Annoying oracle error during software installation

It may happen that you install first oracle server/client in a specific directory and then you'd like to do a brand new installation, but you are getting the error below, even after you've completely removed the OH:

[INS-32025] The chosen installation conflicts with software already installed in the given Oracle home.


The solution is to tamper with the configuration file:

oraInventory/ContentsXML/inventory.xml

First create a backup of the above file and then remove the lines related to the previous installation.


Tuesday 4 February 2014

Arithmetic inside Linux ksh script

Sometimes, you write a shell script and the need arises for a little arithemtic inside. There are a few ways to do this, below is the simplest way, in my opinion; this is a very simple example, to calculate the percentage done by a specific job:

#!/bin/ksh

total=27800
done=`grep 9k4dgqum1pkdh MYDB_ora_7519.trc |wc -l`


s=`echo "${done}*100/${total}" | bc`

echo "Completed : ${s}%"