SESSIONS_PER_USER UNLIMITED
CPU_PER_SESSION UNLIMITED
CPU_PER_CALL UNLIMITED
CONNECT_TIME 5
IDLE_TIME 10
LOGICAL_READS_PER_SESSION DEFAULT
LOGICAL_READS_PER_CALL DEFAULT
COMPOSITE_LIMIT DEFAULT
PRIVATE_SGA DEFAULT
FAILED_LOGIN_ATTEMPTS DEFAULT
PASSWORD_LIFE_TIME DEFAULT
PASSWORD_REUSE_TIME DEFAULT
PASSWORD_REUSE_MAX DEFAULT
PASSWORD_LOCK_TIME DEFAULT
PASSWORD_GRACE_TIME DEFAULT
PASSWORD_VERIFY_FUNCTION DEFAUL
----------------
Final Script
#!/bin/sh
tmpfile=/tmp/tmp.$$
raid_dw_env
sqlplus / as sysdba<<EOF
spool $tmpfile
select p.spid from v\$process p,v\$session s
where s.paddr=p.addr
and s.status='SNIPED'
spool off
EOF
for x in `cat $tmpfile | grep "^[0123456789]"`
do
kill -9 $x
done
rm $tmpfile
#!/bin/bash
echo "Enter a value"
read num
case $num in
1) echo "one" ;;
2) echo "Two" ;;
esac
#!/bin/bash
if [ -t 0 ]
then
ORACLE_SID=""
while [ -z "${ORACLE_SID}" ]
do
tput clear; tput rev
echo "Valid Oracle SIDs are :"
tput rmso
for SID in `cat /etc/oratab|grep -v "^#"|cut -f1 -d: -s`
do
echo " ${SID}"
done
DEFAULT=`cat /etc/oratab|grep -v "^#"|cut -d: -f1 -s|head -1`
echo "\nEnter the Oracle SID you require (def: $DEFAULT): \c"
read ANSWER
[ "${ANSWER}" = "" ] && ANSWER=$DEFAULT
export ORACLE_SID=`grep "^${ANSWER}:" /etc/oratab|cut -d: -f1 -s`
export ORACLE_HOME=`grep "^${ANSWER}:" /etc/oratab|cut -d: -f2 -s`
if [ "${ORACLE_SID}" = "" ]
then
echo "\n\n ${ANS}: Invalid Oracle SID \c"
sleep 2
fi
done
else # Set to first entry in oratab
export ORACLE_SID=`cat /etc/oratab|grep -v "^#"|cut -d: -f1 -s|head -1`
export ORACLE_HOME=`cat /etc/oratab|grep -v "^#"|cut -d: -f2 -s|head -1`
fi
export ORACLE_SID=$ORACLE_SID
export ORACLE_HOME=$ORACLE_HOME
export PATH=${PATH}:${ORACLE_HOME}/bin
#ORAENV_ASK=NO
#. ${ORACLE_HOME}/bin/oraenv
#ORAENV_ASK=
echo
echo Oracle SID is now `tput rev`$ORACLE_SID`tput rmso`, Oracle Home is `tput
rev`$ORACLE_HOME`tput rmso`
echo
+ASM
bscstest
rtxtest
[oracle@flvprdbscsbd01 ~]$
#!/bin/bash
------------------------
#!/usr/bin/ksh
#
# Sample 10g CRS resource status query script
#
# Description:
# - Returns formatted version of crs_stat -t, in tabular
# format, with the complete rsc names and filtering keywords
# - The argument, $RSC_KEY, is optional and if passed to the script, will
# limit the output to HA resources whose names match $RSC_KEY.
# Requirements:
# - $ORA_CRS_HOME should be set in your environment
RSC_KEY=$1
QSTAT=-u
AWK=/bin/awk # if not available use /usr/bin/awk
# Table body:
$ORACLE_HOME/bin/crsctl status resource | $AWK \
'
function ltrim(s) { sub(/^[ \t]+/, "", s); return s }
function rtrim(s) { sub(/[ \t]+$/, "", s); return s }
function trim(s) { return rtrim(ltrim(s)); }
crsctl status res |grep -v "^$"|awk -F "=" 'BEGIN {print " "} {printf("%s",NR%4 ?
$2"|" : $2"\n")}'|sed -e 's/ *, /,/g' -e 's/, /,/g'|\
awk -F "|" 'BEGIN { printf "%-40s%-35s%-20s%-50s\n","Resource Name","Resource
Type","Target ","State" }{ split ($3,trg,",") split ($4,st,",")}{for (i in trg)
{printf "%-40s%-35s%-20s%-50s\n",$1,$2,trg[i],st[i]}}'
crsctl status res |grep -v "^$"|awk -F "=" 'BEGIN {print " "} {printf("%s",NR%4 ?
$2"|" : $2"\n")}'|sed -e 's/ *, /,/g' -e 's/, /,/g'|\
awk -F "|" 'BEGIN { printf "%-40s%-20s%-50s\n","Resource Name","Target ","State" }{
split ($3,trg,",") split ($4,st,",")}{for (i in trg) {printf "%-40s%-20s%-50s\n",
$1,$2,trg[i],st[i]}}'|awk '{$3=" "; print $0}'
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-------------------
$ pwd
/u01/app/11.2.0.3/grid/bin
$
$
$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.DATA.dg ora....up.type ONLINE ONLINE isdo...p001
ora.FRA.dg ora....up.type ONLINE ONLINE isdo...p001
ora....ER.lsnr ora....er.type ONLINE ONLINE isdo...p001
ora....N1.lsnr ora....er.type ONLINE ONLINE isdo...p004
ora....N2.lsnr ora....er.type ONLINE ONLINE isdo...p001
ora....N3.lsnr ora....er.type ONLINE ONLINE isdo...p002
ora.OCRVOTE.dg ora....up.type ONLINE ONLINE isdo...p001
ora.asm ora.asm.type ONLINE ONLINE isdo...p001
ora.cvu ora.cvu.type ONLINE ONLINE isdo...p001
ora.gcprod.db ora....se.type ONLINE ONLINE isdo...p001
ora....kup.svc ora....ce.type ONLINE ONLINE isdo...p002
ora....com.svc ora....ce.type ONLINE ONLINE isdo...p003
ora.gsd ora.gsd.type OFFLINE OFFLINE
ora....SM1.asm application ONLINE ONLINE isdo...p001
ora....01.lsnr application ONLINE ONLINE isdo...p001
ora....001.gsd application OFFLINE OFFLINE
ora....001.ons application ONLINE ONLINE isdo...p001
ora....001.vip ora....t1.type ONLINE ONLINE isdo...p001
ora....SM2.asm application ONLINE ONLINE isdo...p002
ora....02.lsnr application ONLINE ONLINE isdo...p002
ora....002.gsd application OFFLINE OFFLINE
ora....002.ons application ONLINE ONLINE isdo...p002
ora....002.vip ora....t1.type ONLINE ONLINE isdo...p002
ora....SM3.asm application ONLINE ONLINE isdo...p003
ora....03.lsnr application ONLINE ONLINE isdo...p003
ora....003.gsd application OFFLINE OFFLINE
ora....003.ons application ONLINE ONLINE isdo...p003
ora....003.vip ora....t1.type ONLINE ONLINE isdo...p003
ora....SM4.asm application ONLINE ONLINE isdo...p004
ora....04.lsnr application ONLINE ONLINE isdo...p004
ora....004.gsd application OFFLINE OFFLINE
ora....004.ons application ONLINE ONLINE isdo...p004
ora....004.vip ora....t1.type ONLINE ONLINE isdo...p004
ora....network ora....rk.type ONLINE ONLINE isdo...p001
ora.oc4j ora.oc4j.type ONLINE ONLINE isdo...p004
ora.ons ora.ons.type ONLINE ONLINE isdo...p001
ora....ry.acfs ora....fs.type ONLINE ONLINE isdo...p001
ora.scan1.vip ora....ip.type ONLINE ONLINE isdo...p004
ora.scan2.vip ora....ip.type ONLINE ONLINE isdo...p001
ora.scan3.vip ora....ip.type ONLINE ONLINE isdo...p002
$ hostname
isdoroemhp001
$
$
$ srvctl status listener -n isdoroemhp001
Listener LISTENER is enabled on node(s): isdoroemhp001
Listener LISTENER is running on node(s): isdoroemhp001
$ srvctl status asm -n isdoroemhp001
ASM is running on isdoroemhp001
$ srvctl STATUS instance -d GCPROD -i gcprod1
Instance gcprod1 is running on node isdoroemhp001
$
=============================================================================
wait for some time and check the crs_stat -t from orcle id..
check crs
crs_stat -t-->node one related all shud be online
bring down and bring up nodes one by one by above steps ====
cp $alertlogloc$alertlog $alertlogloc$alertlog_bak
find . -mmin -60
!/usr/bin/ksh
cnt=find . -type f -name "*.log*" -mmin -30 |wc -l
if [cnt > 0]; then
Err=tail -200f alert_qasttk1.log|grep -i ORA-|awk '{print $1}'
echo $Err
Else
retrun 0
fi;
/u02/app/oracle/rbt/diag/rdbms/qasrbt/qasrbt1/trace/
final