Tuesday, February 8, 2011

Excellent Unix Commands for finding and replacing in vi and file system

If you want to find something

$ find . | xargs grep "string"

It will find all the files recursively and then display the strings


vi commands (advanced)

Go to / Replace functionality can be used in vi... like this

:%s/stringtobereplaced/stringwithwhichtoreplace/g

(Esc + colen (:) + percentage (%) s /string1/string2/g

for eg:

:%s/avggstdh/avggstrh/g

will replace all the occurences of avggstdh with avggstrh.

Friday, February 4, 2011

BRCONNECT command for collecting stats for all tables

brconnect -c -u / -f stats -t all -f collect -p 4

Thursday, February 3, 2011

Listener Issues - TNS_ADMIN parameter

If you face listener Issues make sure that TNS_ADMIN parameter is set in your DB environment


setenv TNS_ADMIN /oracle/SID/102_64/network/admin

also you may use


tnsping SID to test (It should be running) (Your listener should be up)

We faced the situation when we were using dbua for upgrading oracle. DBUA uses tnsping, also tnsnames.ora should be set correctly

Setting parameters in Oracle - New way


We may set the parameters in oracle with Alter command as well. We need not set the parameter in pfile and then create pfile. Easy way

How to free MDM Port

Our MDM Server uses port 20005 and if it is busy it wont start, it means some other application is waiting for the port.

we find out by this command

netstat -a | grep 20005

if it gives FINWAIT_1 then it is OK it will get free in some time, but if it gives FINWAIT_2 then we need to free the same manually

After analysis we found the destination host where three EP server are hosted EP1, EP2 and EP3

we logged on to each one and found which process is looking keeping busy port 20005, with below command

lsof -i | 20005

on EP3 we found the process

killed the process by kill -9 pid

Now the port became free :)

Thursday, January 27, 2011

Host Movement - Profile Dependencies ABAP


Following profiles need to be changed for ABAP Host Movement and for Java apart from profile changes there need to be changes in configtool as per SAP Note 757692.