You are on page 1of 3

bash-3.00$ cat DatabaseHealthCheck.

sh
# Purpose: Script to generate database healthcheck report
# Author : Mythics DBA Team
# Dated : Dec. 14, 2009
. /nvision/oracle/DB11g/11.2.0/PROD_sriprofin1.env
#export ORACLE_HOME=/nvision/oracle/proddb/10.2.0
#export ORACLE_SID=PROD
#export PATH=$PATH:/nvision/oracle/prddb/10.2.0/bin
#sh /home/oracle/PROD-DB.env
ReportFile=~/OracleHealthCheck/'HealthCheckReport_'$ORACLE_SID'_'`date '+%m%d_%H
:%M'`'.txt'
rm -rf $ReportFile
sh /home/oracle/OracleHealthCheck/CheckAppsServices.sh >> $ReportFile
sqlplus -S / as sysdba << EOF >> $ReportFile 2>&1
# Prompt **************************************
# Prompt * Disk Space Statistics
# Prompt **************************************
!df -g
# Prompt **************************************
# Prompt * Database Status
# Prompt **************************************
set pagesize 500 linesize 150
select name, open_mode, to_char(current_scn,'TM') CurrentSCN from v\$database;
# Prompt **************************************
# Prompt * Archiving Status
# Prompt **************************************
archive log list
# Prompt **************************************
# Prompt * Listener Status
# Prompt **************************************
!lsnrctl status PROD
# Prompt **************************************
# Prompt * Database Health Check
# Prompt **************************************
@HealthCheckScript.sql
# Prompt **************************************
# Prompt * Report Server Status
# Prompt **************************************
! /nvision/oracle/prodcomn/admin/scripts/PROD_sriprofin1/adrepctl.sh status apps
/w3ntl1v3
# Prompt **************************************
# Prompt * Concurrent Managers
# Prompt **************************************
! /nvision/oracle/prodcomn/admin/scripts/PROD_sriprofin1/adcmctl.sh status apps/
w3ntl1v3
!ps -ef | grep FNDLIBR | grep -v grep | wc -l
# Prompt **************************************
# Prompt * Waiting Concurrent Requests
# Prompt **************************************
@WaitingConcReqs.sql
# Prompt **************************************
# Prompt * Concurrent Requests Runnig for more than 10 minutes
# Prompt **************************************
@LongRunningConcReqs_10mins.sql
# Prompt **************************************
# Prompt * APPS Schema Invalid Objects

71 * 6840 2160 24 APPS_TS_SUMMARY 1/24/2012 6:46:22 PM 14472 11721 2751 19.00$ ================================================ Solaris display Memory Size (RAM size): prtconf|grep -i mem Oracle Databse report with free sapce.6 APPS_TS_NOLOGGING 1/24/2012 6:46:22 PM * * APPS_TS_QUEUES 1/24/2012 6:46:22 PM 10024 * APPS_TS_SEED 1/24/2012 6:46:22 PM 9000 10696 10641 55 0.sql # Prompt ************************************* # Prompt * Indexes which are not VALID # Prompt ************************************** @/home/oracle/OracleHealthCheck/23_Invalid_Index.01 APPS_TS_TOOLS 100 1 99 99 1/24/2012 6:46:22 PM * .177 /u01/oracle/proddisco/opmn/bin/opmnctl status #mailx -s $ORACLE_SID" Healthcheck Report dated "`date '+%m%d'` MKumar@Mythics.sql # Prompt ************************************** # Prompt * Database Alert Log Status # Prompt ************************************** !/home/oracle/OracleHealthCheck/Check_AlertLog.51 9051 973 9. # Prompt ************************************* # Prompt * Tables Having Fragmentation Morethan 40% # Prompt ************************************** @/home/oracle/OracleHealthCheck/19_FragmentedTable.sh # Prompt ************************************** # Prompt * Agent Status # Prompt ************************************** !/nvision/oracle/agent/agent11g/bin/emctl status agent EOF # Prompt ************************************** # Prompt * Discoverer Status # Prompt ************************************** #ssh 10.# Prompt ************************************** select count(*) from dba_objects where owner='APPS' and status='INVALID'.com ASharma@Mythics.c om VSagar@Mythics.com < $ReportFile cat $ReportFile bash-3.43 * 6000 5130 870 14.204. RAM and perfomance indicators TSP_NAME D E SYSDATE Total (MB) Used (MB) Free (MB) % Free APPS_TS_ARCHIVE 1/24/2012 6:46:22 PM 8000 * APPS_TS_INTERFACE 1/24/2012 6:46:22 PM * * APPS_TS_MEDIA 1/24/2012 6:46:22 PM 4000 6926 1074 13.1.sh # Prompt ************************************** # Prompt * Listener Log Status # Prompt ************************************** !/home/oracle/OracleHealthCheck/Check_ListenerLog.5 2656 1344 33.com AAchal@Mythics.

19 63.13 IGID 1/24/2012 6:46:22 PM 25 PERFSTAT 1/24/2012 6:46:22 PM 0.13 358.APPS_TS_TX_DATA 1/24/2012 6:46:22 PM * APPS_TS_TX_IDX 1/24/2012 6:46:22 PM * APPS_UNDOTS1 1/24/2012 6:46:22 PM 164252 153714 10538 6.06 DISCOVERER 1/24/2012 6:46:22 PM 30 475. v$session s where paddr(+)=addr group by s. s.31 23.75 42.33 1177.88 23.88 99.14 0. s.11 CTXD 1/24/2012 6:46:22 PM 475.53 181.29 EURASSTX 1/24/2012 6:46:22 PM 10 7.12 500 24.92 * 4000 6157 315.36 7646. .56 3684.status.42 * 103984 97827 5.5 EURASSTD 1/24/2012 6:46:22 PM 128 81.45 36. count(1).status.81 318.25 12.username from v$process p.28 select s.69 2.64 SPOTLIGHT 15 7 1/24/2012 6:46:22 PM SYSAUX 1/24/2012 6:46:22 PM SYSTEM 1/24/2012 6:46:22 PM 1536 12000 8 53.99 17.55 46.4 36.08 99.6 4353.username order by 1.44 92.