Tuesday, March 24, 2009

Red Hat Linux Essentials Training

Billing System Training In China


In July 2008 I went to china and participate training there it was in huawei university we spend wonderful time there ..

Sunday, March 1, 2009

Patch file for daily backup

in windows
exp "dbahakki/******@DBSID" owner=owner_name buffer=102400 feedback=10000 grants=y file=E:\BACKUP\Backup_%date:~7,2%_%date:~4,2%_%time:~0,2%_%time:~3,2%.dmp log=E:\BACKUP\Backup_%date:~7,2%_%date:~4,2%_%time:~0,2%_%time:~3,2%.log statistics=none

in linux
username=backup
password=bluechip
destination="/ucm05/backup/"
x=`date +%d%m`
nf="${x}07.DMP"
nl="${x}07.LOG"
mmstable=IN_MMS

echo "Delete 2 days old log and dmp file";

find /ucm05/backup -type f -name '*.DMP' -mtime +1 -exec rm -fr {} \;
find /ucm05/backup -type f -name '*.LOG' -mtime +1 -exec rm -fr {} \;

echo "******************** DAILY DUMP ********************"; >>/ucm05/backup/${x};

exp $username/$password@$DBSID STATISTICS=NONE FILE="${destination}${smstable}_${nf}" LOG="${destination}${smstable}_${nl}" TABLES=(OWNER.${smstable});

export ORACLE_BASE=/ucm01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib
export PATH=$PATH:$ORACLE_HOME/bin
export TNS_ADMIN=$ORACLE_HOME/network/admin
export ORACLE_SID=DBSID