Showing posts with label Script Shell Configuration. Show all posts
Showing posts with label Script Shell Configuration. Show all posts

Oracle script for apply standby database for Standard version(Not implement Dataguard) remote copy new archivlog from Primary database host to standby host (#compat 8i,9i,10g) for Implement Disaster not Enterprise License

** Myself
## Pre Step
#1) Install oracle software (oracle standard or enterprise edition)
#2) Assigne disk same as production system
#3) Transfer backup offline to standby host (not export or datapump) to same as location production system
#4) Create standby control file from production system and transfer to standby host same location of control file (same step as create standby database or dataguard)
#5) Set rcp or scp for trust file transfer
#6) Adjust Dynamic ENV  and Execute binary ENV for you want

Shell Script Freeze and Unfreeze oracle db 8i,9i for begin/end backup(apply with backup agent)

** Myself
Freeze script
#########  DYNAMIC ENV ##############
orauser=oracle            #Oracle User
orasid=jde1                #Oracle SID
backcontrol_tmp=/tmp/backup_${orasid}controlfile.ctl        #Backup controlfile on temp directory
backcontrol_srg=/u01/back_ctl/backup_${orasid}controlfile.ctl    #Backup controlfile on storage
blog=/tmp/hot_ora_backup.log
#############################################################
###### Write information Backup to logfile ###
date >> $blog
echo "Start begin backup" >> $blog

Shell Script Freeze and Unfreeze oracle db 10g for begin/end backup(apply with backup agent)

** Myself
Freeze script
 
orauser=oracle
su - ${orauser}   << BOF 2>&1
export ORACLE_SID=$orasid
sqlplus /nolog << EOF 2>&1
connect / as sysdba
alter database begin backup;
EOF
BOF
 
Unfreeze script
orauser=oracle
su - ${orauser}   << BOF 2>&1
export ORACLE_SID=$orasid
sqlplus /nolog << EOF 2>&1
connect / as sysdba
alter database end backup;
EOF
BOF

Collect AIX configuration

** Myself
เป็น shell script ที่ใช้ในการ เก็บ configuration ของ AIX server โดยทำการเก็บข้อมูลหลักๆ ถ้าใครอยากรู้ command บางอย่างมี show ใน script นี้ครับ

copy ใต้บทความนี้ครับ

########################################

filename=$(hostname)_$(date +"%Y%m%d_%H%M").conf;

echo "##### oslevel -r ######################" > $filename ;
oslevel -r >> $filename ;
echo "\n" >> $filename ;
echo "##### oslevel -rq #####################" >> $filename ;
oslevel -rq >> $filename ;

Mirroring the rootvg Volume Group for AIX

** Myself
เป็น shell script ที่ใช้ในการ mirror logical volume ของ AIX เมื่อมีการเปลี่ยน disk หรือมีการเพื่มครับ
copy ใต้บทความนี้ครับ

#Mirroring the rootvg Volume Group for AIX
#--------------------------------------------------------------------------------
# 1. Extend rootvg to ${SEC_DISK}:
PRI_DISK=hdisk0
SEC_DISK=hdisk1


Loading