0% found this document useful (0 votes)
26 views

PerfSheet v3.1 With My Custom Query

The document describes a database performance monitoring sheet that allows users to view and analyze performance metrics from AWR and Statspack reports. It includes details on connecting to data sources and selecting queries and views to populate the sheet with key performance indicators from the last hour.

Uploaded by

Atul Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLS, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views

PerfSheet v3.1 With My Custom Query

The document describes a database performance monitoring sheet that allows users to view and analyze performance metrics from AWR and Statspack reports. It includes details on connecting to data sources and selecting queries and views to populate the sheet with key performance indicators from the last hour.

Uploaded by

Atul Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLS, PDF, TXT or read online on Scribd
You are on page 1/ 25

Database Performance Sheet

Version 3.1 beta © http://www.tanelpoder.com Help

Connect Details
Data Source
Username
Password

Report Details
Which Instance
Which Query My Key Figures Last Hour
Which View My Key Figures Last Hour
Choose the query and view name from the Query Browser
Time Details
From Date sysdate-7
To Date sysdate

Ad Hoc Query Run This


0

Advanced
Additional Filters 1=1 -- stat_name in ('application wait time')
Reuse Last Sheet 0
Dump result to sheet 0
Debug VBA on error 0

Go To Query Browser Show me! Reset Sheets

SHEET NAVIGATION

Go Delete Sheet
Set Keyboard Shortcuts Here: Press Ctrl+Shift+ …
H to go back to Front Page
Q to go to Query Browser

CommandButton1
Runtime variables Do not change these!
SheetSequence = 3
LastDataSheet =
AutoFitTables = 1
Query Category Query Name
Simple AWR Queries
Simple Statspack Queries
My Data Sources NYOUG
________________ My AWR Queries
ORADEV01 My V$ Queries
RAC_DEV *
OL112
ORA11GR2

This

heets
y Query Name View Name
DBA_HIST_SGASTAT My Key Figures Last Hour
DBA_HIST_PGASTAT
DBA_HIST_OSSTAT
DBA_HIST_BUFFER_POOL_STAT
DBA_HIST_COMP_IOSTAT
DBA_HIST_ENQUEUE_STAT
DBA_HIST_FILESTATXS
DBA_HIST_SEG_STAT
DBA_HIST_SERVICE_STAT
DBA_HIST_SYSSTAT
DBA_HIST_TEMPSTATXS
DBA_HIST_UNDOSTAT
DBA_HIST_WAITSTAT
Category Query Name Query Type
*
Simple AWR Queries DBA_HIST_SGASTAT SQL to XLS
Simple AWR Queries DBA_HIST_PGASTAT SQL to XLS
Simple AWR Queries DBA_HIST_OSSTAT SQL to XLS
Simple AWR Queries DBA_HIST_BUFFER_POOL_STAT SQL to XLS
Simple AWR Queries DBA_HIST_COMP_IOSTAT SQL to XLS
Simple AWR Queries DBA_HIST_ENQUEUE_STAT SQL to XLS
Simple AWR Queries DBA_HIST_FILESTATXS SQL to XLS
Simple AWR Queries DBA_HIST_SEG_STAT SQL to XLS
Simple AWR Queries DBA_HIST_SERVICE_STAT SQL to XLS
Simple AWR Queries DBA_HIST_SYSSTAT SQL to XLS
Simple AWR Queries DBA_HIST_TEMPSTATXS SQL to XLS
Simple AWR Queries DBA_HIST_UNDOSTAT SQL to XLS
Simple AWR Queries DBA_HIST_WAITSTAT SQL to XLS
Simple Statspack Queries STATS$BUFFER_POOL_STATISTICS SQL to XLS
Simple Statspack Queries STATS$ENQUEUE_STATISTICS SQL to XLS
Simple Statspack Queries STATS$FILESTATXS SQL to XLS
Simple Statspack Queries STATS$SEG_STAT SQL to XLS
Simple Statspack Queries STATS$OSSTAT SQL to XLS
Simple Statspack Queries STATS$PGASTAT SQL to XLS
Simple Statspack Queries STATS$UNDOSTAT SQL to XLS
Simple Statspack Queries STATS$SESSTAT SQL to XLS
Simple Statspack Queries STATS$TEMPSTATXS SQL to XLS
Simple Statspack Queries STATS$SGASTAT SQL to XLS
Simple Statspack Queries STATS$SYSSTAT SQL to XLS
Simple Statspack Queries STATS$WAITSTAT SQL to XLS
NYOUG ASH Test SQL to XLS
My AWR Queries DB Time SQL to XLS
My AWR Queries Log File Sync Avg SQL to XLS
My AWR Queries db file sequential read avg SQL to XLS
My AWR Queries direct path read avg SQL to XLS
My AWR Queries db file parallel read avg SQL to XLS

My AWR Queries read by other session avg SQL to XLS


My AWR Queries db file scattered read avg SQL to XLS
My AWR Queries Enq -TX - Cont SQL to XLS
My AWR Queries Key Figures SQL to XLS

My AWR Queries My Key Figures SQL to XLS

My AWR Queries log file parallel write avg SQL to XLS


My V$ Queries Response Time Last Hour SQL to XLS
My V$ Queries My Key Figures Last Hour SQL to XLS
Query Text Default View

select CAST(sn.begin_interval_time AS DATE) begin_time, sg.*


from dba_hist_sgastat sg,
default
select pg.*
from dba_hist_pgastat pg,
default
select os.*
from dba_hist_osstat os,
default
select bp.*
from dba_hist_buffer_pool_stat bp,
default
select ci.*
from dba_hist_comp_iostat ci,
default
select e.*
from dba_hist_enqueue_stat e,
default
select fx.*
from dba_hist_filestatxs fx,
default
select ss.*
from dba_hist_seg_stat ss,
default
select ss.*
from dba_hist_service_stat ss,
default
select ss.*
from dba_hist_sysstat ss,
default
select fx.*
from dba_hist_tempstatxs fx,
default
select us.*
from dba_hist_undostat us,
default
select ws.*
from dba_hist_waitstat ws,
default
select bp.*
from stats$buffer_pool_statistics bp,
default
select e.*
from stats$enqueue_statistics e,
default
select fx.*
from stats$filestatxs fx,
default
select ss.*
from stats$seg_stat ss,
default
select os.*, osn.stat_name
from stats$osstat os,
default
select pg.*
from stats$pgastat pg,
default
select us.*
from stats$undostat us,
default
select ss.*,snm.name
from stats$sesstat ss,
default
select fx.*
from stats$tempstatxs fx,
default
select sg.*
from stats$sgastat sg,
default
select ss.*
from stats$sysstat ss,
default
select ws.*
from stats$waitstat ws,
default
SELECT to_date(sample_time) sample_time, sql_id, sql_plan_hash_value, wait_cla
default
SELECT
i.instance_name DB Time
instance_name_print
select
btime,
log file sync
sample_day, sample_hour,
select
btime,
db file sequential read
select
btime,
direct path read view
sample_day, sample_hour,
select
btime,
db file parallel read
sample_day, sample_hour,
select
btime,
read by other session view
sample_day, sample_hour,
select
btime,
db file scattered read view
sample_day, sample_hour,
select
btime,
enq tx cont view
sample_day, sample_hour,
select begin_time, to_char(begin_time, 'YYYYMMDD') sample_day,
to_char(begin_time,'HH24')sample_hour, to_char(begin_time,'MI')sample_minute,
key metric by day
round(maxval,2) max, round(average,2) avg, metric_name
select begin_time, to_char(begin_time, 'YYYYMMDD') sample_day,
to_char(begin_time,'HH24')sample_hour, to_char(begin_time,'MI')sample_minute,
my key figures by day
round(maxval,2) max, round(average,2) avg, metric_name
select
btime,
log file parallel write view
sample_day, sample_hour,
select to_char(end_time, 'YYYYMMDD') sample_day, to_char(end_time,'HH24')sa
Response Time Per Txn
select to_char(end_time, 'YYYYMMDD') sample_day,
to_char(end_time,'HH24')sample_hour, to_char(end_time,'MI')sample_minute,
My Key Figures Last Hour
metric_name, value, metric_unit from V$SYSMETRIC_HISTORY where
metric_name in ('Database Time Per Sec','Database Wait Time Ratio',
Description
Query Name View Name
DBA_HIST_SGASTAT default
DBA_HIST_SGASTAT default
DBA_HIST_SGASTAT default
DBA_HIST_SGASTAT default
DBA_HIST_PGASTAT default
DBA_HIST_PGASTAT default
DBA_HIST_PGASTAT default
DBA_HIST_OSSTAT default
DBA_HIST_OSSTAT default
DBA_HIST_OSSTAT default
DBA_HIST_BUFFER_POOL_STAT default
DBA_HIST_BUFFER_POOL_STAT default
DBA_HIST_BUFFER_POOL_STAT default
DBA_HIST_COMP_IOSTAT default
DBA_HIST_COMP_IOSTAT default
DBA_HIST_COMP_IOSTAT default
DBA_HIST_ENQUEUE_STAT default
DBA_HIST_ENQUEUE_STAT default
DBA_HIST_ENQUEUE_STAT default
DBA_HIST_FILESTATXS default
DBA_HIST_FILESTATXS default
DBA_HIST_FILESTATXS default
DBA_HIST_FILESTATXS default
DBA_HIST_SEG_STAT default
DBA_HIST_SEG_STAT default
DBA_HIST_SEG_STAT default
DBA_HIST_SERVICE_STAT default
DBA_HIST_SERVICE_STAT default
DBA_HIST_SERVICE_STAT default
DBA_HIST_SERVICE_STAT default
DBA_HIST_SYSSTAT default
DBA_HIST_SYSSTAT default
DBA_HIST_SYSSTAT default
DBA_HIST_SYSSTAT default
DBA_HIST_TEMPSTATXS default
DBA_HIST_TEMPSTATXS default
DBA_HIST_TEMPSTATXS default
DBA_HIST_TEMPSTATXS default
DBA_HIST_UNDOSTAT default
DBA_HIST_UNDOSTAT default
DBA_HIST_UNDOSTAT default
DBA_HIST_WAITSTAT default
DBA_HIST_WAITSTAT default
DBA_HIST_WAITSTAT default
STATS$BUFFER_POOL_STATISTICS default
STATS$BUFFER_POOL_STATISTICS default
STATS$BUFFER_POOL_STATISTICS default
STATS$ENQUEUE_STATISTICS default
STATS$ENQUEUE_STATISTICS default
STATS$ENQUEUE_STATISTICS default
STATS$FILESTATXS default
STATS$FILESTATXS default
STATS$FILESTATXS default
STATS$FILESTATXS default
STATS$SEG_STAT default
STATS$SEG_STAT default
STATS$SEG_STAT default
STATS$OSSTAT default
STATS$OSSTAT default
STATS$OSSTAT default
STATS$PGASTAT default
STATS$PGASTAT default
STATS$PGASTAT default
STATS$UNDOSTAT default
STATS$UNDOSTAT default
STATS$UNDOSTAT default
STATS$SESSTAT default
STATS$SESSTAT default
STATS$SESSTAT default
STATS$SESSTAT default
STATS$TEMPSTATXS default
STATS$TEMPSTATXS default
STATS$TEMPSTATXS default
STATS$TEMPSTATXS default
STATS$SGASTAT default
STATS$SGASTAT default
STATS$SGASTAT default
STATS$SGASTAT default
STATS$SYSSTAT default
STATS$SYSSTAT default
STATS$SYSSTAT default
STATS$SYSSTAT default
STATS$WAITSTAT default
STATS$WAITSTAT default
STATS$WAITSTAT default
DB_TIME_BY_SERVICE default
DB_TIME_BY_SERVICE Sum of DB Time by Service
DB_TIME_BY_SERVICE Sum of DB Time by Service
DB_TIME_BY_SERVICE Sum of DB Time by Service
DB_TIME_BY_SERVICE Sum of DB Time by Service
DB_TIME_BY_SERVICE Sum of DB Time by Service
DB_TIME_BY_SERVICE Sum of DB Time by Service
DB_TIME_BY_SERVICE Sum of DB Time by Service
DB_TIME_BY_SERVICE Sum of DB Time by Service
DB_TIME_BY_SERVICE Sum of DB Time by Service
DB_TIME_BY_SERVICE Avg DB Time per execute
DB_TIME_BY_SERVICE Avg DB Time per execute
DB_TIME_BY_SERVICE Avg DB Time per execute
DB_TIME_BY_SERVICE Avg DB Time per execute
DB_TIME_BY_SERVICE Avg DB Time per execute
DB_TIME_BY_SERVICE Avg DB Time per execute
DB_TIME_BY_SERVICE Avg DB Time per execute
DB_TIME_BY_SERVICE Avg DB Time per execute
DB_TIME_BY_SERVICE Avg DB Time per execute
Test DBA_SEGMENTS default
Test DBA_SEGMENTS default
Test DBA_SEGMENTS default
Test DBA_SEGMENTS default
DB Time DB Time
DB Time DB Time
DB Time DB Time
Log File Sync Avg log file sync
Log File Sync Avg log file sync
Log File Sync Avg log file sync
db file sequential read avg db file sequential read
db file sequential read avg db file sequential read
db file sequential read avg db file sequential read
direct path read direct path read
direct path read direct path read
direct path read direct path read
db file parallel read avg db file parallel read
db file parallel read avg db file parallel read
db file parallel read avg db file parallel read
direct path read avg direct path read view
direct path read avg direct path read view
direct path read avg direct path read view
read by other session avg read by other session view
read by other session avg read by other session view
read by other session avg read by other session view
db file scattered read avg db file scattered read
db file scattered read avg db file scattered read
db file scattered read avg db file scattered read
db file scattered read avg db file scattered read view
db file scattered read avg db file scattered read view
db file scattered read avg db file scattered read view
Enq -TX - Cont enq tx cont view
Enq -TX - Cont enq tx cont view
Enq -TX - Cont enq tx cont view
Key Figures key metric by day
Key Figures key metric by day
Key Figures key metric by day
My Key Figures my key figures by day
My Key Figures my key figures by day
My Key Figures my key figures by day
log file parallel write avg log file parallel write view
log file parallel write avg log file parallel write view
log file parallel write avg log file parallel write view
Response Time Last Hour Response Time Per Txn
Response Time Last Hour Response Time Per Txn
Response Time Last Hour Response Time Per Txn
Response Time Last Hour Response Time Per Txn
My Key Figures Last Hour My Key Figures Last Hour
My Key Figures Last Hour My Key Figures Last Hour
My Key Figures Last Hour My Key Figures Last Hour
My Key Figures Last Hour My Key Figures Last Hour
Chart Type Database Column Name Display Column Name As
AreaStacked BYTES
POOL
NAME
BEGIN_TIME
ColumnStacked VALUE
NAME
SNAP_ID
ColumnStacked VALUE
STAT_NAME
SNAP_ID
AreaStacked BUF_GOT
NAME
SNAP_ID
AreaStacked BYTES
COMPONENT
SNAP_ID
AreaStacked CUM_WAIT_TIME
EQ_TYPE
SNAP_ID
AreaStacked WAIT_COUNT
TSNAME
FILENAME
SNAP_ID
Area LOGICAL_READS_DELTA
TS#
SNAP_ID
ColumnStacked VALUE
STAT_NAME
SERVICE_NAME
SNAP_ID
ColumnStacked VALUE
STAT_NAME
SNAP_ID
INSTANCE_NUMBER
AreaStacked WAIT_COUNT
TSNAME
FILENAME
SNAP_ID
AreaStacked UNDOBLKS
UNDOTSN
SNAP_ID
ColumnStacked TIME
CLASS
SNAP_ID
AreaStacked BUF_GOT
NAME
SNAP_ID
AreaStacked CUM_WAIT_TIME
EQ_TYPE
SNAP_ID
AreaStacked WAIT_COUNT
TSNAME
FILENAME
SNAP_ID
Area LOGICAL_READS_DELTA
TS#
SNAP_ID
ColumnStacked VALUE
STAT_NAME
SNAP_ID
ColumnStacked VALUE
NAME
SNAP_ID
AreaStacked UNDOBLKS
UNDOTSN
SNAP_ID
ColumnStacked VALUE
STAT_NAME
SNAP_ID
INSTANCE_NUMBER
AreaStacked WAIT_COUNT
TSNAME
FILENAME
SNAP_ID
AreaStacked BYTES
POOL
NAME
SNAP_ID
ColumnStacked VALUE
NAME
SNAP_ID
INSTANCE_NUMBER
ColumnStacked TIME
CLASS
SNAP_ID
ColumnStacked BEGIN_TIME
AreaStacked DBID
INSTANCE_NUMBER
SERVICE_NAME
MONTH
MONTH_NAME
DAY
DAY_OF_WEEK
HOUR
DB_TIME
AreaStacked DBID
INSTANCE_NUMBER
SERVICE_NAME
MONTH
MONTH_NAME
DAY
DAY_OF_WEEK
HOUR
DB_TIME_PER_EXE
ColumnStacked OWNER
SEGMENT_TYPE
TABLESPACE_NAME
BYTES
Line SAMPLE_DAY
SAMPLE_HOUR
DB_TIME
Line SAMPLE_DAY
SAMPLE_HOUR
AVG_MS
Line SAMPLE_DAY
SAMPLE_HOUR
AVG_MS
Line SAMPLE_DAY
SAMPLE_HOUR
AVG_MS
Line SAMPLE_DAY
SAMPLE_HOUR
AVG_MS
Line SAMPLE_DAY
SAMPLE_HOUR
AVG_MS
Line SAMPLE_DAY
SAMPLE_HOUR
AVG_MS
Line SAMPLE_DAY
SAMPLE_HOUR
AVG_MS
Line SAMPLE_DAY
SAMPLE_HOUR
AVG_MS
Line SAMPLE_DAY
SAMPLE_HOUR
AVG_MS
3DLine SAMPLE_DAY
METRIC_NAME
AVG
3DLine SAMPLE_DAY
METRIC_NAME
AVG
Line SAMPLE_DAY
SAMPLE_HOUR
AVG_MS
LineMarkers SAMPLE_HOUR
SAMPLE_MINUTE
METRIC_NAME
VALUE
LineMarkers SAMPLE_HOUR
SAMPLE_MINUTE
METRIC_NAME
VALUE
Location on Chart Baseline Value Description
data:sum
axis:P
axis:Y
axis:X
data:sum
axis:Y
axis:X
data:sum
axis:Y
axis:X
data:sum
axis:Y
axis:X
data:sum
axis:Y
axis:X
data:sum
axis:Y
axis:X
data:sum
axis:P
axis:Y
axis:X
data:sum
axis:Y
axis:X
data:sum
axis:Y
axis:P
axis:X
data:sum
axis:Y
axis:X
axis:P
data:sum
axis:P
axis:Y
axis:X
data:sum
axis:Y
axis:X
data:sum
axis:Y
axis:X
data:sum
axis:Y
axis:X
data:sum
axis:Y
axis:X
data:sum
axis:P
axis:Y
axis:X
data:sum
axis:Y
axis:X
data:sum
axis:Y
axis:X
data:sum
axis:Y
axis:X
data:sum
axis:Y
axis:X
data:sum
axis:Y
axis:X
axis:P
data:sum
axis:P
axis:Y
axis:X
data:sum
axis:P
axis:Y
axis:X
data:sum
axis:Y
axis:X
axis:P
data:sum
axis:Y
axis:X
axis:X
axis:P
axis:P
axis:Y
axis:X
axis:X
axis:X
axis:X
axis:X
data:sum
axis:P
axis:P
axis:Y
axis:X
axis:X
axis:X
axis:X
axis:X
data:average
axis:Y
axis:P
axis:X
data:sum
axis:X
axis:X
data:sum
axis:X
axis:X
data:sum
axis:X
axis:X
data:sum
axis:X
axis:X
data:sum
axis:X
axis:X
data:sum
axis:X
axis:X
data:sum
axis:X
axis:X
data:sum
axis:X
axis:X
data:sum
axis:X
axis:X
data:sum
axis:X
axis:X
data:sum
axis:X
axis:Y
data:sum
axis:X
axis:Y
data:sum
axis:X
axis:X
data:sum
axis:X
axis:X
axis:Y
data:sum
axis:X
axis:X
axis:Y
data:sum
Baseline Name View Name Query Name
Baselines not implemented yet
Database Column Name Baseline Value Description
Welcome to Tanel Poder's Database Performance Sheet

Database Performance Sheet is written by Tanel Poder

Get the latest version from http://www.tanelpoder.com


Additional VBA code (v3.0b) by Rhojel Echano
http://www.rhojelechano.com

Get Tim Gorman's Statspack


delta views from http://www.evdbt.com/tools.htm#sp_delta_views

The PerfSheet is still in beta status and no guarantees are made that it works the way advertised :)

Credit for code fixes:


Tony Hasler http://tonyhasler.wordpress.com/

Help

Substitution variables:
%FROM_DATE%
%TO_DATE%
%FROM_SNAP%
%TO_SNAP%
%INSTANCE%
%FILTER%
Poder's Database Performance Sheet

© Tanel Poder 2007-2011


All rights reserved. You may not distribute this file without
written consent from Tanel Poder. Instead point the potential
users to http://www.tanelpoder.com

m/tools.htm#sp_delta_views

es are made that it works the way advertised :)

rdpress.com/
My Key Figur
select to_char(end_time, 'YYYYMMDD') sample_day, to_char(end_time,'HH24')sample_hour, to_char(end_time,'MI')sample_m
value, metric_unit from V$SYSMETRIC_HISTORY where metric_name in ('Database Time Per Sec','Database Wait Time Rat
'Redo Generated Per Sec','Average Active Sessions','CPU Usage Per Sec','DB Block Changes Per Sec','Enqueue Waits Per S
Per Sec',
'Hard Parse Count Per Sec','Host CPU Utilization (%)','I/O Megabytes per Second','Logical Reads Per Sec','Logical Reads Per
Scans Per Sec','Physical Read Bytes Per Sec',
'Physical Write Bytes Per Sec','Response Time Per Txn','User Commits Per Sec','User Calls Per Sec','Network Traffic Volume

You might also like