script to find locks in awr

[code language=»sql»] select cast(min (ash.SAMPLE_TIME) as date) as start# ,round (24*60*(cast (max(ash.SAMPLE_TIME) as date) — cast(min (ash.SAMPLE_TIME) as date) ),2) as duration# ,ash.sql_id,ash.top_level_sql_id,ash.BLOCKING_SESSION as B_SID,ash.BLOCKING_SESSION_SERIAL# as b_serial# ,ash2.SQL_EXEC_ID b_sql_exec_id ,ash.event,do.object_name ,sum(decode(ash.session_state,’ON CPU’,1,0)) "CPU" ,sum(decode(ash.session_state,’WAITING’,1,0)) — sum(decode(ash.session_state,’WAITING’, decode(ash.wait_class, ‘User I/O’,1,0),0)) "WAIT" ,sum(decode(ash.session_state,’WAITING’, decode(ash.wait_class, ‘User I/O’,1,0),0)) "IO" ,sum(decode(ash.session_state,’ON CPU’,1,1)) "TOTAL" ,du.username,ash2.SQL_EXEC_ID, dp.owner||nvl2(dp.object_name,’.’||dp.object_name,null) ||nvl2(dp.procedure_name,’.’||dp.procedure_name,null) as pl_sql_obj ,ash2.machine as […]

How To Configure SSH for a RAC Installation [ID 300548.1]

How To Configure SSH for a RAC Installation [ID 300548.1] [code language=»bash»] cd $HOME rm -rf .ssh mkdir .ssh chmod 700 .ssh cd .ssh ssh-keygen -t rsa ssh-keygen -t dsa cat $HOME/.ssh/*.pub >> $HOME/.ssh/authorized_keys.$HOSTNAME cd $HOME/.ssh scp rac[1-4]:$HOME/.ssh/authorized_keys.oel6* $HOME/.ssh scp $HOME/.ssh/authorized_keys.oel6* oel6-[1-4]:$HOME/.ssh cat $HOME/.ssh/*oel6* >> $HOME/.ssh/authorized_keys chmod 600 authorized_keys [/code]

qick config bash profile for oracle and grid user

Grid [code language=»bash»] export PS1=’\[\e[1;31m\][\u@\h \W]\$\[\e[0m\] ‘ export ORACLE_SID=$(cat /etc/oratab| grep -i asm | grep -v "^#" |awk -F: ‘{print $1}’ ) export ORAENV_ASK=NO . oraenv export ORAENV_ASK=YES alias sqlplus=’rlwrap sqlplus’ alias lsnrctl=’rlwrap lsnrctl’ alias rman=’rlwrap rman’ alias asmcmd=’rlwrap asmcmd’ alias adrci=’rlwrap adrci’ alias dgmgrl=’rlwrap dgmgrl’ [/code] Oracle: [code language=»bash»] export PS1=’\[\e[1;32m\][\u@\h \W]\$\[\e[0m\] ‘ export […]

mac os x virtual box issue on oracle install

original at Can’t Compile GI 12.1.0.2 and Segmentation Fault quick fix [code language=»bash»] cp $ORACLE_HOME/javavm/jdk/jdk7/lib/libjavavm12.a $ORACLE_HOME/lib [/code] [code language=»bash»] cd ~ rm -rf perl mkdir perl cd perl/ curl -O http://www.cpan.org/src/5.0/perl-5.14.1.tar.gz tar -xvzf perl-5.14.1.tar.gz cd perl-5.14.1 cd $ORACLE_HOME mv perl/ perl.OLD mkdir perl cd $HOME/perl/perl-5.14.1 ./Configure -des -Dprefix=$ORACLE_HOME/perl -Doptimize=-O3 -Dusethreads -Duseithreads -Duserelocatableinc && make clean […]