Skip to content
June 13, 2012 / doganay

HOW TO CLEAN ORAINVENTORY XML

, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

These lines are not necessary in oraInventory xml:

REMOVED="T"

So you can clean ’em:

uname -a|grep SunOS
if [ $? -eq 0 ]
then
INV_FILE_NAME=`grep inventory_loc /var/opt/oracle/oraInst.loc|awk -F"=" '{print $2}'`
else
INV_FILE_NAME=`grep inventory_loc /etc/oraInst.loc|awk -F"=" '{print $2}'`
fi
TMP_FILE=/tmp/inventory_$(date +%Y%m%d_%H%M%S)
grep -v "REMOVED=\"T\"" $INV_FILE_NAME > $TMP_FILE
mv $TMP_FILE $INV_FILE_NAME
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: