alias ali='. ~/.oraalias'
clear
if [ "`uname`" = "Linux" ]
then
scnds_ago="`cut -f1 -d. /proc/uptime` seconds ago"
startup_date="`date -d \"$scnds_ago seconds ago\" \"+%d.%m.%Y %H:%M:%S\"`"
alias ll='ls -alh'
export PS1=$'\[\e[31;1m\]`id -nur`\[\e[34;1m\](`echo $ORACLE_SID`)\[\e[0m\]@\h:\[\e[32;1m\]`pwd`\[\e[0m\]>'
else # AIX
startup_date="`who -b | awk '{print $4,$5,$6}'`"
export PS1="`whoami`(\$ORACLE_SID)@$(hostname):\$PWD > "
export PS1='$LOGNAME'@'\[\e[0;32m\]($ORACLE_SID)\[\e[m\]'`hostname`:'$PWD $ '
export PS1='\[\e[0;31m\]$LOGNAME\[\e[m\]'@'\[\e[0;32m\]($ORACLE_SID)\[\e[m\]\[\e[0;33m\]'`hostname`'\[\e[m\]':'$PWD $ '
fi;
######################
echo "+-----------------------------------------------------+"
echo " Hostname: `hostname` "
echo " Startup : $startup_date"
echo "+------------------------+----------------------------+"
echo "+--------------------- +----------------------------+"
echo "| grid GRID | ASM, Cluster |"
echo "+------------------------+----------------------------+"
######################
export envGRID=". /opt/oracle/scripts/db_env/+ASM/env/env_+ASM"
export envDB=". /env_DB"
######################
alias asm="$envGRID"
alias ASM="$envGRID"
alias +ASM="$envGRID"
alias +asm="$envGRID"
alias GRID="$envGRID"
alias grid="$envGRID"
alias DB="$envDB"
alias db="$envDB"
alias AGENT="$envAGENT"
alias +ASM='. /opt/oracle/scripts/db_env/+ASM/env/env_+ASM'
alias +asm='. /opt/oracle/scripts/db_env/+ASM/env/env_+ASM'
alias AGENT='nalias'
alias ASM='. /opt/oracle/scripts/db_env/+ASM/env/env_+ASM'
alias GRID='. /opt/oracle/scripts/db_env/+ASM/env/env_+ASM'
alias al='find $DIAG -name "alert_$ORACLE_SID.log" -exec less {} \;'
alias ali='. ~/.oraalias'
alias asm='. /opt/oracle/scripts/db_env/+ASM/env/env_+ASM'
alias cda='cd $ORACLE_ADMIN'
alias cdal='cd $ORACLE_DIAG/alert'
alias cdb='cd $ORACLE_DIAG/trace'
alias cdd='cd $ORACLE_DIAG'
alias cddba='cd $ORACLE_DBADMIN'
alias cdh='cd $ORACLE_HOME'
alias cdi='cd $ORACLE_BASE/scripts/setup'
alias cdl='cd $OB/scripts/log'
alias cdn='cd $ORACLE_HOME/network/admin'
alias cds='cd $OB/scripts'
alias cdt='cd $ORACLE_DIAG/trace'
alias envo='env| grep -i ora'
alias grid='. /opt/oracle/scripts/db_env/+ASM/env/env_+ASM'
alias ll='ls -al'
alias db='. /opt/oracle/scripts/env_db'
alias psg='ps -ef| grep'
alias psm='psg pmon'
alias pso='ps -ef| grep -i ora'
alias rctl='rlwrap -f /opt/oracle/scripts/rlwrap/lsnrctl.key lsnrctl'
alias rdgm='rlwrap -f /opt/oracle/scripts/rlwrap/dg.key dgmgrl '
alias rsql='rlwrap -f /opt/oracle/scripts/rlwrap/sql.key sqlplus / as sysdba'
alias sql='sqlplus "$vSQLCONNECT"'
alias ta='find $DIAG -name "alert_$ORACLE_SID.log" -exec tail -f {} \;'
alias tl='ReadListener tl'
alias va='find $DIAG -name "alert_$ORACLE_SID.log" -exec vi {} \;'
alias vl='ReadListener vl'
clear
if [ "`uname`" = "Linux" ]
then
scnds_ago="`cut -f1 -d. /proc/uptime` seconds ago"
startup_date="`date -d \"$scnds_ago seconds ago\" \"+%d.%m.%Y %H:%M:%S\"`"
alias ll='ls -alh'
export PS1=$'\[\e[31;1m\]`id -nur`\[\e[34;1m\](`echo $ORACLE_SID`)\[\e[0m\]@\h:\[\e[32;1m\]`pwd`\[\e[0m\]>'
else # AIX
startup_date="`who -b | awk '{print $4,$5,$6}'`"
export PS1="`whoami`(\$ORACLE_SID)@$(hostname):\$PWD > "
export PS1='$LOGNAME'@'\[\e[0;32m\]($ORACLE_SID)\[\e[m\]'`hostname`:'$PWD $ '
export PS1='\[\e[0;31m\]$LOGNAME\[\e[m\]'@'\[\e[0;32m\]($ORACLE_SID)\[\e[m\]\[\e[0;33m\]'`hostname`'\[\e[m\]':'$PWD $ '
fi;
######################
- BANNER
echo "+-----------------------------------------------------+"
echo " Hostname: `hostname` "
echo " Startup : $startup_date"
echo "+------------------------+----------------------------+"
echo "+--------------------- +----------------------------+"
echo "| grid GRID | ASM, Cluster |"
echo "+------------------------+----------------------------+"
######################
- ENVIRONMENTS
export envGRID=". /opt/oracle/scripts/db_env/+ASM/env/env_+ASM"
export envDB=". /env_DB"
######################
- ALIASES
alias asm="$envGRID"
alias ASM="$envGRID"
alias +ASM="$envGRID"
alias +asm="$envGRID"
alias GRID="$envGRID"
alias grid="$envGRID"
alias DB="$envDB"
alias db="$envDB"
alias AGENT="$envAGENT"
alias +ASM='. /opt/oracle/scripts/db_env/+ASM/env/env_+ASM'
alias +asm='. /opt/oracle/scripts/db_env/+ASM/env/env_+ASM'
alias AGENT='nalias'
alias ASM='. /opt/oracle/scripts/db_env/+ASM/env/env_+ASM'
alias GRID='. /opt/oracle/scripts/db_env/+ASM/env/env_+ASM'
alias al='find $DIAG -name "alert_$ORACLE_SID.log" -exec less {} \;'
alias ali='. ~/.oraalias'
alias asm='. /opt/oracle/scripts/db_env/+ASM/env/env_+ASM'
alias cda='cd $ORACLE_ADMIN'
alias cdal='cd $ORACLE_DIAG/alert'
alias cdb='cd $ORACLE_DIAG/trace'
alias cdd='cd $ORACLE_DIAG'
alias cddba='cd $ORACLE_DBADMIN'
alias cdh='cd $ORACLE_HOME'
alias cdi='cd $ORACLE_BASE/scripts/setup'
alias cdl='cd $OB/scripts/log'
alias cdn='cd $ORACLE_HOME/network/admin'
alias cds='cd $OB/scripts'
alias cdt='cd $ORACLE_DIAG/trace'
alias envo='env| grep -i ora'
alias grid='. /opt/oracle/scripts/db_env/+ASM/env/env_+ASM'
alias ll='ls -al'
alias db='. /opt/oracle/scripts/env_db'
alias psg='ps -ef| grep'
alias psm='psg pmon'
alias pso='ps -ef| grep -i ora'
alias rctl='rlwrap -f /opt/oracle/scripts/rlwrap/lsnrctl.key lsnrctl'
alias rdgm='rlwrap -f /opt/oracle/scripts/rlwrap/dg.key dgmgrl '
alias rsql='rlwrap -f /opt/oracle/scripts/rlwrap/sql.key sqlplus / as sysdba'
alias sql='sqlplus "$vSQLCONNECT"'
alias ta='find $DIAG -name "alert_$ORACLE_SID.log" -exec tail -f {} \;'
alias tl='ReadListener tl'
alias va='find $DIAG -name "alert_$ORACLE_SID.log" -exec vi {} \;'
alias vl='ReadListener vl'
No comments:
Post a Comment