Friday, February 25, 2011

E071 // Details about the transports done in the system

To check the status of transports, we can there is one table E071 where we can check the details of transports imported in the system.

Wednesday, February 16, 2011

Tuning Oracle DB Parameters - Steps to follow

First we can check the existing parmaters with following commands:

$show sga

$show parameter shared_pool;

$show parameter sga_max_size;

$show parameter db_cache_size;

Then take backup for pfile and spfile (initSID.ora and spfileSID.ora)

/oracle/SID/102_64/dbs

$create pfile from spfile

then edit pfile with the parameters that are recommended

start database with changed pfile

$startup pfile='/oracle/SID/102_64/dbs/initSID.ora'

check the parameters

if they are correct then

$create spfile from pfile

then shutdown and restart the database

$shutdown immediate
$startup

//Issue faced
while restarting database listener not found

$tnsping SID

gave error for resolving name

resolution

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

later on added the same in .dbenv.csh and .dbenv_avggstqh.csh to make the same permanent.


//we can dynamically set the parameters in spfile online but this is not recommended as Oracle needs to adjust the parameters as well.

$alter system set shared_pool_size=400M scope=spfile;

How to find out UID and GID for HP-UX users

HP-UX command

$id oraeb3

$id dn1adm

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 :)