Monitor-Get ORA errors by given days
--OraCheck.sh#!/bin/bash#Usage: sh OraCheck.sh alertlogfile days#Example: sh OraCheck.sh $ORACLE_BASE/admin/SID/bdump/alert_sid.log 30 ERRORLOGFILE=$1 GAPDAYS=$...
Get Log Switch Frequency and Archive Size
Prompt Table: Frequency of Log Switches by hour and daySELECT SUBSTR(TO_CHAR(FIRST_TIME, 'MM-DD-YY HH24:MI:SS'),1,5) DAY, TO_CHAR(SUM(DECODE(SUBSTR(TO_CHAR(FIRST...
Get Top 5 event from AWR
select Day, Event_name, Total_wait from (select day, event_name, sum(event_time_waited) total_wait,row_number() over (partition by day order by sum(event_time_waited) desc) rn from (SELECT to_d...
DB Info Collect SQL
-- This script. spools the output to a file named schemaCheckOracle.out -- Example of running the script.:-- Oracle Support document ID 1298562.1-- sqlplus <userid>/<pw> @full-DB_CheckOracle.sql-...
Get ASM Info by HTLM Format
spool dbcollect_$ORACLE_SID.html!date >> dbcollect_$ORACLE_SID.htmlSET MARKUP HTML ON set echo onset pagesize 200alter session set nls_date_format='YYYY-MM-DD HH24:MI:SS';select 'THIS ASM REPORT ...
Get Tablespace Real usage
Prompt Tablespace Usage:set linesize 180select * from (select d.tablespace_name,space1 "Total", space "sum_space(M)",space-nvl(free_space,1) "used_space(M)",space1-(space-nvl(free_space,0)) ...
Get tablespace growth history
Prompt Tablespace growth trend history of last 30 Days:set linesize 180set feedback offSELECT TO_CHAR (sp.begin_interval_time,'DD-MM-YYYY') days, ts.tsname, max(round((tsu.tablespace_size* dt.block_si...