Oracle Database Experts

By Charles Kim

December 19th, 2009

One Liner to View the Inventory XML file

Solaris:

cat /var/opt/oracle/oraInst.loc |grep inventory_loc |cut -d= -f2 |xargs -I {} -t cat {}/ContentsXML/inventory.xml

Linux and other Unix OS:

cat /etc/oraInst.loc |grep inventory_loc |cut -d= -f2 |xargs -I {} -t cat {}/ContentsXML/inventory.xml

Notes:
1. The -t option tells it to display out the syntax before execution
2. The -I is for Insert mode. utility is executed for each
line from standard input, taking the entire
line as a single argument, inserting it in
argument s for each occurrence of replstr.

Posted by Charles Kim, Oracle ACE Director

March 19th, 2008

Setup VNCServer to autostart after a server reboot

Modify /etc/sysconfig/vncservers

# The VNCSERVERS variable is a list of display:user pairs.
#
# Uncomment the lines below to start a VNC server on display :2
# as my ‘myusername’ (adjust this to your own). You will also
# need to set a VNC password; run ‘man vncpasswd’ to see how
# to do that.
#
# DO NOT RUN THIS SERVICE if your local area network is
# untrusted! For a secure way of using VNC, see
# <URL:http://www.uk.research.att.com/archive/vnc/sshvnc.html>.

# Use “-nolisten tcp” to prevent X connections to your VNC server via TCP.

# Use “-nohttpd” to prevent web-based VNC clients connecting.

# Use “-localhost” to prevent remote VNC clients connecting except when
# doing so through a secure tunnel. See the “-via” option in the
# `man vncviewer’ manual page.

VNCSERVERS=”1:oracle 2:root”
VNCSERVERARGS[1]=”-geometry 1024×768″

Once the changes are saved, Run “chkconfig vncserver on 345″ to enable autostartup. When the server reboots, two vncserver processes will start, one for root and the other for oracle.

March 10th, 2008

Create a new file system

[root@gc ~]# fdisk -l

Disk /dev/hda: 100.0 GB, 100030242816 bytes
255 heads, 63 sectors/track, 12161 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 2040 16386268+ 83 Linux
/dev/hda2 2041 6119 32764567+ 83 Linux
/dev/hda3 6120 6641 4192965 82 Linux swap
/dev/hda4 6642 12161 44339400 5 Extended
/dev/hda5 6642 7163 4192933+ 83 Linux
/dev/hda6 7164 7662 4008186 83 Linux
/dev/hda7 7663 8161 4008186 83 Linux
/dev/hda8 8162 8660 4008186 83 Linux
/dev/hda9 8661 9159 4008186 83 Linux
/dev/hda10 9160 9658 4008186 83 Linux
/dev/hda11 9659 10281 5004216 83 Linux

[root@gc ~]# mke2fs -j /dev/hda11
mke2fs 1.35 (28-Feb-2004)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
626496 inodes, 1251054 blocks
62552 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=1283457024
39 block groups
32768 blocks per group, 32768 fragments per group
16064 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736

Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 33 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@gc ~]# mkdir /nfs1
[root@gc ~]# vi /etc/fstab

# This file is edited by fstab-sync – see ‘man fstab-sync’ for details
LABEL=/ / ext3 defaults 1 1
LABEL=/apps /apps ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tmpfs defaults 0 0
none /proc proc defaults 0 0
none /sys sysfs defaults 0 0
LABEL=/tmp /tmp ext3 defaults 1 2
LABEL=SWAP-hda3 swap swap defaults 0 0
rac1.dbaexpert.com:/backups/oracle /backups/oracle nfs rw,rsize=32768,wsize=32768,tcp,hard,nointr,nfsvers=3,bg,actimeo=0,timeo=600,suid,async
/dev/hdc /media/cdrecorder auto pamconsole,fscontext=system_u:object_r:removable_t,exec,noauto,managed 0 0
/dev/hda11 /nfs1 ext3 defaults 1 1

[root@gc ~]# mount /nfs1
[root@gc ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda1 16G 3.7G 11G 26% /
/dev/hda2 31G 26G 3.7G 88% /apps
none 1014M 566M 449M 56% /dev/shm
/dev/hda5 4.0G 41M 3.7G 2% /tmp
/dev/hda11 4.7G 42M 4.5G 1% /nfs1

[root@gc ~]# cd /nfs1
[root@gc nfs1]# mkdir oracle
[root@gc nfs1]# chown oracle:oinstall oracle
[root@gc nfs1]# ls -tlr
total 24
drwx—— 2 root root 16384 Mar 10 22:32 lost+found
drwxr-xr-x 2 oracle oinstall 4096 Mar 10 22:33 oracle




January 9th, 2008

Oracle Validated RPMs

If you are licensed to use Oracle Enterprise Linux and have setup up2date with OLN, you can use up2date with the “–install oracle-validated” option to automatically install all required packages by the Oracle database installer. The oracle-validated installation also creates the oracle OS user and an oinstall and dba groups.

up2date --install oracle-validated

Fetching Obsoletes list for channel: el4_i386_addons...

Fetching Obsoletes list for channel: el4_i386_oracle...

Fetching Obsoletes list for channel: el4_i386_latest...

Fetching rpm headers...
########################################

Name                                    Version        Rel
----------------------------------------------------------
oracle-validated                        1.0.0          3.el4             i386  

Testing package set / solving RPM inter-dependencies...
########################################
oracle-validated-1.0.0-3.el ########################## Done.
elfutils-libelf-devel-0.97. ########################## Done.
gcc-3.4.6-3.1.0.1.i386.rpm: ########################## Done.
gcc-c++-3.4.6-3.1.0.1.i386. ########################## Done.
glibc-devel-2.3.4-2.25.i386 ########################## Done.
glibc-headers-2.3.4-2.25.i3 ########################## Done.
glibc-kernheaders-2.4-9.1.9 ########################## Done.
libstdc++-devel-3.4.6-3.1.0 ########################## Done.
sysstat-5.0.5-11.rhel4.i386 ########################## Done.
Preparing              ########################################### [100%]

Installing...
   1:libstdc++-devel        ########################################### [100%]
   2:glibc-kernheaders      ########################################### [100%]
   3:glibc-headers          ########################################### [100%]
   4:glibc-devel            ########################################### [100%]
   5:gcc                    ########################################### [100%]
   6:gcc-c++                ########################################### [100%]
   7:sysstat                ########################################### [100%]
   8:elfutils-libelf-devel  ########################################### [100%]
   9:oracle-validated       ########################################### [100%]
.....
Posted by Charles Kim @ DBAExpert.com
December 1st, 2007

Required Kernel Parameters and RPM Requirements for Grid Control on Redhat 4

Kernel Parameters in /etc/sysctl.conf< /STRONG >

kernel.shmall = 3279547
kernel.shmmax = 2147483648
kernel.shmmni = 4096
#semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 256 32000 100 142
fs.file-max = 327679
net.ipv4.ip_local_port_range = 1024 65000
kernel.msgmni = 2878
kernel.msgmax = 8192
kernel.msgmnb = 65535
net.core.rmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144

To reload the kernel:
sysctl -p

RPM Requirements

glibc-2.3.4-2.9
make-3.79
binutils-2.15.92.0.2-13
gcc-3.4.3-22.1
libaio-0.3.96
glibgc-common-2.3.4-2.9
setarch-1.6-1
pdksh-5.2.14-30
openmotif21-2.1.30-11
sysstat-5.0.5-1
gnome-libs-1.4.1.2.90-44.1
libstdc++-3.4.3-22.1
libstdc++devel-3.4.3-22.1
compat-libstdc++-296-2.96-
compat-db-4.1.25-9
control-center-2.8.0-12
xscreensaver-4.18-5.rhel4.2

Posted by Charles Kim @ DBAExpert.com

November 9th, 2007

Use uuencode from unix to attach files to mail recipients

The rpm that is required to install uucp in Redhat is sharutils:

root# rpm -ihv sharutils-4.2.1-22.2.x86_64.rpm
Preparing… ########################################### [100%]
1:sharutils ########################################### [100%]

Once you have uuencode installed and configured, you can attach file using the example code below:

uuencode rman_backup.ksh rman_backup.ksh |mailx -s “Attached rman backup shell script” oradba@dbaexpert.com

Posted by: Charles Kim @ DBAExpert.com

November 7th, 2007

Change hostnames in Linux

Check /etc/sysconfig/network
If you have a static IP address, then /etc/sysconfig/network is configured as follows:

NETWORKING=yes
HOSTNAME=”mybox.mydomain.com”

Posted by Charles Kim @ DBAExpert.com

October 24th, 2007

Remove files with find

In this example, we will remove all files that have not been modified in 30 days.
find . -mtime +30 -exec rm -f {} \;

If you have a ton of files in the directory, the find command used above will spit out errors. In this case, you may want to try the find command piped to xargs:

find . -mtime +30 |xargs rm -f

rhct-logo

Posted by: Charles Kim @ DBAExpert.com

October 22nd, 2007

Introduction to CVS

Relevant Aliases
cvsadd=’echo “Enter File to Add to CVS Repository”; read FILE; cvs add $FILE; cvs ci -m “Initial load of file into the
vs repository” $FILE’
cvsci=’echo “Enter File to Check-In to CVS Repository”; read FILE; cvs ci $FILE’
cvsprod=’. $SH/CVS.profile prod’

From the $SH directory – To Check Out a file from the CVS repository:
DBATOOLS > cvs co sh/vmstat.ksh
U sh/vmstat.ksh
ictcdb25:/u01/app/oracle/general/sh
DBATOOLS > cd sh
ictcdb25:/u01/app/oracle/general/sh/sh
DBATOOLS > l -tlr
total 4
4 -rwxr-xr-x 1 oracle oinstall 2748 Dec 22 08:26 vmstat.ksh
0 drwxr-sr-x 2 oracle oinstall 256 Dec 22 08:30 CVS

Check out certain versions:
cvs co -r 1.3 sh/rman_backup.ksh

Check In a file into the CVS repository
DBATOOLS > cvs add dgman.ksh
cvs add: scheduling file `dgman.ksh’ for addition
cvs add: use ‘cvs commit’ to add this file permanently
ictcdb25:/u01/app/oracle/general/sh
DBATOOLS > cvs ci -m “Initial load of dgman.ksh” dgman.ksh
RCS file: /u01/app/oracle/general/cvs/sh/dgman.ksh,v
done
Checking in dgman.ksh;
/u01/app/oracle/general/cvs/sh/dgman.ksh,v <– dgman.ksh
initial revision: 1.1
done

Help
cvs –help
cvs -H co

DBATOOLS > cvs -H add
Usage: cvs add [-k rcs-kflag] [-m message] files…
-k Use “rcs-kflag” to add the file with the specified kflag.
-m Use “message” for the creation log.
(Specify the –help global option for a list of other help options)

Current Status of a file
cvs status rman_backup.ksh

Revision history of a file
cvs rlog sh/rman_backup.ksh

Check Differences Between Versions
cvs diff -r 1.1 -r 1.2 srvping.ksh
Index: srvping.ksh
===================================================================
RCS file: /u01/app/oracle/general/cvs/sh/srvping.ksh,v
retrieving revision 1.1
retrieving revision 1.2
diff -r1.1 -r1.2
1a2
> # Created By: Basir Kabir

rhct-logo

October 18th, 2007

Unix: Create oracle user

groupadd -g 500 oinstall

groupadd -g 501 dba

mkdir -p /apps/oracle

mkdir -p /var/opt/oracle

useradd -u 500 -d /home/oracle -g oinstall -G dba -s /bin/bash oracle

chown oracle:dba /apps/oracle /var/opt/oracle

October 12th, 2007

Sample .aliases file

#!/bin/ksh

alias ck=’cd $HOME/work/ck’

export DBTOP=$HOME/work/ck

. $HOME/.ORACLE_BASE

alias bkups=’cd $ADMIN/exp/bkups’

alias DBS=’cd $ORACLE_HOME/dbs’

alias log=’cd $ORACLE_BASE/admin/$ORACLE_SID/log;clear;pwd;ls’

alias phone=’head -1 $HOME/.phone; cat $HOME/.phone |grep -i ‘

export PFILE=$ORACLE_BASE/admin/${ORACLE_SID}/pfile

export SH=$ORACLE_BASE/general/sh

export SQL=$ORACLE_BASE/general/sql

export ISQL=$ORACLE_BASE/admin/www/isql

alias adhoc=’cd $ORACLE_BASE/admin/$ORACLE_SID/adhoc; clear; pwd; ls’

alias admin=’cd $ORACLE_BASE/admin/$ORACLE_SID; clear; pwd; ls’

alias adump=’cd $ORACLE_BASE/admin/$ORACLE_SID/adump; clear; pwd; ls’

alias ALERT=’view $ORACLE_BASE/admin/$ORACLE_SID/bdump/alert_$ORACLE_SID.log’

alias arch=’cd $ORACLE_BASE/admin/$ORACLE_SID/arch; clear; pwd; ls’

alias ARCH_DIR=’cd $ORACLE_BASE/admin/$ORACLE_SID/arch’

alias bdump=’cd $ORACLE_BASE/admin/$ORACLE_SID/bdump; clear; pwd; ls’

alias bksp=’stty erase ^?’

alias bs=’stty erase ^H’

alias cddt=’cd `date +%m%d%y`’

alias cdump=’cd $ORACLE_BASE/$ORACLE_SID/admin/cdump; clear; pwd; ls’

alias ckcp=’$ORACLE_BASE/general/sh/check_ps.ksh CPMGR’

alias ckfsv=’$ORACLE_BASE/general/sh/check_ps.ksh f60srvm’

alias ckipc=’/etc/sysdef | tail -24′

alias ckora=’$ORACLE_BASE/general/sh/check_ps.ksh ora_ | sort’

alias ckps=’$ORACLE_BASE/general/sh/check_ps.ksh’

alias ckrsv=’$ORACLE_BASE/general/sh/check_ps.ksh rwmts60′

alias ckrunf=’$ORACLE_BASE/general/sh/check_ps.ksh f60webmx | grep -v f60srv | sort’

alias cksmon=’$ORACLE_BASE/general/sh/check_ps.ksh smon | sort +8′

alias cksys=’/usr/platform/`uname -i`/sbin/prtdiag -v’

alias cktns=’$ORACLE_BASE/general/sh/check_ps.ksh tnslsnr’

alias ckuser=’$ORACLE_BASE/general/sh/user_info.ksh’

alias CONFIG=’vi $ORACLE_BASE/admin/$ORACLE_SID/pfile/config${ORACLE_SID}.ora’

if [ "$OS" = "HP-UX" ]; then

alias cpu=’sar -M 1 1′

elif [ "$OS" = "Solaris" ]; then

alias cpu=’uname -X | grep CPU’

elif [ "$OS" = "AIX" ]; then

alias cpu=’prtconf |egrep -i “Processor|cpu”‘

fi

alias create=’cd $ORACLE_BASE/admin/$ORACLE_SID/create; clear; pwd; ls’

alias dbtop=’cd $ORACLE_BASE/general’

alias dbtoplog=’cd $ORACLE_BASE/general/log;clear;pwd;env|grep ORACLE_SID=|grep -v ORACLE_SID_;ls’

alias dbtopsh=’cd $ORACLE_BASE/general/sh;clear;pwd;env|grep ORACLE_SID=|grep -v ORACLE_SID_;ls’

alias dbtopsql=’cd $ORACLE_BASE/general/sql;clear;pwd;env|grep ORACLE_SID=|grep -v ORACLE_SID_;ls’

alias gerp=’/bin/grep’

alias gzcat=’gunzip <’

alias INIT=’vi $ORACLE_HOME/dbs/init${ORACLE_SID}.ora’

alias l=’ls -lstr’

alias land=’lp -d cc1-3pub6 -y landscape’

alias lastfile=’vi $(ls -ltr |tail -1 |awk {“print \$9″})’

alias LISTENER=’vi $ORACLE_HOME/network/admin/listener.ora’

alias ll=’ls -ltra’

alias mddt=’mkdir `date +%m%d%y`’

alias mem=’prtconf | grep Memory’

alias page=’prtconf | egrep -i “Total Paging|Percent Used”‘

alias obase=’cd $ORACLE_BASE; clear; pwd; ls’

alias ohome=’cd $ORACLE_HOME’

alias on=’cd $ORACLE_HOME/network/admin’

alias ora=’env | grep ORA|sort’

alias oraexp=’cd $ORACLE_BASE/admin/$ORACLE_SID/exp; clear; pwd; ls’

alias ORATAB=’vi /etc/oracle/oratab’

alias pfile=’cd $ORACLE_BASE/admin/$ORACLE_SID/pfile; clear; pwd; ls’

alias psora=’ps -ef |grep -i lgwr |grep -v grep| awk -F_ {“print \$3″} |sort’

alias scripts=’cd $ORACLE_BASE/general/sh’

alias sid=’echo $ORACLE_SID’

alias sql=’cd $ORACLE_BASE/general/sql’

alias sqlp=’sqlplus “/ as sysdba”‘

alias svrmgrl=’sqlplus -prelim “/ as sysdba”‘

alias TAILALERT=’tail -f $ORACLE_BASE/admin/$ORACLE_SID/bdump/alert_$ORACLE_SID.log’

alias TNSNAMES=’vi $ORACLE_HOME/network/admin/tnsnames.ora’

alias udump=’cd $ORACLE_BASE/admin/$ORACLE_SID/udump; clear; pwd; ls’

#alias apache=’cd $ORACLE_HOME/Apache/Apache’

alias apache=’cd /usr/local/Zend/apache2′

alias www=’cd $ORACLE_BASE/admin/www’

alias servers=’cat $SH/servers.list |grep -v \#| sort |awk -F”:” {“print \$1, \$3, \$4, \$5″}’

alias display=’echo “Enter last digits of display”;read a; export DISPLAY=10.131.224.$a:0.0; export DISPLAY’

alias dfk=’df -k |sort |more’

#—————————-

# Syncronization of Servers

#—————————-

alias push=’$SH/ssh_push’

alias push_all=’$SH/ssh_push_to_all_designated_servers.ksh’

alias pull=’$SH/scp_pull’

#—————————-

# SQL Queries

#—————————-

alias rodba+=’[ -f $SH/.rodba.pw ] && sqlplus rodba/$(cat $SH/.rodba.pw)’

alias rodba=’$SH/rodba.ksh’

alias vlsuser=’$SH/vlsuser.ksh’

alias rodba++=’[ -f $SH/.rodba.pw ] && sqlplus rodba/$(cat $SH/.rodba.pw)@DBATOOLS’

export TMPDIR=/tmp/dba

export RODBA_PW=$([ -f $SH/.rodba.pw ] && cat $SH/.rodba.pw)

alias backup_status=’cat $SQL/backup_status.sql $SQL/exit.sql > $TMPDIR/backup_status.sql; sqlplus -s rodba/${RODBA_PW}@dbatools @$TMPDIR/backup_status.sql’

alias backup_status3=’cat $SQL/backup_status_3days.sql $SQL/exit.sql > $TMPDIR/backup_status_3days.sql; sqlplus -s rodba/${RODBA_PW}@dbatools @$TMPDIR/backup_status_3days.sql’

alias backup_status7=’cat $SQL/backup_status_7days.sql $SQL/exit.sql > $TMPDIR/backup_status_7days.sql; sqlplus -s rodba/${RODBA_PW}@dbatools @$TMPDIR/backup_status_7days.sql’

alias vmstats=’cat $SQL/vmstat.sql $SQL/exit.sql > $TMPDIR/vmstat.sql; sqlplus -s rodba/${RODBA_PW}@dbatools @$TMPDIR/vmstat.sql’

#———————————-

# Change Aliases on a weekly basis

#———————————-

alias editalias=’sudo vi /etc/aliases; sudo /usr/sbin/newaliases’

alias editaliases=’sudo vi /etc/aliases; sudo /usr/sbin/newaliases’

#—————————-

# CVS

#—————————-

alias cvsprod=’. $SH/CVS.profile prod’

alias cvsstg=’. $SH/CVS.profile stg’

alias cvsadd=’echo “Enter File to Add to CVS Repository”; read FILE; cvs add $FILE; cvs ci -m “Initial load of file into the cvs repository” $FILE’

alias cvsci=’echo “Enter File to Check-In to CVS Repository”; read FILE; cvs ci $FILE’

#—————————-

# X Windows

#—————————-

alias xwin=’echo “Enter Hostname:”; read HOST; ssh $HOST “/usr/openwin/bin/xterm -display $DISPLAY -bg blue -sb -fg white -sl 10000 -geometry 120×26 -fn 6×13 -title $HOST &”‘

alias X=’$SH/wterm.sh’

#—————————-

# OEM

#—————————-

alias omsstop=’oemctl stop oms sysman/oracle123′

alias omsstart=’oemctl start oms’

#—————————-

# Apache

#—————————-

alias apachestop=’. oracle_setup.ksh RMANPROD; cd $ORACLE_HOME/Apache/Apache/bin; ./apachectl stop’

alias apachestart=’. oracle_setup.ksh RMANPROD; cd $ORACLE_HOME/Apache/Apache/bin; ./apachectl start’

alias apacherestart=’. oracle_setup.ksh RMANPROD; cd $ORACLE_HOME/Apache/Apache/bin; ./apachectl restart’

#—————————-

# PERFSTAT

#—————————-

alias sqlperf=’[ -f $SH/.perfstat.pw ] && sqlplus perfstat/$(cat $SH/.perfstat.pw)’

#—————————-

# RMAN

#—————————-

alias rman+=’[ -f $SH/.rman.pw ] && rman target / catalog rman/$(cat $SH/.rman.pw)@RMANPROD’

alias rmandev+=’rman target / catalog rman/rman@RMANDEV’

alias sqlrman=’[ -f $SH/.rman.pw ] && sqlplus rman/$(cat $SH/.rman.pw)@RMANPROD’

alias sqlrmandev=’sqlplus rman/rman@RMANDEV’

alias rman_crosscheck_archivelogs=’[ -f $SH/.rman.pw ] && print “change archivelog all crosscheck;” |rman target / catalog rman/$(cat $SH/.rman.pw)@RMANPROD’

alias appp=’cd $ORACLE_BASE/admin/www/appportal’

alias tail_edm_logs=’tail -f /usr/epoch/EB/log/backups.log’

alias view_edm_logs=’view /usr/epoch/EB/log/backups.log’

alias XDK=’export ORACLE_SID=DBA920; export ORAENV_ASK=NO; . oraenv; cd $ORACLE_HOME/xdk/demo/java/xsql/dba’

alias RDA=’cd $ORACLE_BASE/admin/www/RDA’

alias CGI=’export ORACLE_SID=DBA920; export ORAENV_ASK=NO; . oraenv; cd $ORACLE_HOME/Apache/Apache/cgi-bin’

#—————————-

# Make Man Pages

#—————————-

alias makeman=’$SH/makeman.ksh’

alias kill_remote_x=’$SH/kill_remote_x.ksh’

export CK=$HOME/work/ck

#—————————-

# dba_ shell script aliases

#—————————-

alias dbamenu=’cd $SH; $SH/menu’

alias dba_session=’$SH/dba_session’

alias dba_efs=’$SH/dba_efs’

alias dba_sqltrace=’$SH/dba_sqltrace’

alias dba_sqltrace_user=’$SH/dba_sqltrace_user’

alias dba_histograms=’$SH/dba_histograms’

alias dba_init=’$SH/dba_init’

alias dba_sga=’$SH/dba_sga’

alias dba_user_memory=’$SH/dba_user_memory’

alias dba_last_analyzed=’$SH/dba_last_analyzed’

alias dba_object=’$SH/dba_object’

alias dba_object_id=’$SH/dba_object_id’

alias dba_analyze_table=’$SH/dba_analyze_table’

alias dba_analyze_schema=’$SH/dba_analyze_schema’

alias dba_long_sql=’$SH/dba_long_sql’

alias unix_ps_oracle=’$SH/unix_ps_oracle’

alias unix_oramem=’$SH/oramem.ksh’

alias unix_check_backup=’$SH/unix_check_backup’

alias unix_defunct=’$SH/unix_defunct’

alias topmem=’ps -e -o pid,vsz,args | sort -nr -k2,2 | head -20′

alias topcpu=’ps -e -o pcpu,pid,user,comm |sort -r -k 1 |head -20′

alias tel=’cd $SH; $SH/tel’

alias listdev=’/usr/sbin/lsdev -Cc disk’

alias ASM1=’. $SH/setup_oracle_asm.ksh +ASM1′

alias ASM2=’. $SH/setup_oracle_asm.ksh +ASM2′

alias ASM3=’. $SH/setup_oracle_asm.ksh +ASM3′

alias ASM4=’. $SH/setup_oracle_asm.ksh +ASM4′

alias asm1=’. $SH/setup_oracle_asm.ksh +ASM1′

alias asm2=’. $SH/setup_oracle_asm.ksh +ASM2′

alias asm3=’. $SH/setup_oracle_asm.ksh +ASM3′

alias asm4=’. $SH/setup_oracle_asm.ksh +ASM4′

alias lsdir=’ls -l |grep ^d’

alias topswap=”lsps -s; lsps -s |grep % |awk {‘print \$2′}”

October 11th, 2007

Up2date

up2date –arch=i386

or

up2date –arch=x86_64 libaio

 

[root@prdb1 ~]# rpm -qa –queryformat “%{NAME}-%{VERSION}.%{RELEASE} (%{ARCH})\n” | grep libaio

libaio-0.3.105.2 (i386)

libaio-0.3.105.2 (x86_64)