Presentation is loading. Please wait.

Presentation is loading. Please wait.

Graphing AWR Data in Excel David Kurtz Go-Faster Consultancy Ltd.

Similar presentations


Presentation on theme: "Graphing AWR Data in Excel David Kurtz Go-Faster Consultancy Ltd."— Presentation transcript:

1 Graphing AWR Data in Excel David Kurtz Go-Faster Consultancy Ltd.

2 Graphing AWR Data in Excel © Who Am I? Oracle Database Specialist –Independent consultant System Performance tuning –PeopleSoft ERP –Oracle RDBMS Book –www.psftdba.comwww.psftdba.com UKOUG –PeopleSoft Technology SIG Committee

3 Graphing AWR Data in Excel © Resources If you can’t hear me say so now. Please feel free to ask questions as we go along. The presentation is available from UKOUG Library See also –Tip: Print in ‘black and white’ for white background.

4 Graphing AWR Data in Excel © Background Reading Blog Entry: –http://blog.go-faster.co.uk/2008/12/graphing- awr-data-in-excel.htmlhttp://blog.go-faster.co.uk/2008/12/graphing- awr-data-in-excel.html Download Excel Sheet: –http://www.go- faster.co.uk/scripts.htm#awr_wait.xlshttp://www.go- faster.co.uk/scripts.htm#awr_wait.xls

5 Graphing AWR Data in Excel © A Picture is worth 1000 metrics! If you are lucky you might be able to pick out that one number in an AWR/Statspack report that is different to usual. But –How many databases do you have to look after? –How many reports do you need to examine to find that rogue metric?

6 Graphing AWR Data in Excel © DBA2.0 Oracle Enterprise Manager –Graph Performance Data –Focus on time

7 Graphing AWR Data in Excel © Oracle Enterprise Manager / Grid Control If you don’t have it, then I am going to show you how to graph some of the data yourself. If you have it, it is excellent. –But it can be a bit tricky to save charts. Screen dump, or save graphics.

8 Graphing AWR Data in Excel © Objective Chart of –Time the database spent waiting –Over the last 7 days –Broken down by Wait Event I am going to use AWR data –But you can do the same thing with Statspack This technique can be applied to any set of metrics

9 Graphing AWR Data in Excel © Recipe Ingredients –A SQL Query –Microsoft Excel –SQL*Net Client And this is what you do…

10 Graphing AWR Data in Excel © This slide is deliberately hidden At this point in the live presentation I am going to do a demonstration, but if it all goes horribly wrong I have a set of backup slides. If it works I will go to the end of presentation and work backwards to the final slide.

11 Graphing AWR Data in Excel © SQL Query Wait Information –DBA_HIST_SYSTEM_EVENT –Snapshot of v$system_event Snapshot Information –DBA_HIST_SNAPSHOTS

12 Graphing AWR Data in Excel © Analytic Functions Wait Event Data are running totals Use analytic function LAG() to work out the change since last snapshot. This is generally more efficient than getting previous row using sub-queries.

13 Graphing AWR Data in Excel © Recipe (1): Data Source Create A Blank Workbook Data -> Import External Query -> New Database Query Do not use the Wizard

14 Graphing AWR Data in Excel © Recipe (2): ODBC Driver The first time you do this you may need to create a new data source Select ODBC Driver, either –Oracle ODBC –MS ODBC for Oracle

15 Graphing AWR Data in Excel © Recipe (3): MS Query Connect Connect to the database in the ordinary way

16 Graphing AWR Data in Excel © Recipe (4): MS Query SQL Window View SQL Paste Query into the SQL Window

17 Graphing AWR Data in Excel © Recipe (5): MS Query Results

18 Graphing AWR Data in Excel © Recipe (6): Import Data Return the data to Excel. This time we want a Pivot table

19 Graphing AWR Data in Excel © Recipe (7): Pivot Wizard Start with Layout

20 Graphing AWR Data in Excel © Recipe (8): Pivot Layout Wizard Drag fields, adjust titles and formating

21 Graphing AWR Data in Excel © Recipe (9): Pivot Subtotalling Turn off Subtotalling

22 Graphing AWR Data in Excel © Recipe (10): Pivot Formatting Sort Heading, restrict to Top-n

23 Graphing AWR Data in Excel © Recipe (11): Pivot Options Turn off Totals Save data with table layout Disable Drilldown Save Password? –(this could be a security issue)

24 Graphing AWR Data in Excel © Recipe (12): Pivot Chart Very easy –You can continue formatting in the pivot chat But works best when data points absolutely regular along x-axis. Usually OK, because AWR snapshot regularish.

25 Graphing AWR Data in Excel © Tips (1): X-Y Chart Pivot Can’t do it by default Cheat – copy to somewhere else in spreadsheet. Copy down previous values use cell formula when run out of data

26 Graphing AWR Data in Excel © Tips (2): Multiple pivots of same data Don’t create a new query, copy the sheet –The SQL is only issued once, but both sheets refresh.

27 Graphing AWR Data in Excel © A Real System

28 Graphing AWR Data in Excel © A war story… Come back after lunch, and I’ll explain what was going on here, and where it led…

29 Graphing AWR Data in Excel © And here is one I prepared earlier. I can now –Keep the chart and data in a file –Cut & Paste to Word document or PowerPoint Like this…

30 Graphing AWR Data in Excel © A real system

31 Graphing AWR Data in Excel © A war story… Come back after lunch, and I’ll explain what was going on here, and where it led…

32 Questions? Where’s lunch?

33 Graphing AWR Data in Excel David Kurtz Go-Faster Consultancy Ltd.

34 Questions? Where’s lunch?

35 Graphing AWR Data in Excel © A war story… Come back after lunch, and I’ll explain what was going on here, and where it led…

36 Graphing AWR Data in Excel © A real system


Download ppt "Graphing AWR Data in Excel David Kurtz Go-Faster Consultancy Ltd."

Similar presentations


Ads by Google