<!--{{{-->
<link rel='alternate' type='application/rss+xml' title='RSS' href='index.xml' />
<!--}}}-->
Background: #fff
Foreground: #000
PrimaryPale: #8cf
PrimaryLight: #18f
PrimaryMid: #04b
PrimaryDark: #014
SecondaryPale: #ffc
SecondaryLight: #fe8
SecondaryMid: #db4
SecondaryDark: #841
TertiaryPale: #eee
TertiaryLight: #ccc
TertiaryMid: #999
TertiaryDark: #666
Error: #f88
/*{{{*/
body {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}

a {color:[[ColorPalette::PrimaryMid]];}
a:hover {background-color:[[ColorPalette::PrimaryMid]]; color:[[ColorPalette::Background]];}
a img {border:0;}

h1,h2,h3,h4,h5,h6 {color:[[ColorPalette::SecondaryDark]]; background:transparent;}
h1 {border-bottom:2px solid [[ColorPalette::TertiaryLight]];}
h2,h3 {border-bottom:1px solid [[ColorPalette::TertiaryLight]];}

.button {color:[[ColorPalette::PrimaryDark]]; border:1px solid [[ColorPalette::Background]];}
.button:hover {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::SecondaryLight]]; border-color:[[ColorPalette::SecondaryMid]];}
.button:active {color:[[ColorPalette::Background]]; background:[[ColorPalette::SecondaryMid]]; border:1px solid [[ColorPalette::SecondaryDark]];}

.header {background:[[ColorPalette::PrimaryMid]];}
.headerShadow {color:[[ColorPalette::Foreground]];}
.headerShadow a {font-weight:normal; color:[[ColorPalette::Foreground]];}
.headerForeground {color:[[ColorPalette::Background]];}
.headerForeground a {font-weight:normal; color:[[ColorPalette::PrimaryPale]];}

.tabSelected{color:[[ColorPalette::PrimaryDark]];
	background:[[ColorPalette::TertiaryPale]];
	border-left:1px solid [[ColorPalette::TertiaryLight]];
	border-top:1px solid [[ColorPalette::TertiaryLight]];
	border-right:1px solid [[ColorPalette::TertiaryLight]];
}
.tabUnselected {color:[[ColorPalette::Background]]; background:[[ColorPalette::TertiaryMid]];}
.tabContents {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::TertiaryPale]]; border:1px solid [[ColorPalette::TertiaryLight]];}
.tabContents .button {border:0;}

#sidebar {}
#sidebarOptions input {border:1px solid [[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel {background:[[ColorPalette::PrimaryPale]];}
#sidebarOptions .sliderPanel a {border:none;color:[[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel a:hover {color:[[ColorPalette::Background]]; background:[[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel a:active {color:[[ColorPalette::PrimaryMid]]; background:[[ColorPalette::Background]];}

.wizard {background:[[ColorPalette::PrimaryPale]]; border:1px solid [[ColorPalette::PrimaryMid]];}
.wizard h1 {color:[[ColorPalette::PrimaryDark]]; border:none;}
.wizard h2 {color:[[ColorPalette::Foreground]]; border:none;}
.wizardStep {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];
	border:1px solid [[ColorPalette::PrimaryMid]];}
.wizardStep.wizardStepDone {background:[[ColorPalette::TertiaryLight]];}
.wizardFooter {background:[[ColorPalette::PrimaryPale]];}
.wizardFooter .status {background:[[ColorPalette::PrimaryDark]]; color:[[ColorPalette::Background]];}
.wizard .button {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::SecondaryLight]]; border: 1px solid;
	border-color:[[ColorPalette::SecondaryPale]] [[ColorPalette::SecondaryDark]] [[ColorPalette::SecondaryDark]] [[ColorPalette::SecondaryPale]];}
.wizard .button:hover {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::Background]];}
.wizard .button:active {color:[[ColorPalette::Background]]; background:[[ColorPalette::Foreground]]; border: 1px solid;
	border-color:[[ColorPalette::PrimaryDark]] [[ColorPalette::PrimaryPale]] [[ColorPalette::PrimaryPale]] [[ColorPalette::PrimaryDark]];}

.wizard .notChanged {background:transparent;}
.wizard .changedLocally {background:#80ff80;}
.wizard .changedServer {background:#8080ff;}
.wizard .changedBoth {background:#ff8080;}
.wizard .notFound {background:#ffff80;}
.wizard .putToServer {background:#ff80ff;}
.wizard .gotFromServer {background:#80ffff;}

#messageArea {border:1px solid [[ColorPalette::SecondaryMid]]; background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]];}
#messageArea .button {color:[[ColorPalette::PrimaryMid]]; background:[[ColorPalette::SecondaryPale]]; border:none;}

.popupTiddler {background:[[ColorPalette::TertiaryPale]]; border:2px solid [[ColorPalette::TertiaryMid]];}

.popup {background:[[ColorPalette::TertiaryPale]]; color:[[ColorPalette::TertiaryDark]]; border-left:1px solid [[ColorPalette::TertiaryMid]]; border-top:1px solid [[ColorPalette::TertiaryMid]]; border-right:2px solid [[ColorPalette::TertiaryDark]]; border-bottom:2px solid [[ColorPalette::TertiaryDark]];}
.popup hr {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::PrimaryDark]]; border-bottom:1px;}
.popup li.disabled {color:[[ColorPalette::TertiaryMid]];}
.popup li a, .popup li a:visited {color:[[ColorPalette::Foreground]]; border: none;}
.popup li a:hover {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; border: none;}
.popup li a:active {background:[[ColorPalette::SecondaryPale]]; color:[[ColorPalette::Foreground]]; border: none;}
.popupHighlight {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
.listBreak div {border-bottom:1px solid [[ColorPalette::TertiaryDark]];}

.tiddler .defaultCommand {font-weight:bold;}

.shadow .title {color:[[ColorPalette::TertiaryDark]];}

.title {color:[[ColorPalette::SecondaryDark]];}
.subtitle {color:[[ColorPalette::TertiaryDark]];}

.toolbar {color:[[ColorPalette::PrimaryMid]];}
.toolbar a {color:[[ColorPalette::TertiaryLight]];}
.selected .toolbar a {color:[[ColorPalette::TertiaryMid]];}
.selected .toolbar a:hover {color:[[ColorPalette::Foreground]];}

.tagging, .tagged {border:1px solid [[ColorPalette::TertiaryPale]]; background-color:[[ColorPalette::TertiaryPale]];}
.selected .tagging, .selected .tagged {background-color:[[ColorPalette::TertiaryLight]]; border:1px solid [[ColorPalette::TertiaryMid]];}
.tagging .listTitle, .tagged .listTitle {color:[[ColorPalette::PrimaryDark]];}
.tagging .button, .tagged .button {border:none;}

.footer {color:[[ColorPalette::TertiaryLight]];}
.selected .footer {color:[[ColorPalette::TertiaryMid]];}

.sparkline {background:[[ColorPalette::PrimaryPale]]; border:0;}
.sparktick {background:[[ColorPalette::PrimaryDark]];}

.error, .errorButton {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::Error]];}
.warning {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::SecondaryPale]];}
.lowlight {background:[[ColorPalette::TertiaryLight]];}

.zoomer {background:none; color:[[ColorPalette::TertiaryMid]]; border:3px solid [[ColorPalette::TertiaryMid]];}

.imageLink, #displayArea .imageLink {background:transparent;}

.annotation {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; border:2px solid [[ColorPalette::SecondaryMid]];}

.viewer .listTitle {list-style-type:none; margin-left:-2em;}
.viewer .button {border:1px solid [[ColorPalette::SecondaryMid]];}
.viewer blockquote {border-left:3px solid [[ColorPalette::TertiaryDark]];}

.viewer table, table.twtable {border:2px solid [[ColorPalette::TertiaryDark]];}
.viewer th, .viewer thead td, .twtable th, .twtable thead td {background:[[ColorPalette::SecondaryMid]]; border:1px solid [[ColorPalette::TertiaryDark]]; color:[[ColorPalette::Background]];}
.viewer td, .viewer tr, .twtable td, .twtable tr {border:1px solid [[ColorPalette::TertiaryDark]];}

.viewer pre {border:1px solid [[ColorPalette::SecondaryLight]]; background:[[ColorPalette::SecondaryPale]];}
.viewer code {color:[[ColorPalette::SecondaryDark]];}
.viewer hr {border:0; border-top:dashed 1px [[ColorPalette::TertiaryDark]]; color:[[ColorPalette::TertiaryDark]];}

.highlight, .marked {background:[[ColorPalette::SecondaryLight]];}

.editor input {border:1px solid [[ColorPalette::PrimaryMid]];}
.editor textarea {border:1px solid [[ColorPalette::PrimaryMid]]; width:100%;}
.editorFooter {color:[[ColorPalette::TertiaryMid]];}

#backstageArea {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::TertiaryMid]];}
#backstageArea a {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::Background]]; border:none;}
#backstageArea a:hover {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; }
#backstageArea a.backstageSelTab {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
#backstageButton a {background:none; color:[[ColorPalette::Background]]; border:none;}
#backstageButton a:hover {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::Background]]; border:none;}
#backstagePanel {background:[[ColorPalette::Background]]; border-color: [[ColorPalette::Background]] [[ColorPalette::TertiaryDark]] [[ColorPalette::TertiaryDark]] [[ColorPalette::TertiaryDark]];}
.backstagePanelFooter .button {border:none; color:[[ColorPalette::Background]];}
.backstagePanelFooter .button:hover {color:[[ColorPalette::Foreground]];}
#backstageCloak {background:[[ColorPalette::Foreground]]; opacity:0.6; filter:'alpha(opacity:60)';}
/*}}}*/
/*{{{*/
* html .tiddler {height:1%;}

body {font-size:.75em; font-family:arial,helvetica; margin:0; padding:0;}

h1,h2,h3,h4,h5,h6 {font-weight:bold; text-decoration:none;}
h1,h2,h3 {padding-bottom:1px; margin-top:1.2em;margin-bottom:0.3em;}
h4,h5,h6 {margin-top:1em;}
h1 {font-size:1.35em;}
h2 {font-size:1.25em;}
h3 {font-size:1.1em;}
h4 {font-size:1em;}
h5 {font-size:.9em;}

hr {height:1px;}

a {text-decoration:none;}

dt {font-weight:bold;}

ol {list-style-type:decimal;}
ol ol {list-style-type:lower-alpha;}
ol ol ol {list-style-type:lower-roman;}
ol ol ol ol {list-style-type:decimal;}
ol ol ol ol ol {list-style-type:lower-alpha;}
ol ol ol ol ol ol {list-style-type:lower-roman;}
ol ol ol ol ol ol ol {list-style-type:decimal;}

.txtOptionInput {width:11em;}

#contentWrapper .chkOptionInput {border:0;}

.externalLink {text-decoration:underline;}

.indent {margin-left:3em;}
.outdent {margin-left:3em; text-indent:-3em;}
code.escaped {white-space:nowrap;}

.tiddlyLinkExisting {font-weight:bold;}
.tiddlyLinkNonExisting {font-style:italic;}

/* the 'a' is required for IE, otherwise it renders the whole tiddler in bold */
a.tiddlyLinkNonExisting.shadow {font-weight:bold;}

#mainMenu .tiddlyLinkExisting,
	#mainMenu .tiddlyLinkNonExisting,
	#sidebarTabs .tiddlyLinkNonExisting {font-weight:normal; font-style:normal;}
#sidebarTabs .tiddlyLinkExisting {font-weight:bold; font-style:normal;}

.header {position:relative;}
.header a:hover {background:transparent;}
.headerShadow {position:relative; padding:4.5em 0em 1em 1em; left:-1px; top:-1px;}
.headerForeground {position:absolute; padding:4.5em 0em 1em 1em; left:0px; top:0px;}

.siteTitle {font-size:3em;}
.siteSubtitle {font-size:1.2em;}

#mainMenu {position:absolute; left:0; width:10em; text-align:right; line-height:1.6em; padding:1.5em 0.5em 0.5em 0.5em; font-size:1.1em;}

#sidebar {position:absolute; right:3px; width:16em; font-size:.9em;}
#sidebarOptions {padding-top:0.3em;}
#sidebarOptions a {margin:0em 0.2em; padding:0.2em 0.3em; display:block;}
#sidebarOptions input {margin:0.4em 0.5em;}
#sidebarOptions .sliderPanel {margin-left:1em; padding:0.5em; font-size:.85em;}
#sidebarOptions .sliderPanel a {font-weight:bold; display:inline; padding:0;}
#sidebarOptions .sliderPanel input {margin:0 0 .3em 0;}
#sidebarTabs .tabContents {width:15em; overflow:hidden;}

.wizard {padding:0.1em 1em 0em 2em;}
.wizard h1 {font-size:2em; font-weight:bold; background:none; padding:0em 0em 0em 0em; margin:0.4em 0em 0.2em 0em;}
.wizard h2 {font-size:1.2em; font-weight:bold; background:none; padding:0em 0em 0em 0em; margin:0.4em 0em 0.2em 0em;}
.wizardStep {padding:1em 1em 1em 1em;}
.wizard .button {margin:0.5em 0em 0em 0em; font-size:1.2em;}
.wizardFooter {padding:0.8em 0.4em 0.8em 0em;}
.wizardFooter .status {padding:0em 0.4em 0em 0.4em; margin-left:1em;}
.wizard .button {padding:0.1em 0.2em 0.1em 0.2em;}

#messageArea {position:fixed; top:2em; right:0em; margin:0.5em; padding:0.5em; z-index:2000; _position:absolute;}
.messageToolbar {display:block; text-align:right; padding:0.2em 0.2em 0.2em 0.2em;}
#messageArea a {text-decoration:underline;}

.tiddlerPopupButton {padding:0.2em 0.2em 0.2em 0.2em;}
.popupTiddler {position: absolute; z-index:300; padding:1em 1em 1em 1em; margin:0;}

.popup {position:absolute; z-index:300; font-size:.9em; padding:0; list-style:none; margin:0;}
.popup .popupMessage {padding:0.4em;}
.popup hr {display:block; height:1px; width:auto; padding:0; margin:0.2em 0em;}
.popup li.disabled {padding:0.4em;}
.popup li a {display:block; padding:0.4em; font-weight:normal; cursor:pointer;}
.listBreak {font-size:1px; line-height:1px;}
.listBreak div {margin:2px 0;}

.tabset {padding:1em 0em 0em 0.5em;}
.tab {margin:0em 0em 0em 0.25em; padding:2px;}
.tabContents {padding:0.5em;}
.tabContents ul, .tabContents ol {margin:0; padding:0;}
.txtMainTab .tabContents li {list-style:none;}
.tabContents li.listLink { margin-left:.75em;}

#contentWrapper {display:block;}
#splashScreen {display:none;}

#displayArea {margin:1em 17em 0em 14em;}

.toolbar {text-align:right; font-size:.9em;}

.tiddler {padding:1em 1em 0em 1em;}

.missing .viewer,.missing .title {font-style:italic;}

.title {font-size:1.6em; font-weight:bold;}

.missing .subtitle {display:none;}
.subtitle {font-size:1.1em;}

.tiddler .button {padding:0.2em 0.4em;}

.tagging {margin:0.5em 0.5em 0.5em 0; float:left; display:none;}
.isTag .tagging {display:block;}
.tagged {margin:0.5em; float:right;}
.tagging, .tagged {font-size:0.9em; padding:0.25em;}
.tagging ul, .tagged ul {list-style:none; margin:0.25em; padding:0;}
.tagClear {clear:both;}

.footer {font-size:.9em;}
.footer li {display:inline;}

.annotation {padding:0.5em; margin:0.5em;}

* html .viewer pre {width:99%; padding:0 0 1em 0;}
.viewer {line-height:1.4em; padding-top:0.5em;}
.viewer .button {margin:0em 0.25em; padding:0em 0.25em;}
.viewer blockquote {line-height:1.5em; padding-left:0.8em;margin-left:2.5em;}
.viewer ul, .viewer ol {margin-left:0.5em; padding-left:1.5em;}

.viewer table, table.twtable {border-collapse:collapse; margin:0.8em 1.0em;}
.viewer th, .viewer td, .viewer tr,.viewer caption,.twtable th, .twtable td, .twtable tr,.twtable caption {padding:3px;}
table.listView {font-size:0.85em; margin:0.8em 1.0em;}
table.listView th, table.listView td, table.listView tr {padding:0px 3px 0px 3px;}

.viewer pre {padding:0.5em; margin-left:0.5em; font-size:1.2em; line-height:1.4em; overflow:auto;}
.viewer code {font-size:1.2em; line-height:1.4em;}

.editor {font-size:1.1em;}
.editor input, .editor textarea {display:block; width:100%; font:inherit;}
.editorFooter {padding:0.25em 0em; font-size:.9em;}
.editorFooter .button {padding-top:0px; padding-bottom:0px;}

.fieldsetFix {border:0; padding:0; margin:1px 0px 1px 0px;}

.sparkline {line-height:1em;}
.sparktick {outline:0;}

.zoomer {font-size:1.1em; position:absolute; overflow:hidden;}
.zoomer div {padding:1em;}

* html #backstage {width:99%;}
* html #backstageArea {width:99%;}
#backstageArea {display:none; position:relative; overflow: hidden; z-index:150; padding:0.3em 0.5em 0.3em 0.5em;}
#backstageToolbar {position:relative;}
#backstageArea a {font-weight:bold; margin-left:0.5em; padding:0.3em 0.5em 0.3em 0.5em;}
#backstageButton {display:none; position:absolute; z-index:175; top:0em; right:0em;}
#backstageButton a {padding:0.1em 0.4em 0.1em 0.4em; margin:0.1em 0.1em 0.1em 0.1em;}
#backstage {position:relative; width:100%; z-index:50;}
#backstagePanel {display:none; z-index:100; position:absolute; width:90%; margin:0em 3em 0em 3em; padding:1em 1em 1em 1em;}
.backstagePanelFooter {padding-top:0.2em; float:right;}
.backstagePanelFooter a {padding:0.2em 0.4em 0.2em 0.4em;}
#backstageCloak {display:none; z-index:20; position:absolute; width:100%; height:100px;}

.whenBackstage {display:none;}
.backstageVisible .whenBackstage {display:block;}
/*}}}*/
/***
StyleSheet for use when a translation requires any css style changes.
This StyleSheet can be used directly by languages such as Chinese, Japanese and Korean which need larger font sizes.
***/
/*{{{*/
body {font-size:0.8em;}
#sidebarOptions {font-size:1.05em;}
#sidebarOptions a {font-style:normal;}
#sidebarOptions .sliderPanel {font-size:0.95em;}
.subtitle {font-size:0.8em;}
.viewer table.listView {font-size:0.95em;}
/*}}}*/
/*{{{*/
@media print {
#mainMenu, #sidebar, #messageArea, .toolbar, #backstageButton, #backstageArea {display: none ! important;}
#displayArea {margin: 1em 1em 0em 1em;}
/* Fixes a feature in Firefox 1.5.0.2 where print preview displays the noscript content */
noscript {display:none;}
}
/*}}}*/
<!--{{{-->
<div class='header' macro='gradient vert [[ColorPalette::PrimaryLight]] [[ColorPalette::PrimaryMid]]'>
<div class='headerShadow'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
<div class='headerForeground'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
</div>
<div id='mainMenu' refresh='content' tiddler='MainMenu'></div>
<div id='sidebar'>
<div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>
<div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>
</div>
<div id='displayArea'>
<div id='messageArea'></div>
<div id='tiddlerDisplay'></div>
</div>
<!--}}}-->
<!--{{{-->
<div class='toolbar' macro='toolbar [[ToolbarCommands::ViewToolbar]]'></div>
<div class='title' macro='view title'></div>
<div class='subtitle'><span macro='view modifier link'></span>, <span macro='view modified date'></span> (<span macro='message views.wikified.createdPrompt'></span> <span macro='view created date'></span>)</div>
<div class='tagging' macro='tagging'></div>
<div class='tagged' macro='tags'></div>
<div class='viewer' macro='view text wikified'></div>
<div class='tagClear'></div>
<!--}}}-->
<!--{{{-->
<div class='toolbar' macro='toolbar [[ToolbarCommands::EditToolbar]]'></div>
<div class='title' macro='view title'></div>
<div class='editor' macro='edit title'></div>
<div macro='annotations'></div>
<div class='editor' macro='edit text'></div>
<div class='editor' macro='edit tags'></div><div class='editorFooter'><span macro='message views.editor.tagPrompt'></span><span macro='tagChooser excludeLists'></span></div>
<!--}}}-->
To get started with this blank TiddlyWiki, you'll need to modify the following tiddlers:
* SiteTitle & SiteSubtitle: The title and subtitle of the site, as shown above (after saving, they will also appear in the browser title bar)
* MainMenu: The menu (usually on the left)
* DefaultTiddlers: Contains the names of the tiddlers that you want to appear when the TiddlyWiki is opened
You'll also need to enter your username for signing your edits: <<option txtUserName>>
These InterfaceOptions for customising TiddlyWiki are saved in your browser

Your username for signing your edits. Write it as a WikiWord (eg JoeBloggs)

<<option txtUserName>>
<<option chkSaveBackups>> SaveBackups
<<option chkAutoSave>> AutoSave
<<option chkRegExpSearch>> RegExpSearch
<<option chkCaseSensitiveSearch>> CaseSensitiveSearch
<<option chkAnimate>> EnableAnimations

----
Also see [[AdvancedOptions]]
<<importTiddlers>>
http://www.evernote.com/shard/s48/sh/780e7534-cee4-4278-87f7-449e81d2acfc/23124af97669edefaca70c4f6e719426
http://www.evernote.com/shard/s48/sh/c5653239-108b-4515-a19e-d69fa3ad92c1/2476cb2c13785e02a391d05a7daf7507
http://jacobian.org/writing/web-scale/
http://thebuild.com/blog/2010/10/27/things-i-do-not-understand-web-scale/


http://www.cyberciti.biz/tips/what-is-devshm-and-its-practical-usage.html
http://superuser.com/questions/45342/when-should-i-use-dev-shm-and-when-should-i-use-tmp
http://download.oracle.com/docs/cd/B28359_01/server.111/b32009/appi_vlm.htm

tanel mentioned he used it as a persistent storage when he was doing a migration on this one database because it needs to do fast writes so he put the redo log on the /dev/shm.. this is dangerous because when the server crash then you have to do a restore/recover.. data residing in /dev/shm is not persistent on OS reboot..
turbo mode is disabled 
{{{
          <!-- Turbo Mode -->
          <!-- Description: Turbo Mode. -->
          <!-- Possible Values: "Disabled", "Enabled" -->
          <Turbo_Mode>Disabled</Turbo_Mode>
}}}

! cpu_topology script
{{{
[root@enkx3cel01 ~]# sh cpu_topology
        Product Name: SUN FIRE X4270 M3
        Product Name: ASSY,MOTHERBOARD,2U
model name      : Intel(R) Xeon(R) CPU E5-2630L 0 @ 2.00GHz
processors  (OS CPU count)          0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
physical id (processor socket)      0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1
siblings    (logical CPUs/socket)   12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12
core id     (# assigned to a core)  0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5
cpu cores   (physical cores/socket) 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6
}}}

! intel cpu topology tool
{{{
[root@enkx3cel01 cpu-topology]# ./cpu_topology64.out


        Advisory to Users on system topology enumeration

This utility is for demonstration purpose only. It assumes the hardware topology
configuration within a coherent domain does not change during the life of an OS
session. If an OS support advanced features that can change hardware topology
configurations, more sophisticated adaptation may be necessary to account for
the hardware configuration change that might have added and reduced the number
of logical processors being managed by the OS.

User should also`be aware that the system topology enumeration algorithm is
based on the assumption that CPUID instruction will return raw data reflecting
the native hardware configuration. When an application runs inside a virtual
machine hosted by a Virtual Machine Monitor (VMM), any CPUID instructions
issued by an app (or a guest OS) are trapped by the VMM and it is the VMM's
responsibility and decision to emulate/supply CPUID return data to the virtual
machines. When deploying topology enumeration code based on querying CPUID
inside a VM environment, the user must consult with the VMM vendor on how an VMM
will emulate CPUID instruction relating to topology enumeration.



        Software visible enumeration in the system:
Number of logical processors visible to the OS: 24
Number of logical processors visible to this process: 24
Number of processor cores visible to this process: 12
Number of physical packages visible to this process: 2


        Hierarchical counts by levels of processor topology:
 # of cores in package  0 visible to this process: 6 .
         # of logical processors in Core 0 visible to this process: 2 .
         # of logical processors in Core  1 visible to this process: 2 .
         # of logical processors in Core  2 visible to this process: 2 .
         # of logical processors in Core  3 visible to this process: 2 .
         # of logical processors in Core  4 visible to this process: 2 .
         # of logical processors in Core  5 visible to this process: 2 .
 # of cores in package  1 visible to this process: 6 .
         # of logical processors in Core 0 visible to this process: 2 .
         # of logical processors in Core  1 visible to this process: 2 .
         # of logical processors in Core  2 visible to this process: 2 .
         # of logical processors in Core  3 visible to this process: 2 .
         # of logical processors in Core  4 visible to this process: 2 .
         # of logical processors in Core  5 visible to this process: 2 .


        Affinity masks per SMT thread, per core, per package:
Individual:
        P:0, C:0, T:0 --> 1
        P:0, C:0, T:1 --> 1z3

Core-aggregated:
        P:0, C:0 --> 1001
Individual:
        P:0, C:1, T:0 --> 2
        P:0, C:1, T:1 --> 2z3

Core-aggregated:
        P:0, C:1 --> 2002
Individual:
        P:0, C:2, T:0 --> 4
        P:0, C:2, T:1 --> 4z3

Core-aggregated:
        P:0, C:2 --> 4004
Individual:
        P:0, C:3, T:0 --> 8
        P:0, C:3, T:1 --> 8z3

Core-aggregated:
        P:0, C:3 --> 8008
Individual:
        P:0, C:4, T:0 --> 10
        P:0, C:4, T:1 --> 1z4

Core-aggregated:
        P:0, C:4 --> 10010
Individual:
        P:0, C:5, T:0 --> 20
        P:0, C:5, T:1 --> 2z4

Core-aggregated:
        P:0, C:5 --> 20020

Pkg-aggregated:
        P:0 --> 3f03f
Individual:
        P:1, C:0, T:0 --> 40
        P:1, C:0, T:1 --> 4z4

Core-aggregated:
        P:1, C:0 --> 40040
Individual:
        P:1, C:1, T:0 --> 80
        P:1, C:1, T:1 --> 8z4

Core-aggregated:
        P:1, C:1 --> 80080
Individual:
        P:1, C:2, T:0 --> 100
        P:1, C:2, T:1 --> 1z5

Core-aggregated:
        P:1, C:2 --> 100100
Individual:
        P:1, C:3, T:0 --> 200
        P:1, C:3, T:1 --> 2z5

Core-aggregated:
        P:1, C:3 --> 200200
Individual:
        P:1, C:4, T:0 --> 400
        P:1, C:4, T:1 --> 4z5

Core-aggregated:
        P:1, C:4 --> 400400
Individual:
        P:1, C:5, T:0 --> 800
        P:1, C:5, T:1 --> 8z5

Core-aggregated:
        P:1, C:5 --> 800800

Pkg-aggregated:
        P:1 --> fc0fc0


        APIC ID listings from affinity masks
OS cpu   0, Affinity mask 00000001 - apic id 0
OS cpu   1, Affinity mask 00000002 - apic id 2
OS cpu   2, Affinity mask 00000004 - apic id 4
OS cpu   3, Affinity mask 00000008 - apic id 6
OS cpu   4, Affinity mask 00000010 - apic id 8
OS cpu   5, Affinity mask 00000020 - apic id a
OS cpu   6, Affinity mask 00000040 - apic id 20
OS cpu   7, Affinity mask 00000080 - apic id 22
OS cpu   8, Affinity mask 00000100 - apic id 24
OS cpu   9, Affinity mask 00000200 - apic id 26
OS cpu  10, Affinity mask 00000400 - apic id 28
OS cpu  11, Affinity mask 00000800 - apic id 2a
OS cpu  12, Affinity mask 00001000 - apic id 1
OS cpu  13, Affinity mask 00002000 - apic id 3
OS cpu  14, Affinity mask 00004000 - apic id 5
OS cpu  15, Affinity mask 00008000 - apic id 7
OS cpu  16, Affinity mask 00010000 - apic id 9
OS cpu  17, Affinity mask 00020000 - apic id b
OS cpu  18, Affinity mask 00040000 - apic id 21
OS cpu  19, Affinity mask 00080000 - apic id 23
OS cpu  20, Affinity mask 00100000 - apic id 25
OS cpu  21, Affinity mask 00200000 - apic id 27
OS cpu  22, Affinity mask 00400000 - apic id 29
OS cpu  23, Affinity mask 00800000 - apic id 2b


Package 0 Cache and Thread details


Box Description:
Cache  is cache level designator
Size   is cache size
OScpu# is cpu # as seen by OS
Core   is core#[_thread# if > 1 thread/core] inside socket
AffMsk is AffinityMask(extended hex) for core and thread
CmbMsk is Combined AffinityMask(extended hex) for hw threads sharing cache
       CmbMsk will differ from AffMsk if > 1 hw_thread/cache
Extended Hex replaces trailing zeroes with 'z#'
       where # is number of zeroes (so '8z5' is '0x800000')
L1D is Level 1 Data cache, size(KBytes)= 32,  Cores/cache= 2, Caches/package= 6
L1I is Level 1 Instruction cache, size(KBytes)= 32,  Cores/cache= 2, Caches/package= 6
L2 is Level 2 Unified cache, size(KBytes)= 256,  Cores/cache= 2, Caches/package= 6
L3 is Level 3 Unified cache, size(KBytes)= 15360,  Cores/cache= 12, Caches/package= 1
      +-------------+-------------+-------------+-------------+-------------+-------------+
Cache |   L1D       |   L1D       |   L1D       |   L1D       |   L1D       |   L1D       |
Size  |   32K       |   32K       |   32K       |   32K       |   32K       |   32K       |
OScpu#|     0     12|     1     13|     2     14|     3     15|     4     16|     5     17|
Core  | c0_t0  c0_t1| c1_t0  c1_t1| c2_t0  c2_t1| c3_t0  c3_t1| c4_t0  c4_t1| c5_t0  c5_t1|
AffMsk|     1    1z3|     2    2z3|     4    4z3|     8    8z3|    10    1z4|    20    2z4|
CmbMsk|  1001       |  2002       |  4004       |  8008       | 10010       | 20020       |
      +-------------+-------------+-------------+-------------+-------------+-------------+

Cache |   L1I       |   L1I       |   L1I       |   L1I       |   L1I       |   L1I       |
Size  |   32K       |   32K       |   32K       |   32K       |   32K       |   32K       |
      +-------------+-------------+-------------+-------------+-------------+-------------+

Cache |    L2       |    L2       |    L2       |    L2       |    L2       |    L2       |
Size  |  256K       |  256K       |  256K       |  256K       |  256K       |  256K       |
      +-------------+-------------+-------------+-------------+-------------+-------------+

Cache |    L3                                                                             |
Size  |   15M                                                                             |
CmbMsk| 3f03f                                                                             |
      +-----------------------------------------------------------------------------------+

Combined socket AffinityMask= 0x3f03f


Package 1 Cache and Thread details


Box Description:
Cache  is cache level designator
Size   is cache size
OScpu# is cpu # as seen by OS
Core   is core#[_thread# if > 1 thread/core] inside socket
AffMsk is AffinityMask(extended hex) for core and thread
CmbMsk is Combined AffinityMask(extended hex) for hw threads sharing cache
       CmbMsk will differ from AffMsk if > 1 hw_thread/cache
Extended Hex replaces trailing zeroes with 'z#'
       where # is number of zeroes (so '8z5' is '0x800000')
      +-------------+-------------+-------------+-------------+-------------+-------------+
Cache |   L1D       |   L1D       |   L1D       |   L1D       |   L1D       |   L1D       |
Size  |   32K       |   32K       |   32K       |   32K       |   32K       |   32K       |
OScpu#|     6     18|     7     19|     8     20|     9     21|    10     22|    11     23|
Core  | c0_t0  c0_t1| c1_t0  c1_t1| c2_t0  c2_t1| c3_t0  c3_t1| c4_t0  c4_t1| c5_t0  c5_t1|
AffMsk|    40    4z4|    80    8z4|   100    1z5|   200    2z5|   400    4z5|   800    8z5|
CmbMsk| 40040       | 80080       |100100       |200200       |400400       |800800       |
      +-------------+-------------+-------------+-------------+-------------+-------------+

Cache |   L1I       |   L1I       |   L1I       |   L1I       |   L1I       |   L1I       |
Size  |   32K       |   32K       |   32K       |   32K       |   32K       |   32K       |
      +-------------+-------------+-------------+-------------+-------------+-------------+

Cache |    L2       |    L2       |    L2       |    L2       |    L2       |    L2       |
Size  |  256K       |  256K       |  256K       |  256K       |  256K       |  256K       |
      +-------------+-------------+-------------+-------------+-------------+-------------+

Cache |    L3                                                                             |
Size  |   15M                                                                             |
CmbMsk|fc0fc0                                                                             |
      +-----------------------------------------------------------------------------------+
}}}


! intel turbostat
{{{
[root@enkx3cel01 ~]# ./turbostat
pkg core CPU   %c0   GHz  TSC   %c1    %c3    %c6    %c7   %pc2   %pc3   %pc6   %pc7
               4.22 2.00 2.00  95.78   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   0   0   0   3.85 2.00 2.00  96.15   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   0   0  12   2.74 2.00 2.00  97.26   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   0   1   1  24.62 2.00 2.00  75.38   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   0   1  13  26.93 2.00 2.00  73.07   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   0   2   2   2.68 2.00 2.00  97.32   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   0   2  14   3.15 2.00 2.00  96.85   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   0   3   3   2.10 2.00 2.00  97.90   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   0   3  15   1.44 2.00 2.00  98.56   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   0   4   4   2.66 2.00 2.00  97.34   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   0   4  16   1.99 2.00 2.00  98.01   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   0   5   5   1.88 2.00 2.00  98.12   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   0   5  17   2.34 2.00 2.00  97.66   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   1   0   6   3.10 2.00 2.00  96.90   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   1   0  18   2.28 2.00 2.00  97.72   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   1   1   7   2.73 2.00 2.00  97.27   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   1   1  19   2.28 2.00 2.00  97.72   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   1   2   8   1.94 2.00 2.00  98.06   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   1   2  20   1.41 2.00 2.00  98.59   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   1   3   9   2.45 2.00 2.00  97.55   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   1   3  21   2.26 2.00 2.00  97.74   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   1   4  10   1.41 2.00 2.00  98.59   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   1   4  22   1.48 2.00 2.00  98.52   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   1   5  11   1.59 2.00 2.00  98.41   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   1   5  23   1.87 2.00 2.00  98.13   0.00   0.00   0.00   0.00   0.00   0.00   0.00
}}}




! cpu_topology script
{{{
[root@enkx3db01 cpu-topology]# sh ~root/cpu_topology
        Product Name: SUN FIRE X4170 M3
        Product Name: ASSY,MOTHERBOARD,1U
model name      : Intel(R) Xeon(R) CPU E5-2690 0 @ 2.90GHz
processors  (OS CPU count)          0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
physical id (processor socket)      0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
siblings    (logical CPUs/socket)   16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16
core id     (# assigned to a core)  0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
cpu cores   (physical cores/socket) 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8
}}}


! intel cpu topology tool
{{{
[root@enkx3db01 cpu-topology]# ./cpu_topology64.out


        Advisory to Users on system topology enumeration

This utility is for demonstration purpose only. It assumes the hardware topology
configuration within a coherent domain does not change during the life of an OS
session. If an OS support advanced features that can change hardware topology
configurations, more sophisticated adaptation may be necessary to account for
the hardware configuration change that might have added and reduced the number
of logical processors being managed by the OS.

User should also`be aware that the system topology enumeration algorithm is
based on the assumption that CPUID instruction will return raw data reflecting
the native hardware configuration. When an application runs inside a virtual
machine hosted by a Virtual Machine Monitor (VMM), any CPUID instructions
issued by an app (or a guest OS) are trapped by the VMM and it is the VMM's
responsibility and decision to emulate/supply CPUID return data to the virtual
machines. When deploying topology enumeration code based on querying CPUID
inside a VM environment, the user must consult with the VMM vendor on how an VMM
will emulate CPUID instruction relating to topology enumeration.



        Software visible enumeration in the system:
Number of logical processors visible to the OS: 32
Number of logical processors visible to this process: 32
Number of processor cores visible to this process: 16
Number of physical packages visible to this process: 2


        Hierarchical counts by levels of processor topology:
 # of cores in package  0 visible to this process: 8 .
         # of logical processors in Core 0 visible to this process: 2 .
         # of logical processors in Core  1 visible to this process: 2 .
         # of logical processors in Core  2 visible to this process: 2 .
         # of logical processors in Core  3 visible to this process: 2 .
         # of logical processors in Core  4 visible to this process: 2 .
         # of logical processors in Core  5 visible to this process: 2 .
         # of logical processors in Core  6 visible to this process: 2 .
         # of logical processors in Core  7 visible to this process: 2 .
 # of cores in package  1 visible to this process: 8 .
         # of logical processors in Core 0 visible to this process: 2 .
         # of logical processors in Core  1 visible to this process: 2 .
         # of logical processors in Core  2 visible to this process: 2 .
         # of logical processors in Core  3 visible to this process: 2 .
         # of logical processors in Core  4 visible to this process: 2 .
         # of logical processors in Core  5 visible to this process: 2 .
         # of logical processors in Core  6 visible to this process: 2 .
         # of logical processors in Core  7 visible to this process: 2 .


        Affinity masks per SMT thread, per core, per package:
Individual:
        P:0, C:0, T:0 --> 1
        P:0, C:0, T:1 --> 1z4

Core-aggregated:
        P:0, C:0 --> 10001
Individual:
        P:0, C:1, T:0 --> 2
        P:0, C:1, T:1 --> 2z4

Core-aggregated:
        P:0, C:1 --> 20002
Individual:
        P:0, C:2, T:0 --> 4
        P:0, C:2, T:1 --> 4z4

Core-aggregated:
        P:0, C:2 --> 40004
Individual:
        P:0, C:3, T:0 --> 8
        P:0, C:3, T:1 --> 8z4

Core-aggregated:
        P:0, C:3 --> 80008
Individual:
        P:0, C:4, T:0 --> 10
        P:0, C:4, T:1 --> 1z5

Core-aggregated:
        P:0, C:4 --> 100010
Individual:
        P:0, C:5, T:0 --> 20
        P:0, C:5, T:1 --> 2z5

Core-aggregated:
        P:0, C:5 --> 200020
Individual:
        P:0, C:6, T:0 --> 40
        P:0, C:6, T:1 --> 4z5

Core-aggregated:
        P:0, C:6 --> 400040
Individual:
        P:0, C:7, T:0 --> 80
        P:0, C:7, T:1 --> 8z5

Core-aggregated:
        P:0, C:7 --> 800080

Pkg-aggregated:
        P:0 --> ff00ff
Individual:
        P:1, C:0, T:0 --> 100
        P:1, C:0, T:1 --> 1z6

Core-aggregated:
        P:1, C:0 --> 1000100
Individual:
        P:1, C:1, T:0 --> 200
        P:1, C:1, T:1 --> 2z6

Core-aggregated:
        P:1, C:1 --> 2000200
Individual:
        P:1, C:2, T:0 --> 400
        P:1, C:2, T:1 --> 4z6

Core-aggregated:
        P:1, C:2 --> 4000400
Individual:
        P:1, C:3, T:0 --> 800
        P:1, C:3, T:1 --> 8z6

Core-aggregated:
        P:1, C:3 --> 8000800
Individual:
        P:1, C:4, T:0 --> 1z3
        P:1, C:4, T:1 --> 1z7

Core-aggregated:
        P:1, C:4 --> 10001z3
Individual:
        P:1, C:5, T:0 --> 2z3
        P:1, C:5, T:1 --> 2z7

Core-aggregated:
        P:1, C:5 --> 20002z3
Individual:
        P:1, C:6, T:0 --> 4z3
        P:1, C:6, T:1 --> 4z7

Core-aggregated:
        P:1, C:6 --> 40004z3
Individual:
        P:1, C:7, T:0 --> 8z3
        P:1, C:7, T:1 --> 8z7

Core-aggregated:
        P:1, C:7 --> 80008z3

Pkg-aggregated:
        P:1 --> ff00ff00


        APIC ID listings from affinity masks
OS cpu   0, Affinity mask 0000000001 - apic id 0
OS cpu   1, Affinity mask 0000000002 - apic id 2
OS cpu   2, Affinity mask 0000000004 - apic id 4
OS cpu   3, Affinity mask 0000000008 - apic id 6
OS cpu   4, Affinity mask 0000000010 - apic id 8
OS cpu   5, Affinity mask 0000000020 - apic id a
OS cpu   6, Affinity mask 0000000040 - apic id c
OS cpu   7, Affinity mask 0000000080 - apic id e
OS cpu   8, Affinity mask 0000000100 - apic id 20
OS cpu   9, Affinity mask 0000000200 - apic id 22
OS cpu  10, Affinity mask 0000000400 - apic id 24
OS cpu  11, Affinity mask 0000000800 - apic id 26
OS cpu  12, Affinity mask 0000001000 - apic id 28
OS cpu  13, Affinity mask 0000002000 - apic id 2a
OS cpu  14, Affinity mask 0000004000 - apic id 2c
OS cpu  15, Affinity mask 0000008000 - apic id 2e
OS cpu  16, Affinity mask 0000010000 - apic id 1
OS cpu  17, Affinity mask 0000020000 - apic id 3
OS cpu  18, Affinity mask 0000040000 - apic id 5
OS cpu  19, Affinity mask 0000080000 - apic id 7
OS cpu  20, Affinity mask 0000100000 - apic id 9
OS cpu  21, Affinity mask 0000200000 - apic id b
OS cpu  22, Affinity mask 0000400000 - apic id d
OS cpu  23, Affinity mask 0000800000 - apic id f
OS cpu  24, Affinity mask 0001000000 - apic id 21
OS cpu  25, Affinity mask 0002000000 - apic id 23
OS cpu  26, Affinity mask 0004000000 - apic id 25
OS cpu  27, Affinity mask 0008000000 - apic id 27
OS cpu  28, Affinity mask 0010000000 - apic id 29
OS cpu  29, Affinity mask 0020000000 - apic id 2b
OS cpu  30, Affinity mask 0040000000 - apic id 2d
OS cpu  31, Affinity mask 0080000000 - apic id 2f


Package 0 Cache and Thread details


Box Description:
Cache  is cache level designator
Size   is cache size
OScpu# is cpu # as seen by OS
Core   is core#[_thread# if > 1 thread/core] inside socket
AffMsk is AffinityMask(extended hex) for core and thread
CmbMsk is Combined AffinityMask(extended hex) for hw threads sharing cache
       CmbMsk will differ from AffMsk if > 1 hw_thread/cache
Extended Hex replaces trailing zeroes with 'z#'
       where # is number of zeroes (so '8z5' is '0x800000')
L1D is Level 1 Data cache, size(KBytes)= 32,  Cores/cache= 2, Caches/package= 8
L1I is Level 1 Instruction cache, size(KBytes)= 32,  Cores/cache= 2, Caches/package= 8
L2 is Level 2 Unified cache, size(KBytes)= 256,  Cores/cache= 2, Caches/package= 8
L3 is Level 3 Unified cache, size(KBytes)= 20480,  Cores/cache= 16, Caches/package= 1
      +-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+
Cache |     L1D         |     L1D         |     L1D         |     L1D         |     L1D         |     L1D         |     L1D         |     L1D         |
Size  |     32K         |     32K         |     32K         |     32K         |     32K         |     32K         |     32K         |     32K         |
OScpu#|       0       16|       1       17|       2       18|       3       19|       4       20|       5       21|       6       22|       7       23|
Core  |   c0_t0    c0_t1|   c1_t0    c1_t1|   c2_t0    c2_t1|   c3_t0    c3_t1|   c4_t0    c4_t1|   c5_t0    c5_t1|   c6_t0    c6_t1|   c7_t0    c7_t1|
AffMsk|       1      1z4|       2      2z4|       4      4z4|       8      8z4|      10      1z5|      20      2z5|      40      4z5|      80      8z5|
CmbMsk|   10001         |   20002         |   40004         |   80008         |  100010         |  200020         |  400040         |  800080         |
      +-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+

Cache |     L1I         |     L1I         |     L1I         |     L1I         |     L1I         |     L1I         |     L1I         |     L1I         |
Size  |     32K         |     32K         |     32K         |     32K         |     32K         |     32K         |     32K         |     32K         |
      +-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+

Cache |      L2         |      L2         |      L2         |      L2         |      L2         |      L2         |      L2         |      L2         |
Size  |    256K         |    256K         |    256K         |    256K         |    256K         |    256K         |    256K         |    256K         |
      +-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+

Cache |      L3                                                                                                                                       |
Size  |     20M                                                                                                                                       |
CmbMsk|  ff00ff                                                                                                                                       |
      +-----------------------------------------------------------------------------------------------------------------------------------------------+

Combined socket AffinityMask= 0xff00ff


Package 1 Cache and Thread details


Box Description:
Cache  is cache level designator
Size   is cache size
OScpu# is cpu # as seen by OS
Core   is core#[_thread# if > 1 thread/core] inside socket
AffMsk is AffinityMask(extended hex) for core and thread
CmbMsk is Combined AffinityMask(extended hex) for hw threads sharing cache
       CmbMsk will differ from AffMsk if > 1 hw_thread/cache
Extended Hex replaces trailing zeroes with 'z#'
       where # is number of zeroes (so '8z5' is '0x800000')
      +-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+
Cache |     L1D         |     L1D         |     L1D         |     L1D         |     L1D         |     L1D         |     L1D         |     L1D         |
Size  |     32K         |     32K         |     32K         |     32K         |     32K         |     32K         |     32K         |     32K         |
OScpu#|       8       24|       9       25|      10       26|      11       27|      12       28|      13       29|      14       30|      15       31|
Core  |   c0_t0    c0_t1|   c1_t0    c1_t1|   c2_t0    c2_t1|   c3_t0    c3_t1|   c4_t0    c4_t1|   c5_t0    c5_t1|   c6_t0    c6_t1|   c7_t0    c7_t1|
AffMsk|     100      1z6|     200      2z6|     400      4z6|     800      8z6|     1z3      1z7|     2z3      2z7|     4z3      4z7|     8z3      8z7|
CmbMsk| 1000100         | 2000200         | 4000400         | 8000800         | 10001z3         | 20002z3         | 40004z3         | 80008z3         |
      +-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+

Cache |     L1I         |     L1I         |     L1I         |     L1I         |     L1I         |     L1I         |     L1I         |     L1I         |
Size  |     32K         |     32K         |     32K         |     32K         |     32K         |     32K         |     32K         |     32K         |
      +-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+

Cache |      L2         |      L2         |      L2         |      L2         |      L2         |      L2         |      L2         |      L2         |
Size  |    256K         |    256K         |    256K         |    256K         |    256K         |    256K         |    256K         |    256K         |
      +-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+

Cache |      L3                                                                                                                                       |
Size  |     20M                                                                                                                                       |
CmbMsk|ff00ff00                                                                                                                                       |
      +-----------------------------------------------------------------------------------------------------------------------------------------------+
}}}


! intel turbostat
{{{
[root@enkx3db01 ~]# ./turbostat
pkg core CPU   %c0   GHz  TSC   %c1    %c3    %c6    %c7   %pc2   %pc3   %pc6   %pc7
               0.73 1.99 2.89  99.27   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   0   0   0   1.71 1.86 2.89  98.29   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   0   0  16   0.82 1.88 2.89  99.18   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   0   1   1   3.66 1.60 2.89  96.34   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   0   1  17   3.34 1.97 2.89  96.66   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   0   2   2   0.20 2.12 2.89  99.80   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   0   2  18   0.32 2.68 2.89  99.68   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   0   3   3   0.43 2.28 2.89  99.57   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   0   3  19   0.32 1.47 2.89  99.68   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   0   4   4   0.14 2.61 2.89  99.86   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   0   4  20   0.14 1.90 2.89  99.86   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   0   5   5   0.09 1.98 2.89  99.91   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   0   5  21   0.18 1.80 2.89  99.82   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   0   6   6   0.14 1.94 2.89  99.86   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   0   6  22   0.03 2.12 2.89  99.97   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   0   7   7   0.02 2.28 2.89  99.98   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   0   7  23   0.02 2.02 2.89  99.98   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   1   0   8   3.49 2.37 2.89  96.51   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   1   0  24   1.30 2.48 2.89  98.70   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   1   1   9   0.85 2.39 2.89  99.15   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   1   1  25   0.54 2.66 2.89  99.46   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   1   2  10   0.49 1.92 2.89  99.51   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   1   2  26   0.23 2.17 2.89  99.77   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   1   3  11   0.24 2.18 2.89  99.76   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   1   3  27   0.57 1.65 2.89  99.43   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   1   4  12   0.22 2.30 2.89  99.78   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   1   4  28   0.28 2.10 2.89  99.72   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   1   5  13   0.44 1.79 2.89  99.56   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   1   5  29   0.10 2.02 2.89  99.90   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   1   6  14   0.05 2.46 2.89  99.95   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   1   6  30   0.06 2.44 2.89  99.94   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   1   7  15   2.24 1.44 2.89  97.76   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   1   7  31   0.70 2.23 2.89  99.30   0.00   0.00   0.00   0.00   0.00   0.00   0.00
}}}






turbo mode is disabled 
{{{
          <!-- Turbo Mode -->
          <!-- Description: Turbo Mode. -->
          <!-- Possible Values: "Disabled", "Enabled" -->
          <Turbo_Mode>Disabled</Turbo_Mode>
}}}

! cpu_topology script
{{{
[root@enkx3db02 cpu-topology]# sh ~root/cpu_topology
        Product Name: SUN FIRE X4170 M3
        Product Name: ASSY,MOTHERBOARD,1U
model name      : Intel(R) Xeon(R) CPU E5-2690 0 @ 2.90GHz
processors  (OS CPU count)          0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
physical id (processor socket)      0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1
siblings    (logical CPUs/socket)   8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8
core id     (# assigned to a core)  0 1 6 7 0 1 6 7 0 1 6 7 0 1 6 7
cpu cores   (physical cores/socket) 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
}}}


! intel cpu topology tool
{{{
[root@enkx3db02 cpu-topology]# ./cpu_topology64.out


        Advisory to Users on system topology enumeration

This utility is for demonstration purpose only. It assumes the hardware topology
configuration within a coherent domain does not change during the life of an OS
session. If an OS support advanced features that can change hardware topology
configurations, more sophisticated adaptation may be necessary to account for
the hardware configuration change that might have added and reduced the number
of logical processors being managed by the OS.

User should also`be aware that the system topology enumeration algorithm is
based on the assumption that CPUID instruction will return raw data reflecting
the native hardware configuration. When an application runs inside a virtual
machine hosted by a Virtual Machine Monitor (VMM), any CPUID instructions
issued by an app (or a guest OS) are trapped by the VMM and it is the VMM's
responsibility and decision to emulate/supply CPUID return data to the virtual
machines. When deploying topology enumeration code based on querying CPUID
inside a VM environment, the user must consult with the VMM vendor on how an VMM
will emulate CPUID instruction relating to topology enumeration.



        Software visible enumeration in the system:
Number of logical processors visible to the OS: 16
Number of logical processors visible to this process: 16
Number of processor cores visible to this process: 8
Number of physical packages visible to this process: 2


        Hierarchical counts by levels of processor topology:
 # of cores in package  0 visible to this process: 4 .
         # of logical processors in Core 0 visible to this process: 2 .
         # of logical processors in Core  1 visible to this process: 2 .
         # of logical processors in Core  2 visible to this process: 2 .
         # of logical processors in Core  3 visible to this process: 2 .
 # of cores in package  1 visible to this process: 4 .
         # of logical processors in Core 0 visible to this process: 2 .
         # of logical processors in Core  1 visible to this process: 2 .
         # of logical processors in Core  2 visible to this process: 2 .
         # of logical processors in Core  3 visible to this process: 2 .


        Affinity masks per SMT thread, per core, per package:
Individual:
        P:0, C:0, T:0 --> 1
        P:0, C:0, T:1 --> 100

Core-aggregated:
        P:0, C:0 --> 101
Individual:
        P:0, C:1, T:0 --> 2
        P:0, C:1, T:1 --> 200

Core-aggregated:
        P:0, C:1 --> 202
Individual:
        P:0, C:2, T:0 --> 4
        P:0, C:2, T:1 --> 400

Core-aggregated:
        P:0, C:2 --> 404
Individual:
        P:0, C:3, T:0 --> 8
        P:0, C:3, T:1 --> 800

Core-aggregated:
        P:0, C:3 --> 808

Pkg-aggregated:
        P:0 --> f0f
Individual:
        P:1, C:0, T:0 --> 10
        P:1, C:0, T:1 --> 1z3

Core-aggregated:
        P:1, C:0 --> 1010
Individual:
        P:1, C:1, T:0 --> 20
        P:1, C:1, T:1 --> 2z3

Core-aggregated:
        P:1, C:1 --> 2020
Individual:
        P:1, C:2, T:0 --> 40
        P:1, C:2, T:1 --> 4z3

Core-aggregated:
        P:1, C:2 --> 4040
Individual:
        P:1, C:3, T:0 --> 80
        P:1, C:3, T:1 --> 8z3

Core-aggregated:
        P:1, C:3 --> 8080

Pkg-aggregated:
        P:1 --> f0f0


        APIC ID listings from affinity masks
OS cpu   0, Affinity mask   000001 - apic id 0
OS cpu   1, Affinity mask   000002 - apic id 2
OS cpu   2, Affinity mask   000004 - apic id c
OS cpu   3, Affinity mask   000008 - apic id e
OS cpu   4, Affinity mask   000010 - apic id 20
OS cpu   5, Affinity mask   000020 - apic id 22
OS cpu   6, Affinity mask   000040 - apic id 2c
OS cpu   7, Affinity mask   000080 - apic id 2e
OS cpu   8, Affinity mask   000100 - apic id 1
OS cpu   9, Affinity mask   000200 - apic id 3
OS cpu  10, Affinity mask   000400 - apic id d
OS cpu  11, Affinity mask   000800 - apic id f
OS cpu  12, Affinity mask   001000 - apic id 21
OS cpu  13, Affinity mask   002000 - apic id 23
OS cpu  14, Affinity mask   004000 - apic id 2d
OS cpu  15, Affinity mask   008000 - apic id 2f


Package 0 Cache and Thread details


Box Description:
Cache  is cache level designator
Size   is cache size
OScpu# is cpu # as seen by OS
Core   is core#[_thread# if > 1 thread/core] inside socket
AffMsk is AffinityMask(extended hex) for core and thread
CmbMsk is Combined AffinityMask(extended hex) for hw threads sharing cache
       CmbMsk will differ from AffMsk if > 1 hw_thread/cache
Extended Hex replaces trailing zeroes with 'z#'
       where # is number of zeroes (so '8z5' is '0x800000')
L1D is Level 1 Data cache, size(KBytes)= 32,  Cores/cache= 2, Caches/package= 4
L1I is Level 1 Instruction cache, size(KBytes)= 32,  Cores/cache= 2, Caches/package= 4
L2 is Level 2 Unified cache, size(KBytes)= 256,  Cores/cache= 2, Caches/package= 4
L3 is Level 3 Unified cache, size(KBytes)= 20480,  Cores/cache= 8, Caches/package= 1
      +-----------+-----------+-----------+-----------+
Cache |  L1D      |  L1D      |  L1D      |  L1D      |
Size  |  32K      |  32K      |  32K      |  32K      |
OScpu#|    0     8|    1     9|    2    10|    3    11|
Core  |c0_t0 c0_t1|c1_t0 c1_t1|c2_t0 c2_t1|c3_t0 c3_t1|
AffMsk|    1   100|    2   200|    4   400|    8   800|
CmbMsk|  101      |  202      |  404      |  808      |
      +-----------+-----------+-----------+-----------+

Cache |  L1I      |  L1I      |  L1I      |  L1I      |
Size  |  32K      |  32K      |  32K      |  32K      |
      +-----------+-----------+-----------+-----------+

Cache |   L2      |   L2      |   L2      |   L2      |
Size  | 256K      | 256K      | 256K      | 256K      |
      +-----------+-----------+-----------+-----------+

Cache |   L3                                          |
Size  |  20M                                          |
CmbMsk|  f0f                                          |
      +-----------------------------------------------+

Combined socket AffinityMask= 0xf0f


Package 1 Cache and Thread details


Box Description:
Cache  is cache level designator
Size   is cache size
OScpu# is cpu # as seen by OS
Core   is core#[_thread# if > 1 thread/core] inside socket
AffMsk is AffinityMask(extended hex) for core and thread
CmbMsk is Combined AffinityMask(extended hex) for hw threads sharing cache
       CmbMsk will differ from AffMsk if > 1 hw_thread/cache
Extended Hex replaces trailing zeroes with 'z#'
       where # is number of zeroes (so '8z5' is '0x800000')
      +-----------+-----------+-----------+-----------+
Cache |  L1D      |  L1D      |  L1D      |  L1D      |
Size  |  32K      |  32K      |  32K      |  32K      |
OScpu#|    4    12|    5    13|    6    14|    7    15|
Core  |c0_t0 c0_t1|c1_t0 c1_t1|c2_t0 c2_t1|c3_t0 c3_t1|
AffMsk|   10   1z3|   20   2z3|   40   4z3|   80   8z3|
CmbMsk| 1010      | 2020      | 4040      | 8080      |
      +-----------+-----------+-----------+-----------+

Cache |  L1I      |  L1I      |  L1I      |  L1I      |
Size  |  32K      |  32K      |  32K      |  32K      |
      +-----------+-----------+-----------+-----------+

Cache |   L2      |   L2      |   L2      |   L2      |
Size  | 256K      | 256K      | 256K      | 256K      |
      +-----------+-----------+-----------+-----------+

Cache |   L3                                          |
Size  |  20M                                          |
CmbMsk| f0f0                                          |
      +-----------------------------------------------+
}}}


! intel turbostat
{{{
[root@enkx3db02 ~]# ./turbostat
pkg core CPU   %c0   GHz  TSC   %c1    %c3    %c6    %c7   %pc2   %pc3   %pc6   %pc7
               2.05 2.42 2.89  97.95   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   0   0   0   3.19 1.93 2.89  96.81   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   0   0   8   2.09 1.93 2.89  97.91   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   0   1   1   4.14 2.22 2.89  95.86   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   0   1   9  10.10 2.66 2.89  89.90   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   0   6   2   0.89 1.98 2.89  99.11   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   0   6  10   5.12 2.79 2.89  94.88   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   0   7   3   0.40 2.26 2.89  99.60   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   0   7  11   0.46 2.33 2.89  99.54   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   1   0   4   1.86 2.07 2.89  98.14   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   1   0  12   0.53 2.33 2.89  99.47   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   1   1   5   0.57 2.45 2.89  99.43   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   1   1  13   0.95 2.55 2.89  99.05   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   1   6   6   0.58 1.62 2.89  99.42   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   1   6  14   1.04 2.68 2.89  98.96   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   1   7   7   0.31 2.18 2.89  99.69   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   1   7  15   0.58 2.75 2.89  99.42   0.00   0.00   0.00   0.00   0.00   0.00   0.00
}}}
http://rnm1978.wordpress.com/2011/02/02/instrumenting-obiee-for-tracing-oracle-db-calls/
http://rnm1978.wordpress.com/2010/01/26/identify-your-users-by-setting-client-id-in-oracle/

http://www.oracle-base.com/articles/10g/SQLTrace10046TrcsessAndTkprof10g.php
http://www.oracle-base.com/articles/10g/PerformanceTuningEnhancements10g.php

http://method-r.com/software/mrtools
http://method-r.com/component/content/article/115 <-- mrls
http://method-r.com/component/content/article/116 <-- mrnl
http://method-r.com/component/content/article/117 <-- mrskew

http://appsdba.com/docs/orcl_event_6340.html <-- trace file event timeline 
http://www.appsdba.com/blog/?category_name=oracle-dba&paged=2
http://www.appsdba.com/blog/?p=109 <-- trace file execution tree
http://appsdba.com/utilities_resource.htm 

http://www.juliandyke.com/Diagnostics/Trace/EnablingTrace.html
http://www.rittmanmead.com/2005/04/tracing-parallel-execution/
http://www.antognini.ch/2012/08/event-10046-full-list-of-levels/
http://www.sagecomputing.com.au/papers_presentations/lostwithoutatrace.pdf   <- good stuff, with sample codes
http://www.oracle-base.com/articles/8i/DBMS_APPLICATION_INFO.php    <- DBMS_APPLICATION_INFO : For Code Instrumentation
http://www.oracle-base.com/articles/misc/DBMS_SESSION.php <- DBMS_SESSION : Managing Sessions From a Connection Pool in Oracle Databases
http://www.oracle-base.com/articles/10g/SQLTrace10046TrcsessAndTkprof10g.php
http://www.petefinnigan.com/ramblings/how_to_set_trace.htm
http://psoug.org/reference/dbms_monitor.html
http://psoug.org/reference/dbms_applic_info.html
http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:49818662859946

How to: Trace the SQL executed by SYSMAN Using a Trigger [ID 400937.1]
{{{
CREATE OR REPLACE TRIGGER logontrig AFTER logon ON database 
begin 
if ora_login_user = 'SYSMAN' then 
execute immediate 'alter session set tracefile_identifier = '||'SYSMAN'; 
execute immediate 'Alter session set events ''10046 trace name context forever, level 12'''; 
end if; 
end;
/
}}}


Capture 10046 Traces Upon User Login (without using a trigger) [ID 371678.1]
http://dbmentors.blogspot.com/2011/09/using-dbmsmonitor.html
http://docs.oracle.com/cd/B28359_01/network.111/b28531/app_context.htm <- application context
https://method-r.fogbugz.com/default.asp?method-r.11.139.2 <- hotsos ILO 
http://www.databasejournal.com/features/oracle/article.php/3435431/Oracle-Session-Tracing-Part-I.htm   <- Oracle Session Tracing Part I







''per module''
{{{
exec DBMS_MONITOR.serv_mod_act_trace_enable (service_name => 'FSTSTAH', module_name => 'EX_APPROVAL');
exec DBMS_MONITOR.serv_mod_act_trace_disable (service_name => 'FSTSTAH', module_name => 'EX_APPROVAL');
trcsess output=client.trc module=EX_APPROVAL *.trc
./orasrp --aggregate=no --binds=0 --recognize-idle-events=no --sys=no client.trc fsprd.html
tkprof client.trc client.tkprof sort=exeela 
}}}

''grep tkprof SQLs''
{{{
less client.tkprof-webapp | grep -B3 -A30 "SELECT L2.TREE_NODE_NUM" | egrep "SQL ID|total" | less

SQL ID: 9gxa3r2v0mkzp Plan Hash: 751140913
total       24      3.65       3.65          0       9103          0        4294
SQL ID: 9zssps0292n9m Plan Hash: 2156210208
total       17      2.64       2.64          0     206748          0        2901
SQL ID: 034a6u0h7psb1 Plan Hash: 2156210208
total        3      0.18       0.18          0       8929          0           4
SQL ID: 2yr2m4xfb14z0 Plan Hash: 4136997945
total        3      0.18       0.18          0       9102          0           3
SQL ID: 0rurft7y2paks Plan Hash: 3656446192
total       14      3.62       3.62          0       9102          0        2391
SQL ID: 99ugjzcz1j1r4 Plan Hash: 2156210208
total       24      2.62       2.62          0     206749          0        4337
SQL ID: 5fgb0cvhqy8w2 Plan Hash: 2156210208
total       28      3.26       3.26          0     215957          0        5077
SQL ID: amrb5fkaysu2r Plan Hash: 2156210208
total        3      0.14       0.14          0      11367          0           3
SQL ID: 3d6u5vjh1y5ny Plan Hash: 2156210208
total       20      3.26       3.27          0     215956          0        3450

}}}


{{{
select service_name, module from v$session where module = 'EX_APPROVAL'
 
SERVICE_NAME                                                     MODULE
---------------------------------------------------------------- ----------------------------------------------------------------
FSPRDOL                                                          EX_APPROVAL
FSPRDOL                                                          EX_APPROVAL
FSPRDOL                                                          EX_APPROVAL
FSPRDOL                                                          EX_APPROVAL
FSPRDOL                                                          EX_APPROVAL
FSPRDOL                                                          EX_APPROVAL
FSPRDOL                                                          EX_APPROVAL
FSPRDOL                                                          EX_APPROVAL
FSPRDOL                                                          EX_APPROVAL
 
9 rows selected.
 
 
 
SYS@fsprd2> SELECT * FROM DBA_ENABLED_TRACES ;
SYS@fsprd2>
SYS@fsprd2> /
 
no rows selected
 
SYS@fsprd2>
SYS@fsprd2>
SYS@fsprd2> exec DBMS_MONITOR.serv_mod_act_trace_enable (service_name => 'FSPRDOL', module_name => 'EX_APPROVAL');
 
PL/SQL procedure successfully completed.
 
 
SELECT 
TRACE_TYPE,
PRIMARY_ID,
QUALIFIER_ID1,
waits,
binds
FROM DBA_ENABLED_TRACES;
 
 
TRACE_TYPE            PRIMARY_ID                                                       QUALIFIER_ID1                                WAITS BINDS
--------------------- ---------------------------------------------------------------- ------------------------------------------------ ----- -----
SERVICE_MODULE        FSPRDOL                                                          EX_APPROVAL                                  TRUE  FALSE
 


--To disable
 exec DBMS_MONITOR.serv_mod_act_trace_disable (service_name => 'FSPRDOL', module_name => 'EX_APPROVAL');
}}}
11g
http://structureddata.org/2011/08/18/creating-optimizer-trace-files/?utm_source=rss&utm_medium=rss&utm_campaign=creating-optimizer-trace-files

Examining the Oracle Database 10053 Trace Event Dump File
http://www.databasejournal.com/features/oracle/article.php/3894901/article.htm

Don Seiler
http://seilerwerks.wordpress.com/2007/08/17/dr-statslove-or-how-i-learned-to-stop-guessing-and-love-the-10053-trace/
! your own session
{{{
trace the session

ALTER SESSION SET TRACEFILE_IDENTIFIER='LIO_TRACE';
ALTER SESSION SET EVENTS '10200 TRACE NAME CONTEXT FOREVER, LEVEL 1';

Then take the occurrence of the LIO reasons

$ less emrep_ora_9946_WATCH_CONSISTENT.trc | grep "started for block" | awk '{print $1} ' | sort | uniq -c
    324 ktrget2():
     44 ktrgtc2():


I found this too which more on tracking the objects
http://hoopercharles.wordpress.com/2011/01/24/watching-consistent-gets-10200-trace-file-parser/
}}}

! another session
{{{

1) create the files ss.sql and getlio.awk (see below)

2) get the sid and serial# and trace file name

SELECT s.sid, 
s.serial#,
s.server, 
lower( 
CASE 
WHEN s.server IN ('DEDICATED','SHARED') THEN 
i.instance_name || '_' || 
nvl(pp.server_name, nvl(ss.name, 'ora')) || '_' || 
p.spid || '.trc' 
ELSE NULL 
END 
) AS trace_file_name 
FROM v$instance i, 
v$session s, 
v$process p, 
v$px_process pp, 
v$shared_server ss 
WHERE s.paddr = p.addr 
AND s.sid = pp.sid (+) 
AND s.paddr = ss.paddr(+) 
AND s.type = 'USER' 
ORDER BY s.sid;

3) to start trace, set the 10200 event level 1

exec sys.dbms_system.set_ev(200   ,   11667, 10200, 1, '');

4) monitor the file size

while : ; do du -sm dw_ora_18177.trc ; echo "--" ; sleep 2 ; done

5) execute ss.sql on the sid for 5 times

6) to stop trace, set the 10200 event level 0

exec sys.dbms_system.set_ev(200   ,   11667, 10200, 0, '');

7) process the trace file and the oradebug output

-- get the top objects
awk -v trcfile=dw_ora_18177.trc -f getlio.awk

-- get the function names
less dw_ora_18177.trc | grep "started for block" | awk '{print $1} ' | sort | uniq -c

8) SQL to get the object names

	SELECT
	  OBJECT_NAME,
	  DATA_OBJECT_ID,
	  TO_CHAR(DATA_OBJECT_ID, 'XXXXX') HEX_DATA_OBJECT_ID
	FROM
	  DBA_OBJECTS
	WHERE
	  DATA_OBJECT_ID IN(
	    TO_NUMBER('15ced', 'XXXXX'))
	/

	OBJECT_NAME                                                                                                                      DATA_OBJECT_ID HEX_DA
	-------------------------------------------------------------------------------------------------------------------------------- -------------- ------
	OBJ$                                                                                                                                         18     12


	Summary obj for file: dw_ora_18177.trc
	---------------------------------
	0x00000012 2781466


	2781466 ktrget2():



#### ss.sql and getlio.awk scripts below

cat ss.sql
oradebug setospid &spid
oradebug short_stack
oradebug short_stack
oradebug short_stack
oradebug short_stack
oradebug short_stack
oradebug short_stack
oradebug short_stack
oradebug short_stack
oradebug short_stack
oradebug short_stack
oradebug short_stack
oradebug short_stack
oradebug short_stack
oradebug short_stack
oradebug short_stack
oradebug short_stack
oradebug short_stack
oradebug short_stack
oradebug short_stack
oradebug short_stack
oradebug short_stack
oradebug short_stack
oradebug short_stack
oradebug short_stack
oradebug short_stack
oradebug short_stack
oradebug short_stack
oradebug short_stack
oradebug short_stack
oradebug short_stack



$ cat getlio.awk
BEGIN {
   FS ="[ \t<>:]+"
    print "Details for file: " trcfile
   print "---------------------------------"
   while( getline < trcfile != EOF ){
      if ( $0 ~ /started for block/ ) {
      rdba[$6]+=1
      obj[$8]+=1
      both[$6","$8]+=1
      #print $6 " " rdba[$6] ", " $8 " " obj[$8]
      }
   }
   close (trcfile)
   print ""

   print ""
   print "Summary rdba and obj for file: " trcfile
   print "---------------------------------"
   for ( var in both) {
      #print var " " both[var]
   }

   print ""
   print "Summary obj for file: " trcfile
   print "---------------------------------"
   for ( var in obj ) {
      print var " " obj[var]
   }
}

}}}
-- this will hog your server's memory in no time
{{{
select count(*) from dual connect by 1=1;
}}}

http://www.pythian.com/news/26003/rdbms-online-patching/

''Online Patching is a new feature introduced in 11.1.0.6. It will be delivered starting with RDBMS 11.2.0.2.0.''

http://goo.gl/2U3H3

http://apex.oracle.com/pls/apex/f?p=44785:24:0:::24:P24_CONTENT_ID,P24_PREV_PAGE:4679,1

RDBMS Online Patching Aka Hot Patching [ID 761111.1]
''Quick guide to package ORA- errors with ADRCI'' http://www.evernote.com/shard/s48/sh/e6086cd4-ab4e-4065-b145-323cfa545f80/a831bef2f6480f43c96bb23749df2710


http://goo.gl/mNnaD

''quick step by step'' https://support.oracle.com/CSP/main/article?cmd=show&type=ATT&id=443529.1:Steps&inline=1
How to Build a Testcase for Oracle Data Server Support to Reproduce ORA-600 and ORA-7445 Errors (Doc ID 232963.1)


To change the ADR base
<<<
ADR base = "/u01/app/oracle/product/11.2.0.3/dbhome_1/log"
adrci>
adrci>
''adrci> set base /u01/app/oracle''
adrci>
adrci> show home
ADR Homes:
diag/asm/+asm/+ASM4
diag/tnslsnr/pd01db04/listener
diag/tnslsnr/pd01db04/listener_fsprd
diag/tnslsnr/pd01db04/listener_temp
diag/tnslsnr/pd01db04/listener_mtaprd11
diag/tnslsnr/pd01db04/listener_scan2
diag/tnslsnr/pd01db04/listener_mvwprd
diag/tnslsnr/pd01db04/stat
diag/rdbms/dbm/dbm4
diag/rdbms/dbfsprd/DBFSPRD4
diag/rdbms/mtaprd11/mtaprd112
diag/rdbms/fsprd/fsprd2
diag/rdbms/fsqacdc/fsqa2
diag/rdbms/fsprddal/fsprd2
diag/rdbms/mtaprd11dal/mtaprd112
diag/rdbms/mvwprd/mvwprd2
diag/rdbms/mvwprddal/mvwprd2
diag/clients/user_oracle/host_783020838_80
diag/clients/user_oracle/host_783020838_11
<<<


{{{
Use ADRCI or SWB steps to create IPS packages
ADRCI
1. Enter ADRCI
# Adrci
2 shows the existence of the ADR home
adrci> show home
4 Setting ADR home
adrci> set home
5 shows all the problems
adrci> show problem
6 show all events
adrci> show incident
7 diagnostic information packed event
adrci> ips pack incident <incident id>
SWB
1 Log in to Enterprise Manager
2 Click the link 'support workbench'
3 Select 'all active' problem
4 Click the 'problem id' to view the corresponding event
5 Select the appropriate event
6 Click the 'quick package'
7 Enter the package name, description, choose whether to upload to oracle support
8 See the information package
9. Select the 'immediate' create the package, and click the button 'submit'

<br /> For more information, please read the following note for more information.
Note 422893.1 - 11g Understanding Automatic Diagnostic Repository.
Note 1091653.1 - "11g Quick Steps - How to create an IPS package using Support Workbench" [Video]
Note 443529.1 - 11g Quick Steps to Package and Send Critical Error Diagnostic Information to Support [Video] 
}}}
11g : Active Database Duplication
 	Doc ID:	Note:568034.1



-- DATABASE REPLAY

Oracle Database Replay Client Provisioning - Platform Download Matrix
  	Doc ID: 	815567.1

How To Find Database Replay Divergence Details [ID 1388309.1]


Oracle Database 11g: Interactive Quick Reference http://goo.gl/rQejT
{{{

New Products Installed in 11g:
------------------------------

1) Oracle APEX
	**- Installed by default

2) Oracle Warehouse Builder
	**- Installed by default

3) Oracle Configuration Manager
	- Offered, not installed by default
		two options:
			connected mode	
			disconnected mode

4) SQL Developer
	- Installed by default with template-based database installations
	- It is also installed with database client

5) Database Vault
	- Installed by default (OPTIONAL component - custom installation)



Changes in Install Options:
---------------------------

1) Oracle Configuration Manager
	- Starting 11g, Integrated with OUI (OPTIONAL component)

2) Oracle Data Mining
	- Selected on Enterprise Edition Installation type

3) Oracle Database Vault
	- Starting 11g, Integrated with OUI (OPTIONAL component - custom installation)

4) Oracle HTTP Server
	- Starting 11g, Available on separate media

5) Oracle Ultra Search
	- Starting 11g, Integrated with the Oracle Database

6) Oracle XML DB
	- Starting 11g, Installed by default



New Parameters:
---------------

MEMORY_TARGET
DIAGNOSTIC_DEST



New in ASM:
-----------

Automatic Storage Management Fast Mirror Resync
	see: Oracle Database Storage Administrator's Guide
SYSASM privilege
OSASM group



New Directories:
----------------

ADR_base/diag	<-- automatic diagnostic repository



Deprecated Components: 
----------------------

iSQL*Plus
Oracle Workflow
Oracle Data Mining Scoring Engine
Oracle Enterprise Manager Java Console




Overview of Installation:
-------------------------

CSS (Cluster Synchronization Services) does the synchronization between ASM and database instance
	for RAC, resides on Clusterware Home
	for Single Node-Single System, resides on home directory of ASM instance


Automatic Storage Management
	can be used starting 10.1.0.3 or later
	also, if you are 11.1 then you could use ASM from 10.1


Database Management Options:
	either you use:
	1) Enterprise Manager Grid Control
		Oracle Management Repository & Service --> Install Management Agent on each computer
	2) Local Database Control


Upgrading the database using RHEL 2.1 OS
	www.oracle.com/technology/tech/linux/pdf/rhel_23_upgrade.pdf



Preinstallation:
----------------


1) Logging In to the System as root

2) Checking the Hardware Requirements
	**NEW-parameters:
		memory_max_target
		memory_target

3) Checking the Software Requirements
	# Operating System Requirements
	# Kernel Requirements
	# Package Requirements
rpm -qa | grep -i "binutils"
rpm -qa | grep -i "compat-libstdc++"
rpm -qa | grep -i "elfutils-libelf"
rpm -qa | grep -i "elfutils-libelf-devel"
rpm -qa | grep -i "glibc"
rpm -qa | grep -i "glibc-common"
rpm -qa | grep -i "glibc-devel"
rpm -qa | grep -i "gcc"
rpm -qa | grep -i "gcc-c++"
rpm -qa | grep -i "libaio"
rpm -qa | grep -i "libaio-devel" 
rpm -qa | grep -i "libgcc"
rpm -qa | grep -i "libstdc++" 
rpm -qa | grep -i "libstdc++-devel"
rpm -qa | grep -i "make"
rpm -qa | grep -i "sysstat"
rpm -qa | grep -i "unixODBC"
rpm -qa | grep -i "unixODBC-devel"


NOT DISCOVERED:
rpm -qa | grep -i "elfutils-libelf-devel"
	dep: elfutils-libelf-devel-static-0.125-3.el5.i386.rpm
rpm -qa | grep -i "libaio-devel"
rpm -qa | grep -i "sysstat"
rpm -qa | grep -i "unixODBC"
rpm -qa | grep -i "unixODBC-devel"

	# Compiler Requirements
	# Additional Software Requirements

4) Preinstallation Requirements for Oracle Configuration Manager

5) Checking the Network Setup
	# Configuring Name Resolution
	# Installing on DHCP Computers
	# Installing on Multihomed Computers
	# Installing on Computers with Multiple Aliases
	# Installing on Non-Networked Computers

6) Creating Required Operating System Groups and Users
	**NEW-group:
		OSASM group...which has a usual name of "ASMADMIN"
		this group is for ASM storage administrators

groupadd oinstall
groupadd dba
groupadd oper
groupadd asmadmin
useradd -g oinstall -G dba,oper,asmadmin oracle

7) Configuring Kernel Parameters

in /etc/sysctl.conf
	# Controls the maximum shared segment size, in bytes
	kernel.shmmax = 4294967295
	
	# Controls the maximum number of shared memory segments, in pages
	kernel.shmall = 268435456
	
	fs.file-max = 102552
	kernel.shmmni = 4096
	kernel.sem = 250 32000 100 128
	net.ipv4.ip_local_port_range = 1024 65000
	net.core.rmem_default = 4194304
	net.core.rmem_max = 4194304
	net.core.wmem_default = 262144
	net.core.wmem_max = 262144

to increase shell limits:
in /etc/security/limits.conf
	oracle              soft    nproc   2047
	oracle              hard    nproc   16384
	oracle              soft    nofile  1024
	oracle              hard    nofile  65536

in /etc/pam.d/login
	session    required     /lib/security/pam_limits.so
	session    required     pam_limits.so

in /etc/profile
	if [ $USER = "oracle" ]; then
		if [ $SHELL = "/bin/ksh" ]; then
		ulimit -p 16384
		ulimit -n 65536
		else
		ulimit -u 16384 -n 65536
		fi
	fi

8) Identifying Required Software Directories

9) Identifying or Creating an Oracle Base Directory
root@localhost ~]# mkdir -p /u01/app
[root@localhost ~]# chown -R oracle:oinstall /u01/app
[root@localhost ~]# chmod -R 775 /u01/app

10) Choosing a Storage Option for Oracle Database and Recovery Files

11) Creating Directories for Oracle Database or Recovery Files
[root@localhost oracle]# mkdir flash_recovery_area
[root@localhost oracle]# chown oracle:oinstall flash_recovery_area/
[root@localhost oracle]# chmod 775 flash_recovery_area/

12) Preparing Disk Groups for an Automatic Storage Management Installation
13) Stopping Existing Oracle Processes
14) Configuring the oracle User's Environment
umask 022

export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
export ORACLE_BASE=/u01/app/oracle
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export ORACLE_SID=ora11

PATH=$ORACLE_HOME/bin:$PATH


}}}
http://www.oracle-base.com/articles/11g/ACFS_11gR2.php

ACFS Technical Overview and Deployment Guide [ID 948187.1]  ''<-- ACFS now supports RMAN, DataPump on 11.2.0.3 above... BTW, it does not support archivelogs… You still have to have the FRA diskgroup to put your archivelogs/redo. At least you can have the ACFS as container of backupsets and data pump files''

''update''
11.2.0.3 now supports almost everything
http://docs.oracle.com/cd/E11882_01/server.112/e18951/asmfilesystem.htm#CACJFGCD
Starting with Oracle Automatic Storage Management 11g Release 2 (11.2.0.3), Oracle ACFS supports RMAN backups (BACKUPSET file type), archive logs (ARCHIVELOG file type), and Data Pump dumpsets (DUMPSET file type). Note that Oracle ACFS snapshots are not supported with these files.

''update 08/2014''
ACFS supported on Exadata
<<<
Creating AFCS file systems on Exadata storage requires the following:

Oracle Linux
Grid Infrastructure 12.1.0.2
Database files stored in ACFS on Exadata storage are subject to the following guidelines and restrictions:

Supported database versions are 10.2.0.4, 10.2.0.5, 11.2.0.4, and 12.1.
Hybrid Columnar Compression (HCC) support (for 11.2 and 12.1) requires fix for bug 19136936.
Exadata-offload features such as Smart Scan, Storage Indexes, IORM, Network RM, etc. are not supported.
Exadata Smart Flash Cache will cache read operations. Caching of write operations is expected in a later release.
No specialized cache hints are passed from the Database to the Exadata Storage layer, which means the Smart Flash Cache heuristics are based on I/O size, similar to any other block storage caching technology.
Exadata Smart Flash Logging is not supported.
Hardware Assisted Resilient Data (HARD) checks are not performed.
<<<


How To Install/Reinstall Or Deinstall ACFS Modules/Installation Manually? [ID 1371067.1]

http://www.oracle-base.com/articles/11g/DBFS_11gR2.php
http://ronnyegner.wordpress.com/2009/10/08/the-oracle-database-file-system-dbfs/
http://www.pythian.com/news/17849/chopt-utility/
http://perumal.org/enabling-and-disabling-database-options/
http://juliandyke.wordpress.com/2010/10/06/oracle-11-2-0-2-requires-multicasting-on-the-interconnect/
http://dbastreet.com/blog/?p=515
http://blog.ronnyegner-consulting.de/oracle-11g-release-2-install-guide/
{{{
the only difference it would make on the databases that will have the DBV and TDE configured is that when 
DBAs would try to create a user it has to go through the dvadmin user. Other databases that doesn’t have the 
DV schemas created and configured will still behave as is. 

Below is a sample of create a user in a DBV environment

SYS@dbv_1> SYS@dbv_1> select username from dba_users order by 1;

USERNAME
------------------------------
ANONYMOUS
APEX_030200
APEX_PUBLIC_USER
APPQOSSYS
BI
CTXSYS
DBSNMP
DIP
DVADMIN
DVF
DVOWNER
DVSYS

SYS@dbv_1> conn / as sysdba 
SYS@dbv_1> create user karlarao identified by karlarao;


create user karlarao identified by karlarao
                                   *
ERROR at line 1:
ORA-01031: insufficient privileges


SYS@dbv_1> conn dvadmin/<password>
Connected.
DVADMIN@dbv_1> create user karlarao identified by karlarao;

User created.
}}}
Monitoring Business Applications http://docs.oracle.com/cd/E24628_01/install.121/e24215/bussapps.htm#BEIBBHFH

It’s kind of a Service Type that combines information from:
* Systems (PSFT systems for example), 
* Service tests, 
* Real User experience Insight data and 
* Business Transaction Management data. 
http://hemantoracledba.blogspot.sg/2013/07/concepts-features-overturned-in-12c.html

Oracle Database 12c Release 1 Information Center (Doc ID 1595421.2)
Release Schedule of Current Database Releases (Doc ID 742060.1)

Master Note For Oracle Database 12c Release 1 (12.1) Database/Client Installation/Upgrade/Migration Standalone Environment (Non-RAC) (Doc ID 1520299.1)
Master Note of Linux OS Requirements for Database Server (Doc ID 851598.1)
Requirements for Installing Oracle Database 12.1 on RHEL5 or OL5 64-bit (x86-64) (Doc ID 1529433.1)
Requirements for Installing Oracle Database 12.1 on RHEL6 or OL6 64-bit (x86-64) (Doc ID 1529864.1)

Exadata 12.1.1.1.0 release and patch (16980054 ) (Doc ID 1571789.1)

Interesting observation about 15sec Top Activity graph
http://oracleprof.blogspot.com/2010/07/oem-performance-tab-and-active-session.html
http://www.evernote.com/shard/s48/sh/1a9c1779-94ec-4e5a-a26f-ba92ea08988e/3bb10603e76f4fb346d7df4328882dcd

Also check out this thread at oracle-l for options on 10GbE on V2 http://www.freelists.org/post/oracle-l/Exadata-V2-Compute-Node-10GigE-PCI-card-installation
{{{
create table parallel_t1(c1 int, c2 char(100));

insert into parallel_t1
select level, 'x'
from dual
connect by level <= 8000
;

commit;


alter system set db_file_multiblock_read_count=128;
*._db_block_prefetch_limit=0
*._db_block_prefetch_quota=0
*._db_file_noncontig_mblock_read_count=0

alter system flush buffer_cache;


-- generate one parallel query
select count(*) from parallel_t1;


16:28:36 SYS@orcl> shutdown abort
ORACLE instance shut down.
16:29:21 SYS@orcl> startup pfile='/home/oracle/app/oracle/product/11.2.0/dbhome_2/dbs/initorcl.ora'
ORACLE instance started.

Total System Global Area  456146944 bytes
Fixed Size                  1344840 bytes
Variable Size             348129976 bytes
Database Buffers          100663296 bytes
Redo Buffers                6008832 bytes
Database mounted.
Database opened.
16:29:33 SYS@orcl> alter system flush buffer_cache;

System altered.

16:29:38 SYS@orcl> show parameter db_file_multi

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_file_multiblock_read_count        integer     128
16:29:47 SYS@orcl>
16:29:47 SYS@orcl> set lines 300
16:29:51 SYS@orcl> col "Parameter" FOR a40
16:29:51 SYS@orcl> col "Session Value" FOR a20
16:29:51 SYS@orcl> col "Instance Value" FOR a20
16:29:51 SYS@orcl> col "Description" FOR a50
16:29:51 SYS@orcl> SELECT a.ksppinm "Parameter", b.ksppstvl "Session Value", c.ksppstvl "Instance Value", a.ksppdesc "Description"
16:29:51   2  FROM x$ksppi a, x$ksppcv b, x$ksppsv c
16:29:51   3  WHERE a.indx = b.indx AND a.indx = c.indx
16:29:51   4  AND substr(ksppinm,1,1)='_'
16:29:51   5  AND a.ksppinm like '%&parameter%'
16:29:51   6  /
Enter value for parameter: read_count

Parameter                                Session Value        Instance Value       Description
---------------------------------------- -------------------- -------------------- --------------------------------------------------
_db_file_exec_read_count                 128                  128                  multiblock read count for regular clients
_db_file_optimizer_read_count            128                  128                  multiblock read count for regular clients
_db_file_noncontig_mblock_read_count     0                    0                    number of noncontiguous db blocks to be prefetched
_sort_multiblock_read_count              2                    2                    multi-block read count for sort

16:29:54 SYS@orcl>
16:29:54 SYS@orcl> @mystat

628 rows created.


SNAP_DATE_END
-------------------
2014-09-08 16:29:57


SNAP_DATE_BEGIN
-------------------



no rows selected


no rows selected


0 rows deleted.

16:29:57 SYS@orcl> select count(*) from parallel_t1;

  COUNT(*)
----------
      8000

16:30:03 SYS@orcl> @mystat

628 rows created.


SNAP_DATE_END
-------------------
2014-09-08 16:30:05


SNAP_DATE_BEGIN
-------------------
2014-09-08 16:29:57


      Difference Statistics Name
---------------- --------------------------------------------------------------
               2 CPU used by this session
               4 CPU used when call started
               3 DB time
             628 HSC Heap Segment Block Changes
              10 SQL*Net roundtrips to/from client
              80 buffer is not pinned count
           3,225 bytes received via SQL*Net from client
           2,308 bytes sent via SQL*Net to client
              15 calls to get snapshot scn: kcmgss
               1 calls to kcmgas
              32 calls to kcmgcs
       1,097,728 cell physical IO interconnect bytes
               4 cluster key scan block gets
               4 cluster key scans
             672 consistent changes
             250 consistent gets
              12 consistent gets - examination
             250 consistent gets from cache
             211 consistent gets from cache (fastpath)
               1 cursor authentications
           1,307 db block changes
             703 db block gets
             703 db block gets from cache
              10 db block gets from cache (fastpath)
              18 enqueue releases
              19 enqueue requests
              14 execute count
             530 file io wait time
             149 free buffer requested
               5 index fetch by key
               2 index scans kdiixs1
             218 no work - consistent read gets
              42 non-idle wait count
              19 opened cursors cumulative
               5 parse count (failures)
              12 parse count (hard)
              19 parse count (total)
               1 parse time elapsed
              32 physical read IO requests
       1,097,728 physical read bytes
              32 physical read total IO requests
       1,097,728 physical read total bytes
             134 physical reads
             134 physical reads cache
             102 physical reads cache prefetch
              56 recursive calls
             629 redo entries
          88,372 redo size
             953 session logical reads
               3 shared hash latch upgrades - no wait
               3 sorts (memory)
               2 sorts (rows)
               5 sql area purged
               1 table fetch by rowid
             211 table scan blocks gotten
          13,560 table scan rows gotten
               4 table scans (short tables)
          42,700 undo change vector size
              17 user calls
               3 workarea executions - optimal
               4 workarea memory allocated

61 rows selected.


SNAP_DATE_BEGIN     SNAP_DATE_END
------------------- -------------------
2014-09-08 16:29:57 2014-09-08 16:30:05


1256 rows deleted.

16:30:05 SYS@orcl> set lines 300
16:30:38 SYS@orcl> col "Parameter" FOR a40
16:30:38 SYS@orcl> col "Session Value" FOR a20
16:30:38 SYS@orcl> col "Instance Value" FOR a20
16:30:38 SYS@orcl> col "Description" FOR a50
16:30:38 SYS@orcl> SELECT a.ksppinm "Parameter", b.ksppstvl "Session Value", c.ksppstvl "Instance Value", a.ksppdesc "Description"
16:30:38   2  FROM x$ksppi a, x$ksppcv b, x$ksppsv c
16:30:38   3  WHERE a.indx = b.indx AND a.indx = c.indx
16:30:38   4  AND substr(ksppinm,1,1)='_'
16:30:38   5  AND a.ksppinm like '%&parameter%'
16:30:38   6  /
Enter value for parameter: prefetch

Parameter                                Session Value        Instance Value       Description
---------------------------------------- -------------------- -------------------- --------------------------------------------------
_db_block_prefetch_quota                 0                    0                    Prefetch quota as a percent of cache size
_db_block_prefetch_limit                 0                    0                    Prefetch limit in blocks


}}}
{{{

-- CREATE THE JOB 
-- 1min interval --   repeat_interval => 'FREQ=MINUTELY;BYSECOND=0',
-- 2mins interval -- repeat_interval => 'FREQ=MINUTELY;INTERVAL=2;BYSECOND=0',
-- 10secs interval -- repeat_interval => 'FREQ=SECONDLY;INTERVAL=10',

BEGIN
    SYS.DBMS_SCHEDULER.CREATE_JOB (
            job_name => '"SYSTEM"."AWR_1MIN_SNAP"',
            job_type => 'PLSQL_BLOCK',
            job_action => 'BEGIN
dbms_workload_repository.create_snapshot;
END;',
            number_of_arguments => 0,
            start_date => SYSTIMESTAMP,
            repeat_interval => 'FREQ=MINUTELY;BYSECOND=0',
            end_date => NULL,
            job_class => '"SYS"."DEFAULT_JOB_CLASS"',
            enabled => FALSE,
            auto_drop => FALSE,
            comments => 'AWR_1MIN_SNAP',
            credential_name => NULL,
            destination_name => NULL);

    SYS.DBMS_SCHEDULER.SET_ATTRIBUTE( 
             name => '"SYSTEM"."AWR_1MIN_SNAP"', 
             attribute => 'logging_level', value => DBMS_SCHEDULER.LOGGING_OFF);
          
    SYS.DBMS_SCHEDULER.enable(
             name => '"SYSTEM"."AWR_1MIN_SNAP"');

END; 
/


-- RUN JOB
BEGIN
	SYS.DBMS_SCHEDULER.run_job('"SYSTEM"."AWR_1MIN_SNAP"');
END;
/


-- DROP JOB
BEGIN
    SYS.DBMS_SCHEDULER.DROP_JOB(job_name => '"SYSTEM"."AWR_1MIN_SNAP"',
                                defer => false,
                                force => true);
END;
/


-- DISABLE JOB
BEGIN
    SYS.DBMS_SCHEDULER.disable(
             name => '"SYSTEM"."AWR_1MIN_SNAP"');
END;
/   


-- MONITOR JOB
SELECT * FROM DBA_SCHEDULER_JOB_LOG WHERE job_name = 'AWR_1MIN_SNAP';

col JOB_NAME format a15
col START_DATE format a25
col LAST_START_DATE format a25
col NEXT_RUN_DATE format a25
SELECT job_name, enabled, start_date, last_start_date, next_run_date FROM DBA_SCHEDULER_JOBS WHERE job_name = 'AWR_1MIN_SNAP';

-- AWR get recent snapshot
select * from 
(SELECT s0.instance_number, s0.snap_id, s0.startup_time,
  TO_CHAR(s0.END_INTERVAL_TIME,'YYYY-Mon-DD HH24:MI:SS') snap_start,
  TO_CHAR(s1.END_INTERVAL_TIME,'YYYY-Mon-DD HH24:MI:SS') snap_end,
  round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2) ela_min
FROM dba_hist_snapshot s0,
  dba_hist_snapshot s1
WHERE s1.snap_id           = s0.snap_id + 1
ORDER BY snap_id DESC)
where rownum < 11;

}}}
— Oracle Mix - Oracle OpenWorld and Oracle Develop Suggest-a-Session
https://mix.oracle.com/oow10/faq
https://mix.oracle.com/oow10/streams


http://blogs.oracle.com/oracleopenworld/2010/06/missed_the_call_for_papers_dea.html
http://blogs.oracle.com/datawarehousing/2010/06/openworld_suggest-a-session_vo.html
http://structureddata.org/2010/07/13/oracle-openworld-2010-the-oracle-real-world-performance-group/
http://kevinclosson.wordpress.com/2010/08/26/whats-really-happening-at-openworld-2010/

BI 
http://www.rittmanmead.com/2010/09/03/rittman-mead-at-oracle-openworld-2010-san-francisco/
OCW 2010 photos by Karl Arao
http://www.flickr.com/photos/kylehailey/sets/72157625025196338/

Oracle Closed World 2010
http://www.flickr.com/photos/kylehailey/sets/72157625018583630/
-- scheduler builder username is karlara0
https://oracleus.wingateweb.com/scheduler/login.jsp


Volunteer geek work at RACSIG 9-10am Wed, Oct5
http://en.wikibooks.org/wiki/RAC_Attack_-_Oracle_Cluster_Database_at_Home/Events

my notes ... http://www.evernote.com/shard/s48/sh/6591ce43-e00f-4b5c-ad12-b1f1547183a7/2a146737c4bfb7dab7453ba0bcdb4677

''bloggers meetup''
http://blogs.portrix-systems.de/brost/good-morning-san-francisco-5k-partner-fun-run/
http://dbakevlar.com/2011/10/oracle-open-world-2011-followup/
making use of smart scan made the run times faster, cpu on a lower utilization, + can accommodate more databases 
http://www.evernote.com/shard/s48/sh/b1f43d49-1bcd-4319-b274-19a91cf338ac/f9f554d2d03b3f20db591d5e68392cbf

{{{
Glenn Fawcett 
http://glennfawcett.files.wordpress.com/2013/06/ciops_data_x3-2.jpg
---
It wasn’t actually SLOB, but that might be interesting.
I used a mod of my blkhammer populate script to populate a bunch of tables OLTP style to 
show how WriteBack is used. As expected, Exadata is real good on 
“db file sequential read”… in the sub picosecond range if I am not mistaken :)
---
That was just a simple OLTP style insert test that spawns a bunch of PLSQL.  Yes for sure 
their were spills to disk... But the benefit was the coalescing of blocks.  DBWR is flushing really 
mostly random blocks, but the write back flash is pretty huge these days.  I was seeing average 
iosize to disk being around 800k but only about 8k to flash.
}}}
Backup and Recovery Performance and Best Practices for Exadata Cell and Oracle Exadata Database Machine  Oracle Database Release 11.2.0.2 and 11.2.0.3
http://www.oracle.com/technetwork/database/features/availability/maa-tech-wp-sundbm-backup-11202-183503.pdf

ODA (Oracle Database Appliance): HowTo Configure Multiple Public Network on GI (Grid Infrastructure) (Doc ID 1501039.1)
Data Guard: Redo Transport Services – How to use a separate network in a RAC environment. (Doc ID 1210153.1)
Data Guard Physical Standby 11.2 RAC Primary to RAC Standby using a second network (Doc ID 1349977.1)

http://kevinclosson.wordpress.com/2012/02/12/how-many-non-exadata-rac-licenses-do-you-need-to-match-exadata-performance/
{{{
kevinclosson
February 14, 2012 at 8:52 pm
Actually, Matt, I see nothing wrong with what the rep said. A single Exadata database grid host can drive a tremendous amount of storage throughput but it can only eat 3.2GB/s since there is but a single 40Gb HCA port active on each host. A single host can drive the storage grid nearly to saturation via Smart Scan…but as soon as the data flow back to the host approaches 3.2GB/s the Smart Scan will start to throttle. In fact single session (non-Parallel Query) can drive Smart Scan to well over 10GB/s in a full rack but, in that case you’d have a single foreground process on a single core of WSM-EP so there wouldn’t sufficient bandwidth to ingest much data..about 250MB/s can flow into a single session performing a Smart Scan. So the hypothetical there would be Smart Scan is churning through, let’s say, 10GB/s and Smart Scan is whittling down the payload by about 9.75GB/s through filtration and projection. Those are very close to realistic numbers I’ve just cited but I haven’t measured those sort of “atomics” in a year so I’m going by memory. Let’s say give or take 5% on my numbers.
<<<
}}}

http://forums.theregister.co.uk/forum/1/2011/12/12/ibm_vs_oracle_data_centre_optimisation/
{{{
Exadata: 2 Grids, 2 sets of roles.
>The Exadata storage nodes compress database files using a hybrid columnar algorithm so they take up less space and can be searched more quickly. They also run a chunk of the Oracle 11g code, pre-processing SQL queries on this compressed data before passing it off to the full-on 11g database nodes.
Exadata cells do not compress data. Data compression is done at load time (in the direct path) and compression (all varieties not just HCC) is code executed only on the RAC grid CPUS. Exadata users get no CPU help from the 168 cores in the storage grid when it comes to compressing data.
Exadata cells can, however, decompress HCC data (but not the other types of compressed data). I wrote "can" because cells monitor how busy they are and are constantly notified by the RAC servers about their respective CPU utilization. Since decompressing HCC data is murderously CPU-intensive the cells easily go processor-bound. At that time cells switch to "pass-through" mode shipping up to 40% of the HCC blocks to the RAC grid in compressed form. Unfortunately there are more CPUs in the storage grid than the RAC grid. There is a lot of writing on this matter on my blog and in the Expert Oracle Exadata book (Apress).
Also, while there are indeed 40GB DDR Infiniband paths to/from the RAC grid and the storage grid, there is only 3.2GB/s usable bandwidth for application payload between these grids. Therefore, the aggregate maximum data flow between the RAC grid and the cells is 25.6GB/s (3.2x8). There are 8 IB HCAs in either X2 model as well so the figure sticks for both. In the HP Oracle Database Mahine days that figure was 12.8GB/s.
With a maximum of 25.6 GB/s for application payload (Oracle's iDB protocol as it is called) one has to quickly do the math to see the mandatory data reduction rate in storage. That is, if only 25.6 GB/s fits through the network between these two grids yet a full rack can scan combined HDD+FLASH at 75 GB/s then you have to write SQL that throws away at least 66% of the data that comes off disk. Now, I'll be the first to point out that 66% payload reduction from cells is common. Indeed, the cells filter (WHERE predicate) and project columns (only the cited and join columns need shipped). However, compression changes all of that.
If scanning HCC data on a full rack Exadata configuration, and that data is compressed at the commonly cited compression ratio of 10:1 then the "effective" scan rate is 750GB/s. Now use the same predicates and cite the same columns and you'll get 66% reduced payload--or 255GB/s that needs to flow over iDB. That's about 10x over-subscription of the available 25.6 GB/s iDB bandwidth. When this occurs, I/O is throttled. That is, if the filtered/projected data produced by the cells is greater than 25.6GB/s then I/O wanes. Don't expect 10x query speedup because the product only has to perform 10% the I/O it would in the non-compressed case (given a HCC compression ratio of 10:1).
That is how the product works. So long as your service levels are met, fine. Just don't expect to see 75GB/s of HCC storage throughput with complex queries because this asymmetrical MPP architecture (Exadata) cannot scale that way (for more info see: http://bit.ly/tFauDA )
}}}


http://kevinclosson.wordpress.com/2011/11/23/mark-hurd-knows-cios-i-know-trivia-cios-may-not-care-about-either-hang-on-im-booting-my-cell-phone/#comment-37527
{{{
kevinclosson
November 28, 2011 at 7:09 pm
“I can see the shared nothing vs shared everything point in a CPU + separate storage perspective.”

…actually, I don’t fester about with the shared-disk versus shared nothing as I really don’t think it matters. It’s true that Real Application Clusters requires shared disk but that is not a scalability hindrance–so long as one works out the storage bandwidth requirements–a task that is not all that difficult with modern storage networking options. So long as ample I/O flow is plumbed into RAC it scales DW/BI workloads. It is as simple as that. On the other hand, what doesn’t scale is asymmetry. Asymmetry has never scaled as would be obvious to even the casual observer. As long as all code can run on all CPUs (symmetry) scalability is within reach. What I’m saying is that RAC actually has better scalability characteristics when running with conventional storage than with Exadata! That’s a preposterous statement to the folks who don’t actually know the technology, as well as those who are dishonest about the technology, but obvious to the rest of us. It’s simple computer science. One cannot take the code path of query processing, chop it off at the knees (filtration/projection) and offload that to some arbitrary percentage of your CPU assets and pigeon-hole all the rest of the code to the remaining CPUs and cross fingers.

A query cannot be equally CPU-intensive in all query code all the time. There is natural ebb and tide. If the query plan is at the point of intensive join processing it is not beneficial to have over fifty percent of the CPUs in the rack unable to process join code (as is the case with Exadata).

To address this sort of ebb/tide imbalance Oracle has “released” a “feature” referred to as “passthrough” where Exadata cells stop doing their value-add (filtration and HCC decompression) for up to about 40% of the data flowing off storage when cells get too busy (CPU-wise). At that point they just send unfiltered, compressed data to the RAC grid. The RAC grid, unfortunately, has less CPU cores than the storage grid and has brutally CPU-intensive work of its own to do (table join, sort, agg). “Passthrough” is discussed in the Expert Oracle Exadata (Apress) book.

This passthrough feature does allow water to find its level, as it were. When Exadata falls back to passthrough mode the whole configuration does indeed utilize all CPU and since idle CPU doesn’t do well to increase query processing performance this is a good thing. However, if Exadata cells stop doing the “Secret Sauce” (a.k.a., Offload Processing) when they get busy then why not just build a really large database grid (e.g., with the CPU count of all servers in an Exadata rack) and feed it with conventional storage? That way all CPU power is “in the right place” all the time. Well, the answer to that is clearly RAC licensing. Very few folks can afford to license enough cores to run a large enough RAC grid to make any of this matter. Instead they divert some monies that could go for a bigger database grid into “intelligent storage” and hope for the best.
}}}



http://www.snia.org/sites/default/education/tutorials/2008/fall/networking/DrorGoldenberg-Fabric_Consolidation_InfiniBand.pdf
3.2 GB/s unidirectional 
theoretical limit 3.2 GB/s measured due to server IO limitations


http://www.it-einkauf.de/images/PDF/677C777.pdf
{{{
INFINIBAND PHYSICAL-LAYER CHARACTERISTICS 
The InfiniBand physical-layer specification supports three data rates, designated 1X, 4X, and 12X, over both copper and fiber optic media. 
The base data rate, 1X single data rate (SDR), is clocked at 2.5 Gbps and is transmitted over two pairs of wires—transmit and receive—and 
yields an effective data rate of 2 Gbps full duplex (2 Gbps transmit, 2 Gbps receive). The 25 percent difference between data rate and  
clock rate is due to 8B/10B line encoding that dictates that for every 8 bits of data transmitted, an additional 2 bits of transmission 
overhead is incurred. 
}}}

infiniband cabling issues
{{{
InfiniBand cable presents a challenge within this environment because the cables are considerably thicker, heavier, and shorter in length 
to mitigate the effects of cross-talk and signal attenuation and achieve low bit error rates (BERs). To assure the operational integrity and 
performance of the HPC cluster, it is critically important to maintain the correct bend radius, or the integrity of the cable can be 
compromised such that the effects of cross-talk introduce unacceptable BERs. 
To address these issues, it is essential to thoroughly plan the InfiniBand implementation and provide a good cable management solution 
that enables easy expansion and replacement of failed cables and hardware. This is especially important when InfiniBand 12X or DDR 
technologies are being deployed because the high transmission rates are less tolerant to poor installation practices. 
}}}

http://www.redbooks.ibm.com/abstracts/tips0456.html
A single PCI Express serial link is a dual-simplex connection using two pairs of wires, one pair for transmit and one pair for receive, and can only transmit one bit per cycle. Although this sounds limiting, it can transmit at the extremely high speed of 2.5 Gbps, which equates to a burst mode of 320 MBps on a single connection. These two pairs of wires is called a lane.
{{{
Table: PCI Express maximum transfer rate
Lane width	Clock speed	Throughput (duplex, bits)	Throughput (duplex, bytes)	Initial expected uses
x1	2.5 GHz	5 Gbps	400 MBps	Slots, Gigabit Ethernet
x2	2.5 GHz	10 Gbps	800 MBps	
x4	2.5 GHz	20 Gbps	1.6 GBps	Slots, 10 Gigabit Ethernet, SCSI, SAS
x8	2.5 GHz	40 Gbps	3.2 GBps	
x16	2.5 GHz	80 Gbps	6.4 GBps	Graphics adapters
}}}


http://www.aiotestking.com/juniper/2011/07/when-using-a-40-gbps-switch-fabric-how-much-full-duplex-bandwidth-is-available-to-each-slot/
{{{
When using a 40 Gbps switch fabric, how much full duplex bandwidth is available to each slot?
A.
1.25 Gbps
}}}

Sun Blade 6048 InfiniBand QDR Switched Network Express Module Introduction
http://docs.oracle.com/cd/E19914-01/820-6705-10/chapter1.html
{{{
IB transfer rate (maximum)	
40 Gbps (QDR) per 4x IB port for the Sun Blade X6275 server module and 20 Gbps (DDR) per 4x IB port for the Sun Blade X6270 server module. There are two 4x IB ports per server module.

1,536 Gbps aggregate throughput
}}}


''email with Kevin''
<<<
on Exadata the 3.2 is establsihed by the PCI slot the HCA is sitting in. I don't scrutinize QDR IB these days. It would be duplex...would have to look it up.
<<<

wikipedia
<<<
http://en.wikipedia.org/wiki/InfiniBand where it mentioned about "The SDR connection's signalling rate is 2.5 gigabit per second (Gbit/s) in each direction per connection"
<<<

''The flash and HCA cards uses pci-e x8''
http://jarneil.wordpress.com/2012/02/02/upgradingdowngrading-exadata-ilom-firmware/
http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CFkQFjAA&url=http%3A%2F%2Fhusnusensoy.files.wordpress.com%2F2010%2F10%2Foracle-exadata-v2-fast-track.pptx&ei=M4zTT_mvLcGC2AWpufi6Dw&usg=AFQjCNFMAJgvIx9QuD3513dWS9nETkeXqw
{{{
IB Switches
3 x 36-port managed switches as opposed to Exadata v1 (2+1).
2 “leaf”
1 “spine” switches
Spine switch is only available for Full Rack because it is for connecting multiple full racks side by side.
A subnet manager running on one switch discovers the topology of the network.
HCA
Each node (RAC & Storage Cell) has a PCIe x8 40 Gbit HCA with two ports
Active-Standby Intracard Bonding.
}}}

F20 PCIe Card
{{{
Not a SATA/SAS SSD driver but a x8 PCIe device providing SATA/SAS interface.
4 Solid State Flash Disk Modules (FMod) each of 24 GB size
256 MB Cache
SuperCap Power Reserve (EnergyStorageModule) provides write-back operation mode.
ESM should be enabled for optimal write performance
Should be replaced in every two years.
Can be monitored using various tools like ILOM
Embedded SAS/SATA configuration will expose  16 (4 cards x 4 FMod) Linux devices.
/dev/sdn
4K sector boundary for Fmods
Each FMod consists of several NAND modules best performance can be reached with multithreading (32+ thread/FMod etc)

}}}







{{{

How To Avoid ORA-04030/ORA-12500 In 32 Bit Windows Environment
  	Doc ID: 	Note:373602.1

How to convert a 32-bit database to 64-bit database on Linux?
  	Doc ID: 	Note:341880.1 	
  	


-- PAE/AWE
		
		Some relief may be obtained by setting the /3GB flag as well as the /PAE flag in Oracle. This at least assures that up to 2 GB of memory is available for the Large Pool, 
		the Shared Pool, the PGA, and all user threads, after the AWE_WINDOW_SIZE parameter is taken into account. However, Microsoft recommends that the /3GB flag not be set if 
		the /AWE flag is set. This is due to the fact that the total amount of RAM accessible for ALL purposes is limited to 16 GB if the /3GB flag is set. RAM above 16 GB simply 
		�disappears� from the view of the OS. For PowerEdge 6850 servers that can support up to 64 GB of RAM, a limitation to only 16 GB of RAM is unacceptable.
		
		As noted previously, the model used for extended memory access under a 32-bit Operating System entails a substantial performance penalty. However, with a 64-bit OS, a flat linear model for memory used, with no need for PAE to access memory above 4 GB. Improved performance will be experienced for database SGA sizes greater than 3 GB, due to elimination of PAE overhead.
		
		
		MAXIMUM OF 4 GB OF ADDRESSABLE MEMORY FOR THE 32 BIT ARCHITECTURE. THIS IS A MAXIMUM PER PROCESS. THAT IS, EACH PROCESS MAY ALLOCATE UP TO 4 GB OF MEMORY
		
		2GB for OS
		2GB for USER THREADS
		
		1st workaround on 4GB limit: 
			- To expand the total memory used by Oracle above 2 GB, the /3GB flag may be set in the boot.ini file.	
				With the /3GB flag set, only 1 GB is used for the OS, and 3 GB is available for all user threads, including the Oracle SGA. 
			
		2nd workaround on 4GB limit: 
			- use the PAE, Intel 32-bit processors such as the Xeon processor support PAGING ADDRESS EXTENSIONS for large memory support
				MS Windows 2000 and 2003 support PAE through ADDRESS WINDOWING EXTENSIONS (AWE). PAE/AWE may be enabled by setting the /PAE flag in the boot.ini file. 
				The �USE_INDIRECT_BUFFERS=TRUE� parameter must also be set in the Oracle initialization file. In addition, the DB_BLOCK_BUFFERS parameter must be used 
				instead of the DB_CACHE parameter in the Oracle initialization file. With this method, Windows 2000 Server and Windows Server 2003 versions can support 
				up to 8 GB of total memory.
				Windows Advanced Server and Data Center versions support up to 64 GB of addressable memory with PAE/AWE.
			- One limitation of AWE is that only the Data Buffer component of the SGA may be placed in extended memory. Threads for other 
				SGA components such as the Shared Pool and the Large Pool, as well as the PGA and all Oracle user sessions must still fit inside 
				a relatively small memory area. THERE IS AN AWE_WINDOW_SIZE REGISTRY KEY PARAMETER THAT IS USED TO SET THE SIZE OF A KIND OF  �SWAP� AREA IN THE SGA. <-- swap area in SGA
				This �swap� area is used for mapping data blocks in upper memory to a lower memory location. By default, 
				this takes an additional 1 GB of low memory. This leaves only 2 GB of memory for everything other than the Buffer cache, assuming 
				the /3GB flag is set. If the /3GB flag is not set, only 1 GB of memory is available for the non-Buffer Cache components.
			- Note that the maximum addressable memory was limited to 16 GB of RAM
				Some relief may be obtained by setting the /3GB flag as well as the /PAE flag in Oracle. This at least assures that up to 2 GB of memory is available 
				for the Large Pool, the Shared Pool, the PGA, and all user threads, after the AWE_WINDOW_SIZE parameter is taken into account. However, Microsoft 
				recommends that the /3GB flag not be set if the /AWE flag is set. This is due to the fact that the total amount of RAM accessible for ALL purposes 
				is limited to 16 GB if the /3GB flag is set. RAM ABOVE 16 GB SIMPLY �DISAPPEARS� FROM THE VIEW OF THE OS. For PowerEdge 6850 servers that can support 
				up to 64 GB of RAM, a limitation to only 16 GB of RAM is unacceptable.
					This will give you (/3GB is set):
						3-4GB 	for Buffer Cache
						1GB 	for the swap area
						2GB 	for everything other than the Buffer Cache
						1GB 	for OS
					This will give you (/3GB is not set):
						3-4GB 	for Buffer Cache
						1GB 	for the swap area
						1GB 	for everything other than the Buffer Cache
						2GB 	for OS
			- Performance Tuning Corporation Benchmark:
					This will give you (/3GB is set):
						11GB 	for Buffer Cache
						.75GB 	for the swap area (AWE_MEMORY_WINDOW..minimum size that allowed the database to start)
						2.25GB 	for everything other than the Buffer Cache
						1GB 	for OS
					This will give you (/3GB is not set):
						11GB 	for Buffer Cache
						.75GB 	for the swap area (AWE_MEMORY_WINDOW..minimum size that allowed the database to start)
						1.25GB 	for everything other than the Buffer Cache
						2GB 	for OS

}}}

Using Large Pages for Oracle on Windows 64-bit (ORA_LPENABLE) http://blog.ronnyegner-consulting.de/2010/10/19/using-large-pages-for-oracle-on-windows-64-bit-ora_lpenable/
http://www.sketchup.com/download
http://docs.oracle.com/cd/E11857_01/em.111/e16790/ha_strategy.htm#EMADM9613
http://www.ibm.com/developerworks/linux/library/l-4kb-sector-disks/ <-- good stuff
http://ubuntuforums.org/showthread.php?t=1854524
http://ubuntuforums.org/showthread.php?t=1685666
http://ubuntuforums.org/showthread.php?t=1768635

also see [[Get BlockSize of OS]]


''Oracle related links''
1.8.1.4 Support 4 KB Sector Disk Drives http://docs.oracle.com/cd/E11882_01/server.112/e22487/chapter1.htm#FEATURENO08747 
Planning the Block Size of Redo Log Files http://docs.oracle.com/cd/E11882_01/server.112/e25494/onlineredo002.htm#ADMIN12891
Specifying the Sector Size for Drives http://docs.oracle.com/cd/E11882_01/server.112/e18951/asmdiskgrps.htm#OSTMG10203
Microsoft support policy for 4K sector hard drives in Windows http://support.microsoft.com/kb/2510009
ATA 4 KiB sector issues https://ata.wiki.kernel.org/index.php/ATA_4_KiB_sector_issues
http://en.wikipedia.org/wiki/Advanced_format
http://martincarstenbach.wordpress.com/2013/04/29/4k-sector-size-and-grid-infrastructure-11-2-installation-gotcha/
http://flashdba.com/4k-sector-size/
http://flashdba.com/install-cookbooks/installing-oracle-database-11-2-0-3-single-instance-using-4k-sector-size/
http://flashdba.com/2013/04/12/strange-asm-behaviour-with-4k-devices/
http://flashdba.com/2013/05/08/the-most-important-thing-you-need-to-know-about-flash/
http://www.storagenewsletter.com/news/disk/217-companies-hdd-since-1956
http://www.theregister.co.uk/2013/02/04/ihs_hdd_projections/
Alert: (Fix Is Ready + Additional Steps!) : After SAN Firmware Upgrade, ASM Diskgroups ( Using ASMLIB) Cannot Be Mounted Due To ORA-15085: ASM disk "" has inconsistent sector size. [1500460.1]












http://karlarao.wordpress.com/2009/12/31/50-sql-performance-optimization-scenarios/

{{{
ORACLE SQL Performance Optimization Series (1)

1. The types of ORACLE optimizer
2. The way to visit Table
3. Shared SQL statement

ORACLE SQL Performance Optimization Series (2)

4. Select the table name of the most efficient order (only in the effective rule-based optimizer)
5. WHERE clause in the order of the connections
6. SELECT clause to avoid using ‘*’
7. Access to the database to reduce the number of

ORACLE SQL Performance Optimization Series (3)

8. Using the DECODE function to reduce the processing time
9. Integration of simple, non-associated database access
10. Remove duplicate records
11. Alternative DELETE with TRUNCATE
12. As much as possible the use of COMMIT

ORACLE SQL Performance Optimization Series (4)

13. Calculate the number of records
14. Where clause with the HAVING clause to replace
15. To reduce the query table
16. Through an internal function to improve SQL efficiency

ORACLE SQL Performance Optimization Series (5)

17. Use the table alias (Alias)
18. Replace IN with EXISTS
19. Replace NOT IN with NOT EXISTS

ORACLE SQL performance optimization Series (6)

20. Connect with the table to replace EXISTS
21. Replace DISTINCT with EXISTS
22. Recognition ‘inefficient implementation of the’ in SQL statements
23. Use TKPROF tool to query SQL Performance Status

ORACLE SQL Performance Optimization Series (7)

24. Analysis of SQL statements with EXPLAIN PLAN

ORACLE SQL Performance Optimization Series (8)

25. With the index to improve efficiency
26. Operation index

ORACLE SQL Performance Optimization Series (9)

27. The choice of the basis of the table
28. Number of equal index
29. Comparing and scope of the comparison equation
30. The index level is not clear

ORACLE SQL Performance Optimization Series (10)

31. Force index failure
32. Avoid the use of columns in the index calculation.
33. Auto Select Index
34. Avoid the use of NOT in the index column
35. With “= substitute”

ORACLE SQL Performance Optimization Series (11)

36. UNION replaced with the OR (for the index column)
37. To replace the OR with the IN
38. Avoid the use of columns in the index IS NULL and IS NOT NULL

ORACLE SQL Performance Optimization Series (12)

39. Always use the first column index
40. ORACLE internal operations
41. With the UNION-ALL replaced UNION (if possible)
42. Usage Tips (Hints)

ORACLE SQL Performance Optimization Series (13)

43. WHERE replaced with ORDER BY
44. Avoid changing the index of the column type
45. Need to be careful of the WHERE clause

ORACLE SQL Performance Optimization Series (14)

46. Connect multiple scan
47. CBO to use a more selective index of
48. Avoid the use of resource-intensive operations
49. GROUP BY Optimization
50. Use Date
51. Use explicit cursor (CURSORs)
52. Optimization EXPORT and IMPORT
53. Separate tables and indexes

ORACLE SQL Performance Optimization Series (15)

EXISTS / NOT EXISTS must be better than IN / NOT IN the efficiency of high?

ORACLE SQL Performance Optimization Series (16)

I used the view of how query results are wrong?

ORACLE SQL Performance Optimization Series (17)

Page Which writing efficient SQL?

ORACLE SQL Performance Optimization Series (18)

COUNT (rowid) / COUNT (pk) the efficiency of high?

ORACLE SQL Performance Optimization Series (19)

ORACLE data type implicit conversions

ORACLE SQL Performance Optimization Series (20)

The use of INDEX should pay attention to the three questions

ORACLE Tips (HINT) use (Part 1) (21)

ORACLE Tips (HINT) use (Part 2) (22)

Analysis of function-based index (Part 1) (23)

Analysis of function-based index (Part 2) (24)

How to achieve efficient paging query (25)

ORACLE achieved in the SELECT TOP N method (26)
}}}
http://highscalability.com/blog/2013/11/25/how-to-make-an-infinitely-scalable-relational-database-manag.html
http://dimitrik.free.fr/blog/archives/2013/11/mysql-performance-over-1m-qps-with-innodb-memcached-plugin-in-mysql-57.html
Average Active Sessions (AAS) is a metric of the database load. This value should not go above the CPU count, if it does then that means the database is working very hard or waiting a lot for something. 

''The AAS & CPU count is used as a yardstick for a possible performance problem (I suggest reading Kyle's stuff about this):''
{{{
    if AAS < 1 
      -- Database is not blocked
    AAS ~= 0 
      -- Database basically idle
      -- Problems are in the APP not DB
    AAS < # of CPUs
      -- CPU available
      -- Database is probably not blocked
      -- Are any single sessions 100% active?
    AAS > # of CPUs
      -- Could have performance problems
    AAS >> # of CPUS
      -- There is a bottleneck
}}}

''AAS Formula''
--
{{{
* AAS is either dbtime/elapsed
* or count/samples
* in the case of dba_hist_ count is count*10 since they only write out 1/10 samples (19751*10)/600 = 329.18
}}}
This Tiddler will show you a new interesting metric included in the performance graph of Enterprise Manager 11g.. which is the ''CPU Wait'' or ''CPU + CPU Wait''

a little background.. 

I've done an IO test with the intention of bringing the system down to its knees and characterizing the IO performance on that level of stress. That time I want to know the IO performance of my R&D server http://www.facebook.com/photo.php?pid=5272015&l=d5f2be4166&id=552113028 (which I intend to run lots of VMs) having 8GB memory, IntelCore2Quad Q9500 & 5 x 1TB short stroked disk (on the outer 100GB area) and I was able to built from it an LVM stripe that produced about 900+ IOPS & 300+ MB/s on my ''Orion'' and ''dbms_resource_manager.calibrate_io'' runs and validated those numbers against the database I created by actually running ''256 parallel sessions'' doing SELECT * on a 300GB table http://goo.gl/PYYyH (the same disks are used but as ASM disks on the next 100GB area - short stroked). 

I'll start off by showing you how AAS is computed.. Then detail on how it is being graphed and show you the behavior of AAS on IO and CPU bound workload.. 

The tools I used for graphing the AAS: 
* Enterprise Manager 11g
** both the real time and historical graphs
* ASH Viewer by Alexander Kardapolov http://j.mp/dNidrB 
** this tool samples from the ASH itself and graphs it.. so it allows me to check the correctness and compare it with the ''real time'' graph of Enterprise Manager
* MS Excel and awr_topevents.sql 
** this tool samples from the DBA_HIST views and graphs it.. so it allows me to check the correctness and compare it with the ''historical'' graph of Enterprise Manager

Let's get started.. 

!
! How AAS is computed

AAS is the abstraction of database load and you can get it by the following means... 

!!!! 1) From ASH
<<<
[img[picturename| https://lh5.googleusercontent.com/_F2x5WXOJ6Q8/TZtyRXwwiOI/AAAAAAAABLA/BYOUYtXO1Vo/AASFromASH.png]]
<<<

!!!! 2) From DBA_HIST_ACTIVE_SESS_HISTORY
* In the case of DBA_HIST_ ''sample count'' is sample count*10 since they only write out 1/10 samples
<<<
[img[picturename| https://lh4.googleusercontent.com/_F2x5WXOJ6Q8/TZtyRcp7m_I/AAAAAAAABLI/sLqztbLY3Mw/AASFromDBA_HIST.png]]
<<<

!!!! 3) From the AWR Top Events
* The Top Events section unions the output of ''dba_hist_system_event'' (all the events) and the ''CPU'' from time model (''dba_hist_sys_time_model'') and then filter only the ''top 5'' and do this across the SNAP_IDs
** To get the ''high level AAS'' you have to divide DB Time / Elapsed Time
** To get the ''AAS for the Top Events'', you have to divide the ''time'' (from event or cpu) by ''elapsed time''
* You can see below that we are having ''the same'' AAS numbers compared to the ASH reports 
<<<
[img[picturename| https://lh3.googleusercontent.com/_F2x5WXOJ6Q8/TZtyRdPqm3I/AAAAAAAABLE/o23FMIG1yeQ/AASFromAWRTop.png]]
<<<

!
! How AAS is being graphed
I have a dedicated blog post on this topic.. http://karlarao.wordpress.com/2010/07/25/graphing-the-aas-with-perfsheet-a-la-enterprise-manager/

So we already know how we get the AAS, and how is it graphed.. ''so what's my issue?''

''Remember I mentioned this on the blog post above.. ?''
<<<
"So what’s the effect? mm… on a high CPU activity period you’ll notice that there will be a higher AAS on the Top Activity Page compared to Performance Page. Simply because ASH samples every second and it does that quickly on every active session (the only way to see CPU usage realtime) while the time model CPU although it updates quicker (5secs I think) than v$sysstat “CPU used by this session” there could still be some lag time and it will still be based on Time Statistics (one of two ways to calculate AAS) which could be affected by averages."
<<<
I'll expound on that with test cases included.. ''see below!''

!
! AAS behavior on an IO bound load
* This is the graph of an IO bound load using ASH Viewer, this will be similar to the graph you will see on ''real time'' view of the Enterprise Manager 11g
<<<
[img[picturename| https://lh3.googleusercontent.com/_F2x5WXOJ6Q8/TZ9Cp2Kc8aI/AAAAAAAABN0/1konJAJZMUo/highio-3.png]]
[img[picturename| https://lh4.googleusercontent.com/_F2x5WXOJ6Q8/TZt3yMWQUCI/AAAAAAAABLM/8d-I2RqvF3I/AASIObound.png]]
<<<
* This is the graph of the same workload using MS Excel and the script awr_topevents.sql, this will be the similar graph you will see on the ''historical'' view of the Enterprise Manager 11g
<<<
[img[picturename| https://lh6.googleusercontent.com/_F2x5WXOJ6Q8/TZ9FJ6cXxRI/AAAAAAAABN4/eWRs8SQd0ws/highio-4.png]]
<<<

As you can see from the images above and the numbers below.. the database is doing a lot of ''direct path read'' and we don't have a high load average. Although when you look at the OS statistics, from this IO intensive workload you will see high IO WAIT from the CPU.

Looking at the data below from AWR and ASH.. ''we see no discrepancies''.. now, let's compare this to the workload below where the database server is CPU bound and has a really high load average. 

''AAS Data from AWR''
<<<
[img[picturename| https://lh4.googleusercontent.com/_F2x5WXOJ6Q8/TZ8-nKFw2pI/AAAAAAAABNk/oozsoEgnmeE/highio-1.png]]
<<<

''AAS Data from ASH''
<<<
[img[picturename| https://lh6.googleusercontent.com/_F2x5WXOJ6Q8/TZ8-nFhmP7I/AAAAAAAABNo/x5kIF-HuhnY/highio-2.png]]
<<<

!
! AAS behavior on a CPU bound load

This is the Enterprise Manager 11g graph of a CPU bound load 
<<<
[img[picturename| https://lh5.googleusercontent.com/_F2x5WXOJ6Q8/TZt8ZxUeEUI/AAAAAAAABLY/gmclSmutRVg/AASCPUbound.png]]
<<<
This is the ASH Viewer graph of a CPU bound load 
* The dark green color you see below (18:30 - 22:00) is actually the ''CPU Wait'' metric that you are seeing on the Enterprise Manager graph above
* The light green color on the end part of the graph (22:00) is the ''Scheduler wait - resmgr: cpu quantum'' 
* The small hump on the 16:30-17:30 time frame is the IO bound load test case
<<<
[img[picturename| https://lh3.googleusercontent.com/_F2x5WXOJ6Q8/TZ6emvgui7I/AAAAAAAABNI/fxVzQryIwKc/highcpu-4.png]]
<<<
Below are the data from AWR and ASH of the same time period ''(21:50 - 22:00)''.. see the high level and drill down numbers below 
... it seems like if the database server is ''high on CPU/high on runqueue'' or the ''"wait for CPU"'' appears.. then the AAS numbers from the AWR and ASH reports don't match anymore but I would expect ASH to be bigger because it has fine grained samples of 1 second. But as you can see (below).. 
* the ASH top events correctly accounted the CPU time ''(95.37 AAS)'' which was tagged as ''CPU + Wait  for CPU''
* while the AWR CPU seems to be idle ''(.2 AAS)''. 
And what's even more interesting is 
* the high level AAS on AWR is ''356.7'' 
* while on the ASH it is ''329.18'' 
that's a huge gap! Well that could be because of 
* the high DB Time ''(215947.8)'' on AWR 
* compared to what Sample Count ASH has ''(197510)''. 
Do you have any idea why is this happening? Interesting right? 

''AAS Data from AWR''
<<<
[img[picturename| https://lh5.googleusercontent.com/_F2x5WXOJ6Q8/TZ6BdKu23hI/AAAAAAAABMw/Nuwg_qTt6m8/highcpu-1.png]]

[img[picturename| https://lh5.googleusercontent.com/_F2x5WXOJ6Q8/TZ6BdrU46FI/AAAAAAAABM4/6Inv_8_Z5dc/highcpu-2.png]]
<<<

''AAS Data from ASH''
<<<
[img[picturename| https://lh6.googleusercontent.com/_F2x5WXOJ6Q8/TZ8rp2UTbWI/AAAAAAAABNg/6VBzvJxxApM/highcpu-3.png]]
<<<

''A picture is worth a thousand words...'' - To clearly explain this behavior of ''CPU not properly accounted'' I'll show you the graph of the data samples

__''AWR Top Events with CPU "not properly" accounted''__
<<<
* This is the high level AAS we are getting from the ''DB Time/Elapsed Time'' from the AWR report across SNAP_IDs.. this output comes from the script ''awr_genwl.sql'' (AAS column - http://goo.gl/MUWr) notice that there are AAS number as high as 350 and above.. the second occurence of 350+ is from the SNAP_ID 495-496 mentioned above..
[img[picturename| https://lh5.googleusercontent.com/_F2x5WXOJ6Q8/TZ61tG_iQ0I/AAAAAAAABNY/iKAy7j4Y534/highcpu-5.png]]
* Drilling down on the AAS components of that high level AAS we have to graph the output of the ''awr_topevents.sql''... given that this is still the same workload, you see here that only the ''Direct Path Read'' is properly accounted and when you look at the CPU time it seems to be idle... thus, giving lower AAS than the image above..
* Take note that SNAP_ID 495 the AWR ''CPU'' seems to be idle (.2 AAS) which is what is happening on this image
* Also on the 22:00 period, the database stopped waiting on CPU and started to wait on ''Scheduler''.. and then it matched again the high level AAS from the image above (AAS range of 320).. Interesting right? 
[img[picturename| https://lh5.googleusercontent.com/_F2x5WXOJ6Q8/TZ53u_cLWLI/AAAAAAAABMY/9QP2C4S7AUI/highcpu-6.png]]
* We will also have this same behavior on Enterprise Manager 11g when we go to the ''Top Activity page'' and change the ''Real Time'' to ''Historical''... see the similarities on the graph from MS Excel? So when you go ''Real Time'' you are actually pulling from ASH.. then when you go ''Historical'' you are just pulling the Top Timed events across SNAP_IDs and graphing it.. but when you have issues like CPU time not properly accounted you'll see a really different graph and if you are not careful and don't know what it means you may end up with bad conclusions.. 
[img[picturename| https://lh5.googleusercontent.com/_F2x5WXOJ6Q8/TZ6fz5UzkVI/AAAAAAAABNM/9xL8IukSM4A/highcpu-10.png]]
<<<

__''AWR Top Events with CPU "properly" accounted''__
<<<
* Now, this is really interesting... the graph shown below is from the ''Performance page'' and is also ''Historical'' but produced a different graph from the ''Top Activity page''... 
* Why and how did it account for the ''CPU Wait''? where did it pull the data that the ''Top Activity page'' missed? 
* This is an improvement in the Enterprise Manager! So I'm curious how is this happening...
[img[picturename| https://lh3.googleusercontent.com/_F2x5WXOJ6Q8/TZ6ogMsAp0I/AAAAAAAABNQ/b9dTIxATxoY/highcpu-11.png]]
<<<

__''ASH with CPU "properly" accounted (well.. I say, ALWAYS!)''__

From the graph above & below where the CPU is properly accounted, you see the AAS is consistent at the range of 320.. 
[img[picturename| https://lh6.googleusercontent.com/_F2x5WXOJ6Q8/TZ53uvK1xkI/AAAAAAAABMU/7HThzn4uoEo/highcpu-7.png]]
What makes ASH different is the proper accounting of the ''CPU'' AAS component unlike the chart coming from awr_topevents.sql (mentioned on the AWR Top Events with CPU "not properly" accounted) where there's no CPU accounted at all... this could be the problem of DBA_HIST_SYS_TIME_MODEL - ''DB CPU'' metric that when the database server is high on runqueue and there are already scheduling issues in the OS the ''ASH is even more reliable'' on accounting all the CPU time.. 

Another thing that bothers me is why is it that the ''DB Time'' when applied to the AAS formula gives much higher AAS value than of the ASH? so that could also mean that ''the DB Time is another reliable source'' if the database server is high on runqueue.. 

If this is the case, from a pure AWR perspective... what I would do is have the output of ''awr_genwl.sql''.. then run the ''awr_topevents.sql''.. 
and then if I would see that my AAS is high on awr_genwl.sql with a really high "OS Load" and "CPU Utilization" and then if I compare it with the output of awr_topevents.sql and see a big discrepancy that would give me an idea that I'm experiencing the same issue mentioned here, and I would investigate further with the ASH data to solidify my conclusions.. 

If you are curious about the output of Time model statistics on SNAP_ID 495-496
the CPU values found here does not help either because they have low values..

{{{
   DB CPU = 126.70 sec
   BG CPU = 4.32 sec
   OS CPU (osstat) = 335.71 sec

Statistic Name                                       Time (s) % of DB Time
------------------------------------------ ------------------ ------------
sql execute elapsed time                            215,866.2        100.0
DB CPU                                                  126.7           .1
parse time elapsed                                       62.8           .0
hard parse elapsed time                                  60.0           .0
PL/SQL execution elapsed time                            33.9           .0
hard parse (sharing criteria) elapsed time                9.7           .0
sequence load elapsed time                                0.6           .0
PL/SQL compilation elapsed time                           0.2           .0
connection management call elapsed time                   0.0           .0
repeated bind elapsed time                                0.0           .0
hard parse (bind mismatch) elapsed time                   0.0           .0
DB time                                             215,947.9
background elapsed time                               1,035.5
background cpu time                                       4.3
          -------------------------------------------------------------
}}}

''Now we move on by splitting the ASH AAS components into their separate areas..''
* the ''CPU'' 
* and ''USER IO'' 
see the charts below.. 

This just shows that there is something about ASH properly accounting the ''CPU + WAIT FOR CPU'' whenever the database server is high on runqueue or OS load average... as well as the ''DB Time''
[img[picturename| https://lh6.googleusercontent.com/_F2x5WXOJ6Q8/TZ53wDeLd4I/AAAAAAAABMc/G5lodk6IAqE/highcpu-8.png]]
this is the ''USER IO'' AAS.. same as what is accounted in awr_topevents.sql
[img[picturename| https://lh3.googleusercontent.com/_F2x5WXOJ6Q8/TZ53wKTIMVI/AAAAAAAABMg/dAihs-LYGfY/highcpu-9.png]]


So the big question for me is...

How does ASH and the Enterprise Manager performance page account for the "CPU + WAIT FOR CPU"? even if you drill down on the V$ACTIVE_SESSION_HISTORY you will not find this metric. So I'm really interested on where they pull the data.. :)


''update''... and then I asked a couple of people, and I had a recent problem on a client site running on Exadata where I was troubleshooting their ETL runs. I was running 10046 for every run and found out that my unaccounted-for time is due to the CPU wait that is shown on this tiddler. So using Mr. Tools, and given that I'm having a similar workload.. I had an idea that the unaccounted-for time is the CPU wait. See the write up here http://www.evernote.com/shard/s48/sh/3ccc1e38-b5ef-46f8-bc75-371156ade4b3/69066fa2741f780f93b86af1626a1bcd , and I was right all along ;)


''AAS investigation updates:  Answered questions + bits of interesting findings''
http://www.evernote.com/shard/s48/sh/b4ecaaf2-1ceb-43ea-b58e-6f16079a775c/cb2e28e651c3993b325e66cc858c3935


''I've updated the awr_topevents.sql script to show CPU wait to solve the unnaccounted DB Time issue'' see the write up on the link below:
awr_topevents_v2.sql - http://www.evernote.com/shard/s48/sh/a64a656f-6511-4026-be97-467dccc82688/de5991c75289f16eee73c26c249a60bf



Thanks to the following people for reading/listening about this research, and for the interesting discussions and ideas around this topic: 
- Kyle Hailey, Riyaj Shamsudeen, Dave Abercrombie, Cary Millsap, John Beresniewicz


''Here's the MindMap of the AAS investigation'' http://www.evernote.com/shard/s48/sh/90cdf56f-da52-4dc5-91d0-a9540905baa6/9eb34e881a120f82f2dab0f5424208bf




http://www.evernote.com/shard/s48/sh/a0875f07-26e6-4ec7-ab31-2d946925ef73/6d2fe9d6adc6f716a40ec87e35a0b264
https://blogs.oracle.com/RobertGFreeman/entry/exadata_support_for_acfs_and
Atomic - they all complete successfully, or not at all
Consistent - integrity rules
Isolated - locking
Durable - transaction is guaranteed
{{{
connect / as sysdba

set serveroutput on

show user;

create or replace procedure mailserver_acl(
  aacl       varchar2,
  acomment   varchar2,
  aprincipal varchar2,
  aisgrant   boolean,
  aprivilege varchar2,
  aserver    varchar2,
  aport      number)
is
begin  
  begin
    DBMS_NETWORK_ACL_ADMIN.DROP_ACL(aacl);
     dbms_output.put_line('ACL dropped.....'); 
  exception
    when others then
      dbms_output.put_line('Error dropping ACL: '||aacl);
      dbms_output.put_line(sqlerrm);
  end;
  begin
    DBMS_NETWORK_ACL_ADMIN.CREATE_ACL(aacl,acomment,aprincipal,aisgrant,aprivilege);
    dbms_output.put_line('ACL created.....'); 
  exception
    when others then
      dbms_output.put_line('Error creating ACL: '||aacl);
      dbms_output.put_line(sqlerrm);
  end;  
  begin
    DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL(aacl,aserver,aport);
    dbms_output.put_line('ACL assigned.....');         
  exception
    when others then
      dbms_output.put_line('Error assigning ACL: '||aacl);
      dbms_output.put_line(sqlerrm);
  end;    
  commit;
  dbms_output.put_line('ACL commited.....'); 
end;
/
show errors



select acl, host, lower_port, upper_port from dba_network_acls

ACL                                      HOST                           LOWER_PORT UPPER_PORT
---------------------------------------- ------------------------------ ---------- ----------
/sys/acls/IFSAPP-PLSQLAP-Permission.xml  haiapp09.mfg.am.mds.       59080      59080

 select acl, principal, privilege, is_grant from dba_network_acl_privileges

ACL                                      PRINCIPAL                      PRIVILE IS_GR
---------------------------------------- ------------------------------ ------- -----
/sys/acls/IFSAPP-PLSQLAP-Permission.xml  IFSAPP                         connect true
/sys/acls/IFSAPP-PLSQLAP-Permission.xml  IFSSYS                         connect true



begin
  mailserver_acl(
    '/sys/acls/IFSAPP-PLSQLAP-Permission.xml',
    'ACL for used Email Server to connect',
    'IFSAPP',
    TRUE,
    'connect',
    'haiapp09.mfg.am.mds.',
    59080);    
end;
/


begin
   DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE('/sys/acls/IFSAPP-PLSQLAP-Permission.xml','IFSSYS',TRUE,'connect');
   commit;
end;
/
}}}
https://wiki.archlinux.org/index.php/AHCI
http://en.wikipedia.org/wiki/AHCI
http://en.wikipedia.org/wiki/NCQ

Disks from the Perspective of a File System - TCQ,NCQ,4KSectorSize,MRAM http://goo.gl/eWUK7
{{{

Logical Partitioning (LPAR) in AIX
  	Doc ID: 	Note:458571.1


-- INSTALLATION

Minimum Software Versions and Patches Required to Support Oracle Products on IBM pSeries
 	Doc ID:	Note:282036.1

Additional Steps Required To Upgrade IBM JDK On IBM iSeries
 	Doc ID:	Note:457287.1

Questions regarding Oracle database upgrades on AIX
 	Doc ID:	Note:223521.1

PAR: MATRIX IBM AIX for Oracle RDBMS Compatibility
 	Doc ID:	Note:41984.1

http://www-933.ibm.com/eserver/support/fixes/fixcentral/pfixpacks/53



-- BUG on 10.2.0.2 and ML 05 and higher

http://unix.derkeiler.com/Mailing-Lists/AIX-L/2006-09/msg00030.html
http://www.tek-tips.com/viewthread.cfm?qid=1272346&page=7

-- IY fix
ftp://ftp.software.ibm.com/aix/efixes/iy89080/

-- one-of-patch download
https://updates.oracle.com/ARULink/PatchDetails/process_form?patch_num=5496862&release=80102020&plat_lang=212P&patch_num_id=747092&email=karao@sqlwizard.com&userid=ml-591048.992&

Bug 5496862 - AIX: Mandatory patch to use Oracle with IBM Technology Level 5 (5300-5)
 	Doc ID:	Note:5496862.8

Introduction to "Bug Description" Articles
 	Doc ID:	Note:245840.1

10.2.0.3 PMON CRASHES ON STARTUP ON AIX 5L 5.3 ML05 -- WORKS on ML06
 	Doc ID:	Note:458442.1

Does A DB Running Oracle 10.2.0.2 On Aix 5.3 Tl5 Sp1 Have To Use Patch 5496862
 	Doc ID:	Note:432998.1

Is Patch 5496862 Mandatory for 10.2.0.3?
 	Doc ID:	Note:418105.1

How To Determine Whether an APAR has been Fixed in AIX Version/Maintenance Level
 	Doc ID:	Note:417451.1

How To Determine Service Pack in AIX
 	Doc ID:	Note:421513.1

How Do I Determine The AIX Technology level ?
 	Doc ID:	Note:443343.1

Is Patch 5496862 applicable on AIX 5.3 TL 06 / TL 07 / TL 08 ?
 	Doc ID:	Note:443944.1

How To Determine Whether an APAR has been Fixed in AIX Version/Maintenance Level
 	Doc ID:	Note:417451.1

Is Patch 5496862 Mandatory for 10.2.0.3?
 	Doc ID:	Note:418105.1

How Do I Determine The AIX Technology level ?
 	Doc ID:	Note:443343.1

ORA-01115 ORA-01110 ORA-27091 ORA-27072 Error: 5: I/O error
 	Doc ID:	Note:559697.1

IO Interoperability Issue between IBM ML05 and Oracle Databases
 	Doc ID:	Note:390656.1

Patch 5496862 Now Available For RDBMS Server Version 10.1.0.4.2 (AIX)
 	Doc ID:	Note:418048.1



-- DYNAMIC CPU ALLOCATION BUG

http://oracledoug.com/serendipity/index.php?/archives/1318-10.2.0.2-bug-with-Dynamic-Reconfiguration-of-CPU.html

Bug 4704890 - OERI[kslgetl:1] after adding CPU using dynamic reconfiguration
  	Doc ID: 	Note:4704890.8

Pmon Terminated With Ora-00600 [1100] After Dynamically Increase CPU_COUNT
  	Doc ID: 	Note:467695.1

ORA-600 [kslgetl:1]
  	Doc ID: 	Note:351779.1

Ora-07445 (Internal Error)
  	Doc ID: 	Note:421045.1

Ora-600 [Kslgetl:1] when dynamically changing CPU
  	Doc ID: 	Note:369400.1




-- MEMORY

Memory Consumption on AIX
  	Doc ID: 	259983.1

}}}
Power5
Power6	<-- most advanced processor, starting clock is 4Ghz
Power7	

Hardware Virtualization (LPAR)
1) Standard Partition 
	4 LPARs, each have its own dedicated resources (processor, memory)

2) Micropartition
	4 LPARs can utilize a pool of 8 processors
	2 LPARs can utilize 1 processor


Note:
- Dynamic allocation can happen, 
	CPU	5seconds
	Memory	1minute
http://www.oraclerant.com/?p=8
{{{
# Oracle Database environment variables
umask 022
export ORACLE_BASE='/oracle/app/oracle'
export ORACLE_HOME="${ORACLE_BASE}/product/10.2.0/db_1"
export AIXTHREAD_SCOPE=S
export PATH="${ORACLE_HOME}/OPatch:${ORACLE_HOME}/bin:${PATH}"
# export NLS_LANG=language_territory.characterset
export LIBPATH=$ORACLE_HOME/lib:$LIBPATH
export TNS_ADMIN=$ORACLE_HOME/network/admin
}}}
http://www.scribd.com/doc/2153747/AIX-EtherChannel-Load-Balancing-Options
http://gjilevski.wordpress.com/2009/12/13/hardware-solution-for-oracle-rac-11g-private-interconnect-aggregating/
http://www.freelists.org/post/oracle-l/Oracle-10g-R2-RAC-network-configuration
! show system configuration
<<<
* show overall system config
{{{
prtconf
}}}
* to give the highest installed maintenance level
{{{
$ oslevel -r
6100-05
}}}
* to give the known recommended ML
{{{
$ oslevel -rq
Known Recommended Maintenance Levels
------------------------------------
6100-06
6100-05
6100-04
6100-03
6100-02
6100-01
6100-00
}}}
* To show you Service Packs levels as well 
{{{
$ oslevel -s
6100-05-03-1036
}}}
* amount of real memory 
{{{
lsattr -El sys0 -a realmem
realmem 21757952 Amount of usable physical memory in Kbytes False
}}}
* Displays the system model name. For example, IBM, 9114-275
{{{
uname -M

-- on p6
IBM,8204-E8A

-- on p7
IBM,8205-E6C
}}}
<<<

! get CPU information
* get number of CPUs
{{{
lscfg | grep proc

-- on p6
+ proc0                                                      Processor
+ proc2                                                      Processor
+ proc4                                                      Processor
+ proc6                                                      Processor
+ proc8                                                      Processor
+ proc10                                                     Processor
+ proc12                                                     Processor
+ proc14                                                     Processor

-- on p7
+ proc0                                                                          Processor
+ proc4                                                                          Processor
}}}
* get CPU speed
{{{
lsattr -El proc0

-- on p6
frequency   4204000000     Processor Speed       False
smt_enabled true           Processor SMT enabled False
smt_threads 2              Processor SMT threads False
state       enable         Processor state       False
type        PowerPC_POWER6 Processor type        False

-- on p7
frequency   3550000000     Processor Speed       False
smt_enabled true           Processor SMT enabled False
smt_threads 4              Processor SMT threads False
state       enable         Processor state       False
type        PowerPC_POWER7 Processor type        False
}}}

{{{

# lsdev -Cc processor
proc0  Available 00-00 Processor
proc2  Available 00-02 Processor
proc4  Available 00-04 Processor
proc6  Available 00-06 Processor
proc8  Available 00-08 Processor
proc10 Available 00-10 Processor
Which says 6 processors but the following command shows it is only a single 6-way card:
lscfg -vp |grep -ip proc |grep "PROC"
    6 WAY PROC CUOD :
    
The problem seems to revolve around what is a cpu these days, is it a chip or a core or a single piece of a silicone wafer and whatever resides on that being counted as 1 or many.
IBM deem a core to be a CPU so they would say your system has 6 processors.
They are all on one card and may all be in one MCM / chip or there may be several MCMs / chips on that card but you have a 6 CPU system there.
lsdev shows 6 processors so AIX has configured 6 processors.
lscfg shows it is a CUoD 6 processor system and as AIX has configured all 6 it shows all 6 are activated by a suitable POD code.
The Oracle wiki at orafaq.com shows Oracle licence the Standard Edition by CPU (definition undefined) and Enterprise by core (again undefined).
http://www.orafaq.com/wiki/Oracle_Licensing
What ever you call a cpu or a core I would say you have a 6 way / 6 processor system there and the fact that all 6 may or may not be on one bit of silicone wafer will not make any difference.

#############################################################################

get number of processors, its name, physical location, Lists all processors
odmget -q"PdDvLn LIKE processor/*" CuDv

list specific processor, but it is more about Physical location etc, nothing about single/dual core etc
odmget -q"PdDvLn LIKE processor/* AND name=proc0" CuDv

#############################################################################

I've checked is on LPARs on two servers - p55A and p570 - both servers 8 CPUs and seems that in p55A there are 2 4-core CPUs and in 570 4 2-core CPUs.

$ lsattr -El sys0 -a modelname
modelname IBM,9133-55A Machine name False
$ lparstat -i|grep ^Active\ Phys
Active Physical CPUs in system : 8
$ lscfg -vp|grep WAY
4-WAY PROC CUOD :
4-WAY PROC CUOD :
$ lscfg -vp|grep proc
proc0 Processor
proc2 Processor
proc4 Processor
proc6 Processor
$

$ lsattr -El sys0 -a modelname
modelname IBM,9117-570 Machine name False
$ lparstat -i|grep ^Active\ Phys
Active Physical CPUs in system : 8
$ lscfg -vp|grep WAY
2-WAY PROC CUOD :
2-WAY PROC CUOD :
2-WAY PROC CUOD :
2-WAY PROC CUOD :
$ lscfg -vp|grep proc
proc0 Processor
proc2 Processor
proc4 Processor
proc6 Processor
$

#############################################################################

p550 with 2 quad-core processors (no LPARs):

/ #>lsattr -El sys0 -a modelname
modelname IBM,9133-55A Machine name False

/ #>lparstat -i|grep Active\ Phys
Active Physical CPUs in system : 8

/ #>lscfg -vp | grep WAY
2-WAY PROC CUOD :
2-WAY PROC CUOD :

/ #>lscfg -vp |grep proc
proc0 Processor
proc2 Processor
proc4 Processor
proc6 Processor
proc8 Processor
proc10 Processor
proc12 Processor
proc14 Processor

And the further detailed lscfg -vp output shows:
2-WAY PROC CUOD :
Record Name.................VINI
Flag Field..................XXPF
Hardware Location Code......U787B.001.DNWC2F7-P1-C9
Customer Card ID Number.....8313
Serial Number...............YL10HA68E008
FRU Number..................10N6469
Part Number.................10N6469
As you can see, the part number is 10N6469, which clearly is a quad-core cpu:
http://www.searchlighttech.com/searchResults.cfm?part=10N6469

#############################################################################

Power5 and Power6 processors are both Dual Core - Dual Threads.
The next Power7 should have 8 cores and each core can execute 4 threads (comes 2010) but less frequency (3.2Ghz max instead of 5.0Ghz on the power6).

#############################################################################

To get the information about the partition, enter the following command:
lparstat -i

#############################################################################

 lparstat -i
 lparstat
 lscfg | grep proc
 lsattr -El proc0
 uname -M
 lsattr -El sys0 -a realmem
 lscfg | grep proc
 lsdev -Cc processor
 lscfg -vp |grep -ip proc |grep "PROC"
 odmget -q"PdDvLn LIKE processor/*" CuDv
 odmget -q"PdDvLn LIKE processor/* AND name=proc0" CuDv
 odmget -q"PdDvLn LIKE processor/* AND name=proc14" CuDv
 lsattr -El sys0 -a modelname
 lparstat -i|grep ^Active\ Phys
 lscfg -vp|grep WAY
 lscfg -vp|grep proc
 lsattr -El sys0 -a modelname
 lparstat -i|grep Active\ Phys
 lscfg -vp | grep WAY
 lscfg -vp |grep proc
 lscfg -vp

#############################################################################

So the physical CPUs of the AIX box is 8… now it’s a bit tricky to get the real CPU% in AIX.. 
First you have to determine the CPUs of the machine

$ prtconf
System Model: IBM,8204-E8A
Machine Serial Number: 10F2441
Processor Type: PowerPC_POWER6
Processor Implementation Mode: POWER 6
Processor Version: PV_6_Compat
Number Of Processors: 8
Processor Clock Speed: 4204 MHz
CPU Type: 64-bit
Kernel Type: 64-bit
LPAR Info: 2 nad0019aixp21
Memory Size: 21248 MB
Good Memory Size: 21248 MB
Platform Firmware level: Not Available
Firmware Version: IBM,EL350_132
Console Login: enable
Auto Restart: true
Full Core: false

Then, execute the lparstat… 
•	The ent 2.30 is the entitled CPU capacity
•	The psize is the # of physical CPUs on the shared pool
•	The physc 4.42 means that the CPU usage went above the entitled capacity because it is “Uncapped”.. so to get the real CPU% just do a 4.42/8 = 55% utilization
•	55% utilization could either be applied on the 8Physical CPUs or 16 Logical CPUs… because that’s just the percentage used so I just put on the prov worksheet 60% 

$ lparstat 1 10000

System configuration: type=Shared mode=Uncapped smt=On lcpu=16 mem=21247 psize=8 ent=2.30

%user  %sys  %wait  %idle physc %entc  lbusy  vcsw phint
----- ----- ------ ------ ----- ----- ------ ----- -----
 91.4   7.6    0.8    0.3  3.94 171.1   29.9  4968  1352
 92.0   6.9    0.7    0.4  3.76 163.4   26.2  4548  1054
 93.1   6.0    0.5    0.3  4.42 192.3   33.2  4606  1316
 91.3   7.5    0.7    0.5  3.74 162.6   25.6  5220  1191
 93.4   5.7    0.6    0.3  4.07 176.9   28.7  4423  1239
 93.1   6.0    0.6    0.4  4.05 176.0   29.4  4709  1164
 92.3   6.7    0.6    0.5  3.46 150.2   24.8  4299   718
 92.2   6.9    0.6    0.4  3.69 160.6   27.9  4169   973
 91.9   7.3    0.5    0.3  4.06 176.5   33.2  4248  1233
}}}



! install IYs
{{{
To list all IYs
# instfix –i | pg
To show the filesets on a given IY
# instfix –avik IY59135
To commit a fileset
# smitty maintain_software
To list the fileset of an executable
# lslpp –w <full path of the executable>
To install an IY
# Uncompress <file>
# Tar –xvf <file>
# inutoc .
# smity installp
}}}


! iostat

{{{
> iostat -sl

System configuration: lcpu=4 drives=88 ent=0.20 paths=176 vdisks=8

tty:      tin         tout    avg-cpu: % user % sys % idle % iowait physc % entc
          0.3         29.5               64.5  28.6    5.1      1.9   0.9  435.5

System: 
                           Kbps      tps    Kb_read   Kb_wrtn
                         30969.7     429.9   937381114927  200661442300

Disks:        % tm_act     Kbps      tps    Kb_read   Kb_wrtn
hdisk0           1.3      61.9       7.6   1479300432  794583660
...

> iostat -st

System configuration: lcpu=4 drives=88 ent=0.20 paths=176 vdisks=8

tty:      tin         tout    avg-cpu: % user % sys % idle % iowait physc % entc
          0.3         29.5               64.5  28.6    5.1      1.9   0.9  435.5

System: 
                           Kbps      tps    Kb_read   Kb_wrtn
                         30969.7     429.9   937381298349  200661442605

}}}

{{{
$ iostat -DRTl 10 100

System configuration: lcpu=16 drives=80 paths=93 vdisks=2

Disks:                     xfers                                read                                write                                  queue                    time
-------------- -------------------------------- ------------------------------------ ------------------------------------ -------------------------------------- ---------
                 %tm    bps   tps  bread  bwrtn   rps    avg    min    max time fail   wps    avg    min    max time fail    avg    min    max   avg   avg  serv
                 act                                    serv   serv   serv outs              serv   serv   serv outs        time   time   time  wqsz  sqsz qfull
hdisk3           0.0   0.0    0.0   0.0    0.0    0.0   0.0    0.0    0.0     0    0   0.0   0.0    0.0    0.0     0    0   0.0    0.0    0.0    0.0   0.0   0.0  16:05:30
hdisk13          0.0   0.0    0.0   0.0    0.0    0.0   0.0    0.0    0.0     0    0   0.0   0.0    0.0    0.0     0    0   0.0    0.0    0.0    0.0   0.0   0.0  16:05:30
hdisk15         61.5   3.3M 162.0   3.2M  90.2K 158.4   6.4    0.2   60.0     0    0   3.5   3.3    0.7    4.6     0    0   0.5    0.0   15.7    0.0   0.1  53.6  16:05:30
hdisk14         67.3   3.4M 166.2   3.3M  67.7K 162.3   7.2    0.2   71.8     0    0   3.9   2.8    0.8    5.7     0    0   1.0    0.0   36.0    0.0   0.1  63.0  16:05:30
hdisk8          58.9   3.0M 165.2   2.9M 112.8K 160.6   5.6    0.2   57.1     0    0   4.6   3.0    0.6    5.5     0    0   0.4    0.0   18.8    0.0   0.1  43.2  16:05:30
hdisk12         57.6   3.4M 151.3   3.3M  91.8K 147.4   6.0    0.2   54.7     0    0   3.9   3.1    0.6    4.7     0    0   0.5    0.0   23.4    0.0   0.1  43.6  16:05:30
hdisk11          0.0   0.0    0.0   0.0    0.0    0.0   0.0    0.0    0.0     0    0   0.0   0.0    0.0    0.0     0    0   0.0    0.0    0.0    0.0   0.0   0.0  16:05:30
hdisk10         86.0   2.9M 144.9   2.9M  58.0K 141.4  12.7    0.3  109.3     0    0   3.5   2.8    0.8    5.1     0    0   5.3    0.0   82.6    0.0   0.1  86.2  16:05:30
hdisk9           0.0   0.0    0.0   0.0    0.0    0.0   0.0    0.0    0.0     0    0   0.0   0.0    0.0    0.0     0    0   0.0    0.0    0.0    0.0   0.0   0.0  16:05:30
hdisk16          0.1 402.8    0.1   0.0  402.8    0.0   0.0    0.0    0.0     0    0   0.1   8.8    8.8    8.8     0    0   0.0    0.0    0.0    0.0   0.0   0.0  16:05:30
hdisk5           0.0   0.0    0.0   0.0    0.0    0.0   0.0    0.0    0.0     0    0   0.0   0.0    0.0    0.0     0    0   0.0    0.0    0.0    0.0   0.0   0.0  16:05:30
hdisk18          1.3 391.7K  17.1   0.0  391.7K   0.0   0.0    0.0    0.0     0    0  17.1   1.0    0.5    6.2     0    0   0.0    0.0    0.1    0.0   0.0   0.1  16:05:30
hdisk7           0.0   0.0    0.0   0.0    0.0    0.0   0.0    0.0    0.0     0    0   0.0   0.0    0.0    0.0     0    0   0.0    0.0    0.0    0.0   0.0   0.0  16:05:30
hdisk4          43.7   3.2M 150.8   3.2M  67.7K 147.0   4.0    0.3   27.6     0    0   3.8   2.9    0.7    5.0     0    0   0.3    0.0   19.4    0.0   0.0  26.1  16:05:30
hdisk17          0.3   1.2K   0.3   0.0    1.2K   0.0   0.0    0.0    0.0     0    0   0.3   7.2    5.3    8.2     0    0   0.0    0.0    0.0    0.0   0.0   0.0  16:05:30
hdisk6          67.8   3.0M 151.8   2.9M  45.1K 149.1   7.6    0.2   58.4     0    0   2.8   2.8    0.7    4.6     0    0   0.5    0.0   27.1    0.0   0.1  51.6  16:05:30
hdisk21          0.0   0.0    0.0   0.0    0.0    0.0   0.0    0.0    0.0     0    0   0.0   0.0    0.0    0.0     0    0   0.0    0.0    0.0    0.0   0.0   0.0  16:05:30
hdisk27          0.4   1.2K   0.3   0.0    1.2K   0.0   0.0    0.0    0.0     0    0   0.3  16.7    7.7   34.3     0    0   0.0    0.0    0.0    0.0   0.0   0.0  16:05:30
hdisk23         61.3   3.3M 178.8   3.3M  59.6K 175.9   5.8    0.2   63.7     0    0   2.9   2.9    0.8    5.7     0    0   0.8    0.0   61.8    0.0   0.1  57.6  16:05:30
hdisk1          64.5   3.2M 149.7   3.2M  48.3K 146.8   7.0    0.3   45.0     0    0   2.9   2.5    0.9    4.5     0    0   0.7    0.0   46.4    0.0   0.1  42.0  16:05:30
hdisk20         64.8   3.3M 148.6   3.2M  90.2K 145.0   7.1    0.3   52.5     0    0   3.5   2.7    0.9    4.9     0    0   1.0    0.0   41.7    0.0   0.1  49.8  16:05:30
hdisk22          0.0   0.0    0.0   0.0    0.0    0.0   0.0    0.0    0.0     0    0   0.0   0.0    0.0    0.0     0    0   0.0    0.0    0.0    0.0   0.0   0.0  16:05:30
hdisk28          0.0   0.0    0.0   0.0    0.0    0.0   0.0    0.0    0.0     0    0   0.0   0.0    0.0    0.0     0    0   0.0    0.0    0.0    0.0   0.0   0.0  16:05:30
hdisk19         42.6   3.5M 162.6   3.4M  68.9K 160.0   3.6    0.2   22.2     0    0   2.7   1.6    0.5    4.3     0    0   0.1    0.0    8.2    0.0   0.0  27.2  16:05:30

Disks:                     xfers                                read                                write                                  queue                    time
-------------- -------------------------------- ------------------------------------ ------------------------------------ -------------------------------------- ---------
                 %tm    bps   tps  bread  bwrtn   rps    avg    min    max time fail   wps    avg    min    max time fail    avg    min    max   avg   avg  serv
                 act                                    serv   serv   serv outs              serv   serv   serv outs        time   time   time  wqsz  sqsz qfull
hdisk0          53.9   3.0M 153.7   3.0M  41.9K 151.1   5.1    0.2   38.4     0    0   2.6   3.0    1.1    4.6     0    0   0.2    0.0   14.7    0.0   0.0  31.7  16:05:30
hdisk26          0.0   0.0    0.0   0.0    0.0    0.0   0.0    0.0    0.0     0    0   0.0   0.0    0.0    0.0     0    0   0.0    0.0    0.0    0.0   0.0   0.0  16:05:30
hdisk2          63.6   3.2M 144.1   3.2M  64.4K 141.3   7.3    0.2   72.3     0    0   2.8   3.2    0.7    4.5     0    0   0.9    0.0   28.8    0.0   0.1  46.1  16:05:30
hdisk24         56.0   2.9M 139.6   2.8M  77.3K 135.3   6.2    0.2   56.6     0    0   4.3   3.0    1.0    4.7     0    0   0.5    0.0   19.0    0.0   0.1  34.9  16:05:30
hdisk30         65.5   3.3M 156.9   3.2M  70.9K 152.7   7.1    0.3   42.8     0    0   4.2   3.0    0.7    5.6     0    0   0.6    0.0   20.2    0.0   0.1  50.1  16:05:30
hdisk33          0.0   0.0    0.0   0.0    0.0    0.0   0.0    0.0    0.0     0    0   0.0   0.0    0.0    0.0     0    0   0.0    0.0    0.0    0.0   0.0   0.0  16:05:30
hdisk34          0.0   0.0    0.0   0.0    0.0    0.0   0.0    0.0    0.0     0    0   0.0   0.0    0.0    0.0     0    0   0.0    0.0    0.0    0.0   0.0   0.0  16:05:30
hdisk37          0.0   0.0    0.0   0.0    0.0    0.0   0.0    0.0    0.0     0    0   0.0   0.0    0.0    0.0     0    0   0.0    0.0    0.0    0.0   0.0   0.0  16:05:30
hdisk41          0.0   0.0    0.0   0.0    0.0    0.0   0.0    0.0    0.0     0    0   0.0   0.0    0.0    0.0     0    0   0.0    0.0    0.0    0.0   0.0   0.0  16:05:30
hdisk40         63.5   2.8M 148.2   2.7M 103.1K 143.9   7.0    0.2   42.0     0    0   4.3   2.9    1.0    5.2     0    0   0.8    0.0   19.2    0.0   0.1  49.7  16:05:30
hdisk38         60.6   3.0M 146.1   2.9M  70.9K 142.5   7.0    0.2   64.1     0    0   3.6   2.7    0.8    5.4     0    0   0.8    0.0   24.1    0.0   0.1  45.4  16:05:30
hdisk25          0.0   0.0    0.0   0.0    0.0    0.0   0.0    0.0    0.0     0    0   0.0   0.0    0.0    0.0     0    0   0.0    0.0    0.0    0.0   0.0   0.0  16:05:30
hdisk35         50.0   4.0M 197.6   3.9M 107.9K 193.2   3.7    0.2   37.7     0    0   4.3   3.0    0.6    5.4     0    0   0.3    0.0   15.2    0.0   0.0  41.9  16:05:30
hdisk32         41.9   3.0M 159.2   3.0M  54.8K 156.0   3.5    0.2   25.7     0    0   3.2   3.4    1.0    4.8     0    0   0.1    0.0   12.6    0.0   0.0  21.7  16:05:30
hdisk36          0.0   0.0    0.0   0.0    0.0    0.0   0.0    0.0    0.0     0    0   0.0   0.0    0.0    0.0     0    0   0.0    0.0    0.0    0.0   0.0   0.0  16:05:30
hdisk42         79.7   3.0M 159.3   2.9M  83.8K 155.5  10.1    0.2   92.3     0    0   3.8   2.6    0.9    5.3     0    0   2.2    0.0   50.5    0.0   0.1  79.7  16:05:30
hdisk31          3.6   2.1M  52.7   1.7M 391.7K  35.6   0.8    0.2    7.1     0    0  17.1   1.0    0.5    3.4     0    0   0.0    0.0    0.2    0.0   0.0   1.3  16:05:30
hdisk43         42.6   2.9M 144.2   2.8M  64.4K 140.9   4.0    0.2   34.3     0    0   3.2   3.0    1.3    5.4     0    0   0.1    0.0   10.9    0.0   0.0  21.2  16:05:30
hdisk52          0.0   0.0    0.0   0.0    0.0    0.0   0.0    0.0    0.0     0    0   0.0   0.0    0.0    0.0     0    0   0.0    0.0    0.0    0.0   0.0   0.0  16:05:30
hdisk48         51.2   3.7M 165.5   3.6M  69.3K 161.4   4.6    0.2   31.7     0    0   4.1   3.0    0.6    4.7     0    0   0.3    0.0   12.7    0.0   0.0  35.5  16:05:30
hdisk47          0.0   0.0    0.0   0.0    0.0    0.0   0.0    0.0    0.0     0    0   0.0   0.0    0.0    0.0     0    0   0.0    0.0    0.0    0.0   0.0   0.0  16:05:30
hdisk44          0.0   0.0    0.0   0.0    0.0    0.0   0.0    0.0    0.0     0    0   0.0   0.0    0.0    0.0     0    0   0.0    0.0    0.0    0.0   0.0   0.0  16:05:30
hdisk51         50.1   3.7M 187.6   3.6M  90.2K 183.5   3.7    0.2   40.0     0    0   4.1   3.2    1.1    5.0     0    0   0.4    0.0   37.8    0.0   0.0  44.4  16:05:30
hdisk39          0.1  37.7K   3.5  19.3K  18.3K   1.2   0.5    0.3    1.7     0    0   2.4   0.9    0.5    4.6     0    0   0.0    0.0    0.0    0.0   0.0   0.0  16:05:30

Disks:                     xfers                                read                                write                                  queue                    time
-------------- -------------------------------- ------------------------------------ ------------------------------------ -------------------------------------- ---------
                 %tm    bps   tps  bread  bwrtn   rps    avg    min    max time fail   wps    avg    min    max time fail    avg    min    max   avg   avg  serv
                 act                                    serv   serv   serv outs              serv   serv   serv outs        time   time   time  wqsz  sqsz qfull
hdisk49          0.0   0.0    0.0   0.0    0.0    0.0   0.0    0.0    0.0     0    0   0.0   0.0    0.0    0.0     0    0   0.0    0.0    0.0    0.0   0.0   0.0  16:05:30
hdisk57          0.0   0.0    0.0   0.0    0.0    0.0   0.0    0.0    0.0     0    0   0.0   0.0    0.0    0.0     0    0   0.0    0.0    0.0    0.0   0.0   0.0  16:05:30
hdisk45         51.5   3.0M 154.3   3.0M  54.8K 151.5   4.7    0.2   31.6     0    0   2.8   3.2    1.3    5.1     0    0   0.2    0.0   12.5    0.0   0.0  28.1  16:05:30
hdisk50          7.9   2.1M  50.2   1.7M 391.7K  33.0   2.1    0.3   23.3     0    0  17.1   1.5    0.7   18.3     0    0   0.0    0.0    0.5    0.0   0.0   2.8  16:05:30
hdisk55         64.5   3.7M 169.6   3.6M  72.5K 166.0   6.1    0.2   55.9     0    0   3.6   3.4    0.8    5.2     0    0   0.4    0.0   17.6    0.0   0.1  47.0  16:05:30
hdisk54         66.9   3.6M 165.5   3.5M  80.6K 162.3   6.7    0.3   56.3     0    0   3.2   3.0    0.5    5.0     0    0   0.9    0.0   23.7    0.0   0.1  52.7  16:05:30
hdisk53          0.0   0.0    0.0   0.0    0.0    0.0   0.0    0.0    0.0     0    0   0.0   0.0    0.0    0.0     0    0   0.0    0.0    0.0    0.0   0.0   0.0  16:05:30
hdisk56         81.9   3.2M 142.5   3.1M  83.8K 138.8  11.6    0.3  117.6     0    0   3.6   3.3    1.1    5.3     0    0   1.9    0.0   42.9    0.0   0.1  72.4  16:05:30
hdisk58         82.2   3.6M 168.2   3.6M  77.3K 164.9   9.9    0.2   84.0     0    0   3.2   2.7    0.6    5.2     0    0   1.9    0.0   45.8    0.0   0.1  88.9  16:05:30
hdisk60          0.0   0.0    0.0   0.0    0.0    0.0   0.0    0.0    0.0     0    0   0.0   0.0    0.0    0.0     0    0   0.0    0.0    0.0    0.0   0.0   0.0  16:05:30
hdisk29         52.5   3.4M 172.4   3.4M  64.4K 170.1   4.3    0.2   51.9     0    0   2.3   2.6    1.0    5.5     0    0   0.2    0.0   12.5    0.0   0.0  37.1  16:05:30
hdisk59          0.0   0.0    0.0   0.0    0.0    0.0   0.0    0.0    0.0     0    0   0.0   0.0    0.0    0.0     0    0   0.0    0.0    0.0    0.0   0.0   0.0  16:05:30
hdisk61         46.6   3.0M 157.2   2.9M  58.0K 153.7   4.1    0.2   42.8     0    0   3.5   3.5    1.4    5.3     0    0   0.1    0.0    7.8    0.0   0.0  23.1  16:05:30
hdisk63          0.0   0.0    0.0   0.0    0.0    0.0   0.0    0.0    0.0     0    0   0.0   0.0    0.0    0.0     0    0   0.0    0.0    0.0    0.0   0.0   0.0  16:05:30
hdisk62         65.5   3.0M 152.3   2.9M  74.1K 148.7   7.4    0.3   66.8     0    0   3.6   2.6    0.8    5.4     0    0   1.0    0.0   43.2    0.0   0.1  56.1  16:05:30
hdisk68          0.0   0.0    0.0   0.0    0.0    0.0   0.0    0.0    0.0     0    0   0.0   0.0    0.0    0.0     0    0   0.0    0.0    0.0    0.0   0.0   0.0  16:05:30
hdisk65          0.3  19.6K   3.0   1.3K  18.3K   0.6   2.1    0.4    6.6     0    0   2.4   1.2    0.6    2.9     0    0   0.0    0.0    0.0    0.0   0.0   0.0  16:05:30
hdisk64         42.9   3.4M 145.4   3.4M  78.9K 141.5   4.1    0.2   25.1     0    0   3.9   3.0    0.7    5.6     0    0   0.3    0.0   14.5    0.0   0.0  23.7  16:05:30
hdisk67          0.0   0.0    0.0   0.0    0.0    0.0   0.0    0.0    0.0     0    0   0.0   0.0    0.0    0.0     0    0   0.0    0.0    0.0    0.0   0.0   0.0  16:05:30
hdisk46         66.8   3.4M 165.5   3.3M  93.4K 161.8   6.8    0.2   51.6     0    0   3.7   3.1    0.6    5.0     0    0   0.6    0.0   24.2    0.0   0.1  52.1  16:05:30
hdisk71          1.6 411.0K  18.3  19.3K 391.7K   1.2   0.6    0.3    3.2     0    0  17.1   1.1    0.5    3.1     0    0   0.0    0.0    0.1    0.0   0.0   0.1  16:05:30
hdisk70         61.5   2.7M 135.8   2.7M  62.4K 132.2   7.4    0.2  107.1     0    0   3.6   3.1    0.6    4.9     0    0   0.7    0.0   25.7    0.0   0.1  39.2  16:05:30
hdisk74         86.1   3.6M 182.2   3.5M  69.3K 178.9  10.7    0.2  108.8     0    0   3.3   3.2    0.8    5.3     0    0   4.2    0.0   98.7    0.0   0.1 119.1  16:05:30
hdisk72         58.2   2.5M 130.0   2.5M  80.6K 125.7   7.1    0.3   43.8     0    0   4.3   2.9    1.0    5.3     0    0   0.8    0.0   27.0    0.0   0.1  38.6  16:05:30

Disks:                     xfers                                read                                write                                  queue                    time
-------------- -------------------------------- ------------------------------------ ------------------------------------ -------------------------------------- ---------
                 %tm    bps   tps  bread  bwrtn   rps    avg    min    max time fail   wps    avg    min    max time fail    avg    min    max   avg   avg  serv
                 act                                    serv   serv   serv outs              serv   serv   serv outs        time   time   time  wqsz  sqsz qfull
hdisk75         47.3   3.3M 160.7   3.2M  69.3K 157.1   4.0    0.2   30.9     0    0   3.5   3.2    1.2    5.0     0    0   0.2    0.0   12.7    0.0   0.0  27.9  16:05:30
hdisk78         66.2   3.3M 168.3   3.2M  70.9K 165.5   6.7    0.2   48.5     0    0   2.9   3.8    2.0    5.1     0    0   0.9    0.0   31.5    0.0   0.1  56.3  16:05:30
hdisk69          0.0   0.0    0.0   0.0    0.0    0.0   0.0    0.0    0.0     0    0   0.0   0.0    0.0    0.0     0    0   0.0    0.0    0.0    0.0   0.0   0.0  16:05:30
hdisk77          0.0   0.0    0.0   0.0    0.0    0.0   0.0    0.0    0.0     0    0   0.0   0.0    0.0    0.0     0    0   0.0    0.0    0.0    0.0   0.0   0.0  16:05:30
hdisk73          0.0   0.0    0.0   0.0    0.0    0.0   0.0    0.0    0.0     0    0   0.0   0.0    0.0    0.0     0    0   0.0    0.0    0.0    0.0   0.0   0.0  16:05:30
hdisk76          0.0   0.0    0.0   0.0    0.0    0.0   0.0    0.0    0.0     0    0   0.0   0.0    0.0    0.0     0    0   0.0    0.0    0.0    0.0   0.0   0.0  16:05:30
hdisk66          0.0   0.0    0.0   0.0    0.0    0.0   0.0    0.0    0.0     0    0   0.0   0.0    0.0    0.0     0    0   0.0    0.0    0.0    0.0   0.0   0.0  16:05:30
cd0              0.0   0.0    0.0   0.0    0.0    0.0   0.0    0.0    0.0     0    0   0.0   0.0    0.0    0.0     0    0   0.0    0.0    0.0    0.0   0.0   0.0  16:05:30
}}}


''AIX commands you should not leave home without'' http://www.ibm.com/developerworks/aix/library/au-dutta_cmds.html
''AIX system identification'' http://www.ibm.com/developerworks/aix/library/au-aix-systemid.html
''Determining CPU Speed in AIX'' http://www-01.ibm.com/support/docview.wss?uid=isg3T1000107
CPU monitoring and tuning http://www.ibm.com/developerworks/aix/library/au-aix5_cpu/
Too many Virtual Processors? https://www.ibm.com/developerworks/mydeveloperworks/blogs/AIXDownUnder/entry/too_many_virtual_processors365?lang=en
AIX Virtual Processor Folding is Misunderstood https://www.ibm.com/developerworks/mydeveloperworks/blogs/aixpert/entry/aix_virtual_processor_folding_in_misunderstood110?lang=en
How to find physical CPU socket count for IBM AIX http://www.tek-tips.com/viewthread.cfm?qid=1623771
Single/Dual Core Processor http://www.ibm.com/developerworks/forums/message.jspa?messageID=14270797
http://pic.dhe.ibm.com/infocenter/aix/v7r1/index.jsp?topic=%2Fcom.ibm.aix.cmds%2Fdoc%2Faixcmds3%2Flparstat.htm
lparstat command http://www.ibm.com/developerworks/forums/thread.jspa?messageID=14772565
Micropartitioning and Lparstat Output Virtual/Physical http://unix.ittoolbox.com/groups/technical-functional/ibm-aix-l/micropartitioning-and-lparstat-output-virtualphysical-4241112
Capped/Uncapped Partitions http://www.ibmsystemsmag.com/ibmi/trends/linux/See-Linux-Run/Sidebar--Capped-Uncapped-Partitions/
IBM PowerVM Virtualization Introduction and Configuration http://www.redbooks.ibm.com/abstracts/sg247940.html
iostat http://www.wmduszyk.com/wp-content/uploads/2011/01/PE23_Braden_Nasypany.pdf























''12c'' Getting Started with Oracle Application Management Pack (AMP) for Oracle E-Business Suite, Release 12.1.0.1 [ID 1434392.1]
''11g'' Getting Started with Oracle E-Business Suite Plug-in, Release 4.0 [ID 1224313.1]
''10g'' Getting Started with Oracle Application Management Pack and Oracle Application Change Management Pack for Oracle E-Business Suite, Release 3.1 [ID 982302.1]
''Application Management Suite for PeopleSoft (AMS4PSFT)'' http://www.oracle.com/technetwork/oem/app-mgmt/ds-apps-mgmt-suite-psft-166219.pdf
http://download.oracle.com/technology/products/oem/screenwatches/peoplesoft_amp/PeopleSoft_final.html
http://www.psoftsearch.com/managing-peoplesoft-with-application-management-suite/

http://www.oracle.com/technetwork/oem/em12c-screenwatches-512013.html#app_mgmt
https://apex.oracle.com/pls/apex/f?p=44785:24:9222314894074::NO:24:P24_CONTENT_ID,P24_PREV_PAGE:6415,2

<<<
''AMS we bundled the licenses of AMP and RUEI together in a single skew. AMP already had multiple features in it off course.''
<<<
''11g'' 
http://gasparotto.blogspot.com/2011/04/manage-peoplesoft-with-oem-grid-control.html
http://gasparotto.blogspot.com/2011/04/manage-peoplesoft-with-oem-grid-control_08.html
http://gasparotto.blogspot.com/2011/04/manage-peoplesoft-with-oem-grid-control_09.html
peoplesoft plugin 8.52 install, peoplesoft plugin agent install,  http://oraclehowto.wordpress.com/category/oracle-enterprise-manager-11g-plugins/peoplesoft-plugin/

''10g'' http://www.oracle.com/us/products/enterprise-manager/mgmt-pack-for-psft-ds-068946.pdf?ssSourceSiteId=ocomcafr
http://gigaom.com/2012/10/30/meet-arms-two-newest-cores-for-faster-phones-and-greener-servers/
http://gigaom.com/cloud/facebook-amd-hp-and-others-team-up-to-plan-the-arm-data-center-takeover/
''the consortium'' http://www.linaro.org/linux-on-arm
http://www.arm.com/index.php

''ARM and moore's law'' http://www.technologyreview.com/news/507116/moores-law-is-becoming-irrelevant/, http://www.technologyreview.com/news/428481/the-moores-law-moon-shot/
https://sites.google.com/site/embtdbo/wait-event-documentation/ash---active-session-history
ASH patent http://www.google.com/patents?id=cQWbAAAAEBAJ&pg=PA2&source=gbs_selected_pages&cad=3#v=onepage&q&f=false
Practical ASH http://www.scribd.com/rvenrdra/d/44100090-Practical-Advice-on-the-Use-of-Oracle-Database-s-Active-Session-History
magic metirc? http://wenku.baidu.com/view/7d07b81b964bcf84b9d57b48.html?from=related
Sifting through the ASHes http://www.oracle.com/technetwork/database/focus-areas/manageability/ppt-active-session-history-129612.pdf



{{{
col name for a12
col program for a25
col calling_code for a30
col CPU for 9999
col IO for 9999
col TOTAL for 99999
col WAIT for 9999
col user_id for 99999
col sid for 9999
col sql_text format a10

set linesize 300

select /* usercheck */
        decode(nvl(to_char(s.sid),-1),-1,'DISCONNECTED','CONNECTED')
                                                        "STATUS",
        topsession.sid             "SID",
        topsession.serial#,
        u.username  "NAME",
        topsession.program                  "PROGRAM",
        topsession.sql_plan_hash_value,
        topsession.sql_id,        
        st.sql_text sql_text,
        topsession."calling_code",
        max(topsession.CPU)              "CPU",
        max(topsession.WAIT)       "WAITING",
        max(topsession.IO)                  "IO",
        max(topsession.TOTAL)           "TOTAL", 
        round((s.LAST_CALL_ET/60),2) ELAP_MIN
from (
				select * 
				from (
								select
								     ash.session_id sid,
								     ash.session_serial# serial#,
								     ash.user_id user_id,
								     ash.program,
								     ash.sql_plan_hash_value,
								     ash.sql_id, 
								    procs1.object_name || decode(procs1.procedure_name,'','','.')||
								    procs1.procedure_name ||' '||
								    decode(procs2.object_name,procs1.object_name,'',
									 decode(procs2.object_name,'','',' => '||procs2.object_name)) 
								    ||
								    decode(procs2.procedure_name,procs1.procedure_name,'',
								        decode(procs2.procedure_name,'','',null,'','.')||procs2.procedure_name)
								    "calling_code",	     
								     sum(decode(ash.session_state,'ON CPU',1,0))     "CPU",
								     sum(decode(ash.session_state,'WAITING',1,0))    -
								     sum(decode(ash.session_state,'WAITING',
								        decode(wait_class,'User I/O',1, 0 ), 0))    "WAIT" ,
								     sum(decode(ash.session_state,'WAITING',
								        decode(wait_class,'User I/O',1, 0 ), 0))    "IO" ,
								     sum(decode(session_state,'ON CPU',1,1))     "TOTAL"
								from 
									v$active_session_history ash,
									all_procedures procs1,
	                                all_procedures procs2
								where 
							        ash.PLSQL_ENTRY_OBJECT_ID  = procs1.object_id (+) and 
							        ash.PLSQL_ENTRY_SUBPROGRAM_ID = procs1.SUBPROGRAM_ID (+) and 
							        ash.PLSQL_OBJECT_ID   = procs2.object_id (+) and 
							        ash.PLSQL_SUBPROGRAM_ID  = procs2.SUBPROGRAM_ID (+) 
                                        and ash.sample_time > sysdate - 1
								group by session_id,user_id,session_serial#,program,sql_id,sql_plan_hash_value, 
								         procs1.object_name, procs1.procedure_name, procs2.object_name, procs2.procedure_name
								order by sum(decode(session_state,'ON CPU',1,1)) desc
				     ) 
				 where rownum < 10
      ) topsession,
        v$session s,
        (select sql_id, dbid, nvl(b.name, a.command_type) sql_text from dba_hist_sqltext a, audit_actions b where a.command_type =  b.action(+)) st,
        all_users u
where
        u.user_id =topsession.user_id and
        /* outer join to v$session because the session might be disconnected */
        topsession.sid         = s.sid         (+) and
        topsession.serial# = s.serial#   (+)   and
		st.sql_id(+)             = s.sql_id
		and topsession."calling_code" like '%&PACKAGE_NAME%'
group by  topsession.sid, topsession.serial#,
             topsession.user_id, topsession.program, topsession.sql_plan_hash_value, topsession.sql_id,
                     topsession."calling_code",
             s.username, s.sid,s.paddr,u.username, st.sql_text, s.LAST_CALL_ET
order by max(topsession.TOTAL) desc
/
}}}
{{{
col name for a12
col program for a25
col calling_code for a30
col CPU for 9999
col IO for 9999
col TOTAL for 99999
col WAIT for 9999
col user_id for 99999
col sid for 9999
col sql_text format a10

set linesize 300

select /* usercheck */
        decode(nvl(to_char(s.sid),-1),-1,'DISCONNECTED','CONNECTED')
                                                        "STATUS",
        topsession.sid             "SID",
        topsession.serial#,
        u.username  "NAME",
        topsession.program                  "PROGRAM",
        topsession.sql_plan_hash_value,
        topsession.sql_id,
        st.sql_text sql_text,
        topsession."calling_code",
        max(topsession.CPU)              "CPU",
        max(topsession.WAIT)       "WAITING",
        max(topsession.IO)                  "IO",
        max(topsession.TOTAL)           "TOTAL",
        round((s.LAST_CALL_ET/60),2) ELAP_MIN
from (
                                select *
                                from (
                                                                select
                                                                     ash.session_id sid,
                                                                     ash.session_serial# serial#,
                                                                     ash.user_id user_id,
                                                                     ash.program,
                                                                     ash.sql_plan_hash_value,
                                                                     ash.sql_id,
                                                                    procs1.object_name || decode(procs1.procedure_name,'','','.')||
                                                                    procs1.procedure_name ||' '||
                                                                    decode(procs2.object_name,procs1.object_name,'',
                                                                         decode(procs2.object_name,'','',' => '||procs2.object_name))
                                                                    ||
                                                                    decode(procs2.procedure_name,procs1.procedure_name,'',
                                                                        decode(procs2.procedure_name,'','',null,'','.')||procs2.procedure_name)
                                                                    "calling_code",
                                                                     sum(decode(ash.session_state,'ON CPU',1,0))     "CPU",
                                                                     sum(decode(ash.session_state,'WAITING',1,0))    -
                                                                     sum(decode(ash.session_state,'WAITING',
                                                                        decode(wait_class,'User I/O',1, 0 ), 0))    "WAIT" ,
                                                                     sum(decode(ash.session_state,'WAITING',
                                                                        decode(wait_class,'User I/O',1, 0 ), 0))    "IO" ,
                                                                     sum(decode(session_state,'ON CPU',1,1))     "TOTAL"
                                                                from
                                                                        dba_hist_active_sess_history ash,
                                                                        all_procedures procs1,
                                        all_procedures procs2
                                                                where
                                                                ash.PLSQL_ENTRY_OBJECT_ID  = procs1.object_id (+) and
                                                                ash.PLSQL_ENTRY_SUBPROGRAM_ID = procs1.SUBPROGRAM_ID (+) and
                                                                ash.PLSQL_OBJECT_ID   = procs2.object_id (+) and
                                                                ash.PLSQL_SUBPROGRAM_ID  = procs2.SUBPROGRAM_ID (+)
                                        and ash.sample_time > sysdate - 99
                                                                group by session_id,user_id,session_serial#,program,sql_id,sql_plan_hash_value,
                                                                         procs1.object_name, procs1.procedure_name, procs2.object_name, procs2.procedure_name
                                                                order by sum(decode(session_state,'ON CPU',1,1)) desc
                                     )
                                 where rownum < 50
      ) topsession,
        v$session s,
        (select sql_id, dbid, nvl(b.name, a.command_type) sql_text from dba_hist_sqltext a, audit_actions b where a.command_type =  b.action(+)) st,
        all_users u
where
        u.user_id =topsession.user_id and
        /* outer join to v$session because the session might be disconnected */
        topsession.sid         = s.sid         (+) and
        topsession.serial# = s.serial#   (+)   and
                st.sql_id(+)             = s.sql_id
                and topsession."calling_code" like '%&PACKAGE_NAME%'
group by  topsession.sid, topsession.serial#,
             topsession.user_id, topsession.program, topsession.sql_plan_hash_value, topsession.sql_id,
                     topsession."calling_code",
             s.username, s.sid,s.paddr,u.username, st.sql_text, s.LAST_CALL_ET
order by max(topsession.TOTAL) desc
/
}}}
{{{
col name for a12
col program for a25
col calling_code for a30
col CPU for 9999
col IO for 9999
col TOTAL for 99999
col WAIT for 9999
col user_id for 99999
col sid for 9999
col sql_text format a10

set linesize 300

select /* usercheck */
        decode(nvl(to_char(s.sid),-1),-1,'DISCONNECTED','CONNECTED')
                                                        "STATUS",
        topsession.sid             "SID",
        topsession.serial#,
        u.username  "NAME",
        topsession.program                  "PROGRAM",
        topsession.sql_plan_hash_value,
        topsession.sql_id,
        st.sql_text sql_text,
        topsession."calling_code",
        max(topsession.CPU)              "CPU",
        max(topsession.WAIT)       "WAITING",
        max(topsession.IO)                  "IO",
        max(topsession.TOTAL)           "TOTAL",
        round((s.LAST_CALL_ET/60),2) ELAP_MIN
from (
                                select *
                                from (
                                                                select
                                                                     ash.session_id sid,
                                                                     ash.session_serial# serial#,
                                                                     ash.user_id user_id,
                                                                     ash.program,
                                                                     ash.sql_plan_hash_value,
                                                                     ash.sql_id,
                                                                    procs1.object_name || decode(procs1.procedure_name,'','','.')||
                                                                    procs1.procedure_name ||' '||
                                                                    decode(procs2.object_name,procs1.object_name,'',
                                                                         decode(procs2.object_name,'','',' => '||procs2.object_name))
                                                                    ||
                                                                    decode(procs2.procedure_name,procs1.procedure_name,'',
                                                                        decode(procs2.procedure_name,'','',null,'','.')||procs2.procedure_name)
                                                                    "calling_code",
                                                                     sum(decode(ash.session_state,'ON CPU',1,0))     "CPU",
                                                                     sum(decode(ash.session_state,'WAITING',1,0))    -
                                                                     sum(decode(ash.session_state,'WAITING',
                                                                        decode(wait_class,'User I/O',1, 0 ), 0))    "WAIT" ,
                                                                     sum(decode(ash.session_state,'WAITING',
                                                                        decode(wait_class,'User I/O',1, 0 ), 0))    "IO" ,
                                                                     sum(decode(session_state,'ON CPU',1,1))     "TOTAL"
                                                                from
                                                                        v$active_session_history ash,
                                                                        all_procedures procs1,
                                        all_procedures procs2
                                                                where
                                                                ash.PLSQL_ENTRY_OBJECT_ID  = procs1.object_id (+) and
                                                                ash.PLSQL_ENTRY_SUBPROGRAM_ID = procs1.SUBPROGRAM_ID (+) and
                                                                ash.PLSQL_OBJECT_ID   = procs2.object_id (+) and
                                                                ash.PLSQL_SUBPROGRAM_ID  = procs2.SUBPROGRAM_ID (+)
                                        and ash.sample_time > sysdate - 1
                                                                group by session_id,user_id,session_serial#,program,sql_id,sql_plan_hash_value,
                                                                         procs1.object_name, procs1.procedure_name, procs2.object_name, procs2.procedure_name
                                                                order by sum(decode(session_state,'ON CPU',1,1)) desc
                                     )
                                 where rownum < 50
      ) topsession,
        v$session s,
        (select sql_id, dbid, nvl(b.name, a.command_type) sql_text from dba_hist_sqltext a, audit_actions b where a.command_type =  b.action(+)) st,
        all_users u
where
        u.user_id =topsession.user_id and
        /* outer join to v$session because the session might be disconnected */
        topsession.sid         = s.sid         (+) and
        topsession.serial# = s.serial#   (+)   and
                st.sql_id(+)             = s.sql_id
       and topsession.sql_id = '&SQLID'
group by  topsession.sid, topsession.serial#,
             topsession.user_id, topsession.program, topsession.sql_plan_hash_value, topsession.sql_id,
                     topsession."calling_code",
             s.username, s.sid,s.paddr,u.username, st.sql_text, s.LAST_CALL_ET
order by max(topsession.TOTAL) desc
/

}}}
{{{
$ cat ashtop
#!/bin/bash

while :; do
sqlplus "/ as sysdba" <<-EOF
@ashtop.sql
EOF
sleep 5
echo
done
}}}


{{{
-- (c) Kyle Hailey 2007, edited by Karl Arao 20091217

col name for a12
col program for a25
col calling_code for a25
col CPU for 9999
col IO for 9999
col TOTAL for 99999
col WAIT for 9999
col user_id for 99999
col sid for 9999
col sql_text format a10

set linesize 300

select /* usercheck */
        decode(nvl(to_char(s.sid),-1),-1,'DISCONNECTED','CONNECTED')
                                                        "STATUS",
        topsession.sid             "SID",
        topsession.serial#,
        u.username  "NAME",
        topsession.program                  "PROGRAM",
        topsession.sql_plan_hash_value,
        topsession.sql_id,        
        st.sql_text sql_text,
        topsession."calling_code",
        max(topsession.CPU)              "CPU",
        max(topsession.WAIT)       "WAITING",
        max(topsession.IO)                  "IO",
        max(topsession.TOTAL)           "TOTAL", 
        round((s.LAST_CALL_ET/60),2) ELAP_MIN
from (
				select * 
				from (
								select
								     ash.session_id sid,
								     ash.session_serial# serial#,
								     ash.user_id user_id,
								     ash.program,
								     ash.sql_plan_hash_value,
								     ash.sql_id, 
								    procs1.object_name || decode(procs1.procedure_name,'','','.')||
								    procs1.procedure_name ||' '||
								    decode(procs2.object_name,procs1.object_name,'',
									 decode(procs2.object_name,'','',' => '||procs2.object_name)) 
								    ||
								    decode(procs2.procedure_name,procs1.procedure_name,'',
								        decode(procs2.procedure_name,'','',null,'','.')||procs2.procedure_name)
								    "calling_code",	     
								     sum(decode(ash.session_state,'ON CPU',1,0))     "CPU",
								     sum(decode(ash.session_state,'WAITING',1,0))    -
								     sum(decode(ash.session_state,'WAITING',
								        decode(wait_class,'User I/O',1, 0 ), 0))    "WAIT" ,
								     sum(decode(ash.session_state,'WAITING',
								        decode(wait_class,'User I/O',1, 0 ), 0))    "IO" ,
								     sum(decode(session_state,'ON CPU',1,1))     "TOTAL"
								from 
									v$active_session_history ash,
									all_procedures procs1,
	                                all_procedures procs2
								where 
							        ash.PLSQL_ENTRY_OBJECT_ID  = procs1.object_id (+) and 
							        ash.PLSQL_ENTRY_SUBPROGRAM_ID = procs1.SUBPROGRAM_ID (+) and 
							        ash.PLSQL_OBJECT_ID   = procs2.object_id (+) and 
							        ash.PLSQL_SUBPROGRAM_ID  = procs2.SUBPROGRAM_ID (+) 
                                        and ash.sample_time > sysdate - 1/(60*24)
								group by session_id,user_id,session_serial#,program,sql_id,sql_plan_hash_value, 
								         procs1.object_name, procs1.procedure_name, procs2.object_name, procs2.procedure_name
								order by sum(decode(session_state,'ON CPU',1,1)) desc
				     ) 
				 where rownum < 10
      ) topsession,
        v$session s,
        (select sql_id, dbid, nvl(b.name, a.command_type) sql_text from dba_hist_sqltext a, audit_actions b where a.command_type =  b.action(+)) st,
        all_users u
where
        u.user_id =topsession.user_id and
        /* outer join to v$session because the session might be disconnected */
        topsession.sid         = s.sid         (+) and
        topsession.serial# = s.serial#   (+)   and
		st.sql_id(+)             = s.sql_id
group by  topsession.sid, topsession.serial#,
             topsession.user_id, topsession.program, topsession.sql_plan_hash_value, topsession.sql_id,
                     topsession."calling_code",
             s.username, s.sid,s.paddr,u.username, st.sql_text, s.LAST_CALL_ET
order by max(topsession.TOTAL) desc
/

}}}

grant CREATE SESSION to karlarao;
grant SELECT_CATALOG_ROLE to karlarao;
grant SELECT ANY DICTIONARY to karlarao;
usage:
{{{
./ash
or 
sh ash
}}}


create the file and do ''chmod 755 ash''.. this calls the aveactn300.sql
{{{
$ cat ~/dba/bin/ash
#!/bin/bash

while :; do
sqlplus "/ as sysdba" <<-EOF
@/home/oracle/dba/scripts/aveactn300.sql
EOF
sleep 5
echo
done
}}}


{{{
$ cat /home/oracle/dba/scripts/aveactn300.sql
-- (c) Kyle Hailey 2007

set lines 500
column f_days new_value v_days
select 1 f_days from dual;
column f_secs new_value v_secs
select 5 f_secs from dual;
--select &seconds f_secs from dual;
column f_bars new_value v_bars
select 5 f_bars from dual;
column aveact format 999.99
column graph format a50


column fpct format 99.99
column spct format 99.99
column tpct format 99.99
column fasl format 999.99
column sasl format 999.99
column first format a40
column second format a40


select to_char(start_time,'DD HH:MI:SS'),
       samples,
       --total,
       --waits,
       --cpu,
       round(fpct * (total/samples),2) fasl,
       decode(fpct,null,null,first) first,
       round(spct * (total/samples),2) sasl,
       decode(spct,null,null,second) second,
        substr(substr(rpad('+',round((cpu*&v_bars)/samples),'+') ||
        rpad('-',round((waits*&v_bars)/samples),'-')  ||
        rpad(' ',p.value * &v_bars,' '),0,(p.value * &v_bars)) ||
        p.value  ||
        substr(rpad('+',round((cpu*&v_bars)/samples),'+') ||
        rpad('-',round((waits*&v_bars)/samples),'-')  ||
        rpad(' ',p.value * &v_bars,' '),(p.value * &v_bars),10) ,0,50)
        graph
     --  spct,
     --  decode(spct,null,null,second) second,
     --  tpct,
     --  decode(tpct,null,null,third) third
from (
select start_time
     , max(samples) samples
     , sum(top.total) total
     , round(max(decode(top.seq,1,pct,null)),2) fpct
     , substr(max(decode(top.seq,1,decode(top.event,'ON CPU','CPU',event),null)),0,25) first
     , round(max(decode(top.seq,2,pct,null)),2) spct
     , substr(max(decode(top.seq,2,decode(top.event,'ON CPU','CPU',event),null)),0,25) second
     , round(max(decode(top.seq,3,pct,null)),2) tpct
     , substr(max(decode(top.seq,3,decode(top.event,'ON CPU','CPU',event),null)),0,25) third
     , sum(waits) waits
     , sum(cpu) cpu
from (
  select
       to_date(tday||' '||tmod*&v_secs,'YYMMDD SSSSS') start_time
     , event
     , total
     , row_number() over ( partition by id order by total desc ) seq
     , ratio_to_report( sum(total)) over ( partition by id ) pct
     , max(samples) samples
     , sum(decode(event,'ON CPU',total,0))    cpu
     , sum(decode(event,'ON CPU',0,total))    waits
  from (
    select
         to_char(sample_time,'YYMMDD')                      tday
       , trunc(to_char(sample_time,'SSSSS')/&v_secs)          tmod
       , to_char(sample_time,'YYMMDD')||trunc(to_char(sample_time,'SSSSS')/&v_secs) id
       , decode(ash.session_state,'ON CPU','ON CPU',ash.event)     event
       , sum(decode(session_state,'ON CPU',1,decode(session_type,'BACKGROUND',0,1))) total
       , (max(sample_id)-min(sample_id)+1)                    samples
     from
        v$active_session_history ash
     where
               sample_time > sysdate - &v_days
     group by  trunc(to_char(sample_time,'SSSSS')/&v_secs)
            ,  to_char(sample_time,'YYMMDD')
            ,  decode(ash.session_state,'ON CPU','ON CPU',ash.event)
     order by
               to_char(sample_time,'YYMMDD'),
               trunc(to_char(sample_time,'SSSSS')/&v_secs)
  )  chunks
  group by id, tday, tmod, event, total
) top
group by start_time
) aveact,
  v$parameter p
where p.name='cpu_count'
order by start_time
/
}}}
-- from http://www.perfvision.com/statspack/ash.txt

{{{
ASH Report For CDB10/cdb10
DB Name         DB Id    Instance     Inst Num Release     RAC Host
CPUs           SGA Size       Buffer Cache        Shared Pool    ASH Buffer Size
Top User Events
Top Background Events
Top Event P1/P2/P3 Values
Top Service/Module
Top Client IDs
Top SQL Command Types
Top SQL Statements
Top SQL using literals
Top Sessions
Top Blocking Sessions
Top DB Objects
Top DB Files
Top Latches
Activity Over Time
}}}
-- from http://www.perfvision.com/statspack/ash.txt

{{{
ASH Report For CDB10/cdb10

DB Name         DB Id    Instance     Inst Num Release     RAC Host
------------ ----------- ------------ -------- ----------- --- ------------
CDB10         1193559071 cdb10               1 10.2.0.1.0  NO  tsukuba

CPUs           SGA Size       Buffer Cache        Shared Pool    ASH Buffer Size
---- ------------------ ------------------ ------------------ ------------------
   2        440M (100%)         28M (6.4%)       128M (29.1%)        4.0M (0.9%)


          Analysis Begin Time:   31-Jul-07 17:52:21
            Analysis End Time:   31-Jul-07 18:07:21
                 Elapsed Time:        15.0 (mins)
                 Sample Count:       2,647
      Average Active Sessions:        2.94
  Avg. Active Session per CPU:        1.47
                Report Target:   None specified

Top User Events                  DB/Inst: CDB10/cdb10  (Jul 31 17:52 to 18:07)

                                                               Avg Active
Event                               Event Class     % Activity   Sessions
----------------------------------- --------------- ---------- ----------
db file sequential read             User I/O             26.60       0.78
CPU + Wait for CPU                  CPU                   8.88       0.26
db file scattered read              User I/O              7.25       0.21
log file sync                       Commit                5.44       0.16
log buffer space                    Configuration         4.53       0.13
          -------------------------------------------------------------

Top Background Events            DB/Inst: CDB10/cdb10  (Jul 31 17:52 to 18:07)

                                                               Avg Active
Event                               Event Class     % Activity   Sessions
----------------------------------- --------------- ---------- ----------
db file parallel write              System I/O           21.61       0.64
log file parallel write             System I/O           18.21       0.54
          -------------------------------------------------------------

Top Event P1/P2/P3 Values        DB/Inst: CDB10/cdb10  (Jul 31 17:52 to 18:07)

Event                          % Event  P1 Value, P2 Value, P3 Value % Activity
------------------------------ ------- ----------------------------- ----------
Parameter 1                Parameter 2                Parameter 3
-------------------------- -------------------------- --------------------------
db file sequential read          26.97             "201","66953","1"       0.11
file#                      block#                     blocks

db file parallel write           21.61          "3","0","2147483647"       3.21
requests                   interrupt                  timeout

                                                "2","0","2147483647"       2.49


                                                "5","0","2147483647"       2.42


log file parallel write          18.21                "1","2022","1"       0.68
files                      blocks                     requests

db file scattered read            7.37             "201","72065","8"       0.23
file#                      block#                     blocks

log file sync                     5.48                "4114","0","0"       0.30
buffer#                    NOT DEFINED                NOT DEFINED

          -------------------------------------------------------------

Top Service/Module               DB/Inst: CDB10/cdb10  (Jul 31 17:52 to 18:07)

Service        Module                   % Activity Action               % Action
-------------- ------------------------ ---------- ------------------ ----------
SYS$USERS      UNNAMED                       50.70 UNNAMED                 50.70
SYS$BACKGROUND UNNAMED                       41.56 UNNAMED                 41.56
cdb10          OEM.SystemPool                 2.64 UNNAMED                  1.47
                                                   XMLLoader0               1.17
SYS$USERS      sqlplus@tsukuba (TNS V1-       1.55 UNNAMED                  1.55
cdb10          Lab128                         1.36 UNNAMED                  1.36
          -------------------------------------------------------------

Top Client IDs                   DB/Inst: CDB10/cdb10  (Jul 31 17:52 to 18:07)

                  No data exists for this section of the report.
          -------------------------------------------------------------

Top SQL Command Types            DB/Inst: CDB10/cdb10  (Jul 31 17:52 to 18:07)
-> 'Distinct SQLIDs' is the count of the distinct number of SQLIDs
      with the given SQL Command Type found over all the ASH samples
      in the analysis period

                                           Distinct            Avg Active
SQL Command Type                             SQLIDs % Activity   Sessions
---------------------------------------- ---------- ---------- ----------
INSERT                                           28      27.81       0.82
SELECT                                           45      12.73       0.37
UPDATE                                           11       3.85       0.11
DELETE                                            4       3.70       0.11
          -------------------------------------------------------------

Top SQL Statements              DB/Inst: CDB10/cdb10  (Jul 31 17:52 to 18:07)

       SQL ID    Planhash % Activity Event                             % Event
------------- ----------- ---------- ------------------------------ ----------
fd6a0p6333g8z  2993408006       7.59 db file sequential read              3.06
 SELECT trunc(SYSDATE, 'HH24') HOUR_STAMP, CM_ID, MA
X(SUBSTR(CM_DESC, 1, 12)) CM_DESC, MAX(UP_ID) UP_ID, MA
X(DOWN_ID) DOWN_ID, MAX(MAC_ID) MAC_ID, MAX(CMTS_
ID) CMTS_ID, SUM(BYTES_UP) SUM_BYTES_UP, SUM(BY

                                     direct path write temp               1.74

                                     db file scattered read               1.32

298wmz1kxjs1m  4251515144       5.25 CPU + Wait for CPU                   2.68
INSERT INTO CM_QOS_PROF SELECT :B1 , R.TOPOLOGYID, :B1 - :B4 , P.NODE_PROFILE_ID
, R.DOCSIFCMTSSERVICEQOSPROFILE FROM CM_SID_RAWDATA R, ( SELECT DISTINCT T.CMID,
 P.QOS_PROF_IDX, P.NODE_PROFILE_ID FROM TMP_TOP_SLOW_CM T, CMTS_QOS_PROF P WHERE
 T.CMTSID = P.TOPOLOGYID AND P.SECONDID = :B1 ) P WHERE R.BATCHID = :B3 AND R.PR

                                     db file sequential read              1.78

fhawr20n0wy5x  1792062018       3.40 db file sequential read              2.91
INSERT INTO TMP_CALC_HFC_SLOW_CM_TMP SELECT T.CMTSID, T.DOWNID, T.CMID, 0, 0, 0,
 T.DOWN_SNR_CNR_A3, T.DOWN_SNR_CNR_A2, T.DOWN_SNR_CNR_A1, T.DOWN_SNR_CNR_A0, R.S
YSUPTIME, R.DOCSIFSIGQUNERROREDS, R.DOCSIFSIGQCORRECTEDS, R.DOCSIFSIGQUNCORRECTA
BLES, R.DOCSIFSIGQSIGNALNOISE, :B3 , L.PREV_SECONDID, L.PREV_DOCSIFSIGQUNERRORED

3a11s4c86wdu5  1366293986       3.21 db file sequential read              1.85
DELETE FROM CM_RAWDATA WHERE BATCHID = 0 AND PROFINDX = :B1

                                     log buffer space                     1.06

998t5bbdfm5rm  1914870171       3.21 db file sequential read              1.70
INSERT INTO CM_RAWDATA SELECT PROFINDX, 0 BATCHID, TOPOLOGYID, SAMPLETIME, SYSUP
TIME, DOCSIFCMTSCMSTATUSVALUE, DOCSIFCMTSSERVICEINOCTETS, DOCSIFCMTSSERVICEOUTOC
TETS, DOCSIFCMSTATUSTXPOWER, DOCSIFCMTSCMSTATUSRXPOWER, DOCSIFDOWNCHANNELPOWER,
DOCSIFSIGQUNERROREDS, DOCSIFSIGQCORRECTEDS, DOCSIFSIGQUNCORRECTABLES, DOCSIFSIGQ

          -------------------------------------------------------------

Top SQL using literals           DB/Inst: CDB10/cdb10  (Jul 31 17:52 to 18:07)

                  No data exists for this section of the report.
          -------------------------------------------------------------

Top Sessions                    DB/Inst: CDB10/cdb10  (Jul 31 17:52 to 18:07)
-> '# Samples Active' shows the number of ASH samples in which the session
      was found waiting for that particular event. The percentage shown
      in this column is calculated with respect to wall clock time
      and not total database activity.
-> 'XIDs' shows the number of distinct transaction IDs sampled in ASH
      when the session was waiting for that particular event
-> For sessions running Parallel Queries, this section will NOT aggregate
      the PQ slave activity into the session issuing the PQ. Refer to
      the 'Top Sessions running PQs' section for such statistics.

   Sid, Serial# % Activity Event                             % Event
--------------- ---------- ------------------------------ ----------
User                 Program                          # Samples Active     XIDs
-------------------- ------------------------------ ------------------ --------
      126,    5      33.59 db file sequential read             18.62
STARGUS                                                 493/900 [ 55%]        4

                           CPU + Wait for CPU                   5.52
                                                        146/900 [ 16%]        2

                           db file scattered read               5.02
                                                        133/900 [ 15%]        2

      167,    1      21.80 db file parallel write              21.61
SYS                  oracle@tsukuba (DBW0)              572/900 [ 64%]        0

      166,    1      18.47 log file parallel write             18.21
SYS                  oracle@tsukuba (LGWR)              482/900 [ 54%]        0

      133,  763       9.67 db file sequential read              4.80
STARGUS                                                 127/900 [ 14%]        1

                           direct path write temp               1.74
                                                         46/900 [  5%]        0

                           db file scattered read               1.32
                                                         35/900 [  4%]        0

      152,  618       3.10 db file sequential read              1.10
STARGUS                                                  29/900 [  3%]        1

          -------------------------------------------------------------

Top Blocking Sessions            DB/Inst: CDB10/cdb10  (Jul 31 17:52 to 18:07)
-> Blocking session activity percentages are calculated with respect to
      waits on enqueues, latches and "buffer busy" only
-> '% Activity' represents the load on the database caused by
      a particular blocking session
-> '# Samples Active' shows the number of ASH samples in which the
      blocking session was found active.
-> 'XIDs' shows the number of distinct transaction IDs sampled in ASH
      when the blocking session was found active.

   Blocking Sid % Activity Event Caused                      % Event
--------------- ---------- ------------------------------ ----------
User                 Program                          # Samples Active     XIDs
-------------------- ------------------------------ ------------------ --------
      166,    1       5.48 log file sync                        5.48
SYS                  oracle@tsukuba (LGWR)              512/900 [ 57%]        0

          -------------------------------------------------------------

Top Sessions running PQs        DB/Inst: CDB10/cdb10  (Jul 31 17:52 to 18:07)

                  No data exists for this section of the report.
          -------------------------------------------------------------

Top DB Objects                   DB/Inst: CDB10/cdb10  (Jul 31 17:52 to 18:07)
-> With respect to Application, Cluster, User I/O and buffer busy waits only.

      Object ID % Activity Event                             % Event
--------------- ---------- ------------------------------ ----------
Object Name (Type)                                    Tablespace
----------------------------------------------------- -------------------------
          52652       4.08 db file scattered read               4.08
STARGUS.TMP_CALC_HFC_SLOW_CM_TMP (TABLE)              SYSTEM

          52543       3.32 db file sequential read              3.32
STARGUS.PK_CM_RAWDATA (INDEX)                         TS_STARGUS

          52698       3.21 db file sequential read              2.98
STARGUS.TMP_TOP_SLOW_CM (TABLE)                       SYSTEM

          52542       2.98 db file sequential read              2.98
STARGUS.CM_RAWDATA (TABLE)                            TS_STARGUS

          52699       1.78 db file sequential read              1.78
STARGUS.PK_TMP_TOP_SLOW_CM (INDEX)                    SYSTEM

          -------------------------------------------------------------

Top DB Files                     DB/Inst: CDB10/cdb10  (Jul 31 17:52 to 18:07)
-> With respect to Cluster and User I/O events only.

        File ID % Activity Event                             % Event
--------------- ---------- ------------------------------ ----------
File Name                                             Tablespace
----------------------------------------------------- -------------------------
              6      23.31 db file sequential read             19.83
/export/home/oracle10/oradata/cdb10/ts_stargus_01.dbf TS_STARGUS

                           db file scattered read               1.59


                           direct path write temp               1.59


          -------------------------------------------------------------

Top Latches                      DB/Inst: CDB10/cdb10  (Jul 31 17:52 to 18:07)

                  No data exists for this section of the report.
          -------------------------------------------------------------

Activity Over Time              DB/Inst: CDB10/cdb10  (Jul 31 17:52 to 18:07)
-> Analysis period is divided into smaller time slots
-> Top 3 events are reported in each of those slots
-> 'Slot Count' shows the number of ASH samples in that slot
-> 'Event Count' shows the number of ASH samples waiting for
   that event in that slot
-> '% Event' is 'Event Count' over all ASH samples in the analysis period

                         Slot                                   Event
Slot Time (Duration)    Count Event                             Count % Event
-------------------- -------- ------------------------------ -------- -------
17:52:21   (1.7 min)      354 log file parallel write              85    3.21
                              db file sequential read              82    3.10
                              db file parallel write               65    2.46
17:54:00   (2.0 min)      254 CPU + Wait for CPU                   73    2.76
                              db file sequential read              46    1.74
                              log file parallel write              44    1.66
17:56:00   (2.0 min)      323 log file parallel write              94    3.55
                              db file parallel write               85    3.21
                              db file sequential read              85    3.21
17:58:00   (2.0 min)      385 log file parallel write             109    4.12
                              db file parallel write               95    3.59
                              db file sequential read              71    2.68
18:00:00   (2.0 min)      470 db file sequential read             169    6.38
                              db file parallel write               66    2.49
                              log file parallel write              61    2.30
18:02:00   (2.0 min)      277 db file sequential read             139    5.25
                              db file parallel write               58    2.19
                              CPU + Wait for CPU                   39    1.47
18:04:00   (2.0 min)      364 db file parallel write              105    3.97
                              db file scattered read               90    3.40
                              db file sequential read              80    3.02
18:06:00   (1.4 min)      220 db file parallel write               67    2.53
                              db file scattered read               44    1.66
                              db file sequential read              42    1.59
          -------------------------------------------------------------

End of Report
}}}
<<<

Active Session History (ASH) performed an emergency flush. This may mean that ASH is undersized. If emergency flushes are a recurring issue, you may consider increasing ASH size by setting the value of _ASH_SIZE to a sufficiently large value. Currently, ASH size is 16777216 bytes. Both ASH size and the total number of emergency flushes since instance startup can be monitored by running the following query:
 select total_size,awr_flush_emergency_count from v$ash_info;

<<<
''RE: Finding Sessions using AWR Report - ASH'' http://www.evernote.com/shard/s48/sh/733fa2e6-4feb-45cf-ac1a-18a679d9bce5/d6f5a6382d71007a633bc30d0a225db6

http://oracledoug.com/serendipity/index.php?/archives/1614-Network-Events-in-ASH.html

other articles by Doug about ASH 

Alternative Pictures Demo
That Pictures demo in full
Time Matters: Throughput vs. Response Time - Part 2
Diagnosing Locking Problems using ASH/LogMiner – The End
Diagnosing Locking Problems using ASH/LogMiner – Part 9
Diagnosing Locking Problems using ASH/LogMiner – Part 8
Diagnosing Locking Problems using ASH/LogMiner – Part 7
Diagnosing Locking Problems using ASH – Part 6
Diagnosing Locking Problems using ASH – Part 5
Diagnosing Locking Problems using ASH – Part 4
http://www.oaktable.net/content/ukoug-2011-ash-outliers
http://oracledoug.com/serendipity/index.php?/archives/1669-UKOUG-2011-Ash-Outliers.html#comments
http://oracledoug.com/ASHoutliers3c.sql
http://oracledoug.com/adaptive_thresholds_faq.pdf
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1525205200346930663   <-- JB and Graham comments

Visualizing Active Session History (ASH) Data With R http://structureddata.org/2011/12/20/visualizing-active-session-history-ash-data-with-r/
also talks about TIME_WAITED – micro, only the last sample is fixed up, the others will have TIME_WAITED=0
thanks to John Beresniewicz for this info. http://dboptimizer.com/2011/07/20/oracle-time-units-in-v-views/
DAVE ABERCROMBIE research on AAS and ASH
http://aberdave.blogspot.com/search?updated-max=2011-04-02T08:09:00-07:00&max-results=7
http://dboptimizer.com/2011/10/20/tuning-blog-entries/
{{{
ASH

SQL execution times from ASH – using ASH to see SQL execution times and execution time variations
AAS on AWR – my favorite ASH query that shows AAS  wait classes  as an ascii graph
CPU Wait vs CPU Usage
Simulated ASH 2.1
AWR

Wait  Metrics vs v$system_event
Statistic Metrics verses v$sysstat
I/O latency fluctuations
I/O wait histograms
Redo over weeks
AWR mining
Diff’ing AWR reports
Importing AWR repositories
Redo

LGWR redo write times (log file parallel write)
Ratio of Redo bytes to Datablocks writes
Etc

V$ view time units S,CS,MS,US
Parsing 10046 traces
SQL

Display Cursor Explained – what are all those display_cursor options and what exactly is the data
VST – vistual sql tunning

VST in DB Optimizer 3.0
VST with 100 Tables !
SQL Joins using sets
Visualizing SQL Queries
VST – product design
View expansion with VST
Outer Joins Graphically
}}}
* ASM Mind Map
http://jarneil.wordpress.com/2008/08/26/the-asm-mind-map/

* v$asm_disk
http://www.rachelp.nl/index_kb.php?menu=articles&actie=show&id=10



http://www.freelists.org/post/oracle-l/ASM-on-SAN,5
http://www.freelists.org/post/oracle-l/ASM-and-EMC-PowerPath
ASM and shared pool sizing - http://www.evernote.com/shard/s48/sh/c3535415-30fd-42fa-885a-85df36616e6e/288c13d20095240c8882594afed99e8b

Bug 11684854 : ASM ORA-4031 IN LARGE POOL FROM CREATE DISKGROUP
14292825: DEFAULT MEMORY PARAMETER VALUES FOR 11.2 ASM INSTANCES LOW
https://twiki.cern.ch/twiki/bin/view/PDBService/ASM_Internals <-- GOOD STUFF
https://twiki.cern.ch/twiki/bin/view/PDBService/HAandPerf
{{{
ASM considerations on SinglePath and MultiPath across versions (OCR,VD,DATA)

In general you gotta have a facility/mechanism for:

	* multipathing -> persistent naming -> ASM


on 10gR2, 11gR1 for your OCR and VD you must use the following:

	* 
		* clustered filesystem (OCFS2) or NFS
		* raw devices (RHEL4) or udev (RHEL5)


on 11gR2, for your OCR and VD you must use the following:

	* 
		* clustered filesystem or NFS
		* ASM (mirrored at least 3 disks) 

-----------------------
Single Path 
-----------------------

If you have ASMlib you will go with this setup

	* 
		*   ASMlib -> ASM"


If you don't have ASMlib and Powerpath you will go with this setup

	* 
		* 10gR2 and 11g
			* raw devices
			* udev -> ASM

		* 11gR2

			* udev -> ASM

-----------------------
Multi Path
-----------------------

If you have ASMlib and Powerpath you will go with this setup

	* 
		* 10gR2, 11g, 11gR2

			* "powerpath -> ASMlib -> ASM"



If you don't have ASMlib and Powerpath you will go with this setup

	* 
		* 10gR2
			* "dm multipath (dev mapper) -> raw devices -> ASM"


		* 11g and 11gR2
			* "dm multipath (dev mapper) -> ASM"



you can also be flexible and go with 

	* 
		*   "dm multipath (dev mapper) -> ASMlib -> ASM"

-----------------------
Notes
-----------------------

kpartx confuses me..just do this.. 
- assign and share luns on all nodes.
- fdisk the luns and update partition table on all nodes
- configure multipath
- use </dev/mapper/<mpath_alias>
- create asm storage using above devices
https://forums.oracle.com/forums/thread.jspa?threadID=2288213
}}}

http://www.evernote.com/shard/s48/sh/0012dbf5-6648-4792-84ff-825a363f68d3/a744de57fdb99349388e21cdd9c6059a
http://www.pythian.com/news/1078/oracle-11g-asm-diskgroup-compatibility/

http://www.freelists.org/post/oracle-l/Does-ocssdbin-started-from-11gASM-home-support-diskgroups-mounted-by-10g-ASM-instance,5
{{{
Hi Sanjeev,

I'd like to clear some info first.

1st)... the ocssd.bin

the CSS is created when:
- you use ASM as storage
- when you install Clusterware (RAC, but Clusterware has its separate
home already)

  For Oracle Real Application Clusters installations, the CSS daemon
is installed with Oracle Clusterware in a separate Oracle home
directory (also called the Clusterware home directory). For
single-node installations, the CSS daemon is installed in and runs
from the same Oracle home as Oracle Database.

You could identify the Oracle home directory being used to run the CSS daemon:

# cat /etc/oracle/ocr.loc

The output from this command is similar to the following:

[oracle@dbrocaix01 bin]$ cat /etc/oracle/ocr.loc
ocrconfig_loc=/oracle/app/oracle/product/10.2.0/asm_1/cdata/localhost/local.ocr
local_only=TRUE

The ocrconfig_loc parameter specifies the location of the Oracle
Cluster Registry (OCR) used by the CSS daemon. The path up to the
cdata directory is the Oracle home directory where the CSS daemon is
running (/oracle/app/oracle/product/10.2.0/asm_1 in this example). To
confirm you could grep the css deamon and see that it's running on
that home

[oracle@dbrocaix01 bin]$ ps -ef | grep -i css
oracle    4950     1  0 04:23 ?        00:00:00
/oracle/app/oracle/product/10.2.0/asm_1/bin/ocssd.bin
oracle    5806  5609  0 04:26 pts/1    00:00:00 grep -i css

Note:
If the value of the local_only parameter is FALSE, Oracle Clusterware
is installed on this system.


2nd)... ASM and Database compatibility

I'll supply you with some references..

Note 337737.1 Oracle Clusterware - ASM - Database Version Compatibility
Note 363254.1 Applying one-off Oracle Clusterware patches in a mixed
version home environment

and Chapter 4, page 116-120 of Oracle ASM (under the hood & practical
deployment guide) 10g & 11g

In the book it says that there are two types of compatibility settings
between ASM and the RDBMS:
  1) instance-level software compatibility settings
        - the COMPATIBLE parameter (mine is 10.2.0), this defines what
software features are available to the instance. Setting the
COMPATIBLE parameter in the ASM instance
        to 10.1 will not enable you to use 11g ASM new features (variable
extents, etc.)

  2) diskgroup-specific settings
        - COMPATIBLE.ASM and COMPATIBLE.RDBMS which are persistently stored
in the ASM diskgroup metadata..these compatibility settings are
specific to a diskgroup and control which
          attributes are available to the ASM diskgroup and which are
available to the database.
        - COMPATIBLE.RDBMS, which defaults to 10.1 in 11g, is the minimum
COMPATIBLE version setting of a database that can mount the
diskgroup.. once you advanced it, it cannot be reversed
        - COMPATIBLE.ASM, which controls the persistent format of the on-disk
ASM metadata structures. The ASM compatibility defaults to 10.1 in 11g
and must always be greater than or equal to the RDBMS compatibility
level.. once you advanced it, it cannot be reversed

    The combination of the compatibility parameter setting of the
database, the software version of the database, and the RDBMS
compatibility setting of a diskgroup determines whether a database
instance is permitted to mount a given diskgroup. The compatibility
setting also determines which ASM features are available for a
diskgroup.

    An ASM instance can support different RDBMS clients with different
compatibility settings, as long as the database COMPATIBLE init.ora
parameter setting of each database instance is greater than or equal
to the RDBMS compatibility of all diskgroups.

    You could also read more here...
http://download.oracle.com/docs/cd/B28359_01/server.111/b31107/asmdiskgrps.htm#CHDDIGBJ




So the following info will give us some background on your environment

cat /etc/oracle/ocr.loc
ps -ef | grep -i css
cat /etc/oratab
select name, group_number, value from v$asm_attribute order by 2;
select db_name, status,software_version,compatible_version from v$asm_client;
select name,compatibility, database_compatibility from v$asm_diskgroup;



I hope I did not confuse you with all of this info.





- Karl Arao
http://karlarao.wordpress.com
}}}
http://blog.ronnyegner-consulting.de/2009/10/27/asm-resilvering-or-how-to-recovery-your-asm-in-crash-scenarios/
http://www.ardentperf.com/2010/07/15/asm-mirroring-no-hot-spare-disk/
http://asmsupportguy.blogspot.com/2010/05/how-to-map-asmlib-disk-to-device-name.html
http://uhesse.wordpress.com/2010/12/01/database-migration-to-asm-with-short-downtime/
{{{
backup as copy database format '+DATA';
switch database to copy;
}}}
''Migrating Databases from non-ASM to ASM and Vice-Versa'' http://www.idevelopment.info/data/Oracle/DBA_tips/Automatic_Storage_Management/ASM_33.shtml


-- ''OCFS to ASM''
''How to Migrate an Existing RAC database to ASM'' http://www.colestock.com/blogs/2008/05/how-to-migrate-existing-rac-database-to.html
http://oss.oracle.com/pipermail/oracleasm-users/2009-June/000094.html
{{{

[root@uscdcmix30 ~]#  time dd if=/dev/VgCDCMIX30_App/app_new bs=8192 count=655360 of=/dev/null

655360+0 records in

655360+0 records out


 
real    0m39.045s

user    0m0.083s

sys     0m6.467s

[root@uscdcmix30 ~]# time dd if=/dev/oracleasm/disks/DGMIX03 bs=8192 count=655360 of=/dev/null

655360+0 records in

655360+0 records out


 
real    1m1.784s

user    0m0.084s

sys     0m14.914s

[root@uscdcmix30 ~]# time dd if=/dev/oracleasm/disks/DGMIX04 bs=8192 count=655360 of=/dev/null

655360+0 records in

655360+0 records out


 
real    1m17.748s

user    0m0.069s

sys     0m13.409s

[root@uscdcmix30 ~]# time dd if=/dev/oracleasm/disks/DGMIX03 bs=8192 count=655360 of=/dev/null

655360+0 records in

655360+0 records out


 
real    1m2.702s

user    0m0.090s

sys     0m16.682s

[root@uscdcmix30 ~]# time dd if=/dev/oracleasm/disks/DGMIX04 bs=8192 count=655360 of=/dev/null

655360+0 records in

655360+0 records out


 
real    1m19.698s

user    0m0.079s

sys     0m16.774s

[root@uscdcmix30 ~]# time dd if=/dev/oracleasm/disks/DGMIX03 bs=8192 count=655360 of=/dev/null

655360+0 records in

655360+0 records out


 
real    1m2.037s

user    0m0.085s

sys     0m14.386s

[root@uscdcmix30 ~]# time dd if=/dev/oracleasm/disks/DGMIX03 bs=8192 count=655360 of=/dev/null

655360+0 records in

655360+0 records out


 
real    1m2.822s

user    0m0.052s

sys     0m11.703s

[root@uscdcmix30 ~]# oracleasm listdisks

DGCRM01

DGCRM02

DGCRM03

DGCRM04

DGCRM05

DGCRM06

DGMIX01

DGMIX02

DGMIX03

DGMIX04

[root@uscdcmix30 ~]# oracleasm deletedisk DGMIX03

Clearing disk header: done

Dropping disk: done

[root@uscdcmix30 ~]# time dd if=/dev/emcpowers1 bs=8192 count=655360 of=/dev/null

655360+0 records in

655360+0 records out


 
real    1m0.955s

user    0m0.044s

sys     0m11.446s

[root@uscdcmix30 ~]# pvcreate /dev/emcpowers1

  Physical volume "/dev/emcpowers1" successfully created

[root@uscdcmix30 ~]# vgcreate VgTemp /dev/emcpowers1

  /dev/emcpowero: open failed: No such device

  /dev/emcpowero1: open failed: No such device

  Volume group "VgTemp" successfully created

[root@uscdcmix30 ~]# vgs

  VG              #PV #LV #SN Attr   VSize   VFree

  VgCDCCRM30_App    1   1   0 wz--n- 101.14G      0

  VgCDCCRM30_Arch   1   1   0 wz--n- 101.14G      0

  VgCDCMIX30_App    1   1   0 wz--n- 100.00G      0

  VgTemp            1   0   0 wz--n- 100.00G 100.00G

  vg00              1   7   0 wz--n- 136.50G  66.19G

  vg01              1   1   0 wz--n- 101.14G      0

  vg03              2   1   0 wz--n- 505.74G 101.14G

[root@uscdcmix30 ~]# lvcreate -L 102396 -n TestLV VgTemp

  Logical volume "TestLV" created

[root@uscdcmix30 ~]# time dd if=/dev/VgTemp/TestLV bs=8192 count=655360 of=/dev/null

655360+0 records in

655360+0 records out


 
real    0m34.027s

user    0m0.056s

sys     0m4.698s

}}}
How to create ASM filesystem in Oracle 11gR2
http://translate.google.com/translate?sl=auto&tl=en&u=http://www.dbform.com/html/2010/1255.html
OTN ASM
http://www.oracle.com/technology/tech/linux/asmlib/index.html
http://www.oracle.com/technology/tech/linux/asmlib/raw_migration.html
http://www.oracle.com/technology/tech/linux/asmlib/multipath.html
http://www.oracle.com/technology/tech/linux/asmlib/persistence.html

ASM using ASMLib and Raw Devices
http://www.oracle-base.com/articles/10g/ASMUsingASMLibAndRawDevices.php
Raw devices with release 11: Note ID 754305.1
# 
However, the Unbreakable Enterprise Kernel is optional, 
and Oracle Linux continues to include a Red Hat compatible kernel, compiled directly from Red Hat 
Enterprise Linux source code, for customers who require strict RHEL compatibility. Oracle also 
recommends the  Unbreakable Enterprise Kernel when running third party software and third party 
hardware.


# Performance improvements

latencytop?


# ASMlib and virtualization modules in the kernel

Updated Kernel Modules
The Unbreakable Enterprise Kernel includes both OCFS2 1.6 as well as Oracle ASMLib, the kernel 
driver for Oracle’s Automatic Storage Management feature.  There is no need to install separate RPMs 
to implement these kernel features.  Also, the Unbreakable Enterprise Kernel can be run directly on 
bare metal or as a virtual guest on Oracle VM, both in hardware virtualized (HVM) and paravirtualized (PV) mode, as it implements the paravirt_ops instruction set and includes the xen_netfront and 
xen_blkfront drivers.

# 
Unbreakable Enterprise Kernel itself already includes ocfs2 and oracleasm



Questions:
1) Since it will be a new kernel, what if I have a third party module like EMC Powerpath? I'm sure ill have to reinstall it once I use the new 
kernel. But, once reinstalled.. will it be certified with EMC (or vice versa)? 
2) Also, Oracle says, if you have to maintain compatibility with a third party module. You can use the old vanilla kernel. Questions is, since the 
ASMlib module is already integrated on the Unbreakable Kernel, once I use the non-Unbreakable kernel do they also have the old style RPM 
(oracleasm-`uname -r` - kernel driver) for having the ASMlib module? 
OR 
if it's not supported at all and I'm 

ASMLIB has three components.
1. oracleasm-support - user space shell scripts
2. oracleasmlib - user space library (closed source)	
3. oracleasm-`uname -r` - kernel driver		<-- kernel dependent

###############################################################################################3

-- from this thread http://www.freelists.org/post/oracle-l/ASM-and-EMC-PowerPath

! 
! The Storage Report (ASM -> Linux -> EMC)
Below is a sample storage info that you should have, it clearly shows the relationship from the Oracle layer (ASM), Linux, and SAN storage. This info is very useful for you and the storage engineer. So you would know which is which in case of catastrophic problems..

Very useful for storage activities like: 
* SAN Migration
* Add/Remove disk
* Powerpath upgrade
* Kernel upgrade

//(Note: The images below might be too big on your current screen resolution, to have a better view just right click and download the images or ''double click'' on this page to see the full path of the images..)//

[img[picturename| https://lh6.googleusercontent.com/_F2x5WXOJ6Q8/TaFARe_nqfI/AAAAAAAABOI/jXAshWxpfw8/powerpath1.png]]
[img[picturename| https://lh6.googleusercontent.com/_F2x5WXOJ6Q8/TaFARSJDiLI/AAAAAAAABOE/SoDU7jrddUQ/powerpath2.png]]
[img[picturename| https://lh3.googleusercontent.com/_F2x5WXOJ6Q8/TaFAUat0HcI/AAAAAAAABOM/qe5qoeF3wTw/powerpath3.png]]

! 
! What info do you need to produce the report? 
''You need the following:''
* AWR time series output (my scripts http://karlarao.wordpress.com/scripts-resources)
* output of the command ''powermt display dev=all'' (run as root)
* RDA
* SAR (because I just love looking at the performance data)
* sysreport (run as root)

''You have to collect'' this on each server / instance and properly arrange them per folder so you won't have a hard time documenting the bits of info you need on the Excel sheet
[img[picturename| https://lh4.googleusercontent.com/_F2x5WXOJ6Q8/TaFK4F_SexI/AAAAAAAABPQ/VjSQm0_uUUM/powerdevices4.png]]

''Below is the drill down on each folder'', the data you'll see is from a separate two RAC clusters.. each with it's own SAN storage.. the project I'm working on here is to migrate/consolidate them into a single SAN storage (newly purchased). So I need to collect all these data to help on planning the activity and mitigate the risks/issues. Also the collection of performance data is a must to verify if the IO requirements of the databases can be handled by the new SAN. On this project I have verified that the Capacity exceeds the current requirements. 
* AWR
<<<
per server
[img[picturename| https://lh6.googleusercontent.com/_F2x5WXOJ6Q8/TaFDmcOnhBI/AAAAAAAABOk/lxo8_tbLqX4/powerdevices5-awr.png]]
> per instance
> [img[picturename| https://lh3.googleusercontent.com/_F2x5WXOJ6Q8/TaFKbFENV1I/AAAAAAAABPE/nUCFo_HOjHY/powerdevices5-awr2.png]]
>> awr output on each instance
>> [img[picturename| https://lh5.googleusercontent.com/_F2x5WXOJ6Q8/TaFKbZB6nnI/AAAAAAAABPI/8MVhDN5Q_rI/powerdevices5-awr3.png]]
<<<
* powermt display dev=all
<<<
[img[picturename| https://lh5.googleusercontent.com/_F2x5WXOJ6Q8/TaFDmG2XayI/AAAAAAAABOg/0Lo8QoDbm_A/powerdevices6-powermt.png]]
<<<
* RDA
<<<
[img[picturename| https://lh3.googleusercontent.com/_F2x5WXOJ6Q8/TaFDmsNLT2I/AAAAAAAABOs/sHa-KUryYFo/powerdevices7-rda.png]]
<<<
* SAR
<<<
[img[picturename| https://lh6.googleusercontent.com/_F2x5WXOJ6Q8/TaFDmcOnhBI/AAAAAAAABOk/lxo8_tbLqX4/powerdevices5-awr.png]]
> sample output
> [img[picturename| https://lh3.googleusercontent.com/_F2x5WXOJ6Q8/TaFDmyLyKAI/AAAAAAAABOw/f5UgyqVu09I/powerdevices8-sar.png]]
<<<
* sysreport 
<<<
[img[picturename| https://lh4.googleusercontent.com/_F2x5WXOJ6Q8/TaFDm08TuYI/AAAAAAAABO0/bZzSwZX6Vqc/powerdevices8-sysreport.png]]
> sample output
> [img[picturename| https://lh4.googleusercontent.com/_F2x5WXOJ6Q8/TaFDnQpFRHI/AAAAAAAABO4/SiDKdZE9kOY/powerdevices8-sysreport2.png]]
<<<

! 
! Putting it all together 
On the Excel sheet, you have to fill in the following sections 
* From RDA
** ASM Library Information
** ASM Library Disk Information
** Disk Partitions
** Operating System Setup->Operating System Packages
** Operating System Setup->Disk Drives->Disk Mounts
** Oracle Cluster Registry (Cluster -> Cluster Information -> ocrcheck)
* From ''powermt'' command
** Logical Device IDs and names
* From sysreport
** raw devices (possible for OCR and Voting Disk)
** fstab (check for OCFS2 mounts)
* Double check from OS commands
** Voting Disk (''crsctl query css votedisk'')
** ls -l /dev/	
** /etc/init.d/oracleasm querydisk <device_name>

''Below are the output from the various sources...'' this will show you how to map the ''ASM disk'' to a particular ''EMC power device'' (follow the ''RED ARROWS'').. you have to do it on all "ASM disks" and the method will also be the same on accounting the ''raw devices'', ''OCFS2'', and ''OCR'' for their mapping on their respective EMC power devices..

To do the correlated report of the ASM, Linux, and SAN storage.. follow the ''BLUE ARROWS''..

You will also see below that having this proper accounting and correlating it from the ASM, Linux, and EMC storage level you will never go wrong and you have the definitive information that you can share with the EMC Storage Engineer which they can also ''double check''.. in that way both the ''DBAs and the Storage guys will be on the same page''.

[img[picturename| https://lh3.googleusercontent.com/_F2x5WXOJ6Q8/TaFvF-b2-tI/AAAAAAAABPk/cdnpkq6yLeg/emcreport10.png]]

Notice above that the ''emcpowerr'' and ''emcpowers'' have no allocations, so what does that mean? can we allocate these devices now? ... mm ''no!'' ... ''stop''...''move back''... ''think''...

I will do the following: 
* Run this query to check if it's recognized as ''FOREIGN'' or ''CANDIDATE''
{{{
set lines 400
col name format a20
col label format a20
col path format a20
col redundancy format a20
select a.group_number, a.name, a.header_status, a.mount_status, a.state, a.total_mb, a.free_mb, a.label, path, a.redundancy
from v$asm_disk a
order by 1,2;

GROUP_NUMBER NAME                 HEADER_STATU STATE      TOTAL_MB    FREE_MB LABEL                PATH                 REDUNDANCY
------------ -------------------- ------------ -------- ---------- ---------- -------------------- -------------------- --------------------
}}}
* I've done some precautions on my data gathering by checking on the ''fstab'' and ''raw devices config'' and found out that ''there are no pointers to the two devices''.. 
** I have an obsessive–compulsive tendencies just to make sure that these devices are not used by some services. If accidentally these EMC power devices were used for something else let's say as a filesystem.. Oracle will still allow you to do the ADD/DROP operation on these devices wiping out all the data on those devices! 
* Another thing I would do is validate it with my storage engineer or the in-house DBA if these disks exist for the purpose of expanding the disk group. 

If everything is okay. I can safely say they are candidate disks for expanding the space of my current disk group and go ahead with the activity.


! 
! From Matt Zito (former EMC solutions architect)
<<<
Hey guys,

I haven't gotten this email address straightened out on Oracle-L yet, but I figured I'd drop you a note, and you could forward it on to the list if you cared to.

The doc you read is correct, powerpath will cheerfully work with any of the devices you send IOs to, because the kernel driver intercepts requests for all devices and routes them through itself before dishing them down the appropriate path.

However, setting scandisks to the emcpower has the administrative benefits of making sure the disks don't show up twice.  However, even if ASM picks the first of the two disks, it will still be load-balanced successfully.

Thanks,
Matt Zito
(former EMC solutions architect)
<<<

https://blogs.oracle.com/XPSONHA/entry/asr_snmp_on_exadata

Oracle Auto Service Request (ASR) [ID 1185493.1]
''ASR Documentation'' http://www.oracle.com/technetwork/server-storage/asr/documentation/index.html?ssSourceSiteId=ocomen


''10mins AWR snap interval, 144 samples in a day, 1008 samples in 7days, 4032 samples in 4weeks, 52560 samples in 1year''

''Good chapter on HOW to read AWR reports'' http://filezone.orapub.com/FF_Book/v4Chap9.pdf

{{{
Understand each field of AWR (Doc ID 884046.1)
AWR report is broken into multiple parts.

1)Instance information:-
This provides information the instance name , number,snapshot ids,total time the report was taken for and the database time during this elapsed time.

Elapsed time= end snapshot time - start snapshot time
Database time= Work done by database during this much elapsed time( CPU and I/o both add to Database time).If this is lesser than the elapsed time by a great margin, then database is idle.Database time does not include time spend by the background processes.

2)Cache Sizes : This shows the size of each SGA region after AMM has changed them. This information
can be compared to the original init.ora parameters at the end of the AWR report.

3)Load Profile: This important section shows important rates expressed in units of per second and
transactions per second.This is very important for understanding how is the instance behaving.This has to be compared to base line report to understand the expected load on the machine and the delta during bad times.

4)Instance Efficiency Percentages (Target 100%): This section talks about how close are the vital ratios like buffer cache hit, library cache hit,parses etc.These can be taken as indicators ,but should not be a cause of worry if they are low.As the ratios cold be low or high based in database activities, and not due to real performance problem.Hence these are not stand alone statistics, should be read for a high level view .

5)Shared Pool Statistics: This summarizes changes to the shared pool during the snapshot
period.

6)Top 5 Timed Events :This is the section which is most relevant for analysis.This section shows what % of database time was the wait event seen for.Till 9i, this was the way to backtrack what was the total database time for the report , as there was no Database time column in 9i.

7)RAC Statistics :This part is seen only incase of cluster instance.This provides important indication on the average time take for block transfer, block receiving , messages ., which can point to performance problems in the Cluster instead of database.

8)Wait Class : This Depicts which wait class was the area of contention and where we need to focus.Was that network, concurrency, cluster, i/o Application, configuration etc.

9)Wait Events Statistics Section: This section shows a breakdown of the main wait events in the
database including foreground and background database wait events as well as time model, operating
system, service, and wait classes statistics.

10)Wait Events: This AWR report section provides more detailed wait event information for foreground
user processes which includes Top 5 wait events and many other wait events that occurred during
the snapshot interval.

11)Background Wait Events: This section is relevant to the background process wait events.

12)Time Model Statistics: Time mode statistics report how database-processing time is spent. This
section contains detailed timing information on particular components participating in database
processing.This gives information about background process timing also which is not included in database time.

13)Operating System Statistics: This section is important from OS server contention point of view.This section shows the main external resources including I/O, CPU, memory, and network usage.

14)Service Statistics: The service statistics section gives information services and their load in terms of CPU seconds, i/o seconds, number of buffer reads etc.

15)SQL Section: This section displays top SQL, ordered by important SQL execution metrics.

a)SQL Ordered by Elapsed Time: Includes SQL statements that took significant execution
time during processing.

b)SQL Ordered by CPU Time: Includes SQL statements that consumed significant CPU time
during its processing.

c)SQL Ordered by Gets: These SQLs performed a high number of logical reads while
retrieving data.

d)SQL Ordered by Reads: These SQLs performed a high number of physical disk reads while
retrieving data.

e)SQL Ordered by Parse Calls: These SQLs experienced a high number of reparsing operations.

f)SQL Ordered by Sharable Memory: Includes SQL statements cursors which consumed a large
amount of SGA shared pool memory.

g)SQL Ordered by Version Count: These SQLs have a large number of versions in shared pool
for some reason.

16)Instance Activity Stats: This section contains statistical information describing how the database
operated during the snapshot period.

17)I/O Section: This section shows the all important I/O activity.This provides time it took to make 1 i/o say Av Rd(ms), and i/o per second say Av Rd/s.This should be compared to the baseline to see if the rate of i/o has always been like this or there is a diversion now.

18)Advisory Section: This section show details of the advisories for the buffer, shared pool, PGA and
Java pool.

19)Buffer Wait Statistics: This important section shows buffer cache waits statistics.

20)Enqueue Activity: This important section shows how enqueue operates in the database. Enqueues are
special internal structures which provide concurrent access to various database resources.

21)Undo Segment Summary: This section gives a summary about how undo segments are used by the database.
Undo Segment Stats: This section shows detailed history information about undo segment activity.

22)Latch Activity: This section shows details about latch statistics. Latches are a lightweight
serialization mechanism that is used to single-thread access to internal Oracle structures.The latch should be checked by its sleeps.The sleepiest Latch is the latch that is under contention , and not the latch with high requests.Hence  run through the sleep breakdown part of this section to arrive at the latch under highest contention.

23)Segment Section: This portion is important to make a guess in which segment and which segment type the contention could be.Tally this with the top 5 wait events.

Segments by Logical Reads: Includes top segments which experienced high number of
logical reads.

Segments by Physical Reads: Includes top segments which experienced high number of disk
physical reads.

Segments by Buffer Busy Waits: These segments have the largest number of buffer waits
caused by their data blocks.

Segments by Row Lock Waits: Includes segments that had a large number of row locks on
their data.

Segments by ITL Waits: Includes segments that had a large contention for Interested
Transaction List (ITL). The contention for ITL can be reduced by increasing INITRANS storage
parameter of the table.

24)Dictionary Cache Stats: This section exposes details about how the data dictionary cache is
operating.

25)Library Cache Activity: Includes library cache statistics  which are needed in case you see library cache in top 5 wait events.You might want to see if the reload/invalidations are causing the contention or there is some other issue with library cache.

26)SGA Memory Summary:This would tell us the difference in the respective pools at the start and end of report.This could be an indicator of setting minimum value for each, when sga)target is being used..

27)init.ora Parameters: This section shows the original init.ora parameters for the instance during
the snapshot period.

There would be more Sections in case of RAC setups to provide details.
}}}


''A SQL Performance History from AWR''
http://www.toadworld.com/BLOGS/tabid/67/EntryId/125/A-SQL-Performance-History-from-AWR.aspx  <-- This could also be possible to graph using my awr_topsqlx.sql

''miTrend AWR Report / StatsPack Gathering Procedures Instructions'' https://community.emc.com/docs/DOC-13949 <-- EMCs tool with nice PPT and paper, also talks about "burst" periods for IO sizing, raid adjusted IOPS, EFDs IOPS

http://pavandba.files.wordpress.com/2009/11/owp_awr_historical_analysis.pdf







{{{
set arraysize 5000

COLUMN dbid NEW_VALUE _dbid NOPRINT
select dbid from v$database;

COLUMN instancenumber NEW_VALUE _instancenumber NOPRINT
select instance_number instancenumber from v$instance;

ttitle center 'AWR Top SQL Report' skip 2
set pagesize 50000
set linesize 300

col snap_id     format 99999            heading "Snap|ID"
col tm          format a15              heading "Snap|Start|Time"
col inst        format 90               heading "i|n|s|t|#"
col dur         format 990.00          heading "Snap|Dur|(m)"
col sql_id      format a15              heading "SQL|ID"
col phv         format 99999999999      heading "Plan|Hash|Value"
col module      format a20              heading "Module"
col elap        format 999990.00        heading "Elapsed|Time|(s)"
col elapexec    format 999990.00        heading "Elapsed|Time|per exec|(s)"
col cput        format 999990.00        heading "CPU|Time|(s)"
col iowait      format 999990.00        heading "IO|Wait|(s)"
col bget        format 99999999990      heading "LIO"
col dskr        format 99999999990      heading "PIO"
col rowp        format 99999999990      heading "Rows"
col exec        format 9999990          heading "Exec"
col prsc        format 999999990        heading "Parse|Count"
col pxexec      format 9999990          heading "PX|Exec"
col pctdbt      format 990              heading "DB Time|%"
col aas         format 990.00           heading "A|A|S"
col time_rank   format 90               heading "Time|Rank"
col sql_text    format a40              heading "SQL|Text"

     select *
       from (
             select
                  sqt.snap_id snap_id,
                  TO_CHAR(sqt.tm,'MM/DD/YY HH24:MI') tm,
                  sqt.inst inst,
                  sqt.dur dur,
                  sqt.sql_id sql_id,   
                  sqt.phv phv,                
                  to_clob(decode(sqt.module, null, null, sqt.module)) module,
                  nvl((sqt.elap), to_number(null)) elap,
                  nvl((sqt.elapexec), to_number(null)) elapexec,
                  nvl((sqt.cput), to_number(null)) cput,
                  sqt.iowait iowait,
                  sqt.bget bget, 
                  sqt.dskr dskr, 
                  sqt.rowp rowp,
                  sqt.exec exec, 
                  sqt.prsc prsc, 
                  sqt.pxexec pxexec,
                  sqt.aas aas,
                  sqt.time_rank time_rank
                  , nvl(st.sql_text, to_clob('** SQL Text Not Available **')) sql_text     -- PUT/REMOVE COMMENT TO HIDE/SHOW THE SQL_TEXT
             from        (
                          select snap_id, tm, inst, dur, sql_id, phv, module, elap, elapexec, cput, iowait, bget, dskr, rowp, exec, prsc, pxexec, aas, time_rank
                          from
                                             (
                                               select 
                                                      s0.snap_id snap_id,
                                                      s0.END_INTERVAL_TIME tm,
                                                      s0.instance_number inst,
                                                      round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                                              + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                                              + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                                              + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2) dur,
                                                      e.sql_id sql_id, 
                                                      e.plan_hash_value phv, 
                                                      max(e.module) module,
                                                      sum(e.elapsed_time_delta)/1000000 elap,
                                                      decode((sum(e.executions_delta)), 0, to_number(null), ((sum(e.elapsed_time_delta)) / (sum(e.executions_delta)) / 1000000)) elapexec,
                                                      sum(e.cpu_time_delta)/1000000     cput, 
                                                      sum(e.iowait_delta)/1000000 iowait,
                                                      sum(e.buffer_gets_delta) bget,
                                                      sum(e.disk_reads_delta) dskr, 
                                                      sum(e.rows_processed_delta) rowp,
                                                      sum(e.executions_delta)   exec,
                                                      sum(e.parse_calls_delta) prsc,
                                                      sum(px_servers_execs_delta) pxexec,
                                                      (sum(e.elapsed_time_delta)/1000000) / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                                                                            + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                                                                            + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                                                                            + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2))*60) aas,
                                                      DENSE_RANK() OVER (
                                                      PARTITION BY s0.snap_id ORDER BY e.elapsed_time_delta DESC) time_rank
                                               from 
                                                   dba_hist_snapshot s0,
                                                   dba_hist_snapshot s1,
                                                   dba_hist_sqlstat e
                                                   where 
                                                    s0.dbid                   = &_dbid                -- CHANGE THE DBID HERE!
                                                    AND s1.dbid               = s0.dbid
                                                    and e.dbid                = s0.dbid                                                
                                                    AND s0.instance_number    = &_instancenumber      -- CHANGE THE INSTANCE_NUMBER HERE!
                                                    AND s1.instance_number    = s0.instance_number
                                                    and e.instance_number     = s0.instance_number                                                 
                                                    AND s1.snap_id            = s0.snap_id + 1
                                                    and e.snap_id             = s0.snap_id + 1                                              
                                               group by 
                                                    s0.snap_id, s0.END_INTERVAL_TIME, s0.instance_number, e.sql_id, e.plan_hash_value, e.elapsed_time_delta, s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME
                                             )
                          where 
                          time_rank <= 5                                     -- GET TOP 5 SQL ACROSS SNAP_IDs... YOU CAN ALTER THIS TO HAVE MORE DATA POINTS
                         ) 
                        sqt,
                        dba_hist_sqltext st 
             where st.sql_id(+)             = sqt.sql_id
             and st.dbid(+)                 = &_dbid
-- AND TO_CHAR(tm,'D') >= 1                                                  -- Day of week: 1=Sunday 7=Saturday
-- AND TO_CHAR(tm,'D') <= 7
-- AND TO_CHAR(tm,'HH24MI') >= 0900                                          -- Hour
-- AND TO_CHAR(tm,'HH24MI') <= 1800
-- AND tm >= TO_DATE('2010-jan-17 00:00:00','yyyy-mon-dd hh24:mi:ss')     -- Data range
-- AND tm <= TO_DATE('2010-aug-22 23:59:59','yyyy-mon-dd hh24:mi:ss')
-- AND snap_id in (338,339)
-- AND snap_id >= 335 and snap_id <= 339
-- AND snap_id = 3172
-- and sqt.sql_id = 'dj3n91vxsyaq5'
-- AND lower(st.sql_text) like 'select%'
-- AND lower(st.sql_text) like 'insert%'
-- AND lower(st.sql_text) like 'update%'
-- AND lower(st.sql_text) like 'merge%'
-- AND pxexec > 0
-- AND aas > .5
             order by 
             -- snap_id                             -- TO GET SQL OUTPUT ACROSS SNAP_IDs SEQUENTIALLY AND ASC
             nvl(sqt.elap, -1) desc, sqt.sql_id     -- TO GET SQL OUTPUT BY ELAPSED TIME
             )
where rownum <= 20
;
}}}
{{{
set arraysize 5000

COLUMN blocksize NEW_VALUE _blocksize NOPRINT
select distinct block_size blocksize from v$datafile;

COLUMN dbid NEW_VALUE _dbid NOPRINT
select dbid from v$database;

COLUMN name NEW_VALUE _instname NOPRINT
select lower(instance_name) name from v$instance;

COLUMN name NEW_VALUE _hostname NOPRINT
select lower(host_name) name from v$instance;

COLUMN instancenumber NEW_VALUE _instancenumber NOPRINT
select instance_number instancenumber from v$instance;

-- ttitle center 'AWR CPU and IO Workload Report' skip 2
set pagesize 50000
set linesize 550

col instname    format a15              heading instname        -- instname
col hostname    format a30              heading hostname        -- hostname
col tm          format a17              heading tm              -- "tm"
col id          format 99999            heading id              -- "snapid"
col inst        format 90               heading inst            -- "inst"
col dur         format 999990.00        heading dur             -- "dur"
col cpu         format 90               heading cpu             -- "cpu"
col cap         format 9999990.00       heading cap             -- "capacity"
col dbt         format 999990.00        heading dbt             -- "DBTime"
col dbc         format 99990.00         heading dbc             -- "DBcpu"
col bgc         format 99990.00         heading bgc             -- "BGcpu"
col rman        format 9990.00          heading rman            -- "RMANcpu"
col aas         format 990.0            heading aas             -- "AAS"
col totora      format 9999990.00       heading totora          -- "TotalOracleCPU"
col busy        format 9999990.00       heading busy            -- "BusyTime"
col load        format 990.00           heading load            -- "OSLoad"
col totos       format 9999990.00       heading totos           -- "TotalOSCPU"
col mem         format 999990.00        heading mem             -- "PhysicalMemorymb"
col IORs        format 9990.000         heading IORs            -- "IOPsr"
col IOWs        format 9990.000         heading IOWs            -- "IOPsw"
col IORedo      format 9990.000         heading IORedo          -- "IOPsredo"
col IORmbs      format 9990.000         heading IORmbs          -- "IOrmbs"
col IOWmbs      format 9990.000         heading IOWmbs          -- "IOwmbs"
col redosizesec format 9990.000         heading redosizesec     -- "Redombs"
col logons      format 990              heading logons          -- "Sess"
col logone      format 990              heading logone          -- "SessEnd"
col exsraw      format 99990.000        heading exsraw          -- "Execrawdelta"
col exs         format 9990.000         heading exs             -- "Execs"
col ucs         format 9990.000         heading ucs             -- "UserCalls"
col ucoms       format 9990.000         heading ucoms           -- "Commit"
col urs         format 9990.000         heading urs             -- "Rollback"
col oracpupct   format 990              heading oracpupct       -- "OracleCPUPct"
col rmancpupct  format 990              heading rmancpupct      -- "RMANCPUPct"
col oscpupct    format 990              heading oscpupct        -- "OSCPUPct"
col oscpuusr    format 990              heading oscpuusr        -- "USRPct"
col oscpusys    format 990              heading oscpusys        -- "SYSPct"
col oscpuio     format 990              heading oscpuio         -- "IOPct"

SELECT * FROM
( 
  SELECT trim('&_instname') instname, 
         trim('&_dbid') db_id, 
         trim('&_hostname') hostname, 
          s0.snap_id id,
         TO_CHAR(s0.END_INTERVAL_TIME,'MM/DD/YY HH24:MI:SS') tm,
         s0.instance_number inst,
  round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2) dur,
  s3t1.value AS cpu,
  (round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2)*60)*s3t1.value cap,
  (s5t1.value - s5t0.value) / 1000000 as dbt,
  (s6t1.value - s6t0.value) / 1000000 as dbc,
  (s7t1.value - s7t0.value) / 1000000 as bgc,
  round(DECODE(s8t1.value,null,'null',(s8t1.value - s8t0.value) / 1000000),2) as rman,
  ((s5t1.value - s5t0.value) / 1000000)/60 /  round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2) aas,
  round(((s6t1.value - s6t0.value) / 1000000) + ((s7t1.value - s7t0.value) / 1000000),2) totora,
  -- s1t1.value - s1t0.value AS busy,  -- this is osstat BUSY_TIME
  round(s2t1.value,2) AS load,
  (s1t1.value - s1t0.value)/100 AS totos,
  ((round(((s6t1.value - s6t0.value) / 1000000) + ((s7t1.value - s7t0.value) / 1000000),2)) / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                                                                              + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                                                                              + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                                                                              + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2)*60)*s3t1.value))*100 as oracpupct,
  ((round(DECODE(s8t1.value,null,'null',(s8t1.value - s8t0.value) / 1000000),2)) / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                                                                              + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                                                                              + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                                                                              + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2)*60)*s3t1.value))*100 as rmancpupct,
  (((s1t1.value - s1t0.value)/100) / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                                                                              + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                                                                              + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                                                                              + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2)*60)*s3t1.value))*100 as oscpupct,
  (((s17t1.value - s17t0.value)/100) / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                                                                              + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                                                                              + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                                                                              + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2)*60)*s3t1.value))*100 as oscpuusr,
  (((s18t1.value - s18t0.value)/100) / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                                                                              + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                                                                              + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                                                                              + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2)*60)*s3t1.value))*100 as oscpusys,
  (((s19t1.value - s19t0.value)/100) / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                                                                              + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                                                                              + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                                                                              + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2)*60)*s3t1.value))*100 as oscpuio
FROM dba_hist_snapshot s0,
  dba_hist_snapshot s1,
  dba_hist_osstat s1t0,         -- BUSY_TIME
  dba_hist_osstat s1t1,
  dba_hist_osstat s17t0,        -- USER_TIME
  dba_hist_osstat s17t1,
  dba_hist_osstat s18t0,        -- SYS_TIME
  dba_hist_osstat s18t1,
  dba_hist_osstat s19t0,        -- IOWAIT_TIME
  dba_hist_osstat s19t1,
  dba_hist_osstat s2t1,         -- osstat just get the end value
  dba_hist_osstat s3t1,         -- osstat just get the end value
  dba_hist_sys_time_model s5t0,
  dba_hist_sys_time_model s5t1,
  dba_hist_sys_time_model s6t0,
  dba_hist_sys_time_model s6t1,
  dba_hist_sys_time_model s7t0,
  dba_hist_sys_time_model s7t1,
  dba_hist_sys_time_model s8t0,
  dba_hist_sys_time_model s8t1
WHERE s0.dbid            = &_dbid    -- CHANGE THE DBID HERE!
AND s1.dbid              = s0.dbid
AND s1t0.dbid            = s0.dbid
AND s1t1.dbid            = s0.dbid
AND s2t1.dbid            = s0.dbid
AND s3t1.dbid            = s0.dbid
AND s5t0.dbid            = s0.dbid
AND s5t1.dbid            = s0.dbid
AND s6t0.dbid            = s0.dbid
AND s6t1.dbid            = s0.dbid
AND s7t0.dbid            = s0.dbid
AND s7t1.dbid            = s0.dbid
AND s8t0.dbid            = s0.dbid
AND s8t1.dbid            = s0.dbid
AND s17t0.dbid            = s0.dbid
AND s17t1.dbid            = s0.dbid
AND s18t0.dbid            = s0.dbid
AND s18t1.dbid            = s0.dbid
AND s19t0.dbid            = s0.dbid
AND s19t1.dbid            = s0.dbid
AND s0.instance_number   = &_instancenumber   -- CHANGE THE INSTANCE_NUMBER HERE!
AND s1.instance_number   = s0.instance_number
AND s1t0.instance_number = s0.instance_number
AND s1t1.instance_number = s0.instance_number
AND s2t1.instance_number = s0.instance_number
AND s3t1.instance_number = s0.instance_number
AND s5t0.instance_number = s0.instance_number
AND s5t1.instance_number = s0.instance_number
AND s6t0.instance_number = s0.instance_number
AND s6t1.instance_number = s0.instance_number
AND s7t0.instance_number = s0.instance_number
AND s7t1.instance_number = s0.instance_number
AND s8t0.instance_number = s0.instance_number
AND s8t1.instance_number = s0.instance_number
AND s17t0.instance_number = s0.instance_number
AND s17t1.instance_number = s0.instance_number
AND s18t0.instance_number = s0.instance_number
AND s18t1.instance_number = s0.instance_number
AND s19t0.instance_number = s0.instance_number
AND s19t1.instance_number = s0.instance_number
AND s1.snap_id           = s0.snap_id + 1
AND s1t0.snap_id         = s0.snap_id
AND s1t1.snap_id         = s0.snap_id + 1
AND s2t1.snap_id         = s0.snap_id + 1
AND s3t1.snap_id         = s0.snap_id + 1
AND s5t0.snap_id         = s0.snap_id
AND s5t1.snap_id         = s0.snap_id + 1
AND s6t0.snap_id         = s0.snap_id
AND s6t1.snap_id         = s0.snap_id + 1
AND s7t0.snap_id         = s0.snap_id
AND s7t1.snap_id         = s0.snap_id + 1
AND s8t0.snap_id         = s0.snap_id
AND s8t1.snap_id         = s0.snap_id + 1
AND s17t0.snap_id         = s0.snap_id
AND s17t1.snap_id         = s0.snap_id + 1
AND s18t0.snap_id         = s0.snap_id
AND s18t1.snap_id         = s0.snap_id + 1
AND s19t0.snap_id         = s0.snap_id
AND s19t1.snap_id         = s0.snap_id + 1
AND s1t0.stat_name       = 'BUSY_TIME'
AND s1t1.stat_name       = s1t0.stat_name
AND s17t0.stat_name       = 'USER_TIME'
AND s17t1.stat_name       = s17t0.stat_name
AND s18t0.stat_name       = 'SYS_TIME'
AND s18t1.stat_name       = s18t0.stat_name
AND s19t0.stat_name       = 'IOWAIT_TIME'
AND s19t1.stat_name       = s19t0.stat_name
AND s2t1.stat_name       = 'LOAD'
AND s3t1.stat_name       = 'NUM_CPUS'
AND s5t0.stat_name       = 'DB time'
AND s5t1.stat_name       = s5t0.stat_name
AND s6t0.stat_name       = 'DB CPU'
AND s6t1.stat_name       = s6t0.stat_name
AND s7t0.stat_name       = 'background cpu time'
AND s7t1.stat_name       = s7t0.stat_name
AND s8t0.stat_name       = 'RMAN cpu time (backup/restore)'
AND s8t1.stat_name       = s8t0.stat_name
)
-- WHERE 
-- tm > to_char(sysdate - 30, 'MM/DD/YY HH24:MI')
-- id  in (select snap_id from (select * from r2toolkit.r2_regression_data union all select * from r2toolkit.r2_outlier_data))
-- id in (336)
-- aas > 1
-- oracpupct > 50
-- oscpupct > 50
-- AND TO_CHAR(s0.END_INTERVAL_TIME,'D') >= 1     -- Day of week: 1=Sunday 7=Saturday
-- AND TO_CHAR(s0.END_INTERVAL_TIME,'D') <= 7
-- AND TO_CHAR(s0.END_INTERVAL_TIME,'HH24MI') >= 0900     -- Hour
-- AND TO_CHAR(s0.END_INTERVAL_TIME,'HH24MI') <= 1800
-- AND s0.END_INTERVAL_TIME >= TO_DATE('2010-jan-17 00:00:00','yyyy-mon-dd hh24:mi:ss')     -- Data range
-- AND s0.END_INTERVAL_TIME <= TO_DATE('2010-aug-22 23:59:59','yyyy-mon-dd hh24:mi:ss')
ORDER BY id ASC;
}}}
{{{

-- TO VIEW DB INFO
set lines 300
select dbid,instance_number,version,db_name,instance_name, host_name 
from dba_hist_database_instance 
where instance_number = (select instance_number from v$instance)
and rownum < 2;

-- TO VIEW RETENTION INFORMATION
select * from dba_hist_wr_control;
set lines 300
select b.name, a.DBID,
   ((TRUNC(SYSDATE) + a.SNAP_INTERVAL - TRUNC(SYSDATE)) * 86400)/60 AS SNAP_INTERVAL_MINS,
   ((TRUNC(SYSDATE) + a.RETENTION - TRUNC(SYSDATE)) * 86400)/60 AS RETENTION_MINS,
   ((TRUNC(SYSDATE) + a.RETENTION - TRUNC(SYSDATE)) * 86400)/60/60/24 AS RETENTION_DAYS,
   TOPNSQL
from dba_hist_wr_control a, v$database b
where a.dbid = b.dbid;

/*
-- SET RETENTION PEROID TO 31 DAYS (UNIT IS MINUTES)
execute dbms_workload_repository.modify_snapshot_settings (interval => 30, retention => 43200);
-- SET RETENTION PEROID TO 365 DAYS (UNIT IS MINUTES)
exec dbms_workload_repository.modify_snapshot_settings (interval => 30, retention => 525600);

-- Create Snapshot
BEGIN
  DBMS_WORKLOAD_REPOSITORY.CREATE_SNAPSHOT ();
END;
/
*/

-- AWR get recent snapshot
set lines 300
select * from 
(SELECT s0.instance_number, s0.snap_id, 
  to_char(s0.startup_time,'yyyy-mon-dd hh24:mi:ss') startup_time,
  TO_CHAR(s0.END_INTERVAL_TIME,'yyyy-mon-dd hh24:mi:ss') snap_start,
  TO_CHAR(s1.END_INTERVAL_TIME,'yyyy-mon-dd hh24:mi:ss') snap_end,
  round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2) ela_min
FROM dba_hist_snapshot s0,
  dba_hist_snapshot s1
WHERE s1.snap_id           = s0.snap_id + 1
ORDER BY snap_id DESC)
where rownum < 11;

-- MIN/MAX for dba_hist tables
select count(*) snap_count from dba_hist_snapshot;
select min(snap_id) min_snap, max(snap_id) max_snap from dba_hist_snapshot;
select to_char(min(end_interval_time),'yyyy-mon-dd hh24:mi:ss') min_date, to_char(max(end_interval_time),'yyyy-mon-dd hh24:mi:ss') max_date from dba_hist_snapshot;


/*
-- STATSPACK get recent snapshot
	  set lines 300
	  col what format a30
	  set numformat 999999999999999
	  alter session set NLS_DATE_FORMAT='DD-MON-YYYY HH24:MI:SS';
	  select sysdate from dual;
	  select instance, what, job, next_date, next_sec from user_jobs;
	  select * from 
	      (select 
		    s0.instance_number, s0.snap_id snap_id, s0.startup_time,
		    to_char(s0.snap_time,'YYYY-Mon-DD HH24:MI:SS') snap_start,
		    to_char(s1.snap_time,'YYYY-Mon-DD HH24:MI:SS') snap_end,
		    (s1.snap_time-s0.snap_time)*24*60 ela_min,
		    s0.dbid, s0.snap_level, s0.snapshot_exec_time_s 
	      from	stats$snapshot s0,
		      stats$snapshot s1
	      where s1.snap_id  = s0.snap_id + 1
	      ORDER BY s0.snap_id DESC)
	      where rownum < 11;


-- MIN/MAX for statspack tables
col min_dt format a14
col max_dt format a14
col host_name format a12
select	
	t1.dbid, 
	t1.instance_number,
        t2.version,
        t2.db_name,
	t2.instance_name,
        t2.host_name,
	min(to_char(t1.snap_time,'YYYY-Mon-DD HH24')) min_dt,
	max(to_char(t1.snap_time,'YYYY-Mon-DD HH24')) max_dt
from	stats$snapshot t1,
        stats$database_instance t2
where   t1.dbid = t2.dbid
  and   t1.snap_id = t2.snap_id
group by
	t1.dbid, 
	t1.instance_number,
        t2.version,
        t2.db_name,
	t2.instance_name,
        t2.host_name
/
*/


/*
AWR reports:

Running Workload Repository Reports Using Enterprise Manager
Running Workload Repository Compare Period Report Using Enterprise Manager
Running Workload Repository Reports Using SQL Scripts



Running Workload Repository Reports Using SQL Scripts
-----------------------------------------------------

You can view AWR reports by running the following SQL scripts:

The @?/rdbms/admin/awrrpt.sql SQL script generates an HTML or text report that displays statistics for a range of snapshot Ids.

The awrrpti.sql SQL script generates an HTML or text report that displays statistics for a range of snapshot Ids on 
a specified database and instance.

The awrsqrpt.sql SQL script generates an HTML or text report that displays statistics of a particular SQL statement for a 
range of snapshot Ids. Run this report to inspect or debug the performance of a SQL statement.

The awrsqrpi.sql SQL script generates an HTML or text report that displays statistics of a particular SQL statement for a 
range of snapshot Ids on a specified database and instance. Run this report to inspect or debug the performance of a SQL statement on a specific database and instance.

The awrddrpt.sql SQL script generates an HTML or text report that compares detailed performance attributes and configuration 
settings between two selected time periods.

The awrddrpi.sql SQL script generates an HTML or text report that compares detailed performance attributes and configuration 
settings between two selected time periods on a specific database and instance.

awrsqrpt.sql -- SQL performance report
*/

}}}
{{{
set arraysize 5000

COLUMN blocksize NEW_VALUE _blocksize NOPRINT
select distinct block_size blocksize from v$datafile;

COLUMN dbid NEW_VALUE _dbid NOPRINT
select dbid from v$database;

COLUMN name NEW_VALUE _instname NOPRINT
select lower(instance_name) name from v$instance;

COLUMN name NEW_VALUE _hostname NOPRINT
select lower(host_name) name from v$instance;

COLUMN instancenumber NEW_VALUE _instancenumber NOPRINT
select instance_number instancenumber from v$instance;

-- ttitle center 'AWR IO Workload Report' skip 2
set pagesize 50000
set linesize 550

col instname       format a15              heading instname            -- instname
col hostname       format a30              heading hostname            -- hostname
col tm             format a17              heading tm                  -- "tm"
col id             format 99999            heading id                  -- "snapid"
col inst           format 90               heading inst                -- "inst"
col dur            format 999990.00        heading dur                 -- "dur"
col cpu            format 90               heading cpu                 -- "cpu"
col cap            format 9999990.00       heading cap                 -- "capacity"
col dbt            format 999990.00        heading dbt                 -- "DBTime"
col dbc            format 99990.00         heading dbc                 -- "DBcpu"
col bgc            format 99990.00         heading bgc                 -- "BGcpu"
col rman           format 9990.00          heading rman                -- "RMANcpu"
col aas            format 990.0            heading aas                 -- "AAS"
col totora         format 9999990.00       heading totora              -- "TotalOracleCPU"
col busy           format 9999990.00       heading busy                -- "BusyTime"
col load           format 990.00           heading load                -- "OSLoad"
col totos          format 9999990.00       heading totos               -- "TotalOSCPU"
col mem            format 999990.00        heading mem                 -- "PhysicalMemorymb"
col IORs           format 99990.000        heading IORs                -- "IOPsr"
col IOWs           format 99990.000        heading IOWs                -- "IOPsw"
col IORedo         format 99990.000        heading IORedo              -- "IOPsredo"
col IORmbs         format 99990.000        heading IORmbs              -- "IOrmbs"
col IOWmbs         format 99990.000        heading IOWmbs              -- "IOwmbs"
col redosizesec    format 99990.000        heading redosizesec         -- "Redombs"
col logons         format 990              heading logons              -- "Sess"
col logone         format 990              heading logone              -- "SessEnd"
col exsraw         format 99990.000        heading exsraw              -- "Execrawdelta"
col exs            format 9990.000         heading exs                 -- "Execs"
col oracpupct      format 990              heading oracpupct           -- "OracleCPUPct"
col rmancpupct     format 990              heading rmancpupct          -- "RMANCPUPct"
col oscpupct       format 990              heading oscpupct            -- "OSCPUPct"
col oscpuusr       format 990              heading oscpuusr            -- "USRPct"
col oscpusys       format 990              heading oscpusys            -- "SYSPct"
col oscpuio        format 990              heading oscpuio             -- "IOPct"
col SIORs          format 99990.000        heading SIORs               -- "IOPsSingleBlockr"
col MIORs          format 99990.000        heading MIORs               -- "IOPsMultiBlockr"
col TIORmbs        format 99990.000        heading TIORmbs             -- "Readmbs"
col SIOWs          format 99990.000        heading SIOWs               -- "IOPsSingleBlockw"
col MIOWs          format 99990.000        heading MIOWs               -- "IOPsMultiBlockw"
col TIOWmbs        format 99990.000        heading TIOWmbs             -- "Writembs"
col TIOR           format 99990.000        heading TIOR                -- "TotalIOPsr"
col TIOW           format 99990.000        heading TIOW                -- "TotalIOPsw"
col TIOALL         format 99990.000        heading TIOALL              -- "TotalIOPsALL"
col ALLRmbs        format 99990.000        heading ALLRmbs             -- "TotalReadmbs"
col ALLWmbs        format 99990.000        heading ALLWmbs             -- "TotalWritembs"
col GRANDmbs       format 99990.000        heading GRANDmbs            -- "TotalmbsALL"
col readratio      format 990              heading readratio           -- "ReadRatio"
col writeratio     format 990              heading writeratio          -- "WriteRatio"
col diskiops       format 99990.000        heading diskiops            -- "HWDiskIOPs"
col numdisks       format 99990.000        heading numdisks            -- "HWNumofDisks"
col flashcache     format 990              heading flashcache          -- "FlashCacheHitsPct"
col cellpiob       format 99990.000        heading cellpiob            -- "CellPIOICmbs"
col cellpiobss     format 99990.000        heading cellpiobss          -- "CellPIOICSmartScanmbs"
col cellpiobpreoff format 99990.000        heading cellpiobpreoff      -- "CellPIOpredoffloadmbs"
col cellpiobsi     format 99990.000        heading cellpiobsi          -- "CellPIOstorageindexmbs"
col celliouncomb   format 99990.000        heading celliouncomb        -- "CellIOuncompmbs"
col cellpiobs      format 99990.000        heading cellpiobs           -- "CellPIOsavedfilecreationmbs"
col cellpiobsrman  format 99990.000        heading cellpiobsrman       -- "CellPIOsavedRMANfilerestorembs"

SELECT * FROM
( 
  SELECT trim('&_instname') instname, 
         trim('&_dbid') db_id, 
         trim('&_hostname') hostname, 
         s0.snap_id id,
         TO_CHAR(s0.END_INTERVAL_TIME,'MM/DD/YY HH24:MI:SS') tm,
         s0.instance_number inst,
  round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2) dur,
   (((s20t1.value - s20t0.value) - (s21t1.value - s21t0.value)) / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2))*60)
    ) as SIORs,
   ((s21t1.value - s21t0.value) / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2))*60)
    ) as MIORs,
   (((s22t1.value - s22t0.value)/1024/1024) / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2))*60)
    ) as TIORmbs,
   (((s23t1.value - s23t0.value) - (s24t1.value - s24t0.value)) / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2))*60)
    ) as SIOWs,
   ((s24t1.value - s24t0.value) / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2))*60)
    ) as MIOWs,
   (((s25t1.value - s25t0.value)/1024/1024) / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2))*60)
    ) as TIOWmbs,
   ((s13t1.value - s13t0.value)  / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2))*60)
    ) as IORedo, 
   (((s14t1.value - s14t0.value)/1024/1024)  / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2))*60)
    ) as redosizesec,
    ((s33t1.value - s33t0.value) / (s20t1.value - s20t0.value))*100 as flashcache,
   (((s26t1.value - s26t0.value)/1024/1024) / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2))*60)
    ) as cellpiob,
   (((s31t1.value - s31t0.value)/1024/1024) / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2))*60)
    ) as cellpiobss,
   (((s29t1.value - s29t0.value)/1024/1024) / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2))*60)
    ) as cellpiobpreoff,
   (((s30t1.value - s30t0.value)/1024/1024) / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2))*60)
    ) as cellpiobsi,
   (((s32t1.value - s32t0.value)/1024/1024) / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2))*60)
    ) as celliouncomb,
   (((s27t1.value - s27t0.value)/1024/1024) / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2))*60)
    ) as cellpiobs,
   (((s28t1.value - s28t0.value)/1024/1024) / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2))*60)
    ) as cellpiobsrman
FROM dba_hist_snapshot s0,
  dba_hist_snapshot s1,
  dba_hist_sysstat s13t0,       -- redo writes, diffed
  dba_hist_sysstat s13t1,
  dba_hist_sysstat s14t0,       -- redo size, diffed
  dba_hist_sysstat s14t1,
  dba_hist_sysstat s20t0,       -- physical read total IO requests, diffed
  dba_hist_sysstat s20t1,
  dba_hist_sysstat s21t0,       -- physical read total multi block requests, diffed
  dba_hist_sysstat s21t1,  
  dba_hist_sysstat s22t0,       -- physical read total bytes, diffed
  dba_hist_sysstat s22t1,  
  dba_hist_sysstat s23t0,       -- physical write total IO requests, diffed
  dba_hist_sysstat s23t1,
  dba_hist_sysstat s24t0,       -- physical write total multi block requests, diffed
  dba_hist_sysstat s24t1,
  dba_hist_sysstat s25t0,       -- physical write total bytes, diffed
  dba_hist_sysstat s25t1,
  dba_hist_sysstat s26t0,       -- cell physical IO interconnect bytes, diffed, cellpiob
  dba_hist_sysstat s26t1,
  dba_hist_sysstat s27t0,       -- cell physical IO bytes saved during optimized file creation, diffed, cellpiobs
  dba_hist_sysstat s27t1,
  dba_hist_sysstat s28t0,       -- cell physical IO bytes saved during optimized RMAN file restore, diffed, cellpiobsrman
  dba_hist_sysstat s28t1,
  dba_hist_sysstat s29t0,       -- cell physical IO bytes eligible for predicate offload, diffed, cellpiobpreoff
  dba_hist_sysstat s29t1,
  dba_hist_sysstat s30t0,       -- cell physical IO bytes saved by storage index, diffed, cellpiobsi
  dba_hist_sysstat s30t1,
  dba_hist_sysstat s31t0,       -- cell physical IO interconnect bytes returned by smart scan, diffed, cellpiobss
  dba_hist_sysstat s31t1,
  dba_hist_sysstat s32t0,       -- cell IO uncompressed bytes, diffed, celliouncomb
  dba_hist_sysstat s32t1,
  dba_hist_sysstat s33t0,       -- cell flash cache read hits
  dba_hist_sysstat s33t1
WHERE s0.dbid            = &_dbid    -- CHANGE THE DBID HERE!
AND s1.dbid              = s0.dbid
AND s13t0.dbid            = s0.dbid
AND s13t1.dbid            = s0.dbid
AND s14t0.dbid            = s0.dbid
AND s14t1.dbid            = s0.dbid
AND s20t0.dbid            = s0.dbid
AND s20t1.dbid            = s0.dbid
AND s21t0.dbid            = s0.dbid
AND s21t1.dbid            = s0.dbid
AND s22t0.dbid            = s0.dbid
AND s22t1.dbid            = s0.dbid
AND s23t0.dbid            = s0.dbid
AND s23t1.dbid            = s0.dbid
AND s24t0.dbid            = s0.dbid
AND s24t1.dbid            = s0.dbid
AND s25t0.dbid            = s0.dbid
AND s25t1.dbid            = s0.dbid
AND s26t0.dbid            = s0.dbid
AND s26t1.dbid            = s0.dbid
AND s27t0.dbid            = s0.dbid
AND s27t1.dbid            = s0.dbid
AND s28t0.dbid            = s0.dbid
AND s28t1.dbid            = s0.dbid
AND s29t0.dbid            = s0.dbid
AND s29t1.dbid            = s0.dbid
AND s30t0.dbid            = s0.dbid
AND s30t1.dbid            = s0.dbid
AND s31t0.dbid            = s0.dbid
AND s31t1.dbid            = s0.dbid
AND s32t0.dbid            = s0.dbid
AND s32t1.dbid            = s0.dbid
AND s33t0.dbid            = s0.dbid
AND s33t1.dbid            = s0.dbid
AND s0.instance_number   = &_instancenumber   -- CHANGE THE INSTANCE_NUMBER HERE!
AND s1.instance_number   = s0.instance_number
AND s13t0.instance_number = s0.instance_number
AND s13t1.instance_number = s0.instance_number
AND s14t0.instance_number = s0.instance_number
AND s14t1.instance_number = s0.instance_number
AND s20t0.instance_number = s0.instance_number
AND s20t1.instance_number = s0.instance_number
AND s21t0.instance_number = s0.instance_number
AND s21t1.instance_number = s0.instance_number
AND s22t0.instance_number = s0.instance_number
AND s22t1.instance_number = s0.instance_number
AND s23t0.instance_number = s0.instance_number
AND s23t1.instance_number = s0.instance_number
AND s24t0.instance_number = s0.instance_number
AND s24t1.instance_number = s0.instance_number
AND s25t0.instance_number = s0.instance_number
AND s25t1.instance_number = s0.instance_number
AND s26t0.instance_number = s0.instance_number
AND s26t1.instance_number = s0.instance_number
AND s27t0.instance_number = s0.instance_number
AND s27t1.instance_number = s0.instance_number
AND s28t0.instance_number = s0.instance_number
AND s28t1.instance_number = s0.instance_number
AND s29t0.instance_number = s0.instance_number
AND s29t1.instance_number = s0.instance_number
AND s30t0.instance_number = s0.instance_number
AND s30t1.instance_number = s0.instance_number
AND s31t0.instance_number = s0.instance_number
AND s31t1.instance_number = s0.instance_number
AND s32t0.instance_number = s0.instance_number
AND s32t1.instance_number = s0.instance_number
AND s33t0.instance_number = s0.instance_number
AND s33t1.instance_number = s0.instance_number
AND s1.snap_id            = s0.snap_id + 1
AND s13t0.snap_id         = s0.snap_id
AND s13t1.snap_id         = s0.snap_id + 1
AND s14t0.snap_id         = s0.snap_id
AND s14t1.snap_id         = s0.snap_id + 1
AND s20t0.snap_id         = s0.snap_id
AND s20t1.snap_id         = s0.snap_id + 1
AND s21t0.snap_id         = s0.snap_id
AND s21t1.snap_id         = s0.snap_id + 1
AND s22t0.snap_id         = s0.snap_id
AND s22t1.snap_id         = s0.snap_id + 1
AND s23t0.snap_id         = s0.snap_id
AND s23t1.snap_id         = s0.snap_id + 1
AND s24t0.snap_id         = s0.snap_id
AND s24t1.snap_id         = s0.snap_id + 1
AND s25t0.snap_id         = s0.snap_id
AND s25t1.snap_id         = s0.snap_id + 1
AND s26t0.snap_id         = s0.snap_id
AND s26t1.snap_id         = s0.snap_id + 1
AND s27t0.snap_id         = s0.snap_id
AND s27t1.snap_id         = s0.snap_id + 1
AND s28t0.snap_id         = s0.snap_id
AND s28t1.snap_id         = s0.snap_id + 1
AND s29t0.snap_id         = s0.snap_id
AND s29t1.snap_id         = s0.snap_id + 1
AND s30t0.snap_id         = s0.snap_id
AND s30t1.snap_id         = s0.snap_id + 1
AND s31t0.snap_id         = s0.snap_id
AND s31t1.snap_id         = s0.snap_id + 1
AND s32t0.snap_id         = s0.snap_id
AND s32t1.snap_id         = s0.snap_id + 1
AND s33t0.snap_id         = s0.snap_id
AND s33t1.snap_id         = s0.snap_id + 1
AND s13t0.stat_name       = 'redo writes'
AND s13t1.stat_name       = s13t0.stat_name
AND s14t0.stat_name       = 'redo size'
AND s14t1.stat_name       = s14t0.stat_name
AND s20t0.stat_name       = 'physical read total IO requests'
AND s20t1.stat_name       = s20t0.stat_name
AND s21t0.stat_name       = 'physical read total multi block requests'
AND s21t1.stat_name       = s21t0.stat_name
AND s22t0.stat_name       = 'physical read total bytes'
AND s22t1.stat_name       = s22t0.stat_name
AND s23t0.stat_name       = 'physical write total IO requests'
AND s23t1.stat_name       = s23t0.stat_name
AND s24t0.stat_name       = 'physical write total multi block requests'
AND s24t1.stat_name       = s24t0.stat_name
AND s25t0.stat_name       = 'physical write total bytes'
AND s25t1.stat_name       = s25t0.stat_name
AND s26t0.stat_name       = 'cell physical IO interconnect bytes'
AND s26t1.stat_name       = s26t0.stat_name
AND s27t0.stat_name       = 'cell physical IO bytes saved during optimized file creation'
AND s27t1.stat_name       = s27t0.stat_name
AND s28t0.stat_name       = 'cell physical IO bytes saved during optimized RMAN file restore'
AND s28t1.stat_name       = s28t0.stat_name
AND s29t0.stat_name       = 'cell physical IO bytes eligible for predicate offload'
AND s29t1.stat_name       = s29t0.stat_name
AND s30t0.stat_name       = 'cell physical IO bytes saved by storage index'
AND s30t1.stat_name       = s30t0.stat_name
AND s31t0.stat_name       = 'cell physical IO interconnect bytes returned by smart scan'
AND s31t1.stat_name       = s31t0.stat_name
AND s32t0.stat_name       = 'cell IO uncompressed bytes'
AND s32t1.stat_name       = s32t0.stat_name
AND s33t0.stat_name       = 'cell flash cache read hits'
AND s33t1.stat_name       = s33t0.stat_name
)
-- WHERE 
-- tm > to_char(sysdate - 30, 'MM/DD/YY HH24:MI')
-- id  in (select snap_id from (select * from r2toolkit.r2_regression_data union all select * from r2toolkit.r2_outlier_data))
-- id in (338)
-- aas > 1
-- oscpuio > 50
-- rmancpupct > 0
-- AND TO_CHAR(s0.END_INTERVAL_TIME,'D') >= 1     -- Day of week: 1=Sunday 7=Saturday
-- AND TO_CHAR(s0.END_INTERVAL_TIME,'D') <= 7
-- AND TO_CHAR(s0.END_INTERVAL_TIME,'HH24MI') >= 0900     -- Hour
-- AND TO_CHAR(s0.END_INTERVAL_TIME,'HH24MI') <= 1800
-- AND s0.END_INTERVAL_TIME >= TO_DATE('2010-jan-17 00:00:00','yyyy-mon-dd hh24:mi:ss')     -- Data range
-- AND s0.END_INTERVAL_TIME <= TO_DATE('2010-aug-22 23:59:59','yyyy-mon-dd hh24:mi:ss')
ORDER BY id ASC;
}}}
{{{
set arraysize 5000

COLUMN dbid NEW_VALUE _dbid NOPRINT
select dbid from v$database;

COLUMN name NEW_VALUE _instname NOPRINT
select lower(instance_name) name from v$instance;

COLUMN name NEW_VALUE _hostname NOPRINT
select lower(host_name) name from v$instance;

COLUMN instancenumber NEW_VALUE _instancenumber NOPRINT
select instance_number instancenumber from v$instance;

-- ttitle center 'AWR Services Statistics Report' skip 2
set pagesize 50000
set linesize 550

col instname    format a15
col hostname    format a30
col tm          format a15              heading tm           --"Snap|Start|Time"
col id          format 99999            heading id           --"Snap|ID"
col inst        format 90               heading inst         --"i|n|s|t|#"
col dur         format 999990.00        heading dur          --"Snap|Dur|(m)"
col cpu         format 90               heading cpu          --"C|P|U"
col cap         format 9999990.00       heading cap          --"***|Total|CPU|Time|(s)"
col dbt         format 999990.00        heading dbt          --"DB|Time"
col dbc         format 99990.00         heading dbc          --"DB|CPU"
col bgc         format 99990.00         heading bgc          --"Bg|CPU"
col rman        format 9990.00          heading rman         --"RMAN|CPU"
col aas         format 990.0            heading aas          --"A|A|S"
col totora      format 9999990.00       heading totora       --"***|Total|Oracle|CPU|(s)"
col busy        format 9999990.00       heading busy         --"Busy|Time"
col load        format 990.00           heading load         --"OS|Load"
col totos       format 9999990.00       heading totos        --"***|Total|OS|CPU|(s)"
col mem         format 999990.00        heading mem          --"Physical|Memory|(mb)"
col IORs        format 9990.000         heading IORs         --"IOPs|r"
col IOWs        format 9990.000         heading IOWs         --"IOPs|w"
col IORedo      format 9990.000         heading IORedo       --"IOPs|redo"
col IORmbs      format 9990.000         heading IORmbs       --"IO r|(mb)/s"
col IOWmbs      format 9990.000         heading IOWmbs       --"IO w|(mb)/s"
col redosizesec format 9990.000         heading redosizesec  --"Redo|(mb)/s"
col logons      format 990              heading logons       --"Sess"
col logone      format 990              heading logone       --"Sess|End"
col exsraw      format 99990.000        heading exsraw       --"Exec|raw|delta"
col exs         format 9990.000         heading exs          --"Exec|/s"
col oracpupct   format 990              heading oracpupct    --"Oracle|CPU|%"
col rmancpupct  format 990              heading rmancpupct   --"RMAN|CPU|%"
col oscpupct    format 990              heading oscpupct     --"OS|CPU|%"
col oscpuusr    format 990              heading oscpuusr     --"U|S|R|%"
col oscpusys    format 990              heading oscpusys     --"S|Y|S|%"
col oscpuio     format 990              heading oscpuio      --"I|O|%"
col phy_reads   format 99999990.00      heading phy_reads    --"physical|reads"
col log_reads   format 99999990.00      heading log_reads    --"logical|reads"

select  trim('&_instname') instname, trim('&_dbid') db_id, trim('&_hostname') hostname, snap_id,
        TO_CHAR(tm,'MM/DD/YY HH24:MI:SS') tm, 
        inst,
        dur,
        service_name, 
        round(db_time / 1000000, 1) as dbt, 
        round(db_cpu  / 1000000, 1) as dbc,
        phy_reads, 
        log_reads,
        aas
 from (select 
          s1.snap_id,
          s1.tm,
          s1.inst,
          s1.dur,
          s1.service_name, 
          sum(decode(s1.stat_name, 'DB time', s1.diff, 0)) db_time,
          sum(decode(s1.stat_name, 'DB CPU',  s1.diff, 0)) db_cpu,
          sum(decode(s1.stat_name, 'physical reads', s1.diff, 0)) phy_reads,
          sum(decode(s1.stat_name, 'session logical reads', s1.diff, 0)) log_reads,
          round(sum(decode(s1.stat_name, 'DB time', s1.diff, 0))/1000000,1)/60 / s1.dur as aas
   from
     (select s0.snap_id snap_id,
             s0.END_INTERVAL_TIME tm,
             s0.instance_number inst,
            round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2) dur,
             e.service_name     service_name, 
             e.stat_name        stat_name, 
             e.value - b.value  diff
       from dba_hist_snapshot s0,
            dba_hist_snapshot s1,
            dba_hist_service_stat b,
            dba_hist_service_stat e
       where 
         s0.dbid                  = &_dbid            -- CHANGE THE DBID HERE!
         and s1.dbid              = s0.dbid
         and b.dbid               = s0.dbid
         and e.dbid               = s0.dbid
         and s0.instance_number   = &_instancenumber  -- CHANGE THE INSTANCE_NUMBER HERE!
         and s1.instance_number   = s0.instance_number
         and b.instance_number    = s0.instance_number
         and e.instance_number    = s0.instance_number
         and s1.snap_id           = s0.snap_id + 1
         and b.snap_id            = s0.snap_id
         and e.snap_id            = s0.snap_id + 1
         and b.stat_id            = e.stat_id
         and b.service_name_hash  = e.service_name_hash) s1
   group by 
     s1.snap_id, s1.tm, s1.inst, s1.dur, s1.service_name
   order by 
     snap_id asc, aas desc, service_name)
-- where 
-- AND TO_CHAR(tm,'D') >= 1     -- Day of week: 1=Sunday 7=Saturday
-- AND TO_CHAR(tm,'D') <= 7
-- AND TO_CHAR(tm,'HH24MI') >= 0900     -- Hour
-- AND TO_CHAR(tm,'HH24MI') <= 1800
-- AND tm >= TO_DATE('2010-jan-17 00:00:00','yyyy-mon-dd hh24:mi:ss')     -- Data range
-- AND tm <= TO_DATE('2010-aug-22 23:59:59','yyyy-mon-dd hh24:mi:ss')
-- snap_id = 338
-- and snap_id >= 335 and snap_id <= 339
-- aas > .5
;
}}}
{{{
trx/sec = [UCOMS]+[URS]
}}}

{{{
set arraysize 5000

COLUMN blocksize NEW_VALUE _blocksize NOPRINT
select distinct block_size blocksize from v$datafile;

COLUMN dbid NEW_VALUE _dbid NOPRINT
select dbid from v$database;

COLUMN name NEW_VALUE _instname NOPRINT
select lower(instance_name) name from v$instance;

COLUMN name NEW_VALUE _hostname NOPRINT
select lower(host_name) name from v$instance;

COLUMN instancenumber NEW_VALUE _instancenumber NOPRINT
select instance_number instancenumber from v$instance;

-- ttitle center 'AWR CPU and IO Workload Report' skip 2
set pagesize 50000
set linesize 550

col instname    format a15              heading instname        -- instname
col hostname    format a30              heading hostname        -- hostname
col tm          format a17              heading tm              -- "tm"
col id          format 99999            heading id              -- "snapid"
col inst        format 90               heading inst            -- "inst"
col dur         format 999990.00        heading dur             -- "dur"
col cpu         format 90               heading cpu             -- "cpu"
col cap         format 9999990.00       heading cap             -- "capacity"
col dbt         format 999990.00        heading dbt             -- "DBTime"
col dbc         format 99990.00         heading dbc             -- "DBcpu"
col bgc         format 99990.00         heading bgc             -- "BGcpu"
col rman        format 9990.00          heading rman            -- "RMANcpu"
col aas         format 990.0            heading aas             -- "AAS"
col totora      format 9999990.00       heading totora          -- "TotalOracleCPU"
col busy        format 9999990.00       heading busy            -- "BusyTime"
col load        format 990.00           heading load            -- "OSLoad"
col totos       format 9999990.00       heading totos           -- "TotalOSCPU"
col mem         format 999990.00        heading mem             -- "PhysicalMemorymb"
col IORs        format 9990.000         heading IORs            -- "IOPsr"
col IOWs        format 9990.000         heading IOWs            -- "IOPsw"
col IORedo      format 9990.000         heading IORedo          -- "IOPsredo"
col IORmbs      format 9990.000         heading IORmbs          -- "IOrmbs"
col IOWmbs      format 9990.000         heading IOWmbs          -- "IOwmbs"
col redosizesec format 9990.000         heading redosizesec     -- "Redombs"
col logons      format 990              heading logons          -- "Sess"
col logone      format 990              heading logone          -- "SessEnd"
col exsraw      format 99990.000        heading exsraw          -- "Execrawdelta"
col exs         format 9990.000         heading exs             -- "Execs"
col ucs         format 9990.000         heading ucs             -- "UserCalls"
col ucoms       format 9990.000         heading ucoms           -- "Commit"
col urs         format 9990.000         heading urs             -- "Rollback"
col lios        format 9999990.00       heading lios            -- "LIOs"
col oracpupct   format 990              heading oracpupct       -- "OracleCPUPct"
col rmancpupct  format 990              heading rmancpupct      -- "RMANCPUPct"
col oscpupct    format 990              heading oscpupct        -- "OSCPUPct"
col oscpuusr    format 990              heading oscpuusr        -- "USRPct"
col oscpusys    format 990              heading oscpusys        -- "SYSPct"
col oscpuio     format 990              heading oscpuio         -- "IOPct"

SELECT * FROM
( 
  SELECT trim('&_instname') instname, 
         trim('&_dbid') db_id, 
         trim('&_hostname') hostname, 
          s0.snap_id id,
         TO_CHAR(s0.END_INTERVAL_TIME,'MM/DD/YY HH24:MI:SS') tm,
         s0.instance_number inst,
  round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2) dur,
  round(s4t1.value/1024/1024/1024,2) AS memgb,
  round(s37t1.value/1024/1024/1024,2) AS sgagb,
  round(s36t1.value/1024/1024/1024,2) AS pgagb,
     s9t0.value logons, 
   ((s10t1.value - s10t0.value)  / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2))*60)
    ) as exs, 
   ((s40t1.value - s40t0.value)  / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2))*60)
    ) as ucs, 
   ((s38t1.value - s38t0.value)  / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2))*60)
    ) as ucoms, 
   ((s39t1.value - s39t0.value)  / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2))*60)
    ) as urs,
   ((s41t1.value - s41t0.value)  / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2))*60)
    ) as lios
FROM dba_hist_snapshot s0,
  dba_hist_snapshot s1,
  dba_hist_osstat s4t1,         -- osstat just get the end value 
  (select snap_id, dbid, instance_number, sum(value) value from dba_hist_sga group by snap_id, dbid, instance_number) s37t1, -- total SGA allocated, just get the end value
  dba_hist_pgastat s36t1,		-- total PGA allocated, just get the end value 
  dba_hist_sysstat s9t0,        -- logons current, sysstat absolute value should not be diffed
  dba_hist_sysstat s10t0,       -- execute count, diffed
  dba_hist_sysstat s10t1,
  dba_hist_sysstat s38t0,       -- user commits, diffed
  dba_hist_sysstat s38t1,
  dba_hist_sysstat s39t0,       -- user rollbacks, diffed
  dba_hist_sysstat s39t1,
  dba_hist_sysstat s40t0,       -- user calls, diffed
  dba_hist_sysstat s40t1,
  dba_hist_sysstat s41t0,       -- session logical reads, diffed
  dba_hist_sysstat s41t1
WHERE s0.dbid            = &_dbid    -- CHANGE THE DBID HERE!
AND s1.dbid              = s0.dbid
AND s4t1.dbid            = s0.dbid
AND s9t0.dbid            = s0.dbid
AND s10t0.dbid            = s0.dbid
AND s10t1.dbid            = s0.dbid
AND s36t1.dbid            = s0.dbid
AND s37t1.dbid            = s0.dbid
AND s38t0.dbid            = s0.dbid
AND s38t1.dbid            = s0.dbid
AND s39t0.dbid            = s0.dbid
AND s39t1.dbid            = s0.dbid
AND s40t0.dbid            = s0.dbid
AND s40t1.dbid            = s0.dbid
AND s41t0.dbid            = s0.dbid
AND s41t1.dbid            = s0.dbid
AND s0.instance_number   = &_instancenumber   -- CHANGE THE INSTANCE_NUMBER HERE!
AND s1.instance_number   = s0.instance_number
AND s4t1.instance_number = s0.instance_number
AND s9t0.instance_number = s0.instance_number
AND s10t0.instance_number = s0.instance_number
AND s10t1.instance_number = s0.instance_number
AND s36t1.instance_number = s0.instance_number
AND s37t1.instance_number = s0.instance_number
AND s38t0.instance_number = s0.instance_number
AND s38t1.instance_number = s0.instance_number
AND s39t0.instance_number = s0.instance_number
AND s39t1.instance_number = s0.instance_number
AND s40t0.instance_number = s0.instance_number
AND s40t1.instance_number = s0.instance_number
AND s41t0.instance_number = s0.instance_number
AND s41t1.instance_number = s0.instance_number
AND s1.snap_id           = s0.snap_id + 1
AND s4t1.snap_id         = s0.snap_id + 1
AND s36t1.snap_id        = s0.snap_id + 1
AND s37t1.snap_id        = s0.snap_id + 1
AND s9t0.snap_id         = s0.snap_id
AND s10t0.snap_id         = s0.snap_id
AND s10t1.snap_id         = s0.snap_id + 1
AND s38t0.snap_id         = s0.snap_id
AND s38t1.snap_id         = s0.snap_id + 1
AND s39t0.snap_id         = s0.snap_id
AND s39t1.snap_id         = s0.snap_id + 1
AND s40t0.snap_id         = s0.snap_id
AND s40t1.snap_id         = s0.snap_id + 1
AND s41t0.snap_id         = s0.snap_id
AND s41t1.snap_id         = s0.snap_id + 1
AND s4t1.stat_name       = 'PHYSICAL_MEMORY_BYTES'
AND s36t1.name           = 'total PGA allocated'
AND s9t0.stat_name       = 'logons current'
AND s10t0.stat_name       = 'execute count'
AND s10t1.stat_name       = s10t0.stat_name
AND s38t0.stat_name       = 'user commits'
AND s38t1.stat_name       = s38t0.stat_name
AND s39t0.stat_name       = 'user rollbacks'
AND s39t1.stat_name       = s39t0.stat_name
AND s40t0.stat_name       = 'user calls'
AND s40t1.stat_name       = s40t0.stat_name
AND s41t0.stat_name       = 'session logical reads'
AND s41t1.stat_name       = s41t0.stat_name
)
-- WHERE 
-- tm > to_char(sysdate - 30, 'MM/DD/YY HH24:MI')
-- id  in (select snap_id from (select * from r2toolkit.r2_regression_data union all select * from r2toolkit.r2_outlier_data))
-- id in (336)
-- aas > 1
-- oracpupct > 50
-- oscpupct > 50
-- AND TO_CHAR(s0.END_INTERVAL_TIME,'D') >= 1     -- Day of week: 1=Sunday 7=Saturday
-- AND TO_CHAR(s0.END_INTERVAL_TIME,'D') <= 7
-- AND TO_CHAR(s0.END_INTERVAL_TIME,'HH24MI') >= 0900     -- Hour
-- AND TO_CHAR(s0.END_INTERVAL_TIME,'HH24MI') <= 1800
-- AND s0.END_INTERVAL_TIME >= TO_DATE('2010-jan-17 00:00:00','yyyy-mon-dd hh24:mi:ss')     -- Data range
-- AND s0.END_INTERVAL_TIME <= TO_DATE('2010-aug-22 23:59:59','yyyy-mon-dd hh24:mi:ss')
ORDER BY id ASC;
}}}
{{{
set arraysize 5000

COLUMN dbid NEW_VALUE _dbid NOPRINT
select dbid from v$database;

COLUMN name NEW_VALUE _instname NOPRINT
select lower(instance_name) name from v$instance;

COLUMN name NEW_VALUE _hostname NOPRINT
select lower(host_name) name from v$instance;

COLUMN instancenumber NEW_VALUE _instancenumber NOPRINT
select instance_number instancenumber from v$instance;

-- ttitle center 'AWR Top Events Report' skip 2
set pagesize 50000
set linesize 550

col instname    format a15              
col hostname    format a30              
col snap_id     format 99999            heading snap_id       -- "snapid"   
col tm          format a17              heading tm            -- "tm"       
col inst        format 90               heading inst          -- "inst"     
col dur         format 999990.00        heading dur           -- "dur"      
col event       format a55              heading event         -- "Event"    
col event_rank  format 90               heading event_rank    -- "EventRank"
col waits       format 9999999990.00    heading waits         -- "Waits"    
col time        format 9999999990.00    heading time          -- "Timesec"  
col avgwt       format 99990.00         heading avgwt         -- "Avgwtms"  
col pctdbt      format 9990.0           heading pctdbt        -- "DBTimepct"
col aas         format 990.0            heading aas           -- "Aas"      
col wait_class  format a15              heading wait_class    -- "WaitClass"

spool awr_topevents-tableau-&_instname-&_hostname..csv
select trim('&_instname') instname, trim('&_dbid') db_id, trim('&_hostname') hostname, snap_id, tm, inst, dur, event, event_rank, waits, time, avgwt, pctdbt, aas, wait_class
from 
      (select snap_id, TO_CHAR(tm,'MM/DD/YY HH24:MI:SS') tm, inst, dur, event, waits, time, avgwt, pctdbt, aas, wait_class, 
            DENSE_RANK() OVER (
          PARTITION BY snap_id ORDER BY time DESC) event_rank
      from 
              (
              select * from 
                    (select * from 
                          (select 
                            s0.snap_id snap_id,
                            s0.END_INTERVAL_TIME tm,
                            s0.instance_number inst,
                            round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                    + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                    + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                    + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2) dur,
                            e.event_name event,
                            e.total_waits - nvl(b.total_waits,0)       waits,
                            round ((e.time_waited_micro - nvl(b.time_waited_micro,0))/1000000, 2)  time,     -- THIS IS EVENT (sec)
                            round (decode ((e.total_waits - nvl(b.total_waits, 0)), 0, to_number(NULL), ((e.time_waited_micro - nvl(b.time_waited_micro,0))/1000) / (e.total_waits - nvl(b.total_waits,0))), 2) avgwt,
                            ((round ((e.time_waited_micro - nvl(b.time_waited_micro,0))/1000000, 2)) / NULLIF(((s5t1.value - nvl(s5t0.value,0)) / 1000000),0))*100 as pctdbt,     -- THIS IS EVENT (sec) / DB TIME (sec)
                            (round ((e.time_waited_micro - nvl(b.time_waited_micro,0))/1000000, 2))/60 /  round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                                            + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                                            + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                                            + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2) aas,     -- THIS IS EVENT (min) / SnapDur (min) TO GET THE % DB CPU ON AAS
                            e.wait_class wait_class
                            from 
                                 dba_hist_snapshot s0,
                                 dba_hist_snapshot s1,
                                 dba_hist_system_event b,
                                 dba_hist_system_event e,
                                 dba_hist_sys_time_model s5t0,
                                 dba_hist_sys_time_model s5t1
                            where 
                              s0.dbid                   = &_dbid            -- CHANGE THE DBID HERE!
                              AND s1.dbid               = s0.dbid
                              and b.dbid(+)             = s0.dbid
                              and e.dbid                = s0.dbid
                              AND s5t0.dbid             = s0.dbid
                              AND s5t1.dbid             = s0.dbid
                              AND s0.instance_number    = &_instancenumber  -- CHANGE THE INSTANCE_NUMBER HERE!
                              AND s1.instance_number    = s0.instance_number
                              and b.instance_number(+)  = s0.instance_number
                              and e.instance_number     = s0.instance_number
                              AND s5t0.instance_number = s0.instance_number
                              AND s5t1.instance_number = s0.instance_number
                              AND s1.snap_id            = s0.snap_id + 1
                              AND b.snap_id(+)          = s0.snap_id
                              and e.snap_id             = s0.snap_id + 1
                              AND s5t0.snap_id         = s0.snap_id
                              AND s5t1.snap_id         = s0.snap_id + 1
                              AND s5t0.stat_name       = 'DB time'
                              AND s5t1.stat_name       = s5t0.stat_name
                                    and b.event_id            = e.event_id
                                    and e.wait_class          != 'Idle'
                                    and e.total_waits         > nvl(b.total_waits,0)
                                    and e.event_name not in ('smon timer', 
                                                             'pmon timer', 
                                                             'dispatcher timer',
                                                             'dispatcher listen timer',
                                                             'rdbms ipc message')
                                  order by snap_id, time desc, waits desc, event)
                    union all
                              select 
                                       s0.snap_id snap_id,
                                       s0.END_INTERVAL_TIME tm,
                                       s0.instance_number inst,
                                       round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                            + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                            + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                            + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2) dur,
                                        'CPU time',
                                        0,
                                        round ((s6t1.value - s6t0.value) / 1000000, 2) as time,     -- THIS IS DB CPU (sec)
                                        0,
                                        ((round ((s6t1.value - s6t0.value) / 1000000, 2)) / NULLIF(((s5t1.value - nvl(s5t0.value,0)) / 1000000),0))*100 as pctdbt,     -- THIS IS DB CPU (sec) / DB TIME (sec)..TO GET % OF DB CPU ON DB TIME FOR TOP 5 TIMED EVENTS SECTION
                                        (round ((s6t1.value - s6t0.value) / 1000000, 2))/60 /  round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                                                    + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                                                    + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                                                    + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2) aas,  -- THIS IS DB CPU (min) / SnapDur (min) TO GET THE % DB CPU ON AAS
                                        'CPU'
                                      from 
                                        dba_hist_snapshot s0,
                                        dba_hist_snapshot s1,
                                        dba_hist_sys_time_model s6t0,
                                        dba_hist_sys_time_model s6t1,
                                        dba_hist_sys_time_model s5t0,
                                        dba_hist_sys_time_model s5t1
                                      WHERE 
                                      s0.dbid                   = &_dbid              -- CHANGE THE DBID HERE!
                                      AND s1.dbid               = s0.dbid
                                      AND s6t0.dbid            = s0.dbid
                                      AND s6t1.dbid            = s0.dbid
                                      AND s5t0.dbid            = s0.dbid
                                      AND s5t1.dbid            = s0.dbid
                                      AND s0.instance_number    = &_instancenumber    -- CHANGE THE INSTANCE_NUMBER HERE!
                                      AND s1.instance_number    = s0.instance_number
                                      AND s6t0.instance_number = s0.instance_number
                                      AND s6t1.instance_number = s0.instance_number
                                      AND s5t0.instance_number = s0.instance_number
                                      AND s5t1.instance_number = s0.instance_number
                                      AND s1.snap_id            = s0.snap_id + 1
                                      AND s6t0.snap_id         = s0.snap_id
                                      AND s6t1.snap_id         = s0.snap_id + 1
                                      AND s5t0.snap_id         = s0.snap_id
                                      AND s5t1.snap_id         = s0.snap_id + 1
                                      AND s6t0.stat_name       = 'DB CPU'
                                      AND s6t1.stat_name       = s6t0.stat_name
                                      AND s5t0.stat_name       = 'DB time'
                                      AND s5t1.stat_name       = s5t0.stat_name
                    union all
                                      (select 
                                               dbtime.snap_id,
                                               dbtime.tm,
                                               dbtime.inst,
                                               dbtime.dur,
                                               'CPU wait',
                                                0,
                                                round(dbtime.time - accounted_dbtime.time, 2) time,     -- THIS IS UNACCOUNTED FOR DB TIME (sec)
                                                0,
                                                ((dbtime.aas - accounted_dbtime.aas)/ NULLIF(nvl(dbtime.aas,0),0))*100 as pctdbt,     -- THIS IS UNACCOUNTED FOR DB TIME (sec) / DB TIME (sec)
                                                round(dbtime.aas - accounted_dbtime.aas, 2) aas,     -- AAS OF UNACCOUNTED FOR DB TIME
                                                'CPU wait'
                                      from
                                                  (select  
                                                     s0.snap_id, 
                                                     s0.END_INTERVAL_TIME tm,
                                                     s0.instance_number inst,
                                                    round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                                    + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                                    + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                                    + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2) dur,
                                                    'DB time',
                                                    0,
                                                    round ((s5t1.value - s5t0.value) / 1000000, 2) as time,     -- THIS IS DB time (sec)
                                                    0,
                                                    0,
                                                     (round ((s5t1.value - s5t0.value) / 1000000, 2))/60 /  round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                                                                    + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                                                                    + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                                                                    + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2) aas,
                                                    'DB time'
                                                  from 
                                                                    dba_hist_snapshot s0,
                                                                    dba_hist_snapshot s1,
                                                                    dba_hist_sys_time_model s5t0,
                                                                    dba_hist_sys_time_model s5t1
                                                                  WHERE 
                                                                  s0.dbid                   = &_dbid              -- CHANGE THE DBID HERE!
                                                                  AND s1.dbid               = s0.dbid
                                                                  AND s5t0.dbid            = s0.dbid
                                                                  AND s5t1.dbid            = s0.dbid
                                                                  AND s0.instance_number    = &_instancenumber    -- CHANGE THE INSTANCE_NUMBER HERE!
                                                                  AND s1.instance_number    = s0.instance_number
                                                                  AND s5t0.instance_number = s0.instance_number
                                                                  AND s5t1.instance_number = s0.instance_number
                                                                  AND s1.snap_id            = s0.snap_id + 1
                                                                  AND s5t0.snap_id         = s0.snap_id
                                                                  AND s5t1.snap_id         = s0.snap_id + 1
                                                                  AND s5t0.stat_name       = 'DB time'
                                                                  AND s5t1.stat_name       = s5t0.stat_name) dbtime, 
                                                  (select snap_id, sum(time) time, sum(AAS) aas from 
                                                          (select * from (select 
                                                                s0.snap_id snap_id,
                                                                s0.END_INTERVAL_TIME tm,
                                                                s0.instance_number inst,
                                                                round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                                                        + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                                                        + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                                                        + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2) dur,
                                                                e.event_name event,
                                                                e.total_waits - nvl(b.total_waits,0)       waits,
                                                                round ((e.time_waited_micro - nvl(b.time_waited_micro,0))/1000000, 2)  time,     -- THIS IS EVENT (sec)
                                                                round (decode ((e.total_waits - nvl(b.total_waits, 0)), 0, to_number(NULL), ((e.time_waited_micro - nvl(b.time_waited_micro,0))/1000) / (e.total_waits - nvl(b.total_waits,0))), 2) avgwt,
                                                                ((round ((e.time_waited_micro - nvl(b.time_waited_micro,0))/1000000, 2)) / NULLIF(((s5t1.value - nvl(s5t0.value,0)) / 1000000),0))*100 as pctdbt,     -- THIS IS EVENT (sec) / DB TIME (sec)
                                                                (round ((e.time_waited_micro - nvl(b.time_waited_micro,0))/1000000, 2))/60 /  round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                                                                                + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                                                                                + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                                                                                + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2) aas,     -- THIS IS EVENT (min) / SnapDur (min) TO GET THE % DB CPU ON AAS
                                                                e.wait_class wait_class
                                                          from 
                                                               dba_hist_snapshot s0,
                                                               dba_hist_snapshot s1,
                                                               dba_hist_system_event b,
                                                               dba_hist_system_event e,
                                                               dba_hist_sys_time_model s5t0,
                                                               dba_hist_sys_time_model s5t1
                                                          where 
                                                            s0.dbid                   = &_dbid            -- CHANGE THE DBID HERE!
                                                            AND s1.dbid               = s0.dbid
                                                            and b.dbid(+)             = s0.dbid
                                                            and e.dbid                = s0.dbid
                                                            AND s5t0.dbid             = s0.dbid
                                                            AND s5t1.dbid             = s0.dbid
                                                            AND s0.instance_number    = &_instancenumber  -- CHANGE THE INSTANCE_NUMBER HERE!
                                                            AND s1.instance_number    = s0.instance_number
                                                            and b.instance_number(+)  = s0.instance_number
                                                            and e.instance_number     = s0.instance_number
                                                            AND s5t0.instance_number = s0.instance_number
                                                            AND s5t1.instance_number = s0.instance_number
                                                            AND s1.snap_id            = s0.snap_id + 1
                                                            AND b.snap_id(+)          = s0.snap_id
                                                            and e.snap_id             = s0.snap_id + 1
                                                            AND s5t0.snap_id         = s0.snap_id
                                                            AND s5t1.snap_id         = s0.snap_id + 1
                                                      AND s5t0.stat_name       = 'DB time'
                                                      AND s5t1.stat_name       = s5t0.stat_name
                                                            and b.event_id            = e.event_id
                                                            and e.wait_class          != 'Idle'
                                                            and e.total_waits         > nvl(b.total_waits,0)
                                                            and e.event_name not in ('smon timer', 
                                                                                     'pmon timer', 
                                                                                     'dispatcher timer',
                                                                                     'dispatcher listen timer',
                                                                                     'rdbms ipc message')
                                                          order by snap_id, time desc, waits desc, event)
                                                    union all
                                                          select 
                                                                   s0.snap_id snap_id,
                                                                   s0.END_INTERVAL_TIME tm,
                                                                   s0.instance_number inst,
                                                                   round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                                                        + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                                                        + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                                                        + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2) dur,
                                                                    'CPU time',
                                                                    0,
                                                                    round ((s6t1.value - s6t0.value) / 1000000, 2) as time,     -- THIS IS DB CPU (sec)
                                                                    0,
                                                                    ((round ((s6t1.value - s6t0.value) / 1000000, 2)) / NULLIF(((s5t1.value - nvl(s5t0.value,0)) / 1000000),0))*100 as pctdbt,     -- THIS IS DB CPU (sec) / DB TIME (sec)..TO GET % OF DB CPU ON DB TIME FOR TOP 5 TIMED EVENTS SECTION
                                                                    (round ((s6t1.value - s6t0.value) / 1000000, 2))/60 /  round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                                                                                + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                                                                                + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                                                                                + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2) aas,  -- THIS IS DB CPU (min) / SnapDur (min) TO GET THE % DB CPU ON AAS
                                                                    'CPU'
                                                                  from 
                                                                    dba_hist_snapshot s0,
                                                                    dba_hist_snapshot s1,
                                                                    dba_hist_sys_time_model s6t0,
                                                                    dba_hist_sys_time_model s6t1,
                                                                    dba_hist_sys_time_model s5t0,
                                                                    dba_hist_sys_time_model s5t1
                                                                  WHERE 
                                                                  s0.dbid                   = &_dbid              -- CHANGE THE DBID HERE!
                                                                  AND s1.dbid               = s0.dbid
                                                                  AND s6t0.dbid            = s0.dbid
                                                                  AND s6t1.dbid            = s0.dbid
                                                                  AND s5t0.dbid            = s0.dbid
                                                                  AND s5t1.dbid            = s0.dbid
                                                                  AND s0.instance_number    = &_instancenumber    -- CHANGE THE INSTANCE_NUMBER HERE!
                                                                  AND s1.instance_number    = s0.instance_number
                                                                  AND s6t0.instance_number = s0.instance_number
                                                                  AND s6t1.instance_number = s0.instance_number
                                                                  AND s5t0.instance_number = s0.instance_number
                                                                  AND s5t1.instance_number = s0.instance_number
                                                                  AND s1.snap_id            = s0.snap_id + 1
                                                                  AND s6t0.snap_id         = s0.snap_id
                                                                  AND s6t1.snap_id         = s0.snap_id + 1
                                                                  AND s5t0.snap_id         = s0.snap_id
                                                                  AND s5t1.snap_id         = s0.snap_id + 1
                                                                  AND s6t0.stat_name       = 'DB CPU'
                                                                  AND s6t1.stat_name       = s6t0.stat_name
                                                                  AND s5t0.stat_name       = 'DB time'
                                                                  AND s5t1.stat_name       = s5t0.stat_name
                                                          ) group by snap_id) accounted_dbtime
                                                            where dbtime.snap_id = accounted_dbtime.snap_id 
                                        )
                    )
              )
      )
WHERE event_rank <= 5
-- AND tm > to_char(sysdate - 30, 'MM/DD/YY HH24:MI')
-- AND TO_CHAR(tm,'D') >= 1     -- Day of week: 1=Sunday 7=Saturday
-- AND TO_CHAR(tm,'D') <= 7
-- AND TO_CHAR(tm,'HH24MI') >= 0900     -- Hour
-- AND TO_CHAR(tm,'HH24MI') <= 1800
-- AND tm >= TO_DATE('2010-jan-17 00:00:00','yyyy-mon-dd hh24:mi:ss')     -- Data range
-- AND tm <= TO_DATE('2010-aug-22 23:59:59','yyyy-mon-dd hh24:mi:ss')
-- and snap_id = 495
-- and snap_id >= 495 and snap_id <= 496
-- and event = 'db file sequential read'
-- and event like 'CPU%'
-- and avgwt > 5
-- and aas > .5
-- and wait_class = 'CPU'
-- and wait_class like '%I/O%'
-- and event_rank in (1,2,3)
ORDER BY snap_id;
}}}
If you'd like to be detailed and not only give you the top5 across snap_ids.. then comment the following lines below
<<<
where 
                          time_rank <= 5
<<<
then put filters like SQL_ID or AAS after the line 
<<<
-- where rownum <= 20
<<<


{{{
set arraysize 5000

COLUMN blocksize NEW_VALUE _blocksize NOPRINT
select distinct block_size blocksize from v$datafile;

COLUMN dbid NEW_VALUE _dbid NOPRINT
select dbid from v$database;

COLUMN name NEW_VALUE _instname NOPRINT
select lower(instance_name) name from v$instance;

COLUMN name NEW_VALUE _hostname NOPRINT
select lower(host_name) name from v$instance;

COLUMN instancenumber NEW_VALUE _instancenumber NOPRINT
select instance_number instancenumber from v$instance;

-- ttitle center 'AWR Top SQL Report' skip 2
set pagesize 50000
set linesize 550

col snap_id             format 99999            heading -- "Snap|ID"
col tm                  format a15              heading -- "Snap|Start|Time"
col inst                format 90               heading -- "i|n|s|t|#"
col dur                 format 990.00           heading -- "Snap|Dur|(m)"
col sql_id              format a15              heading -- "SQL|ID"
col phv                 format 99999999999      heading -- "Plan|Hash|Value"
col module              format a50
col elap                format 999990.00        heading -- "Ela|Time|(s)"
col elapexec            format 999990.00        heading -- "Ela|Time|per|exec|(s)"
col cput                format 999990.00        heading -- "CPU|Time|(s)"
col iowait              format 999990.00        heading -- "IO|Wait|(s)"
col appwait             format 999990.00        heading -- "App|Wait|(s)"
col concurwait          format 999990.00        heading -- "Ccr|Wait|(s)"
col clwait              format 999990.00        heading -- "Cluster|Wait|(s)"
col bget                format 99999999990      heading -- "LIO"
col dskr                format 99999999990      heading -- "PIO"
col dpath               format 99999999990      heading -- "Direct|Writes"
col rowp                format 99999999990      heading -- "Rows"
col exec                format 9999990          heading -- "Exec"
col prsc                format 999999990        heading -- "Parse|Count"
col pxexec              format 9999990          heading -- "PX|Server|Exec"
col icbytes             format 99999990         heading -- "IC|MB"           
col offloadbytes        format 99999990         heading -- "Offload|MB"
col offloadreturnbytes  format 99999990         heading -- "Offload|return|MB"
col flashcachereads     format 99999990         heading -- "Flash|Cache|MB"   
col uncompbytes         format 99999990         heading -- "Uncomp|MB"       
col pctdbt              format 990              heading -- "DB Time|%"
col aas                 format 990.00           heading -- "A|A|S"
col time_rank           format 90               heading -- "Time|Rank"
col sql_text            format a6               heading -- "SQL|Text"

     select *
       from (
             select
                  trim('&_instname') instname, 
                  trim('&_dbid') db_id, 
                  trim('&_hostname') hostname, 
                  sqt.snap_id snap_id,
                  TO_CHAR(sqt.tm,'MM/DD/YY HH24:MI:SS') tm,
                  sqt.inst inst,
                  sqt.dur dur,
                  sqt.aas aas,
                  nvl((sqt.elap), to_number(null)) elap,
                  nvl((sqt.elapexec), 0) elapexec,
                  nvl((sqt.cput), to_number(null)) cput,
                  sqt.iowait iowait,
                  sqt.appwait appwait,
                  sqt.concurwait concurwait,
                  sqt.clwait clwait,
                  sqt.bget bget, 
                  sqt.dskr dskr, 
                  sqt.dpath dpath,
                  sqt.rowp rowp,
                  sqt.exec exec, 
                  sqt.prsc prsc, 
                  sqt.pxexec pxexec,
                  sqt.icbytes, 
                  sqt.offloadbytes, 
                  sqt.offloadreturnbytes, 
                  sqt.flashcachereads, 
                  sqt.uncompbytes,
                  sqt.time_rank time_rank,
                  sqt.sql_id sql_id,   
                  sqt.phv phv,                
                  substr(to_clob(decode(sqt.module, null, null, sqt.module)),1,50) module, 
                  st.sql_text sql_text     -- PUT/REMOVE COMMENT TO HIDE/SHOW THE SQL_TEXT
             from        (
                          select snap_id, tm, inst, dur, sql_id, phv, module, elap, elapexec, cput, iowait, appwait, concurwait, clwait, bget, dskr, dpath, rowp, exec, prsc, pxexec, icbytes, offloadbytes, offloadreturnbytes, flashcachereads, uncompbytes, aas, time_rank
                          from
                                             (
                                               select 
                                                      s0.snap_id snap_id,
                                                      s0.END_INTERVAL_TIME tm,
                                                      s0.instance_number inst,
                                                      round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                                              + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                                              + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                                              + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2) dur,
                                                      e.sql_id sql_id, 
                                                      e.plan_hash_value phv, 
                                                      max(e.module) module,
                                                      sum(e.elapsed_time_delta)/1000000 elap,
                                                      decode((sum(e.executions_delta)), 0, to_number(null), ((sum(e.elapsed_time_delta)) / (sum(e.executions_delta)) / 1000000)) elapexec,
                                                      sum(e.cpu_time_delta)/1000000     cput, 
                                                      sum(e.iowait_delta)/1000000 iowait,
                                                      sum(e.apwait_delta)/1000000 appwait,
                                                      sum(e.ccwait_delta)/1000000 concurwait,
                                                      sum(e.clwait_delta)/1000000 clwait,
                                                      sum(e.buffer_gets_delta) bget,
                                                      sum(e.disk_reads_delta) dskr, 
                                                      sum(e.direct_writes_delta) dpath,
                                                      sum(e.rows_processed_delta) rowp,
                                                      sum(e.executions_delta)   exec,
                                                      sum(e.parse_calls_delta) prsc,
                                                      sum(e.px_servers_execs_delta) pxexec,
                                                      sum(e.io_interconnect_bytes_delta)/1024/1024 icbytes,  
                                                      sum(e.io_offload_elig_bytes_delta)/1024/1024 offloadbytes,  
                                                      sum(e.io_offload_return_bytes_delta)/1024/1024 offloadreturnbytes,   
                                                      (sum(e.optimized_physical_reads_delta)* &_blocksize)/1024/1024 flashcachereads,   
                                                      sum(e.cell_uncompressed_bytes_delta)/1024/1024 uncompbytes, 
                                                      (sum(e.elapsed_time_delta)/1000000) / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                                                                            + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                                                                            + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                                                                            + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2))*60) aas,
                                                      DENSE_RANK() OVER (
                                                      PARTITION BY s0.snap_id ORDER BY e.elapsed_time_delta DESC) time_rank
                                               from 
                                                   dba_hist_snapshot s0,
                                                   dba_hist_snapshot s1,
                                                   dba_hist_sqlstat e
                                                   where 
                                                    s0.dbid                   = &_dbid                -- CHANGE THE DBID HERE!
                                                    AND s1.dbid               = s0.dbid
                                                    and e.dbid                = s0.dbid                                                
                                                    AND s0.instance_number    = &_instancenumber      -- CHANGE THE INSTANCE_NUMBER HERE!
                                                    AND s1.instance_number    = s0.instance_number
                                                    and e.instance_number     = s0.instance_number                                                 
                                                    AND s1.snap_id            = s0.snap_id + 1
                                                    and e.snap_id             = s0.snap_id + 1                                              
                                               group by 
                                                    s0.snap_id, s0.END_INTERVAL_TIME, s0.instance_number, e.sql_id, e.plan_hash_value, e.elapsed_time_delta, s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME
                                             )
                          where 
                          time_rank <= 5                                     -- GET TOP 5 SQL ACROSS SNAP_IDs... YOU CAN ALTER THIS TO HAVE MORE DATA POINTS
                         ) 
                        sqt,
                        (select sql_id, dbid, nvl(b.name, a.command_type) sql_text from dba_hist_sqltext a, audit_actions b where a.command_type =  b.action(+)) st
             where st.sql_id(+)             = sqt.sql_id
             and st.dbid(+)                 = &_dbid
-- AND TO_CHAR(tm,'D') >= 1                                                  -- Day of week: 1=Sunday 7=Saturday
-- AND TO_CHAR(tm,'D') <= 7
-- AND TO_CHAR(tm,'HH24MI') >= 0900                                          -- Hour
-- AND TO_CHAR(tm,'HH24MI') <= 1800
-- AND tm >= TO_DATE('2010-jan-17 00:00:00','yyyy-mon-dd hh24:mi:ss')     -- Data range
-- AND tm <= TO_DATE('2010-aug-22 23:59:59','yyyy-mon-dd hh24:mi:ss')
-- AND snap_id in (338,339)
-- AND snap_id = 338
-- AND snap_id >= 335 and snap_id <= 339
-- AND lower(st.sql_text) like 'select%'
-- AND lower(st.sql_text) like 'insert%'
-- AND lower(st.sql_text) like 'update%'
-- AND lower(st.sql_text) like 'merge%'
-- AND pxexec > 0
-- AND aas > .5
             order by 
             snap_id                             -- TO GET SQL OUTPUT ACROSS SNAP_IDs SEQUENTIALLY AND ASC
             -- nvl(sqt.elap, -1) desc, sqt.sql_id     -- TO GET SQL OUTPUT BY ELAPSED TIME
             )
-- where rownum <= 20
;

}}}
http://gavinsoorma.com/2009/07/exporting-and-importing-awr-snapshot-data/

http://dboptimizer.com/2011/11/08/importing-awr-repositories-from-cloned-databases/  <-- this is to change the DBIDs
https://sites.google.com/site/oraclemonitor/dba_hist_active_sess_history#TOC-Force-importing-a-in-AWR   <-- this is to ''FORCE'' import ASH data 


{{{


###################################
on the source env
###################################

CREATE DIRECTORY AWR_DATA AS '/oracle/app/oracle/awrdata';

@?/rdbms/admin/awrextr.sql


~~~~~~~~~~~~~
AWR EXTRACT
~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~  This script will extract the AWR data for a range of snapshots  ~
~  into a dump file.  The script will prompt users for the         ~
~  following information:                                          ~
~     (1) database id                                              ~
~     (2) snapshot range to extract                                ~
~     (3) name of directory object                                 ~
~     (4) name of dump file                                        ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Databases in this Workload Repository schema
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

   DB Id     DB Name      Host
------------ ------------ ------------
* 2607950532 IVRS         dbrocaix01.b
                          ayantel.com


The default database id is the local one: '2607950532'.  To use this
database id, press <return> to continue, otherwise enter an alternative.

Enter value for dbid: 2607950532


Specify the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter value for begin_snap: 235
Begin Snapshot Id specified: 235

Enter value for end_snap: 3333


Specify the Directory Name
~~~~~~~~~~~~~~~~~~~~~~~~~~

Directory Name                 Directory Path
------------------------------ -------------------------------------------------
ADMIN_DIR                      /oracle/app/oracle/product/10.2.0/db_1/md/admin
AWR_DATA                       /oracle/app/oracle/awrdata
DATA_PUMP_DIR                  /flash_reco/flash_recovery_area/IVRS/expdp
DATA_PUMP_LOG                  /home/oracle/logs
SQLT$STAGE                     /oracle/app/oracle/admin/ivrs/udump
SQLT$UDUMP                     /oracle/app/oracle/admin/ivrs/udump
WORK_DIR                       /oracle/app/oracle/product/10.2.0/db_1/work

Choose a Directory Name from the above list (case-sensitive).

Enter value for directory_name: AWR_DATA

Using the dump directory: AWR_DATA

Specify the Name of the Extract Dump File
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The prefix for the default dump file name is awrdat_235_3333.
To use this name, press <return> to continue, otherwise enter
an alternative.

Enter value for file_name: awrexp



###################################
on the target env
###################################

CREATE DIRECTORY AWR_DATA AS '/oracle/app/oracle/awrdata';

@?/rdbms/admin/awrload.sql

-- on target before the load 
-- MIN/MAX for dba_hist tables
  2  select min(snap_id) min_snap_id, max(snap_id) max_snap_id from dba_hist_snapshot;
  3  select to_char(min(end_interval_time),'yyyy-mon-dd hh24:mi:ss') min_date, to_char(max(end_interval_time),'yyyy-mon-dd hh24:mi:ss') max_date from dba_hist_snapshot;

  4    5    6    7    8    9   10   11
INSTANCE_NUMBER    SNAP_ID STARTUP_TIME         SNAP_START           SNAP_END                ELA_MIN
--------------- ---------- -------------------- -------------------- -------------------- ----------
              1        238 2011-jan-27 08:52:09 2011-jan-27 09:30:31 2011-jan-27 09:40:34      10.05
              1        237 2011-jan-27 08:52:09 2011-jan-27 09:20:28 2011-jan-27 09:30:31      10.04
              1        236 2011-jan-27 08:52:09 2011-jan-27 09:10:26 2011-jan-27 09:20:28      10.04
              1        235 2011-jan-27 08:52:09 2011-jan-27 09:03:24 2011-jan-27 09:10:26       7.03
              1        234 2009-dec-15 13:41:20 2009-dec-15 14:00:32 2011-jan-27 09:03:24  587222.87
              1        233 2009-dec-15 12:08:35 2009-dec-15 13:00:49 2009-dec-15 14:00:32      59.72
              1        232 2009-dec-15 12:08:35 2009-dec-15 12:19:42 2009-dec-15 13:00:49      41.12
              1        231 2009-dec-15 07:58:35 2009-dec-15 08:09:41 2009-dec-15 12:19:42     250.01
              1        230 2009-dec-14 23:35:11 2009-dec-14 23:46:20 2009-dec-15 08:09:41     503.35
              1        229 2009-dec-10 11:27:30 2009-dec-11 04:00:38 2009-dec-14 23:46:20     5505.7

10 rows selected.

sys@IVRS> sys@IVRS> sys@IVRS>
MIN_SNAP_ID MAX_SNAP_ID
----------- -----------
        213         239

sys@IVRS>
MIN_DATE             MAX_DATE
-------------------- --------------------
2009-dec-10 11:38:56 2011-jan-27 09:40:34



~~~~~~~~~~
AWR LOAD
~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~  This script will load the AWR data from a dump file. The   ~
~  script will prompt users for the following information:    ~
~     (1) name of directory object                            ~
~     (2) name of dump file                                   ~
~     (3) staging schema name to load AWR data into           ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Specify the Directory Name
~~~~~~~~~~~~~~~~~~~~~~~~~~

Directory Name                 Directory Path
------------------------------ -------------------------------------------------
ADMIN_DIR                      /oracle/app/oracle/product/10.2.0/db_1/md/admin
AWR_DATA                       /oracle/app/oracle/awrdata
DATA_PUMP_DIR                  /flash_reco/flash_recovery_area/IVRS/expdp
DATA_PUMP_LOG                  /home/oracle/logs
SQLT$STAGE                     /oracle/app/oracle/admin/ivrs/udump
SQLT$UDUMP                     /oracle/app/oracle/admin/ivrs/udump
WORK_DIR                       /oracle/app/oracle/product/10.2.0/db_1/work

Choose a Directory Name from the list above (case-sensitive).

Enter value for directory_name: AWR_DATA

Using the dump directory: AWR_DATA

Specify the Name of the Dump File to Load
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Please specify the prefix of the dump file (.dmp) to load:

Enter value for file_name: awrexp


Enter value for schema_name:

Using the staging schema name: AWR_STAGE

Choose the Default tablespace for the AWR_STAGE user
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Choose the AWR_STAGE users's default tablespace.  This is the
tablespace in which the AWR data will be staged.

TABLESPACE_NAME                CONTENTS  DEFAULT TABLESPACE
------------------------------ --------- ------------------
CCDATA                         PERMANENT
CCINDEX                        PERMANENT
PSE                            PERMANENT
SOE                            PERMANENT
SOEINDEX                       PERMANENT
SYSAUX                         PERMANENT *
TPCCTAB                        PERMANENT
TPCHTAB                        PERMANENT
USERS                          PERMANENT

Pressing <return> will result in the recommended default
tablespace (identified by *) being used.

Enter value for default_tablespace:


Using tablespace SYSAUX as the default tablespace for the AWR_STAGE


Choose the Temporary tablespace for the AWR_STAGE user
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Choose the AWR_STAGE user's temporary tablespace.

TABLESPACE_NAME                CONTENTS  DEFAULT TEMP TABLESPACE
------------------------------ --------- -----------------------
TEMP                           TEMPORARY *

Pressing <return> will result in the database's default temporary
tablespace (identified by *) being used.

Enter value for temporary_tablespace:




Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
Job "SYS"."SYS_IMPORT_FULL_01" successfully completed at 12:46:07
begin
*
ERROR at line 1:
ORA-20105: unable to move AWR data to SYS
ORA-06512: at "SYS.DBMS_SWRF_INTERNAL", line 1760
ORA-20107: not allowed to move AWR data for local dbid
ORA-06512: at line 3


... Dropping AWR_STAGE user

End of AWR Load
}}}
-- from http://www.perfvision.com/statspack/awr.txt

{{{
WORKLOAD REPOSITORY report for
DB Name         DB Id    Instance     Inst Num Release     RAC Host
              Snap Id      Snap Time      Sessions Curs/Sess
Cache Sizes
Load Profile
Instance Efficiency Percentages (Target 100%)
Top 5 Timed Events                                         Avg %Total
Time Model Statistics
Wait Class
Wait Events
Background Wait Events
Operating System Statistics
Service Statistics
Service Wait Class Stats
SQL ordered by Elapsed Time
SQL ordered by CPU Time
SQL ordered by Gets
SQL ordered by Reads
SQL ordered by Executions
SQL ordered by Parse Calls
SQL ordered by Sharable Memory
SQL ordered by Version Count
Instance Activity Stats
Instance Activity Stats - Absolute Values
Instance Activity Stats - Thread Activity
Tablespace IO Stats
File IO Stats
Buffer Pool Statistics
Instance Recovery Stats
Buffer Pool Advisory
PGA Aggr Summary
PGA Aggr Target Histogram
PGA Memory Advisory
Shared Pool Advisory
SGA Target Advisory
Streams Pool Advisory
Java Pool Advisory
Buffer Wait Statistics
Enqueue Activity
Undo Segment Summary
Latch Activity
Latch Sleep Breakdown
Latch Miss Sources
Parent Latch Statistics
Segments by Logical Reads
Segments by Physical Reads
Segments by Row Lock Waits
Segments by ITL Waits
Segments by Buffer Busy Waits
Dictionary Cache Stats
Library Cache Activity
Process Memory Summary
SGA Memory Summary
SGA regions                     Begin Size (Bytes)      (if different)
SGA breakdown difference
Streams CPU/IO Usage
Streams Capture
Streams Apply
Buffered Queues
Buffered Subscribers
Rule Set
Resource Limit Stats
init.ora Parameters

}}}
{{{
WORKLOAD REPOSITORY report for
DB Name         DB Id    Instance     Inst Num Release     RAC Host
              Snap Id      Snap Time      Sessions Curs/Sess
Cache Sizes
Load Profile
Instance Efficiency Percentages (Target 100%)
Top 5 Timed Events     Avg wait %Total Call
Time Model Statistics
Wait Class
Wait Events
Background Wait Events
Operating System Statistics
Service Statistics
Service Wait Class Stats
SQL ordered by Elapsed Time
SQL ordered by CPU Time
SQL ordered by Gets
SQL ordered by Reads
SQL ordered by Executions
SQL ordered by Parse Calls
SQL ordered by Sharable Memory
SQL ordered by Version Count
Instance Activity Stats
Instance Activity Stats - Absolute Values
Instance Activity Stats - Thread Activity
Tablespace IO Stats
File IO Stats
Buffer Pool Statistics
Instance Recovery Stats
Buffer Pool Advisory
PGA Aggr Summary
PGA Aggr Target Stats     <-- new in 10.2.0.3
PGA Aggr Target Histogram
PGA Memory Advisory
Shared Pool Advisory
SGA Target Advisory
Streams Pool Advisory
Java Pool Advisory
Buffer Wait Statistics
Enqueue Activity
Undo Segment Summary
Undo Segment Stats     <-- new in 10.2.0.3
Latch Activity
Latch Sleep Breakdown
Latch Miss Sources
Parent Latch Statistics
Child Latch Statistics     <-- new in 10.2.0.3
Segments by Logical Reads
Segments by Physical Reads
Segments by Row Lock Waits
Segments by ITL Waits
Segments by Buffer Busy Waits
Dictionary Cache Stats
Library Cache Activity
Process Memory Summary
SGA Memory Summary
SGA breakdown difference
Streams CPU/IO Usage
Streams Capture
Streams Apply
Buffered Queues
Buffered Subscribers
Rule Set
Resource Limit Stats
init.ora Parameters
}}}
-- from http://www.perfvision.com/statspack/awrrpt_1_122_123.txt


{{{
WORKLOAD REPOSITORY report for

DB Name         DB Id    Instance     Inst Num Release     RAC Host
------------ ----------- ------------ -------- ----------- --- ------------
CDB10         1193559071 cdb10               1 10.2.0.1.0  NO  tsukuba

              Snap Id      Snap Time      Sessions Curs/Sess
            --------- ------------------- -------- ---------
Begin Snap:       122 31-Jul-07 17:00:40        36      24.9
  End Snap:       123 31-Jul-07 18:00:56        37      25.0
   Elapsed:               60.26 (mins)
   DB Time:               89.57 (mins)

Cache Sizes
~~~~~~~~~~~                       Begin        End
                             ---------- ----------
               Buffer Cache:        28M        28M  Std Block Size:         8K
           Shared Pool Size:       128M       128M      Log Buffer:     6,256K

Load Profile
~~~~~~~~~~~~                            Per Second       Per Transaction
                                   ---------------       ---------------
                  Redo size:            404,585.37            714,975.12
              Logical reads:              8,318.76             14,700.74
              Block changes:              2,744.42              4,849.89
             Physical reads:                111.18                196.48
            Physical writes:                 48.07                 84.96
                 User calls:                154.96                273.84
                     Parses:                  3.17                  5.60
                Hard parses:                  0.07                  0.13
                      Sorts:                  9.07                 16.04
                     Logons:                  0.05                  0.09
                   Executes:                150.07                265.20
               Transactions:                  0.57

  % Blocks changed per Read:   32.99    Recursive Call %:    16.44
 Rollback per transaction %:   21.11       Rows per Sort:    57.60

Instance Efficiency Percentages (Target 100%)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            Buffer Nowait %:  100.00       Redo NoWait %:   99.98
            Buffer  Hit   %:   98.70    In-memory Sort %:  100.00
            Library Hit   %:   99.94        Soft Parse %:   97.71
         Execute to Parse %:   97.89         Latch Hit %:  100.00
Parse CPU to Parse Elapsd %:    3.60     % Non-Parse CPU:   99.62

 Shared Pool Statistics        Begin    End
                              ------  ------
             Memory Usage %:   91.89   91.86
    % SQL with executions>1:   75.28   73.08
  % Memory for SQL w/exec>1:   73.58   70.06

Top 5 Timed Events                                         Avg %Total
~~~~~~~~~~~~~~~~~~                                        wait   Call
Event                                 Waits    Time (s)   (ms)   Time Wait Class
------------------------------ ------------ ----------- ------ ------ ----------
log file parallel write               2,819       2,037    723   37.9 System I/O
db file parallel write               32,625       1,949     60   36.3 System I/O
db file sequential read             268,447       1,761      7   32.8   User I/O
log file sync                         1,850       1,117    604   20.8     Commit
log buffer space                      1,189         866    728   16.1 Configurat
          -------------------------------------------------------------
Time Model Statistics                    DB/Inst: CDB10/cdb10  Snaps: 122-123
-> Total time in database user-calls (DB Time): 5374.1s
-> Statistics including the word "background" measure background process
   time, and so do not contribute to the DB time statistic
-> Ordered by % or DB time desc, Statistic name

Statistic Name                                       Time (s) % of DB Time
------------------------------------------ ------------------ ------------
sql execute elapsed time                              4,409.2         82.0
DB CPU                                                  488.2          9.1
parse time elapsed                                       48.5           .9
hard parse elapsed time                                  45.8           .9
PL/SQL execution elapsed time                            24.0           .4
sequence load elapsed time                                6.1           .1
connection management call elapsed time                   3.6           .1
failed parse elapsed time                                 0.8           .0
hard parse (sharing criteria) elapsed time                0.1           .0
repeated bind elapsed time                                0.0           .0
DB time                                               5,374.1          N/A
background elapsed time                               4,199.3          N/A
background cpu time                                      76.0          N/A
          -------------------------------------------------------------

Wait Class                                DB/Inst: CDB10/cdb10  Snaps: 122-123
-> s  - second
-> cs - centisecond -     100th of a second
-> ms - millisecond -    1000th of a second
-> us - microsecond - 1000000th of a second
-> ordered by wait time desc, waits desc

                                                                  Avg
                                       %Time       Total Wait    wait     Waits
Wait Class                      Waits  -outs         Time (s)    (ms)      /txn
-------------------- ---------------- ------ ---------------- ------- ---------
System I/O                     63,959     .0            4,080      64      31.3
User I/O                      286,652     .0            2,337       8     140.1
Commit                          1,850   47.2            1,117     604       0.9
Configuration                   4,319   79.1            1,081     250       2.1
Concurrency                       211   14.7               64     301       0.1
Application                     1,432     .3               29      21       0.7
Network                       566,962     .0               20       0     277.1
Other                             499    1.2                9      19       0.2
          -------------------------------------------------------------

Wait Events                              DB/Inst: CDB10/cdb10  Snaps: 122-123
-> s  - second
-> cs - centisecond -     100th of a second
-> ms - millisecond -    1000th of a second
-> us - microsecond - 1000000th of a second
-> ordered by wait time desc, waits desc (idle events last)

                                                                   Avg
                                             %Time  Total Wait    wait     Waits
Event                                 Waits  -outs    Time (s)    (ms)      /txn
---------------------------- -------------- ------ ----------- ------- ---------
log file parallel write               2,819     .0       2,037     723       1.4
db file parallel write               32,625     .0       1,949      60      15.9
db file sequential read             268,447     .0       1,761       7     131.2
log file sync                         1,850   47.2       1,117     604       0.9
log buffer space                      1,189   51.9         866     728       0.6
db file scattered read               16,589     .0         449      27       8.1
log file switch completion              182   35.2         109     597       0.1
control file parallel write           2,134     .0          87      41       1.0
direct path write temp                  415     .0          78     188       0.2
log file switch (checkpoint             120   24.2          53     444       0.1
buffer busy waits                       155   18.1          49     315       0.1
free buffer waits                     2,387   95.0          43      18       1.2
enq: RO - fast object reuse              60    6.7          23     379       0.0
SQL*Net more data to dblink           1,723     .0          19      11       0.8
direct path read temp                   350     .0          16      46       0.2
local write wait                        164    1.8          15      90       0.1
direct path write                       304     .0          13      42       0.1
write complete waits                     11   90.9          10     923       0.0
latch: In memory undo latch               5     .0           8    1592       0.0
os thread startup                        40    7.5           7     171       0.0
enq: CF - contention                     25     .0           7     272       0.0
SQL*Net break/reset to clien          1,372     .0           7       5       0.7
control file sequential read         26,253     .0           5       0      12.8
db file parallel read                   149     .0           4      29       0.1
direct path read                        233     .0           1       6       0.1
latch: cache buffers lru cha             10     .0           1     132       0.0
latch: object queue header o              2     .0           1     460       0.0
SQL*Net message to client           557,769     .0           1       0     272.6
log file single write                    64     .0           1      13       0.0
SQL*Net more data to client           1,806     .0           0       0       0.9
LGWR wait for redo copy                 125    4.8           0       1       0.1
rdbms ipc reply                         298     .0           0       0       0.1
SQL*Net more data from clien             93     .0           0       1       0.0
latch free                                2     .0           0      17       0.0
latch: redo allocation                    1     .0           0      21       0.0
latch: shared pool                        2     .0           0      10       0.0
log file sequential read                 64     .0           0       0       0.0
reliable message                         36     .0           0       1       0.0
read by other session                     1     .0           0      15       0.0
SQL*Net message to dblink             5,565     .0           0       0       2.7
latch: library cache                      4     .0           0       1       0.0
undo segment extension                  430   99.3           0       0       0.2
latch: cache buffers chains               4     .0           0       0       0.0
latch: library cache pin                  1     .0           0       0       0.0
SQL*Net more data from dblin              6     .0           0       0       0.0
SQL*Net message from client         557,767     .0      51,335      92     272.6
Streams AQ: waiting for time             50   40.0       3,796   75924       0.0
wait for unread message on b          3,588   99.5       3,522     982       1.8
Streams AQ: qmn slave idle w            128     .0       3,520   27498       0.1
Streams AQ: qmn coordinator             275   53.5       3,520   12799       0.1
virtual circuit status                  120  100.0       3,503   29191       0.1
Streams AQ: waiting for mess            725   97.7       3,498    4825       0.4
jobq slave wait                       1,133   97.5       3,284    2898       0.6
PL/SQL lock timer                       977   99.9       2,862    2929       0.5
SQL*Net message from dblink           5,566     .0         540      97       2.7
class slave wait                          2  100.0          10    4892       0.0
single-task message                       2     .0           0     103       0.0
          -------------------------------------------------------------

Background Wait Events                   DB/Inst: CDB10/cdb10  Snaps: 122-123
-> ordered by wait time desc, waits desc (idle events last)

                                                                   Avg
                                             %Time  Total Wait    wait     Waits
Event                                 Waits  -outs    Time (s)    (ms)      /txn
---------------------------- -------------- ------ ----------- ------- ---------
log file parallel write               2,820     .0       2,037     722       1.4
db file parallel write               32,625     .0       1,949      60      15.9
control file parallel write           2,134     .0          87      41       1.0
direct path write                       231     .0          13      55       0.1
db file sequential read                 935     .0          12      13       0.5
log buffer space                         13   53.8          10     791       0.0
events in waitclass Other               415    1.4           8      19       0.2
os thread startup                        40    7.5           7     171       0.0
db file scattered read                  115     .0           3      27       0.1
log file sync                             3   66.7           2     828       0.0
direct path read                        231     .0           1       6       0.1
buffer busy waits                        21     .0           1      63       0.0
control file sequential read          2,550     .0           1       0       1.2
log file single write                    64     .0           1      13       0.0
log file sequential read                 64     .0           0       0       0.0
latch: shared pool                        1     .0           0       7       0.0
latch: library cache                      2     .0           0       1       0.0
latch: cache buffers chains               1     .0           0       0       0.0
rdbms ipc message                    13,865   72.8      27,604    1991       6.8
Streams AQ: waiting for time             50   40.0       3,796   75924       0.0
pmon timer                            1,272   98.6       3,526    2772       0.6
Streams AQ: qmn slave idle w            128     .0       3,520   27498       0.1
Streams AQ: qmn coordinator             275   53.5       3,520   12799       0.1
smon timer                              178    3.4       3,360   18875       0.1
          -------------------------------------------------------------

Operating System Statistics               DB/Inst: CDB10/cdb10  Snaps: 122-123

Statistic                                       Total
-------------------------------- --------------------
AVG_BUSY_TIME                                 204,954
AVG_IDLE_TIME                                 155,940
AVG_IOWAIT_TIME                                     0
AVG_SYS_TIME                                   15,979
AVG_USER_TIME                                 188,638
BUSY_TIME                                     410,601
IDLE_TIME                                     312,370
IOWAIT_TIME                                         0
SYS_TIME                                       32,591
USER_TIME                                     378,010
LOAD                                                1
OS_CPU_WAIT_TIME                              228,200
RSRC_MGR_CPU_WAIT_TIME                              0
VM_IN_BYTES                               338,665,472
VM_OUT_BYTES                              397,410,304
PHYSICAL_MEMORY_BYTES                   6,388,301,824
NUM_CPUS                                            2
          -------------------------------------------------------------

Service Statistics                       DB/Inst: CDB10/cdb10  Snaps: 122-123
-> ordered by DB Time

                                                             Physical    Logical
Service Name                      DB Time (s)   DB CPU (s)      Reads      Reads
-------------------------------- ------------ ------------ ---------- ----------
SYS$USERS                             4,666.5        429.9    348,141 ##########
cdb10                                   701.4         58.1     51,046    224,419
SYS$BACKGROUND                            0.0          0.0      2,830     18,255
cdb10XDB                                  0.0          0.0          0          0
          -------------------------------------------------------------

Service Wait Class Stats                  DB/Inst: CDB10/cdb10  Snaps: 122-123
-> Wait Class info for services in the Service Statistics section.
-> Total Waits and Time Waited displayed for the following wait
   classes:  User I/O, Concurrency, Administrative, Network
-> Time Waited (Wt Time) in centisecond (100th of a second)

Service Name
----------------------------------------------------------------
 User I/O  User I/O  Concurcy  Concurcy     Admin     Admin   Network   Network
Total Wts   Wt Time Total Wts   Wt Time Total Wts   Wt Time Total Wts   Wt Time
--------- --------- --------- --------- --------- --------- --------- ---------
SYS$USERS
   271425    210890        65       602         0         0    532492      1979
cdb10
    12969     18550        81      4945         0         0     34068        15
SYS$BACKGROUND
     2261      4306        65       815         0         0         0         0
          -------------------------------------------------------------

SQL ordered by Elapsed Time              DB/Inst: CDB10/cdb10  Snaps: 122-123
-> Resources reported for PL/SQL code includes the resources used by all SQL
   statements called by the code.
-> % Total DB Time is the Elapsed Time of the SQL statement divided
   into the Total Database Time multiplied by 100

  Elapsed      CPU                  Elap per  % Total
  Time (s)   Time (s)  Executions   Exec (s)  DB Time    SQL Id
---------- ---------- ------------ ---------- ------- -------------
       797        134            1      796.6    14.8 f1qcyh20550cf
Call CALC_QOS_SLOW(:1, :2, :3, :4)

       773         58            1      773.2    14.4 fj6gjgsshtxyx
Call CALC_DELETE_OLD_DATA(:1)

       354         25            1      354.3     6.6 0cjsxw5ndqdbc
Call CALC_HFC_SLOW(:1, :2, :3, :4)

       275         29            1      275.3     5.1 8t8as9usk11qw
Call CALC_TOPOLOGY_SLOW(:1, :2, :3, :4)

       202          4            4       50.5     3.8 dr1rkrznhh95b
Call CALC_TOPOLOGY_MEDIUM(:1, :2, :3, :4)

       158         16            0        N/A     2.9 10dkqv3kr8xa5
 SELECT trunc(SYSDATE, 'HH24') HOUR_STAMP, CM_ID, MA
X(SUBSTR(CM_DESC, 1, 12)) CM_DESC, MAX(UP_ID) UP_ID, MA
X(DOWN_ID) DOWN_ID, MAX(MAC_ID) MAC_ID, MAX(CMTS_
ID) CMTS_ID, SUM(BYTES_UP) SUM_BYTES_UP, SUM(BY

       139          7            1      139.2     2.6 38zhkf4jdyff4
DECLARE job BINARY_INTEGER := :job; next_date DATE := :mydate; broken BOOLEAN :
= FALSE; BEGIN ash.collect(3,1200); :mydate := next_date; IF broken THEN :b := 1
; ELSE :b := 0; END IF; END;

       137         72            1      136.8     2.5 298wmz1kxjs1m
INSERT INTO CM_QOS_PROF SELECT :B1 , R.TOPOLOGYID, :B1 - :B4 , P.NODE_PROFILE_ID
, R.DOCSIFCMTSSERVICEQOSPROFILE FROM CM_SID_RAWDATA R, ( SELECT DISTINCT T.CMID,
 P.QOS_PROF_IDX, P.NODE_PROFILE_ID FROM TMP_TOP_SLOW_CM T, CMTS_QOS_PROF P WHERE
 T.CMTSID = P.TOPOLOGYID AND P.SECONDID = :B1 ) P WHERE R.BATCHID = :B3 AND R.PR

       130          9            1      130.5     2.4 6n0d6cv6w6krs
DELETE FROM CM_VA WHERE SECONDID <= :B1

       130          9            1      130.0     2.4 86m0m9q8fw9bj
DELETE FROM CM_QOS_PROF WHERE SECONDID <= :B1

       126          3            1      125.6     2.3 33bpz9dh1w5jk
Module: Lab128
--lab128 select /*+rule*/ owner, segment_name||decode(partition_name,null,nul
l,' ('||partition_name||')') name, segment_type,tablespace_name, extent_id,f
ile_id,block_id, blocks,bytes/1048576 bytes from dba_extents

       124          9            1      124.5     2.3 gyqv6h5pft4mj
DELETE FROM CM_BYTES WHERE SECONDID <= :B1

       121          2           56        2.2     2.3 6gvch1xu9ca3g
DECLARE job BINARY_INTEGER := :job; next_date DATE := :mydate; broken BOOLEAN :
= FALSE; BEGIN EMD_MAINTENANCE.EXECUTE_EM_DBMS_JOB_PROCS(); :mydate := next_date
; IF broken THEN :b := 1; ELSE :b := 0; END IF; END;

       120          2            4       30.0     2.2 4zjg6w4mwu0wv
INSERT INTO TMP_TOP_MED_DN SELECT M.CMTSID, M.VENDOR_DESC, M.MODEL_DESC, MAC_L.T
OPOLOGYID, DOWN_L.TOPOLOGYID, M.UP_SNR_CNR_A3, M.UP_SNR_CNR_A2, M.UP_SNR_CNR_A1,
 M.UP_SNR_CNR_A0, M.MAC_SLOTS_OPEN, M.MAC_SLOTS_USED, M.CMTS_REBOOT, 0 FROM TMP_
TOP_MED_CMTS M, TOPOLOGY_LINK DOWN_L, TOPOLOGY_NODE DOWN_N, TOPOLOGY_LINK MAC_L

       119          9            1      119.1     2.2 aywfs0n7wwwhn
DELETE FROM CM_POWER_2 WHERE SECONDID <= :B1
SQL ordered by Elapsed Time              DB/Inst: CDB10/cdb10  Snaps: 122-123
-> Resources reported for PL/SQL code includes the resources used by all SQL
   statements called by the code.
-> % Total DB Time is the Elapsed Time of the SQL statement divided
   into the Total Database Time multiplied by 100

  Elapsed      CPU                  Elap per  % Total
  Time (s)   Time (s)  Executions   Exec (s)  DB Time    SQL Id
---------- ---------- ------------ ---------- ------- -------------

       117          9            1      117.4     2.2 0fnnktt50m86h
DELETE FROM CM_ERRORS WHERE SECONDID <= :B1

       116          1          977        0.1     2.1 5jh6zfmvpu77f
UPDATE ASH.DBIDS@REPO SET ASHSEQ = :B2 WHERE DBID = :B1

       108          9            1      107.5     2.0 21jqxqyf80cn8
DELETE FROM CM_POWER_1 WHERE SECONDID <= :B1

       107         11            1      107.0     2.0 87gy6mxtk7f3z
DELETE FROM CM_POLL_STATUS WHERE TOPOLOGYID IN ( SELECT DISTINCT TOPOLOGYID FROM
 CM_RAWDATA WHERE BATCHID = :B1 )

        96          6            1       95.9     1.8 2r6jnnf1hzb4z
select power.TOPOLOGYID, power.SAMPLE_LENGTH, UNIQUE_CMS, ACTIVE_CMS, BITSPERSYM
BOL, TXPOWER_UP FROM CM_POWER_2 power, TOPOLOGY_LINK link, UPSTREAM_CHANNEL chan
nel WHERE power.SECONDID = :1 AND link.TOPOLOGYID = power.TOPOLOGYID AND link.PA
RENTLEN = 1 AND link.STATEID = 1 AND link.LINKTYPEID = 1 AND link.PARENTID = cha

        95          1            1       95.1     1.8 1qp1yn30gajjw
 SELECT trunc(SYSDATE, 'HH24') HOUR_STAMP, M.
TOPOLOGYID UP_ID, T.UP_DESC UP_DESC, T.MAC_ID
 MAC_ID, T.CMTS_ID CMTS_ID, M.MAX_PERCENT_UTI
L, M.MAX_PACKETS_PER_SEC, M.AVG_PACKET_SIZE,

        94          5            1       93.9     1.7 fxvdq915s3qpt
DELETE FROM TMP_CALC_HFC_SLOW_CM_LAST

        87          4            1       86.9     1.6 axyukfdx12pu4
Call CALC_DELETE_SLOW_RAWDATA(:1, :2)

        85          9            1       84.6     1.6 998t5bbdfm5rm
INSERT INTO CM_RAWDATA SELECT PROFINDX, 0 BATCHID, TOPOLOGYID, SAMPLETIME, SYSUP
TIME, DOCSIFCMTSCMSTATUSVALUE, DOCSIFCMTSSERVICEINOCTETS, DOCSIFCMTSSERVICEOUTOC
TETS, DOCSIFCMSTATUSTXPOWER, DOCSIFCMTSCMSTATUSRXPOWER, DOCSIFDOWNCHANNELPOWER,
DOCSIFSIGQUNERROREDS, DOCSIFSIGQCORRECTEDS, DOCSIFSIGQUNCORRECTABLES, DOCSIFSIGQ

        84          5            1       83.8     1.6 3a11s4c86wdu5
DELETE FROM CM_RAWDATA WHERE BATCHID = 0 AND PROFINDX = :B1

        77         22      150,832        0.0     1.4 5zm9acqtd51h7
insert into cm_sid_rawdata (profindx, batchid, topologyid, sid, sampletime, docs
IfCmtsServiceQosProfile) values (:1, :2, :3, :4, :5, :6)

        74          9            1       73.6     1.4 3whpusvtv0qq1
INSERT INTO TMP_CALC_QOS_SLOW_CM_TMP SELECT T.CMTSID, T.DOWNID, T.UPID, T.CMID,
GREATEST(T.CMTS_REBOOT, T.UP_REBOOT), GREATEST(T.CMTS_REBOOT, T.UP_REBOOT), R.DO
CSIFCMTSSERVICEINOCTETS, R.DOCSIFCMTSSERVICEOUTOCTETS, S.SID, L.PREV_SECONDID, L
.PREV_IFINOCTETS, L.PREV_IFOUTOCTETS, L.PREV_SID FROM TMP_TOP_SLOW_CM T, CM_RAWD

        74          8            1       73.5     1.4 9h99br1t3qq3a
INSERT INTO TMP_CALC_HFC_SLOW_CM_LAST SELECT * FROM TMP_CALC_HFC_SLOW_CM_LAST_TM
P

        72          7            1       72.0     1.3 4qunm1qbf8cyk
select power.TOPOLOGYID, power.SAMPLE_LENGTH, UNIQUE_CMS, ACTIVE_CMS, CHANNELWID
TH, RXPOWER_UP, RXPOWER UPSTREAM_AVG_RX FROM CM_POWER_1 power, TOPOLOGY_LINK lin
k, UPSTREAM_CHANNEL channel, UPSTREAM_POWER_1 upstream_rx WHERE power.SECONDID =
 :1 and power.SECONDID = upstream_rx.secondid AND link.TOPOLOGYID = power.TOPOLO
SQL ordered by Elapsed Time              DB/Inst: CDB10/cdb10  Snaps: 122-123
-> Resources reported for PL/SQL code includes the resources used by all SQL
   statements called by the code.
-> % Total DB Time is the Elapsed Time of the SQL statement divided
   into the Total Database Time multiplied by 100

  Elapsed      CPU                  Elap per  % Total
  Time (s)   Time (s)  Executions   Exec (s)  DB Time    SQL Id
---------- ---------- ------------ ---------- ------- -------------

        68          3            1       68.4     1.3 bzmccctnyjb3z
INSERT INTO DOWNSTREAM_ERRORS SELECT T2.SECONDID, T1.DOWNID, ROUND(AVG(T2.SAMPLE
_LENGTH), 0), ROUND(AVG(DECODE(T2.UNERROREDS + T2.CORRECTEDS + T2.UNCORRECTABLES
,0,0, T2.UNCORRECTABLES / ( T2.UNERROREDS + T2.CORRECTEDS + T2.UNCORRECTABLES )
* 100)) ,2) AVG_CER, ROUND(AVG(DECODE(T2.UNERROREDS + T2.CORRECTEDS + T2.UNCORRE

        64          7            1       63.6     1.2 fqcwt6uak8x3w
INSERT INTO TMP_CALC_QOS_SLOW_CM_LAST SELECT * FROM TMP_CALC_QOS_SLOW_CM_LAST_TM
P

        59          6            1       58.8     1.1 fd6a0p6333g8z
 SELECT trunc(SYSDATE, 'HH24') HOUR_STAMP, CM_ID, MA
X(SUBSTR(CM_DESC, 1, 12)) CM_DESC, MAX(UP_ID) UP_ID, MA
X(DOWN_ID) DOWN_ID, MAX(MAC_ID) MAC_ID, MAX(CMTS_
ID) CMTS_ID, SUM(BYTES_UP) SUM_BYTES_UP, SUM(BY

          -------------------------------------------------------------

SQL ordered by CPU Time                  DB/Inst: CDB10/cdb10  Snaps: 122-123
-> Resources reported for PL/SQL code includes the resources used by all SQL
   statements called by the code.
-> % Total DB Time is the Elapsed Time of the SQL statement divided
   into the Total Database Time multiplied by 100

    CPU      Elapsed                  CPU per  % Total
  Time (s)   Time (s)  Executions     Exec (s) DB Time    SQL Id
---------- ---------- ------------ ----------- ------- -------------
       134        797            1      133.81    14.8 f1qcyh20550cf
Call CALC_QOS_SLOW(:1, :2, :3, :4)

        72        137            1       71.96     2.5 298wmz1kxjs1m
INSERT INTO CM_QOS_PROF SELECT :B1 , R.TOPOLOGYID, :B1 - :B4 , P.NODE_PROFILE_ID
, R.DOCSIFCMTSSERVICEQOSPROFILE FROM CM_SID_RAWDATA R, ( SELECT DISTINCT T.CMID,
 P.QOS_PROF_IDX, P.NODE_PROFILE_ID FROM TMP_TOP_SLOW_CM T, CMTS_QOS_PROF P WHERE
 T.CMTSID = P.TOPOLOGYID AND P.SECONDID = :B1 ) P WHERE R.BATCHID = :B3 AND R.PR

        58        773            1       57.60    14.4 fj6gjgsshtxyx
Call CALC_DELETE_OLD_DATA(:1)

        29        275            1       29.25     5.1 8t8as9usk11qw
Call CALC_TOPOLOGY_SLOW(:1, :2, :3, :4)

        25        354            1       24.50     6.6 0cjsxw5ndqdbc
Call CALC_HFC_SLOW(:1, :2, :3, :4)

        22         77      150,832        0.00     1.4 5zm9acqtd51h7
insert into cm_sid_rawdata (profindx, batchid, topologyid, sid, sampletime, docs
IfCmtsServiceQosProfile) values (:1, :2, :3, :4, :5, :6)

        19         52      150,324        0.00     1.0 6xz6vg8q1zygu
insert into cm_rawdata (profindx, batchid, topologyid, sampletime, docsifcmtscms
tatusvalue, docsifcmtsserviceinoctets, docsifcmtsserviceoutoctets, docsifcmtscms
tatusrxpower, cmtscm_unerr, cmtscm_corr, cmtscm_uncorr, cmtscm_snr, cmtscm_timin
goffset) values (:1, :2, :3, :4, :5, :6, :7, :8, :9, :10, :11, :12, :13)

        18         40      150,259        0.00     0.7 c2a2g4fqnm25h
insert into cm_rawdata (profindx, batchid, topologyid, sampletime, sysuptime, do
csifcmstatustxpower, docsifdownchannelpower, docsifsigqunerroreds, docsifsigqcor
recteds, docsifsigquncorrectables, docsifsigqsignalnoise, sysobjectid) values (:
1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11,:12)

        16        158            0         N/A     2.9 10dkqv3kr8xa5
 SELECT trunc(SYSDATE, 'HH24') HOUR_STAMP, CM_ID, MA
X(SUBSTR(CM_DESC, 1, 12)) CM_DESC, MAX(UP_ID) UP_ID, MA
X(DOWN_ID) DOWN_ID, MAX(MAC_ID) MAC_ID, MAX(CMTS_
ID) CMTS_ID, SUM(BYTES_UP) SUM_BYTES_UP, SUM(BY

        11        107            1       10.68     2.0 87gy6mxtk7f3z
DELETE FROM CM_POLL_STATUS WHERE TOPOLOGYID IN ( SELECT DISTINCT TOPOLOGYID FROM
 CM_RAWDATA WHERE BATCHID = :B1 )

         9        130            1        9.26     2.4 86m0m9q8fw9bj
DELETE FROM CM_QOS_PROF WHERE SECONDID <= :B1

         9        130            1        9.03     2.4 6n0d6cv6w6krs
DELETE FROM CM_VA WHERE SECONDID <= :B1

         9        108            1        9.01     2.0 21jqxqyf80cn8
DELETE FROM CM_POWER_1 WHERE SECONDID <= :B1

         9         74            1        8.99     1.4 3whpusvtv0qq1
INSERT INTO TMP_CALC_QOS_SLOW_CM_TMP SELECT T.CMTSID, T.DOWNID, T.UPID, T.CMID,
GREATEST(T.CMTS_REBOOT, T.UP_REBOOT), GREATEST(T.CMTS_REBOOT, T.UP_REBOOT), R.DO
CSIFCMTSSERVICEINOCTETS, R.DOCSIFCMTSSERVICEOUTOCTETS, S.SID, L.PREV_SECONDID, L
.PREV_IFINOCTETS, L.PREV_IFOUTOCTETS, L.PREV_SID FROM TMP_TOP_SLOW_CM T, CM_RAWD

         9        117            1        8.96     2.2 0fnnktt50m86h
SQL ordered by CPU Time                  DB/Inst: CDB10/cdb10  Snaps: 122-123
-> Resources reported for PL/SQL code includes the resources used by all SQL
   statements called by the code.
-> % Total DB Time is the Elapsed Time of the SQL statement divided
   into the Total Database Time multiplied by 100

    CPU      Elapsed                  CPU per  % Total
  Time (s)   Time (s)  Executions     Exec (s) DB Time    SQL Id
---------- ---------- ------------ ----------- ------- -------------
DELETE FROM CM_ERRORS WHERE SECONDID <= :B1

         9        124            1        8.88     2.3 gyqv6h5pft4mj
DELETE FROM CM_BYTES WHERE SECONDID <= :B1

         9        119            1        8.87     2.2 aywfs0n7wwwhn
DELETE FROM CM_POWER_2 WHERE SECONDID <= :B1

         9         85            1        8.52     1.6 998t5bbdfm5rm
INSERT INTO CM_RAWDATA SELECT PROFINDX, 0 BATCHID, TOPOLOGYID, SAMPLETIME, SYSUP
TIME, DOCSIFCMTSCMSTATUSVALUE, DOCSIFCMTSSERVICEINOCTETS, DOCSIFCMTSSERVICEOUTOC
TETS, DOCSIFCMSTATUSTXPOWER, DOCSIFCMTSCMSTATUSRXPOWER, DOCSIFDOWNCHANNELPOWER,
DOCSIFSIGQUNERROREDS, DOCSIFSIGQCORRECTEDS, DOCSIFSIGQUNCORRECTABLES, DOCSIFSIGQ

         8         74            1        7.66     1.4 9h99br1t3qq3a
INSERT INTO TMP_CALC_HFC_SLOW_CM_LAST SELECT * FROM TMP_CALC_HFC_SLOW_CM_LAST_TM
P

         7         64            1        7.43     1.2 fqcwt6uak8x3w
INSERT INTO TMP_CALC_QOS_SLOW_CM_LAST SELECT * FROM TMP_CALC_QOS_SLOW_CM_LAST_TM
P

         7        139            1        7.13     2.6 38zhkf4jdyff4
DECLARE job BINARY_INTEGER := :job; next_date DATE := :mydate; broken BOOLEAN :
= FALSE; BEGIN ash.collect(3,1200); :mydate := next_date; IF broken THEN :b := 1
; ELSE :b := 0; END IF; END;

         7         72            1        6.69     1.3 4qunm1qbf8cyk
select power.TOPOLOGYID, power.SAMPLE_LENGTH, UNIQUE_CMS, ACTIVE_CMS, CHANNELWID
TH, RXPOWER_UP, RXPOWER UPSTREAM_AVG_RX FROM CM_POWER_1 power, TOPOLOGY_LINK lin
k, UPSTREAM_CHANNEL channel, UPSTREAM_POWER_1 upstream_rx WHERE power.SECONDID =
 :1 and power.SECONDID = upstream_rx.secondid AND link.TOPOLOGYID = power.TOPOLO

         6         59            1        6.12     1.1 fd6a0p6333g8z
 SELECT trunc(SYSDATE, 'HH24') HOUR_STAMP, CM_ID, MA
X(SUBSTR(CM_DESC, 1, 12)) CM_DESC, MAX(UP_ID) UP_ID, MA
X(DOWN_ID) DOWN_ID, MAX(MAC_ID) MAC_ID, MAX(CMTS_
ID) CMTS_ID, SUM(BYTES_UP) SUM_BYTES_UP, SUM(BY

         6         96            1        5.82     1.8 2r6jnnf1hzb4z
select power.TOPOLOGYID, power.SAMPLE_LENGTH, UNIQUE_CMS, ACTIVE_CMS, BITSPERSYM
BOL, TXPOWER_UP FROM CM_POWER_2 power, TOPOLOGY_LINK link, UPSTREAM_CHANNEL chan
nel WHERE power.SECONDID = :1 AND link.TOPOLOGYID = power.TOPOLOGYID AND link.PA
RENTLEN = 1 AND link.STATEID = 1 AND link.LINKTYPEID = 1 AND link.PARENTID = cha

         5         84            1        5.23     1.6 3a11s4c86wdu5
DELETE FROM CM_RAWDATA WHERE BATCHID = 0 AND PROFINDX = :B1

         5         94            1        5.19     1.7 fxvdq915s3qpt
DELETE FROM TMP_CALC_HFC_SLOW_CM_LAST

         4        202            4        1.11     3.8 dr1rkrznhh95b
Call CALC_TOPOLOGY_MEDIUM(:1, :2, :3, :4)

         4         87            1        3.68     1.6 axyukfdx12pu4
Call CALC_DELETE_SLOW_RAWDATA(:1, :2)

         3        126            1        2.92     2.3 33bpz9dh1w5jk
Module: Lab128
--lab128 select /*+rule*/ owner, segment_name||decode(partition_name,null,nul
SQL ordered by CPU Time                  DB/Inst: CDB10/cdb10  Snaps: 122-123
-> Resources reported for PL/SQL code includes the resources used by all SQL
   statements called by the code.
-> % Total DB Time is the Elapsed Time of the SQL statement divided
   into the Total Database Time multiplied by 100

    CPU      Elapsed                  CPU per  % Total
  Time (s)   Time (s)  Executions     Exec (s) DB Time    SQL Id
---------- ---------- ------------ ----------- ------- -------------
l,' ('||partition_name||')') name, segment_type,tablespace_name, extent_id,f
ile_id,block_id, blocks,bytes/1048576 bytes from dba_extents

         3         68            1        2.66     1.3 bzmccctnyjb3z
INSERT INTO DOWNSTREAM_ERRORS SELECT T2.SECONDID, T1.DOWNID, ROUND(AVG(T2.SAMPLE
_LENGTH), 0), ROUND(AVG(DECODE(T2.UNERROREDS + T2.CORRECTEDS + T2.UNCORRECTABLES
,0,0, T2.UNCORRECTABLES / ( T2.UNERROREDS + T2.CORRECTEDS + T2.UNCORRECTABLES )
* 100)) ,2) AVG_CER, ROUND(AVG(DECODE(T2.UNERROREDS + T2.CORRECTEDS + T2.UNCORRE

         2        121           56        0.04     2.3 6gvch1xu9ca3g
DECLARE job BINARY_INTEGER := :job; next_date DATE := :mydate; broken BOOLEAN :
= FALSE; BEGIN EMD_MAINTENANCE.EXECUTE_EM_DBMS_JOB_PROCS(); :mydate := next_date
; IF broken THEN :b := 1; ELSE :b := 0; END IF; END;

         2        120            4        0.42     2.2 4zjg6w4mwu0wv
INSERT INTO TMP_TOP_MED_DN SELECT M.CMTSID, M.VENDOR_DESC, M.MODEL_DESC, MAC_L.T
OPOLOGYID, DOWN_L.TOPOLOGYID, M.UP_SNR_CNR_A3, M.UP_SNR_CNR_A2, M.UP_SNR_CNR_A1,
 M.UP_SNR_CNR_A0, M.MAC_SLOTS_OPEN, M.MAC_SLOTS_USED, M.CMTS_REBOOT, 0 FROM TMP_
TOP_MED_CMTS M, TOPOLOGY_LINK DOWN_L, TOPOLOGY_NODE DOWN_N, TOPOLOGY_LINK MAC_L

         1         95            1        1.19     1.8 1qp1yn30gajjw
 SELECT trunc(SYSDATE, 'HH24') HOUR_STAMP, M.
TOPOLOGYID UP_ID, T.UP_DESC UP_DESC, T.MAC_ID
 MAC_ID, T.CMTS_ID CMTS_ID, M.MAX_PERCENT_UTI
L, M.MAX_PACKETS_PER_SEC, M.AVG_PACKET_SIZE,

         1        116          977        0.00     2.1 5jh6zfmvpu77f
UPDATE ASH.DBIDS@REPO SET ASHSEQ = :B2 WHERE DBID = :B1

          -------------------------------------------------------------

SQL ordered by Gets                      DB/Inst: CDB10/cdb10  Snaps: 122-123
-> Resources reported for PL/SQL code includes the resources used by all SQL
   statements called by the code.
-> Total Buffer Gets:      30,077,723
-> Captured SQL account for     169.4% of Total

                                Gets              CPU     Elapsed
  Buffer Gets   Executions    per Exec   %Total Time (s)  Time (s)    SQL Id
-------------- ------------ ------------ ------ -------- --------- -------------
    16,494,914            1 ############   54.8   133.81    796.60 f1qcyh20550cf
Call CALC_QOS_SLOW(:1, :2, :3, :4)

    11,322,501            1 ############   37.6    71.96    136.75 298wmz1kxjs1m
INSERT INTO CM_QOS_PROF SELECT :B1 , R.TOPOLOGYID, :B1 - :B4 , P.NODE_PROFILE_ID
, R.DOCSIFCMTSSERVICEQOSPROFILE FROM CM_SID_RAWDATA R, ( SELECT DISTINCT T.CMID,
 P.QOS_PROF_IDX, P.NODE_PROFILE_ID FROM TMP_TOP_SLOW_CM T, CMTS_QOS_PROF P WHERE
 T.CMTSID = P.TOPOLOGYID AND P.SECONDID = :B1 ) P WHERE R.BATCHID = :B3 AND R.PR

     3,835,310            1  3,835,310.0   12.8    57.60    773.15 fj6gjgsshtxyx
Call CALC_DELETE_OLD_DATA(:1)

     2,140,461            1  2,140,461.0    7.1    24.50    354.27 0cjsxw5ndqdbc
Call CALC_HFC_SLOW(:1, :2, :3, :4)

     1,434,233            1  1,434,233.0    4.8    29.25    275.28 8t8as9usk11qw
Call CALC_TOPOLOGY_SLOW(:1, :2, :3, :4)

     1,400,037            1  1,400,037.0    4.7     8.99     73.62 3whpusvtv0qq1
INSERT INTO TMP_CALC_QOS_SLOW_CM_TMP SELECT T.CMTSID, T.DOWNID, T.UPID, T.CMID,
GREATEST(T.CMTS_REBOOT, T.UP_REBOOT), GREATEST(T.CMTS_REBOOT, T.UP_REBOOT), R.DO
CSIFCMTSSERVICEINOCTETS, R.DOCSIFCMTSSERVICEOUTOCTETS, S.SID, L.PREV_SECONDID, L
.PREV_IFINOCTETS, L.PREV_IFOUTOCTETS, L.PREV_SID FROM TMP_TOP_SLOW_CM T, CM_RAWD

     1,213,966            1  1,213,966.0    4.0     6.05     14.45 553hp60qv7vyh
select errors.TOPOLOGYID, errors.SAMPLE_LENGTH, UNIQUE_CMS, ACTIVE_CMS, CHANNELW
IDTH, BITSPERSYMBOL, SNR_DOWN, RXPOWER_DOWN FROM CM_ERRORS errors, CM_POWER_2 po
wer, TOPOLOGY_LINK link, DOWNSTREAM_CHANNEL channel where errors.SECONDID = powe
r.SECONDID AND errors.SECONDID = :1 AND errors.TOPOLOGYID = power.TOPOLOGYID AND

     1,065,052            1  1,065,052.0    3.5     6.69     72.01 4qunm1qbf8cyk
select power.TOPOLOGYID, power.SAMPLE_LENGTH, UNIQUE_CMS, ACTIVE_CMS, CHANNELWID
TH, RXPOWER_UP, RXPOWER UPSTREAM_AVG_RX FROM CM_POWER_1 power, TOPOLOGY_LINK lin
k, UPSTREAM_CHANNEL channel, UPSTREAM_POWER_1 upstream_rx WHERE power.SECONDID =
 :1 and power.SECONDID = upstream_rx.secondid AND link.TOPOLOGYID = power.TOPOLO

     1,011,784            1  1,011,784.0    3.4     8.52     84.62 998t5bbdfm5rm
INSERT INTO CM_RAWDATA SELECT PROFINDX, 0 BATCHID, TOPOLOGYID, SAMPLETIME, SYSUP
TIME, DOCSIFCMTSCMSTATUSVALUE, DOCSIFCMTSSERVICEINOCTETS, DOCSIFCMTSSERVICEOUTOC
TETS, DOCSIFCMSTATUSTXPOWER, DOCSIFCMTSCMSTATUSRXPOWER, DOCSIFDOWNCHANNELPOWER,
DOCSIFSIGQUNERROREDS, DOCSIFSIGQCORRECTEDS, DOCSIFSIGQUNCORRECTABLES, DOCSIFSIGQ

       776,443            1    776,443.0    2.6     7.66     73.54 9h99br1t3qq3a
INSERT INTO TMP_CALC_HFC_SLOW_CM_LAST SELECT * FROM TMP_CALC_HFC_SLOW_CM_LAST_TM
P

       762,710            1    762,710.0    2.5     5.82     95.88 2r6jnnf1hzb4z
select power.TOPOLOGYID, power.SAMPLE_LENGTH, UNIQUE_CMS, ACTIVE_CMS, BITSPERSYM
BOL, TXPOWER_UP FROM CM_POWER_2 power, TOPOLOGY_LINK link, UPSTREAM_CHANNEL chan
nel WHERE power.SECONDID = :1 AND link.TOPOLOGYID = power.TOPOLOGYID AND link.PA
RENTLEN = 1 AND link.STATEID = 1 AND link.LINKTYPEID = 1 AND link.PARENTID = cha

       724,267            1    724,267.0    2.4     7.43     63.59 fqcwt6uak8x3w
INSERT INTO TMP_CALC_QOS_SLOW_CM_LAST SELECT * FROM TMP_CALC_QOS_SLOW_CM_LAST_TM
P

       669,534            1    669,534.0    2.2     6.37     38.97 094vgzny6jvm4
INSERT INTO CM_VA ( SECONDID, TOPOLOGYID, CER, CCER, SNR, STATUSVALUE, TIMINGOFF
SET ) SELECT :B3 , TOPOLOGYID, CASE WHEN (CMTSCM_UNERR_D IS NULL OR CMTSCM_CORR_
D IS NULL OR CMTSCM_UNCORR_D IS NULL) THEN NULL ELSE 100 * CMTSCM_UNCORR_D/TOTAL
SQL ordered by Gets                      DB/Inst: CDB10/cdb10  Snaps: 122-123
-> Resources reported for PL/SQL code includes the resources used by all SQL
   statements called by the code.
-> Total Buffer Gets:      30,077,723
-> Captured SQL account for     169.4% of Total

                                Gets              CPU     Elapsed
  Buffer Gets   Executions    per Exec   %Total Time (s)  Time (s)    SQL Id
-------------- ------------ ------------ ------ -------- --------- -------------
_D END CER, CASE WHEN (CMTSCM_UNERR_D IS NULL OR CMTSCM_CORR_D IS NULL OR CMTSCM

       633,947      150,259          4.2    2.1    18.21     40.04 c2a2g4fqnm25h
insert into cm_rawdata (profindx, batchid, topologyid, sampletime, sysuptime, do
csifcmstatustxpower, docsifdownchannelpower, docsifsigqunerroreds, docsifsigqcor
recteds, docsifsigquncorrectables, docsifsigqsignalnoise, sysobjectid) values (:
1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11,:12)

       618,871      150,324          4.1    2.1    18.56     51.78 6xz6vg8q1zygu
insert into cm_rawdata (profindx, batchid, topologyid, sampletime, docsifcmtscms
tatusvalue, docsifcmtsserviceinoctets, docsifcmtsserviceoutoctets, docsifcmtscms
tatusrxpower, cmtscm_unerr, cmtscm_corr, cmtscm_uncorr, cmtscm_snr, cmtscm_timin
goffset) values (:1, :2, :3, :4, :5, :6, :7, :8, :9, :10, :11, :12, :13)

       615,244            1    615,244.0    2.0     9.03    130.46 6n0d6cv6w6krs
DELETE FROM CM_VA WHERE SECONDID <= :B1

       615,129            1    615,129.0    2.0     9.26    130.03 86m0m9q8fw9bj
DELETE FROM CM_QOS_PROF WHERE SECONDID <= :B1

       614,747            1    614,747.0    2.0     8.96    117.43 0fnnktt50m86h
DELETE FROM CM_ERRORS WHERE SECONDID <= :B1

       614,661            1    614,661.0    2.0     8.88    124.47 gyqv6h5pft4mj
DELETE FROM CM_BYTES WHERE SECONDID <= :B1

       614,649            1    614,649.0    2.0    10.68    107.01 87gy6mxtk7f3z
DELETE FROM CM_POLL_STATUS WHERE TOPOLOGYID IN ( SELECT DISTINCT TOPOLOGYID FROM
 CM_RAWDATA WHERE BATCHID = :B1 )

       613,965            1    613,965.0    2.0     8.87    119.15 aywfs0n7wwwhn
DELETE FROM CM_POWER_2 WHERE SECONDID <= :B1

       613,256            1    613,256.0    2.0     9.01    107.53 21jqxqyf80cn8
DELETE FROM CM_POWER_1 WHERE SECONDID <= :B1

       598,348      150,832          4.0    2.0    22.39     76.71 5zm9acqtd51h7
insert into cm_sid_rawdata (profindx, batchid, topologyid, sid, sampletime, docs
IfCmtsServiceQosProfile) values (:1, :2, :3, :4, :5, :6)

       343,903            1    343,903.0    1.1     2.45     11.06 8b7g4s4qa5r1d
INSERT INTO UPSTREAM_POWER_1 SELECT :B4 , T.UPID, :B4 - :B3 , ROUND(AVG(C.DOCSIF
CMTSCMSTATUSRXPOWER), 0) FROM CM_RAWDATA C, TMP_TOP_SLOW_CM T WHERE C.TOPOLOGYID
 = T.CMID AND C.BATCHID = :B2 AND C.PROFINDX = :B1 GROUP BY T.UPID

       301,471            1    301,471.0    1.0     2.66     68.37 bzmccctnyjb3z
INSERT INTO DOWNSTREAM_ERRORS SELECT T2.SECONDID, T1.DOWNID, ROUND(AVG(T2.SAMPLE
_LENGTH), 0), ROUND(AVG(DECODE(T2.UNERROREDS + T2.CORRECTEDS + T2.UNCORRECTABLES
,0,0, T2.UNCORRECTABLES / ( T2.UNERROREDS + T2.CORRECTEDS + T2.UNCORRECTABLES )
* 100)) ,2) AVG_CER, ROUND(AVG(DECODE(T2.UNERROREDS + T2.CORRECTEDS + T2.UNCORRE

          -------------------------------------------------------------

SQL ordered by Reads                     DB/Inst: CDB10/cdb10  Snaps: 122-123
-> Total Disk Reads:         401,992
-> Captured SQL account for    134.7% of Total

                               Reads              CPU     Elapsed
Physical Reads  Executions    per Exec   %Total Time (s)  Time (s)    SQL Id
-------------- ----------- ------------- ------ -------- --------- -------------
       192,597           1     192,597.0   47.9   133.81    796.60 f1qcyh20550cf
Call CALC_QOS_SLOW(:1, :2, :3, :4)

       144,969           1     144,969.0   36.1    71.96    136.75 298wmz1kxjs1m
INSERT INTO CM_QOS_PROF SELECT :B1 , R.TOPOLOGYID, :B1 - :B4 , P.NODE_PROFILE_ID
, R.DOCSIFCMTSSERVICEQOSPROFILE FROM CM_SID_RAWDATA R, ( SELECT DISTINCT T.CMID,
 P.QOS_PROF_IDX, P.NODE_PROFILE_ID FROM TMP_TOP_SLOW_CM T, CMTS_QOS_PROF P WHERE
 T.CMTSID = P.TOPOLOGYID AND P.SECONDID = :B1 ) P WHERE R.BATCHID = :B3 AND R.PR

        28,436           4       7,109.0    7.1     4.42    201.93 dr1rkrznhh95b
Call CALC_TOPOLOGY_MEDIUM(:1, :2, :3, :4)

        22,352           1      22,352.0    5.6    24.50    354.27 0cjsxw5ndqdbc
Call CALC_HFC_SLOW(:1, :2, :3, :4)

        21,907           1      21,907.0    5.4    57.60    773.15 fj6gjgsshtxyx
Call CALC_DELETE_OLD_DATA(:1)

        15,834           0           N/A    3.9    15.56    158.02 10dkqv3kr8xa5
 SELECT trunc(SYSDATE, 'HH24') HOUR_STAMP, CM_ID, MA
X(SUBSTR(CM_DESC, 1, 12)) CM_DESC, MAX(UP_ID) UP_ID, MA
X(DOWN_ID) DOWN_ID, MAX(MAC_ID) MAC_ID, MAX(CMTS_
ID) CMTS_ID, SUM(BYTES_UP) SUM_BYTES_UP, SUM(BY

        15,050           1      15,050.0    3.7    29.25    275.28 8t8as9usk11qw
Call CALC_TOPOLOGY_SLOW(:1, :2, :3, :4)

        13,424           1      13,424.0    3.3     6.12     58.83 fd6a0p6333g8z
 SELECT trunc(SYSDATE, 'HH24') HOUR_STAMP, CM_ID, MA
X(SUBSTR(CM_DESC, 1, 12)) CM_DESC, MAX(UP_ID) UP_ID, MA
X(DOWN_ID) DOWN_ID, MAX(MAC_ID) MAC_ID, MAX(CMTS_
ID) CMTS_ID, SUM(BYTES_UP) SUM_BYTES_UP, SUM(BY

        10,667           1      10,667.0    2.7     2.92    125.63 33bpz9dh1w5jk
Module: Lab128
--lab128 select /*+rule*/ owner, segment_name||decode(partition_name,null,nul
l,' ('||partition_name||')') name, segment_type,tablespace_name, extent_id,f
ile_id,block_id, blocks,bytes/1048576 bytes from dba_extents

         9,156           4       2,289.0    2.3     1.68    119.84 4zjg6w4mwu0wv
INSERT INTO TMP_TOP_MED_DN SELECT M.CMTSID, M.VENDOR_DESC, M.MODEL_DESC, MAC_L.T
OPOLOGYID, DOWN_L.TOPOLOGYID, M.UP_SNR_CNR_A3, M.UP_SNR_CNR_A2, M.UP_SNR_CNR_A1,
 M.UP_SNR_CNR_A0, M.MAC_SLOTS_OPEN, M.MAC_SLOTS_USED, M.CMTS_REBOOT, 0 FROM TMP_
TOP_MED_CMTS M, TOPOLOGY_LINK DOWN_L, TOPOLOGY_NODE DOWN_N, TOPOLOGY_LINK MAC_L

         8,700           1       8,700.0    2.2     3.68     86.86 axyukfdx12pu4
Call CALC_DELETE_SLOW_RAWDATA(:1, :2)

         6,878           1       6,878.0    1.7     8.99     73.62 3whpusvtv0qq1
INSERT INTO TMP_CALC_QOS_SLOW_CM_TMP SELECT T.CMTSID, T.DOWNID, T.UPID, T.CMID,
GREATEST(T.CMTS_REBOOT, T.UP_REBOOT), GREATEST(T.CMTS_REBOOT, T.UP_REBOOT), R.DO
CSIFCMTSSERVICEINOCTETS, R.DOCSIFCMTSSERVICEOUTOCTETS, S.SID, L.PREV_SECONDID, L
.PREV_IFINOCTETS, L.PREV_IFOUTOCTETS, L.PREV_SID FROM TMP_TOP_SLOW_CM T, CM_RAWD

         5,338           1       5,338.0    1.3     6.37     38.97 094vgzny6jvm4
INSERT INTO CM_VA ( SECONDID, TOPOLOGYID, CER, CCER, SNR, STATUSVALUE, TIMINGOFF
SET ) SELECT :B3 , TOPOLOGYID, CASE WHEN (CMTSCM_UNERR_D IS NULL OR CMTSCM_CORR_
D IS NULL OR CMTSCM_UNCORR_D IS NULL) THEN NULL ELSE 100 * CMTSCM_UNCORR_D/TOTAL
_D END CER, CASE WHEN (CMTSCM_UNERR_D IS NULL OR CMTSCM_CORR_D IS NULL OR CMTSCM

SQL ordered by Reads                     DB/Inst: CDB10/cdb10  Snaps: 122-123
-> Total Disk Reads:         401,992
-> Captured SQL account for    134.7% of Total

                               Reads              CPU     Elapsed
Physical Reads  Executions    per Exec   %Total Time (s)  Time (s)    SQL Id
-------------- ----------- ------------- ------ -------- --------- -------------
         4,337           4       1,084.3    1.1     0.36      5.60 46jpzuthyv6wa
Module: Lab128
--lab128 select se.fa_se, uit.ui, uipt.uip, uist.uis, fr_s.fr_se, t.dt from (se
lect /*+ all_rows */ count(*) fa_se from (select ts#,max(length) m from sys.fet$
 group by ts#) f, sys.seg$ s where s.ts#=f.ts# and extsize>m) se, (select count(
*) ui from sys.ind$ where bitand(flags,1)=1) uit, (select count(*) uip from sys.

         4,197           1       4,197.0    1.0     2.45     11.06 8b7g4s4qa5r1d
INSERT INTO UPSTREAM_POWER_1 SELECT :B4 , T.UPID, :B4 - :B3 , ROUND(AVG(C.DOCSIF
CMTSCMSTATUSRXPOWER), 0) FROM CM_RAWDATA C, TMP_TOP_SLOW_CM T WHERE C.TOPOLOGYID
 = T.CMID AND C.BATCHID = :B2 AND C.PROFINDX = :B1 GROUP BY T.UPID

          -------------------------------------------------------------

SQL ordered by Executions                DB/Inst: CDB10/cdb10  Snaps: 122-123
-> Total Executions:         542,597
-> Captured SQL account for     86.2% of Total

                                              CPU per    Elap per
 Executions   Rows Processed  Rows per Exec   Exec (s)   Exec (s)     SQL Id
------------ --------------- -------------- ---------- ----------- -------------
     150,832         150,324            1.0       0.00        0.00 5zm9acqtd51h7
insert into cm_sid_rawdata (profindx, batchid, topologyid, sid, sampletime, docs
IfCmtsServiceQosProfile) values (:1, :2, :3, :4, :5, :6)

     150,324         150,324            1.0       0.00        0.00 6xz6vg8q1zygu
insert into cm_rawdata (profindx, batchid, topologyid, sampletime, docsifcmtscms
tatusvalue, docsifcmtsserviceinoctets, docsifcmtsserviceoutoctets, docsifcmtscms
tatusrxpower, cmtscm_unerr, cmtscm_corr, cmtscm_uncorr, cmtscm_snr, cmtscm_timin
goffset) values (:1, :2, :3, :4, :5, :6, :7, :8, :9, :10, :11, :12, :13)

     150,259         150,259            1.0       0.00        0.00 c2a2g4fqnm25h
insert into cm_rawdata (profindx, batchid, topologyid, sampletime, sysuptime, do
csifcmstatustxpower, docsifdownchannelpower, docsifsigqunerroreds, docsifsigqcor
recteds, docsifsigquncorrectables, docsifsigqsignalnoise, sysobjectid) values (:
1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11,:12)

       8,128           8,128            1.0       0.00        0.01 12a0nrhpk3hym
UPDATE TOPOLOGY_LINK SET DATETO=sysdate, STATEID=0 WHERE TOPOLOGYID=:1 AND PAREN
TID=:2 AND STATEID=1

         977             977            1.0       0.00        0.12 5jh6zfmvpu77f
UPDATE ASH.DBIDS@REPO SET ASHSEQ = :B2 WHERE DBID = :B1

         624             624            1.0       0.00        0.00 7h35uxf5uhmm1
select sysdate from dual

         624               0            0.0       0.00        0.00 apuw5pk7p77hc
ALTER SESSION SET ISOLATION_LEVEL = READ COMMITTED

         595           7,140           12.0       0.01        0.01 d5vf5a1ffcskb
Module: Lab128
--lab128 select replace(stat_name,'TICKS','TIME') stat_name,value from v$osstat
 where substr(stat_name,1,3) !='AVG'

         567             567            1.0       0.00        0.00 bsa0wjtftg3uw
select file# from file$ where ts#=:1

         556             556            1.0       0.01        0.02 7gtztzv329wg0
select c.name, u.name from con$ c, cdef$ cd, user$ u where c.con# = cd.con# and
 cd.enabled = :1 and c.owner# = u.user#

          -------------------------------------------------------------

SQL ordered by Parse Calls               DB/Inst: CDB10/cdb10  Snaps: 122-123
-> Total Parse Calls:          11,460
-> Captured SQL account for      56.7% of Total

                            % Total
 Parse Calls  Executions     Parses    SQL Id
------------ ------------ --------- -------------
         624          624      5.45 7h35uxf5uhmm1
select sysdate from dual

         624          624      5.45 apuw5pk7p77hc
ALTER SESSION SET ISOLATION_LEVEL = READ COMMITTED

         567          567      4.95 bsa0wjtftg3uw
select file# from file$ where ts#=:1

         556          556      4.85 7gtztzv329wg0
select c.name, u.name from con$ c, cdef$ cd, user$ u where c.con# = cd.con# and
 cd.enabled = :1 and c.owner# = u.user#

         508      150,832      4.43 5zm9acqtd51h7
insert into cm_sid_rawdata (profindx, batchid, topologyid, sid, sampletime, docs
IfCmtsServiceQosProfile) values (:1, :2, :3, :4, :5, :6)

         448          448      3.91 0h6b2sajwb74n
select privilege#,level from sysauth$ connect by grantee#=prior privilege# and p
rivilege#>0 start with grantee#=:1 and privilege#>0

         411          411      3.59 9qgtwh66xg6nz
update seg$ set type#=:4,blocks=:5,extents=:6,minexts=:7,maxexts=:8,extsize=:9,e
xtpct=:10,user#=:11,iniexts=:12,lists=decode(:13, 65535, NULL, :13),groups=decod
e(:14, 65535, NULL, :14), cachehint=:15, hwmincr=:16, spare1=DECODE(:17,0,NULL,:
17),scanhint=:18 where ts#=:1 and file#=:2 and block#=:3

         297          297      2.59 350f5yrnnmshs
lock table sys.mon_mods$ in exclusive mode nowait

         297          297      2.59 g00cj285jmgsw
update sys.mon_mods$ set inserts = inserts + :ins, updates = updates + :upd, del
etes = deletes + :del, flags = (decode(bitand(flags, :flag), :flag, flags, flags
 + :flag)), drop_segments = drop_segments + :dropseg, timestamp = :time where ob
j# = :objn

         181          181      1.58 6129566gyvx21
Module: OEM.SystemPool
SELECT INSTANTIABLE, supertype_owner, supertype_name, LOCAL_ATTRIBUTES FROM all_
types WHERE type_name = :1 AND owner = :2

         144          144      1.26 0k8522rmdzg4k
select privilege# from sysauth$ where (grantee#=:1 or grantee#=1) and privilege#
>0

         128          128      1.12 cp8ygp2mr8j6s
select * from TOPOLOGY_NODETYPE where NODETYPEID < 0

         117          117      1.02 2b064ybzkwf1y
Module: OEM.SystemPool
BEGIN EMD_NOTIFICATION.QUEUE_READY(:1, :2, :3); END;

         117          117      1.02 9p1um1wd886xb
select o.owner#, u.name, o.name, o.namespace, o.obj#, d.d
_timestamp, nvl(d.property,0), o.type#, o.subname, d.d_attrs from dependency$ d
, obj$ o, user$ u where d.p_obj#=:1 and (d.p_timestamp=:2 or d.property=2)
and d.d_obj#=o.obj# and o.owner#=u.user# order by o.obj#

         116          116      1.01 9zg6y3ucgy8kb
select n.intcol# from ntab$ n, col$ c where n.obj#=:1 and c.obj#=:1 and c.intco
SQL ordered by Parse Calls               DB/Inst: CDB10/cdb10  Snaps: 122-123
-> Total Parse Calls:          11,460
-> Captured SQL account for      56.7% of Total

                            % Total
 Parse Calls  Executions     Parses    SQL Id
------------ ------------ --------- -------------
l#=n.intcol# and bitand(c.property, 32768)!=32768

          -------------------------------------------------------------

SQL ordered by Sharable Memory           DB/Inst: CDB10/cdb10  Snaps: 122-123

                  No data exists for this section of the report.
          -------------------------------------------------------------

SQL ordered by Version Count             DB/Inst: CDB10/cdb10  Snaps: 122-123

                  No data exists for this section of the report.
          -------------------------------------------------------------

Instance Activity Stats                  DB/Inst: CDB10/cdb10  Snaps: 122-123

Statistic                                     Total     per Second     per Trans
-------------------------------- ------------------ -------------- -------------
CPU used by this session                     48,802           13.5          23.9
CPU used when call started                   49,725           13.8          24.3
CR blocks created                             1,548            0.4           0.8
Cached Commit SCN referenced                  4,257            1.2           2.1
Commit SCN cached                                19            0.0           0.0
DB time                                   2,051,539          567.4       1,002.7
DBWR checkpoint buffers written               7,052            2.0           3.5
DBWR checkpoints                                 78            0.0           0.0
DBWR object drop buffers written                352            0.1           0.2
DBWR revisited being-written buf                281            0.1           0.1
DBWR thread checkpoint buffers w              6,008            1.7           2.9
DBWR transaction table writes                   169            0.1           0.1
DBWR undo block writes                       86,711           24.0          42.4
IMU CR rollbacks                                196            0.1           0.1
IMU Flushes                                   1,921            0.5           0.9
IMU Redo allocation size                  4,831,688        1,336.3       2,361.5
IMU commits                                   1,095            0.3           0.5
IMU contention                                   51            0.0           0.0
IMU ktichg flush                                 11            0.0           0.0
IMU pool not allocated                          261            0.1           0.1
IMU recursive-transaction flush                   5            0.0           0.0
IMU undo allocation size                  8,282,272        2,290.7       4,048.0
IMU- failed to get a private str                261            0.1           0.1
PX local messages recv'd                          0            0.0           0.0
PX local messages sent                            0            0.0           0.0
SMON posted for undo segment shr                  8            0.0           0.0
SQL*Net roundtrips to/from clien            557,524          154.2         272.5
SQL*Net roundtrips to/from dblin              5,571            1.5           2.7
active txn count during cleanout            667,416          184.6         326.2
application wait time                         2,949            0.8           1.4
auto extends on undo tablespace                   0            0.0           0.0
background checkpoints completed                 33            0.0           0.0
background checkpoints started                   32            0.0           0.0
background timeouts                          10,887            3.0           5.3
branch node splits                               14            0.0           0.0
buffer is not pinned count               16,308,390        4,510.5       7,970.9
buffer is pinned count                   37,217,420       10,293.4      18,190.3
bytes received via SQL*Net from          54,299,124       15,017.8      26,539.2
bytes received via SQL*Net from             702,510          194.3         343.4
bytes sent via SQL*Net to client         59,493,239       16,454.4      29,077.8
bytes sent via SQL*Net to dblink          4,758,313        1,316.0       2,325.7
calls to get snapshot scn: kcmgs            102,555           28.4          50.1
calls to kcmgas                             122,772           34.0          60.0
calls to kcmgcs                             666,871          184.4         325.9
change write time                            93,636           25.9          45.8
cleanout - number of ktugct call            694,894          192.2         339.6
cleanouts and rollbacks - consis                524            0.1           0.3
cleanouts only - consistent read             16,400            4.5           8.0
cluster key scan block gets                  62,504           17.3          30.6
cluster key scans                            44,624           12.3          21.8
commit batch performed                            5            0.0           0.0
commit batch requested                            5            0.0           0.0
commit batch/immediate performed                 49            0.0           0.0
commit batch/immediate requested                 49            0.0           0.0
commit cleanout failures: block              10,148            2.8           5.0
commit cleanout failures: buffer                 39            0.0           0.0
commit cleanout failures: callba                 93            0.0           0.1
commit cleanout failures: cannot                  2            0.0           0.0
commit cleanouts                             49,810           13.8          24.4
commit cleanouts successfully co             39,528           10.9          19.3
Instance Activity Stats                  DB/Inst: CDB10/cdb10  Snaps: 122-123

Statistic                                     Total     per Second     per Trans
-------------------------------- ------------------ -------------- -------------
commit immediate performed                       44            0.0           0.0
commit immediate requested                       44            0.0           0.0
commit txn count during cleanout             37,416           10.4          18.3
concurrency wait time                         6,361            1.8           3.1
consistent changes                          375,588          103.9         183.6
consistent gets                          19,788,311        5,473.0       9,671.7
consistent gets - examination            15,781,101        4,364.7       7,713.2
consistent gets direct                            2            0.0           0.0
consistent gets from cache               19,788,309        5,473.0       9,671.7
current blocks converted for CR                   1            0.0           0.0
cursor authentications                           60            0.0           0.0
data blocks consistent reads - u              7,046            2.0           3.4
db block changes                          9,922,875        2,744.4       4,849.9
db block gets                            10,289,412        2,845.8       5,029.0
db block gets direct                          3,341            0.9           1.6
db block gets from cache                 10,286,071        2,844.9       5,027.4
deferred (CURRENT) block cleanou             10,217            2.8           5.0
dirty buffers inspected                     142,881           39.5          69.8
enqueue conversions                          13,940            3.9           6.8
enqueue releases                             71,947           19.9          35.2
enqueue requests                             71,973           19.9          35.2
enqueue timeouts                                 34            0.0           0.0
enqueue waits                                    65            0.0           0.0
exchange deadlocks                                0            0.0           0.0
execute count                               542,597          150.1         265.2
free buffer inspected                       536,842          148.5         262.4
free buffer requested                       511,414          141.4         250.0
global undo segment hints helped                  0            0.0           0.0
global undo segment hints were s                  0            0.0           0.0
heap block compress                          23,794            6.6          11.6
hot buffers moved to head of LRU             35,300            9.8          17.3
immediate (CR) block cleanout ap             16,924            4.7           8.3
immediate (CURRENT) block cleano             40,644           11.2          19.9
index fast full scans (full)                     11            0.0           0.0
index fetch by key                        9,609,838        2,657.9       4,696.9
index scans kdiixs1                         540,504          149.5         264.2
leaf node 90-10 splits                        3,675            1.0           1.8
leaf node splits                              7,868            2.2           3.9
lob reads                                        10            0.0           0.0
lob writes                                      597            0.2           0.3
lob writes unaligned                            597            0.2           0.3
logons cumulative                               179            0.1           0.1
messages received                            36,800           10.2          18.0
messages sent                                36,800           10.2          18.0
no buffer to keep pinned count                    0            0.0           0.0
no work - consistent read gets            3,414,669          944.4       1,669.0
opened cursors cumulative                    11,030            3.1           5.4
parse count (failures)                           11            0.0           0.0
parse count (hard)                              263            0.1           0.1
parse count (total)                          11,460            3.2           5.6
parse time cpu                                  184            0.1           0.1
parse time elapsed                            5,105            1.4           2.5
physical read IO requests                   286,506           79.2         140.0
physical read bytes                   3,293,118,464      910,795.7   1,609,539.8
physical read total IO requests             312,883           86.5         152.9
physical read total bytes             3,723,894,784    1,029,937.9   1,820,085.4
physical read total multi block              16,936            4.7           8.3
physical reads                              401,992          111.2         196.5
physical reads cache                        391,309          108.2         191.3
physical reads cache prefetch               106,160           29.4          51.9
Instance Activity Stats                  DB/Inst: CDB10/cdb10  Snaps: 122-123

Statistic                                     Total     per Second     per Trans
-------------------------------- ------------------ -------------- -------------
physical reads direct                        10,683            3.0           5.2
physical reads direct (lob)                       2            0.0           0.0
physical reads direct temporary              10,450            2.9           5.1
physical write IO requests                  124,209           34.4          60.7
physical write bytes                  1,423,941,632      393,827.3     695,963.7
physical write total IO requests            135,013           37.3          66.0
physical write total bytes            3,039,874,048      840,754.5   1,485,764.4
physical write total multi block              9,946            2.8           4.9
physical writes                             173,821           48.1          85.0
physical writes direct                       15,138            4.2           7.4
physical writes direct (lob)                      3            0.0           0.0
physical writes direct temporary             13,312            3.7           6.5
physical writes from cache                  158,683           43.9          77.6
physical writes non checkpoint              171,458           47.4          83.8
pinned buffers inspected                      1,327            0.4           0.7
prefetched blocks aged out befor                971            0.3           0.5
process last non-idle time                    5,863            1.6           2.9
recovery blocks read                              0            0.0           0.0
recursive calls                             110,227           30.5          53.9
recursive cpu usage                          28,845            8.0          14.1
redo blocks read for recovery                     0            0.0           0.0
redo blocks written                       2,951,190          816.2       1,442.4
redo buffer allocation retries                4,972            1.4           2.4
redo entries                              4,971,193        1,374.9       2,429.7
redo log space requests                       1,018            0.3           0.5
redo log space wait time                     16,736            4.6           8.2
redo ordering marks                          86,212           23.8          42.1
redo size                             1,462,839,100      404,585.4     714,975.1
redo synch time                             114,641           31.7          56.0
redo synch writes                             5,072            1.4           2.5
redo wastage                                773,164          213.8         377.9
redo write time                             208,649           57.7         102.0
redo writer latching time                         9            0.0           0.0
redo writes                                   2,820            0.8           1.4
rollback changes - undo records               7,908            2.2           3.9
rollbacks only - consistent read              1,010            0.3           0.5
rows fetched via callback                 6,732,803        1,862.1       3,290.7
session connect time                              0            0.0           0.0
session cursor cache hits                     6,009            1.7           2.9
session logical reads                    30,077,723        8,318.8      14,700.7
session pga memory                       87,991,760       24,336.4      43,006.7
session pga memory max                  128,361,936       35,501.8      62,738.0
session uga memory                  262,000,976,040   72,463,036.0 #############
session uga memory max                  122,117,960       33,774.8      59,686.2
shared hash latch upgrades - no             918,434          254.0         448.9
shared hash latch upgrades - wai                  3            0.0           0.0
sorts (disk)                                      0            0.0           0.0
sorts (memory)                               32,808            9.1          16.0
sorts (rows)                              1,889,801          522.7         923.7
sql area purged                                  58            0.0           0.0
summed dirty queue length                 2,498,747          691.1       1,221.3
switch current to new buffer                 10,984            3.0           5.4
table fetch by rowid                     20,173,244        5,579.4       9,859.9
table fetch continued row                         9            0.0           0.0
table scan blocks gotten                    227,381           62.9         111.1
table scan rows gotten                   22,027,503        6,092.3      10,766.1
table scans (cache partitions)                    0            0.0           0.0
table scans (long tables)                       176            0.1           0.1
table scans (short tables)                    5,560            1.5           2.7
total number of times SMON poste                172            0.1           0.1
Instance Activity Stats                  DB/Inst: CDB10/cdb10  Snaps: 122-123

Statistic                                     Total     per Second     per Trans
-------------------------------- ------------------ -------------- -------------
transaction rollbacks                            49            0.0           0.0
transaction tables consistent re                  7            0.0           0.0
transaction tables consistent re                254            0.1           0.1
undo change vector size                 619,905,088      171,450.5     302,983.9
user I/O wait time                          233,992           64.7         114.4
user calls                                  560,283          155.0         273.8
user commits                                  1,614            0.5           0.8
user rollbacks                                  432            0.1           0.2
workarea executions - onepass                     4            0.0           0.0
workarea executions - optimal                36,889           10.2          18.0
write clones created in backgrou                169            0.1           0.1
write clones created in foregrou                830            0.2           0.4
          -------------------------------------------------------------

Instance Activity Stats - Absolute ValuesDB/Inst: CDB10/cdb10  Snaps: 122-123
-> Statistics with absolute values (should not be diffed)

Statistic                            Begin Value       End Value
-------------------------------- --------------- ---------------
session cursor cache count                36,864          38,406
opened cursors current                       895             925
workarea memory allocated                 33,293          34,475
logons current                                36              37
          -------------------------------------------------------------

Instance Activity Stats - Thread Activity DB/Inst: CDB10/cdb10  Snaps: 122-123
-> Statistics identified by '(derived)' come from sources other than SYSSTAT

Statistic                                     Total  per Hour
-------------------------------- ------------------ ---------
log switches (derived)                           32     31.86
          -------------------------------------------------------------

Tablespace IO Stats                      DB/Inst: CDB10/cdb10  Snaps: 122-123
-> ordered by IOs (Reads + Writes) desc

Tablespace
------------------------------
                 Av      Av     Av                       Av     Buffer Av Buf
         Reads Reads/s Rd(ms) Blks/Rd       Writes Writes/s      Waits Wt(ms)
-------------- ------- ------ ------- ------------ -------- ---------- ------
TS_STARGUS
       194,616      54    8.3     1.2       43,074       12          0    0.0
TEMP
        73,213      20    5.1     1.4       13,433        4          0    0.0
UNDOTBS1
           998       0   34.5     1.0       65,474       18        152  325.0
SYSTEM
         9,656       3   12.1     5.1          254        0          2  300.0
SYSAUX
         6,768       2   16.5     1.1        1,773        0          2   10.0
PERFSTAT
           661       0   35.7     1.0          271        0          0    0.0
EXAMPLE
           482       0   13.4     1.0           33        0          0    0.0
USERS
           105       0    8.7     1.0           33        0          0    0.0
          -------------------------------------------------------------

File IO Stats                            DB/Inst: CDB10/cdb10  Snaps: 122-123
-> ordered by Tablespace, File

Tablespace               Filename
------------------------ ----------------------------------------------------
                 Av      Av     Av                       Av     Buffer Av Buf
         Reads Reads/s Rd(ms) Blks/Rd       Writes Writes/s      Waits Wt(ms)
-------------- ------- ------ ------- ------------ -------- ---------- ------
EXAMPLE                  /export/home/oracle10/oradata/cdb10/example01.dbf
           482       0   13.4     1.0           33        0          0    0.0
PERFSTAT                 /export/home/oracle10/oradata/cdb10/perfstat01.dbf
           661       0   35.7     1.0          271        0          0    0.0
SYSAUX                   /export/home/oracle10/oradata/cdb10/sysaux01.dbf
         6,768       2   16.5     1.1        1,773        0          2   10.0
SYSTEM                   /export/home/oracle10/oradata/cdb10/system01.dbf
         9,656       3   12.1     5.1          254        0          2  300.0
TEMP                     /export/home/oracle10/oradata/cdb10/temp01.dbf
        73,213      20    5.1     1.4       13,433        4          0    N/A
TS_STARGUS               /export/home/oracle10/oradata/cdb10/ts_stargus_01.db
       194,616      54    8.3     1.2       43,074       12          0    0.0
UNDOTBS1                 /export/home/oracle10/oradata/cdb10/undotbs01.dbf
           998       0   34.5     1.0       65,474       18        152  325.0
USERS                    /export/home/oracle10/oradata/cdb10/users01.dbf
           105       0    8.7     1.0           33        0          0    0.0
          -------------------------------------------------------------

Buffer Pool Statistics                   DB/Inst: CDB10/cdb10  Snaps: 122-123
-> Standard block size Pools  D: default,  K: keep,  R: recycle
-> Default Pools for other block sizes: 2k, 4k, 8k, 16k, 32k

                                                            Free Writ     Buffer
     Number of Pool         Buffer     Physical    Physical Buff Comp       Busy
P      Buffers Hit%           Gets        Reads      Writes Wait Wait      Waits
--- ---------- ---- -------------- ------------ ----------- ---- ---- ----------
D        3,465   99     30,072,012      391,303     159,176 ####    8        156
          -------------------------------------------------------------

Instance Recovery Stats                   DB/Inst: CDB10/cdb10  Snaps: 122-123
-> B: Begin snapshot,  E: End snapshot

  Targt  Estd                                  Log File Log Ckpt     Log Ckpt
  MTTR   MTTR   Recovery  Actual    Target       Size    Timeout     Interval
   (s)    (s)   Estd IOs Redo Blks Redo Blks  Redo Blks Redo Blks   Redo Blks
- ----- ----- ---------- --------- --------- ---------- --------- ------------
B     0    20       1046    147434    184320     184320    483666          N/A
E     0    16        764     94387    184320     184320    441470          N/A
          -------------------------------------------------------------

Buffer Pool Advisory                           DB/Inst: CDB10/cdb10  Snap: 123
-> Only rows with estimated physical reads >0 are displayed
-> ordered by Block Size, Buffers For Estimate

                                        Est
                                       Phys
    Size for   Size      Buffers for   Read          Estimated
P    Est (M) Factor         Estimate Factor     Physical Reads
--- -------- ------ ---------------- ------ ------------------
D          4     .1              495    2.6          5,966,703
D          8     .3              990    1.4          3,331,760
D         12     .4            1,485    1.4          3,181,146
D         16     .6            1,980    1.3          3,073,609
D         20     .7            2,475    1.3          2,965,522
D         24     .9            2,970    1.0          2,373,562
D         28    1.0            3,465    1.0          2,334,724
D         32    1.1            3,960    1.0          2,309,994
D         36    1.3            4,455    1.0          2,278,012
D         40    1.4            4,950    1.0          2,253,921
D         44    1.6            5,445    1.0          2,231,246
D         48    1.7            5,940    0.9          2,212,530
D         52    1.9            6,435    0.9          2,184,378
D         56    2.0            6,930    0.9          2,146,358
          -------------------------------------------------------------

PGA Aggr Summary                         DB/Inst: CDB10/cdb10  Snaps: 122-123
-> PGA cache hit % - percentage of W/A (WorkArea) data processed only in-memory

PGA Cache Hit %   W/A MB Processed  Extra W/A MB Read/Written
--------------- ------------------ --------------------------
           93.7              3,557                        241
          -------------------------------------------------------------

PGA Aggr Target Stats                     DB/Inst: CDB10/cdb10  Snaps: 122-123
-> B: Begin snap   E: End snap (rows dentified with B or E contain data
   which is absolute i.e. not diffed over the interval)
-> Auto PGA Target - actual workarea memory target
-> W/A PGA Used    - amount of memory used for all Workareas (manual + auto)
-> %PGA W/A Mem    - percentage of PGA memory allocated to workareas
-> %Auto W/A Mem   - percentage of workarea memory controlled by Auto Mem Mgmt
-> %Man W/A Mem    - percentage of workarea memory under manual control

                                                %PGA  %Auto   %Man
    PGA Aggr   Auto PGA   PGA Mem    W/A PGA     W/A    W/A    W/A Global Mem
   Target(M)  Target(M)  Alloc(M)    Used(M)     Mem    Mem    Mem   Bound(K)
- ---------- ---------- ---------- ---------- ------ ------ ------ ----------
B        200        127      141.6       32.5   23.0  100.0     .0     40,960
E        200        125      144.8       33.7   23.2  100.0     .0     40,960
          -------------------------------------------------------------

PGA Aggr Target Histogram                 DB/Inst: CDB10/cdb10  Snaps: 122-123
-> Optimal Executions are purely in-memory operations

  Low     High
Optimal Optimal    Total Execs  Optimal Execs 1-Pass Execs M-Pass Execs
------- ------- -------------- -------------- ------------ ------------
     2K      4K         33,637         33,637            0            0
    64K    128K             25             25            0            0
   128K    256K              3              3            0            0
   256K    512K             26             26            0            0
   512K   1024K          2,273          2,273            0            0
     1M      2M            895            895            0            0
     4M      8M             10              8            2            0
     8M     16M             12             12            0            0
    16M     32M              2              2            0            0
    64M    128M              2              0            2            0
          -------------------------------------------------------------

PGA Memory Advisory                            DB/Inst: CDB10/cdb10  Snap: 123
-> When using Auto Memory Mgmt, minimally choose a pga_aggregate_target value
   where Estd PGA Overalloc Count is 0

                                       Estd Extra    Estd PGA   Estd PGA
PGA Target    Size           W/A MB   W/A MB Read/      Cache  Overalloc
  Est (MB)   Factr        Processed Written to Disk     Hit %      Count
---------- ------- ---------------- ---------------- -------- ----------
        25     0.1         56,190.1          4,876.0     92.0        353
        50     0.3         56,190.1          3,846.0     94.0        203
       100     0.5         56,190.1            406.6     99.0          0
       150     0.8         56,190.1            278.9    100.0          0
       200     1.0         56,190.1            278.9    100.0          0
       240     1.2         56,190.1            215.7    100.0          0
       280     1.4         56,190.1            215.7    100.0          0
       320     1.6         56,190.1            215.7    100.0          0
       360     1.8         56,190.1            215.7    100.0          0
       400     2.0         56,190.1            215.7    100.0          0
       600     3.0         56,190.1            215.7    100.0          0
       800     4.0         56,190.1            215.7    100.0          0
     1,200     6.0         56,190.1            215.7    100.0          0
     1,600     8.0         56,190.1            215.7    100.0          0
          -------------------------------------------------------------

Shared Pool Advisory                          DB/Inst: CDB10/cdb10  Snap: 123
-> SP: Shared Pool     Est LC: Estimated Library Cache   Factr: Factor
-> Note there is often a 1:Many correlation between a single logical object
   in the Library Cache, and the physical number of memory objects associated
   with it.  Therefore comparing the number of Lib Cache objects (e.g. in
   v$librarycache), with the number of Lib Cache Memory Objects is invalid.

                                        Est LC Est LC  Est LC Est LC
    Shared    SP   Est LC                 Time   Time    Load   Load      Est LC
      Pool  Size     Size       Est LC   Saved  Saved    Time   Time         Mem
   Size(M) Factr      (M)      Mem Obj     (s)  Factr     (s)  Factr    Obj Hits
---------- ----- -------- ------------ ------- ------ ------- ------ -----------
        96    .8       19        2,407 #######    1.0     882    2.0   3,172,239
       112    .9       33        3,038 #######    1.0     538    1.2   3,190,425
       128   1.0       47        4,150 #######    1.0     433    1.0   3,193,792
       144   1.1       62        5,909 #######    1.0     430    1.0   3,194,235
       160   1.3       77        7,196 #######    1.0     427    1.0   3,194,510
       176   1.4       92        8,955 #######    1.0     427    1.0   3,194,594
       192   1.5      107       10,579 #######    1.0     426    1.0   3,194,828
       208   1.6      122       12,029 #######    1.0     426    1.0   3,195,128
       224   1.8      137       13,603 #######    1.0     424    1.0   3,195,555
       240   1.9      152       14,744 #######    1.0     423    1.0   3,195,770
       256   2.0      167       15,773 #######    1.0     423    1.0   3,195,906
          -------------------------------------------------------------

SGA Target Advisory                            DB/Inst: CDB10/cdb10  Snap: 123

                  No data exists for this section of the report.
          -------------------------------------------------------------

Streams Pool Advisory                          DB/Inst: CDB10/cdb10  Snap: 123

                  No data exists for this section of the report.
          -------------------------------------------------------------

Java Pool Advisory                             DB/Inst: CDB10/cdb10  Snap: 123

                  No data exists for this section of the report.
          -------------------------------------------------------------

Buffer Wait Statistics                    DB/Inst: CDB10/cdb10  Snaps: 122-123
-> ordered by wait time desc, waits desc

Class                    Waits Total Wait Time (s)  Avg Time (ms)
------------------ ----------- ------------------- --------------
undo header                152                  49            325
data block                   4                   1            155
          -------------------------------------------------------------

Enqueue Activity                         DB/Inst: CDB10/cdb10  Snaps: 122-123
-> only enqueues with waits are shown
-> Enqueue stats gathered prior to 10g should not be compared with 10g data
-> ordered by Wait Time desc, Waits desc

Enqueue Type (Request Reason)
------------------------------------------------------------------------------
    Requests    Succ Gets Failed Gets       Waits  Wt Time (s) Av Wt Time(ms)
------------ ------------ ----------- ----------- ------------ --------------
RO-Multiple Object Reuse (fast object reuse)
         414          414           0          46           23         505.78
CF-Controlfile Transaction
       2,004        2,003           1          19            7         366.58
          -------------------------------------------------------------

Undo Segment Summary                     DB/Inst: CDB10/cdb10  Snaps: 122-123
-> Min/Max TR (mins) - Min and Max Tuned Retention (minutes)
-> STO - Snapshot Too Old count,  OOS - Out of Space count
-> Undo segment block stats:
-> uS - unexpired Stolen,   uR - unexpired Released,   uU - unexpired reUsed
-> eS - expired   Stolen,   eR - expired   Released,   eU - expired   reUsed

Undo   Num Undo       Number of  Max Qry   Max Tx Min/Max   STO/     uS/uR/uU/
 TS# Blocks (K)    Transactions  Len (s) Concurcy TR (mins) OOS      eS/eR/eU
---- ---------- --------------- -------- -------- --------- ----- --------------
   1       82.3          16,347      253        6 15/15.25  0/0   0/0/0/0/0/0
          -------------------------------------------------------------

Undo Segment Stats                        DB/Inst: CDB10/cdb10  Snaps: 122-123
-> Most recent 35 Undostat rows, ordered by Time desc

                Num Undo    Number of Max Qry  Max Tx Tun Ret STO/    uS/uR/uU/
End Time          Blocks Transactions Len (s)   Concy  (mins) OOS     eS/eR/eU
------------ ----------- ------------ ------- ------- ------- ----- ------------
31-Jul 17:54      17,588        4,451      13       6      15 0/0   0/0/0/0/0/0
31-Jul 17:44      11,302        4,215       0       4      15 0/0   0/0/0/0/0/0
31-Jul 17:34       8,066        1,832       0       4      15 0/0   0/0/0/0/0/0
31-Jul 17:24      17,412          861      90       5      15 0/0   0/0/0/0/0/0
31-Jul 17:14      15,100          892     137       3      15 0/0   0/0/0/0/0/0
31-Jul 17:04      12,857        4,096     253       6      15 0/0   0/0/0/0/0/0
          -------------------------------------------------------------

Latch Activity                           DB/Inst: CDB10/cdb10  Snaps: 122-123
-> "Get Requests", "Pct Get Miss" and "Avg Slps/Miss" are statistics for
   willing-to-wait latch get requests
-> "NoWait Requests", "Pct NoWait Miss" are for no-wait latch get requests
-> "Pct Misses" for both should be very close to 0.0

                                           Pct    Avg   Wait                 Pct
                                    Get    Get   Slps   Time       NoWait NoWait
Latch Name                     Requests   Miss  /Miss    (s)     Requests   Miss
------------------------ -------------- ------ ------ ------ ------------ ------
AWR Alerted Metric Eleme         13,936    0.0    N/A      0            0    N/A
Consistent RBA                    2,852    0.0    N/A      0            0    N/A
FOB s.o list latch                  333    0.0    N/A      0            0    N/A
In memory undo latch             30,230    0.0    0.7      8        4,148    0.0
JS mem alloc latch                    3    0.0    N/A      0            0    N/A
JS queue access latch                 3    0.0    N/A      0            0    N/A
JS queue state obj latch         25,990    0.0    N/A      0            0    N/A
JS slv state obj latch              115    0.0    N/A      0            0    N/A
KMG MMAN ready and start          1,201    0.0    N/A      0            0    N/A
KTF sga latch                        10    0.0    N/A      0        1,006    0.0
KWQMN job cache list lat            116    0.0    N/A      0            0    N/A
KWQP Prop Status                      1    0.0    N/A      0            0    N/A
MQL Tracking Latch                    0    N/A    N/A      0           72    0.0
Memory Management Latch               0    N/A    N/A      0        1,201    0.0
OS process                          573    0.0    N/A      0            0    N/A
OS process allocation             1,584    0.0    N/A      0            0    N/A
OS process: request allo            235    0.0    N/A      0            0    N/A
PL/SQL warning settings             935    0.0    N/A      0            0    N/A
SQL memory manager latch              2    0.0    N/A      0        1,177    0.0
SQL memory manager worka         92,470    0.0    N/A      0            0    N/A
Shared B-Tree                       137    0.0    N/A      0            0    N/A
active checkpoint queue          34,292    0.0    N/A      0            0    N/A
active service list               8,119    0.0    N/A      0        1,272    0.0
archive control                   1,017    0.0    N/A      0            0    N/A
begin backup scn array               92    0.0    N/A      0            0    N/A
cache buffer handles             22,997    0.0    N/A      0            0    N/A
cache buffers chains         66,867,303    0.0    0.0      0      665,222    0.0
cache buffers lru chain       1,026,321    0.1    0.0      1      135,882    0.1
cache table scan latch                0    N/A    N/A      0       16,587    0.0
channel handle pool latc            570    0.0    N/A      0            0    N/A
channel operations paren         25,362    0.1    0.0      0            0    N/A
checkpoint queue latch          369,985    0.0    0.0      0      140,728    0.0
client/application info           2,329    0.0    N/A      0            0    N/A
commit callback allocati             97    0.0    N/A      0            0    N/A
compile environment latc          7,185    0.0    N/A      0            0    N/A
dictionary lookup                    55    0.0    N/A      0            0    N/A
dml lock allocation              21,178    0.0    N/A      0            0    N/A
dummy allocation                    357    0.0    N/A      0            0    N/A
enqueue hash chains             157,981    0.0    0.0      0        5,754    0.0
enqueues                         97,190    0.0    0.0      0            0    N/A
event group latch                   118    0.0    N/A      0            0    N/A
file cache latch                    995    0.0    N/A      0            0    N/A
global KZLD latch for me             81    0.0    N/A      0            0    N/A
global tx hash mapping           10,377    0.0    N/A      0            0    N/A
hash table column usage             163    0.0    N/A      0       72,097    0.0
hash table modification             129    0.0    N/A      0            0    N/A
job workq parent latch                0    N/A    N/A      0          122    0.0
job_queue_processes para            120    0.0    N/A      0            0    N/A
kks stats                           504    0.0    N/A      0            0    N/A
ksuosstats global area            1,435    0.0    N/A      0            0    N/A
ktm global data                     194    0.0    N/A      0            0    N/A
kwqbsn:qsga                         137    0.0    N/A      0            0    N/A
lgwr LWN SCN                      2,855    0.0    0.0      0            0    N/A
library cache                 1,239,482    0.0    0.0      0          322    0.0
library cache load lock              90    0.0    N/A      0            7    0.0
library cache lock               55,083    0.0    N/A      0            0    N/A
library cache lock alloc          1,753    0.0    N/A      0            0    N/A
library cache pin             1,158,486    0.0    0.0      0            0    N/A
library cache pin alloca            584    0.0    N/A      0            0    N/A
list of block allocation          1,340    0.0    N/A      0            0    N/A
Latch Activity                           DB/Inst: CDB10/cdb10  Snaps: 122-123
-> "Get Requests", "Pct Get Miss" and "Avg Slps/Miss" are statistics for
   willing-to-wait latch get requests
-> "NoWait Requests", "Pct NoWait Miss" are for no-wait latch get requests
-> "Pct Misses" for both should be very close to 0.0

                                           Pct    Avg   Wait                 Pct
                                    Get    Get   Slps   Time       NoWait NoWait
Latch Name                     Requests   Miss  /Miss    (s)     Requests   Miss
------------------------ -------------- ------ ------ ------ ------------ ------
loader state object free            570    0.0    N/A      0            0    N/A
longop free list parent               1    0.0    N/A      0            1    0.0
message pool operations             568    0.0    N/A      0            0    N/A
messages                         99,560    0.0    0.0      0            0    N/A
mostly latch-free SCN             2,865    0.2    0.0      0            0    N/A
multiblock read objects          35,166    0.0    N/A      0            0    N/A
ncodef allocation latch              71    0.0    N/A      0            0    N/A
object queue header heap          7,276    0.0    N/A      0        7,237    0.0
object queue header oper      1,520,984    0.0    0.0      1            0    N/A
object stats modificatio            360    1.1    0.0      0            0    N/A
parallel query alloc buf            472    0.0    N/A      0            0    N/A
parameter list                      643    0.0    N/A      0            0    N/A
parameter table allocati            240    0.0    N/A      0            0    N/A
post/wait queue                   9,658    0.1    0.0      0        3,466    0.0
process allocation                  235    0.0    N/A      0          118    0.0
process group creation              235    0.0    N/A      0            0    N/A
qmn task queue latch                512    0.0    N/A      0            0    N/A
redo allocation                  25,223    0.1    0.0      0    4,972,609    0.0
redo copy                             0    N/A    N/A      0    4,972,708    0.0
redo writing                     46,698    0.0    0.0      0            0    N/A
resmgr group change latc            533    0.0    N/A      0            0    N/A
resmgr:actses active lis            950    0.0    N/A      0            0    N/A
resmgr:actses change gro            142    0.0    N/A      0            0    N/A
resmgr:free threads list            353    0.0    N/A      0            0    N/A
resmgr:schema config                597    0.0    N/A      0            0    N/A
row cache objects               231,601    0.0    0.0      0          448    0.0
rules engine aggregate s             17    0.0    N/A      0            0    N/A
rules engine rule set st            134    0.0    N/A      0            0    N/A
sequence cache                    4,464    0.0    N/A      0            0    N/A
session allocation               42,421    0.0    N/A      0            0    N/A
session idle bit              1,127,557    0.0    0.0      0            0    N/A
session state list latch            494    0.0    N/A      0            0    N/A
session switching                    71    0.0    N/A      0            0    N/A
session timer                     1,272    0.0    N/A      0            0    N/A
shared pool                      26,428    0.0    0.4      0            0    N/A
simulator hash latch          2,137,589    0.0    N/A      0            0    N/A
simulator lru latch           2,051,579    0.0    0.0      0       46,222    0.1
slave class                           2    0.0    N/A      0            0    N/A
slave class create                    8    0.0    N/A      0            0    N/A
sort extent pool                  4,406    0.1    0.0      0            0    N/A
state object free list                2    0.0    N/A      0            0    N/A
statistics aggregation              140    0.0    N/A      0            0    N/A
temp lob duration state               2    0.0    N/A      0            0    N/A
threshold alerts latch              305    0.0    N/A      0            0    N/A
transaction allocation          875,726    0.0    N/A      0            0    N/A
transaction branch alloc          2,031    0.0    N/A      0            0    N/A
undo global data                804,587    0.0    0.0      0            0    N/A
user lock                           444    0.0    N/A      0            0    N/A
          -------------------------------------------------------------

Latch Sleep Breakdown                    DB/Inst: CDB10/cdb10  Snaps: 122-123
-> ordered by misses desc

Latch Name
----------------------------------------
  Get Requests      Misses      Sleeps  Spin Gets   Sleep1   Sleep2   Sleep3
-------------- ----------- ----------- ---------- -------- -------- --------
cache buffers chains
    66,867,303       1,726           4      1,722        0        0        0
cache buffers lru chain
     1,026,321       1,124          10      1,114        0        0        0
simulator lru latch
     2,051,579         537           2        535        0        0        0
library cache
     1,239,482         149           4        145        0        0        0
object queue header operation
     1,520,984         123           2        121        0        0        0
library cache pin
     1,158,486          33           1         32        0        0        0
redo allocation
        25,223          33           1         32        0        0        0
In memory undo latch
        30,230           7           5          2        0        0        0
shared pool
        26,428           5           2          3        0        0        0
          -------------------------------------------------------------

Latch Miss Sources                       DB/Inst: CDB10/cdb10  Snaps: 122-123
-> only latches with sleeps are shown
-> ordered by name, sleeps desc

                                                     NoWait              Waiter
Latch Name               Where                       Misses     Sleeps   Sleeps
------------------------ -------------------------- ------- ---------- --------
In memory undo latch     ktiFlush: child                  0          5        4
cache buffers chains     kcbgtcr: kslbegin excl           0          4        0
cache buffers chains     kcbgtcr: fast path               0          2        1
cache buffers chains     kcbchg: kslbegin: call CR        0          1        1
cache buffers chains     kcbgtcr: kslbegin shared         0          1        0
cache buffers lru chain  kcbzgws_1                        0          6        9
cache buffers lru chain  kcbzar: KSLNBEGIN                0          2        0
cache buffers lru chain  kcbbic2                          0          1        1
cache buffers lru chain  kcbbwlru                         0          1        0
library cache            kglhdiv: child                   0          1        0
library cache lock       kgllkdl: child: no lock ha       0          2        0
library cache pin        kglpndl                          0          1        1
object queue header oper kcbo_switch_cq                   0          1        1
object queue header oper kcbw_link_q                      0          1        0
redo allocation          kcrfw_redo_gen: redo alloc       0          1        0
shared pool              kghalp                           0          1        0
shared pool              kghfrunp: clatch: nowait         0          1        0
shared pool              kghupr1                          0          1        0
simulator lru latch      kcbs_simulate: simulate se       0          2        1
          -------------------------------------------------------------

Parent Latch Statistics                  DB/Inst: CDB10/cdb10  Snaps: 122-123

                  No data exists for this section of the report.
          -------------------------------------------------------------

Child Latch Statistics                    DB/Inst: CDB10/cdb10  Snaps: 122-123

                  No data exists for this section of the report.
          -------------------------------------------------------------

Segments by Logical Reads                DB/Inst: CDB10/cdb10  Snaps: 122-123
-> Total Logical Reads:      30,077,723
-> Captured Segments account for   88.6% of Total

           Tablespace                      Subobject  Obj.       Logical
Owner         Name    Object Name            Name     Type         Reads  %Total
---------- ---------- -------------------- ---------- ----- ------------ -------
STARGUS    TEMP       PK_TMP_TOP_SLOW_CM              INDEX    5,264,912   17.50
STARGUS    TEMP       TMP_TOP_SLOW_CM                 TABLE    5,244,192   17.44
STARGUS    TS_STARGUS PK_CM_RAWDATA                   INDEX    2,271,232    7.55
STARGUS    TS_STARGUS CM_RAWDATA                      TABLE    1,899,472    6.32
STARGUS    TS_STARGUS CM_SID_RAWDATA                  TABLE    1,440,752    4.79
          -------------------------------------------------------------

Segments by Physical Reads                DB/Inst: CDB10/cdb10  Snaps: 122-123
-> Total Physical Reads:         401,992
-> Captured Segments account for    67.7% of Total

           Tablespace                      Subobject  Obj.      Physical
Owner         Name    Object Name            Name     Type         Reads  %Total
---------- ---------- -------------------- ---------- ----- ------------ -------
STARGUS    TS_STARGUS PK_CM_SID_RAWDATA               INDEX       42,629   10.60
STARGUS    TEMP       TMP_TOP_SLOW_CM                 TABLE       38,818    9.66
STARGUS    TS_STARGUS CM_SID_RAWDATA                  TABLE       38,588    9.60
STARGUS    TEMP       PK_TMP_TOP_SLOW_CM              INDEX       31,020    7.72
STARGUS    TS_STARGUS TOPOLOGY_LINK                   TABLE       30,360    7.55
          -------------------------------------------------------------

Segments by Row Lock Waits               DB/Inst: CDB10/cdb10  Snaps: 122-123
-> % of Capture shows % of row lock waits for each top segment compared
-> with total row lock waits for all segments captured by the Snapshot

                                                                     Row
           Tablespace                      Subobject  Obj.          Lock    % of
Owner         Name    Object Name            Name     Type         Waits Capture
---------- ---------- -------------------- ---------- ----- ------------ -------
SYS        SYSTEM     SMON_SCN_TIME                   TABLE            4   30.77
SYSMAN     SYSAUX     MGMT_METRICS_1HOUR_P            INDEX            2   15.38
PERFSTAT   PERFSTAT   STATS$EVENT_HISTOGRA            INDEX            2   15.38
PERFSTAT   PERFSTAT   STATS$LATCH_PK                  INDEX            2   15.38
SYS        SYSAUX     WRH$_SERVICE_STAT_PK 559071_106 INDEX            2   15.38
          -------------------------------------------------------------

Segments by ITL Waits                     DB/Inst: CDB10/cdb10  Snaps: 122-123

                  No data exists for this section of the report.
          -------------------------------------------------------------

Segments by Buffer Busy Waits             DB/Inst: CDB10/cdb10  Snaps: 122-123
-> % of Capture shows % of Buffer Busy Waits for each top segment compared
-> with total Buffer Busy Waits for all segments captured by the Snapshot

                                                                  Buffer
           Tablespace                      Subobject  Obj.          Busy    % of
Owner         Name    Object Name            Name     Type         Waits Capture
---------- ---------- -------------------- ---------- ----- ------------ -------
SYS        SYSTEM     JOB$                            TABLE            2   66.67
SYSMAN     SYSAUX     MGMT_CURRENT_METRICS            INDEX            1   33.33
          -------------------------------------------------------------

Dictionary Cache Stats                   DB/Inst: CDB10/cdb10  Snaps: 122-123
-> "Pct Misses"  should be very low (< 2% in most cases)
-> "Final Usage" is the number of cache entries being used

                                   Get    Pct    Scan   Pct      Mod      Final
Cache                         Requests   Miss    Reqs  Miss     Reqs      Usage
------------------------- ------------ ------ ------- ----- -------- ----------
dc_awr_control                      67    0.0       0   N/A        2          1
dc_database_links                   72    0.0       0   N/A        0          1
dc_files                            70    0.0       0   N/A        0          7
dc_global_oids                   4,852    0.0       0   N/A        0         16
dc_histogram_data                3,190    0.9       0   N/A        0      1,064
dc_histogram_defs                6,187    0.7       0   N/A        0      1,592
dc_object_ids                    7,737    0.9       0   N/A        1        480
dc_objects                       1,345    1.9       0   N/A       56        437
dc_profiles                        163    0.0       0   N/A        0          2
dc_rollback_segments               677    0.0       0   N/A        0         22
dc_segments                      1,839    0.5       0   N/A      411        264
dc_sequences                        75    0.0       0   N/A       75          6
dc_tablespace_quotas               890    0.1       0   N/A        0          5
dc_tablespaces                  26,615    0.0       0   N/A        0          8
dc_usernames                       257    0.4       0   N/A        0          9
dc_users                        25,512    0.0       0   N/A        0         44
outstanding_alerts                 126    7.1       0   N/A       17         17
          -------------------------------------------------------------

Library Cache Activity                    DB/Inst: CDB10/cdb10  Snaps: 122-123
-> "Pct Misses"  should be very low

                         Get    Pct            Pin    Pct             Invali-
Namespace           Requests   Miss       Requests   Miss    Reloads  dations
--------------- ------------ ------ -------------- ------ ---------- --------
BODY                     550    0.0          6,440    0.0          0        0
CLUSTER                    1    0.0              4    0.0          0        0
INDEX                     41    0.0             86    0.0          0        0
SQL AREA                  64   71.9        548,251    0.1        194      177
TABLE/PROCEDURE          389    3.9         13,583    0.3         16        0
TRIGGER                   34   11.8            520    0.8          0        0
          -------------------------------------------------------------

Process Memory Summary                   DB/Inst: CDB10/cdb10  Snaps: 122-123
-> B: Begin snap   E: End snap
-> All rows below contain absolute values (i.e. not diffed over the interval)
-> Max Alloc is Maximum PGA Allocation size at snapshot time
-> Hist Max Alloc is the Historical Max Allocation for still-connected processes
-> ordered by Begin/End snapshot, Alloc (MB) desc

                                                            Hist
                                    Avg  Std Dev     Max     Max
               Alloc      Used    Alloc    Alloc   Alloc   Alloc    Num    Num
  Category      (MB)      (MB)     (MB)     (MB)    (MB)    (MB)   Proc  Alloc
- -------- --------- --------- -------- -------- ------- ------- ------ ------
B Other         71.7       N/A      1.9      3.6      22      22     38     38
  SQL           39.2      38.0      1.4      6.9      37      46     29     25
  Freeable      29.8        .0      1.1      1.5       9     N/A     26     26
  PL/SQL          .9        .5       .0       .0       0       0     36     36
E Other         74.2       N/A      1.9      3.6      22      22     39     39
  SQL           40.2      38.9      1.3      6.7      37      46     30     26
  Freeable      29.5        .0      1.1      1.5       9     N/A     26     26
  PL/SQL         1.0        .6       .0       .0       0       0     37     37
          -------------------------------------------------------------

SGA Memory Summary                        DB/Inst: CDB10/cdb10  Snaps: 122-123

                                                      End Size (Bytes)
SGA regions                     Begin Size (Bytes)      (if different)
------------------------------ ------------------- -------------------
Database Buffers                        29,360,128
Fixed Size                               1,979,488
Redo Buffers                             6,406,144
Variable Size                          423,627,680
                               -------------------
sum                                    461,373,440
          -------------------------------------------------------------

SGA breakdown difference                  DB/Inst: CDB10/cdb10  Snaps: 122-123
-> ordered by Pool, Name
-> N/A value for Begin MB or End MB indicates the size of that Pool/Name was
   insignificant, or zero in that snapshot

Pool   Name                                 Begin MB         End MB  % Diff
------ ------------------------------ -------------- -------------- -------
java   free memory                              24.0           24.0    0.00
shared ASH buffers                               4.0            4.0    0.00
shared CCursor                                   6.5            6.5   -0.11
shared FileOpenBlock                             1.4            1.4    0.00
shared Heap0: KGL                                3.8            3.7   -0.62
shared KCB Table Scan Buffer                     3.8            3.8    0.00
shared KGLS heap                                 1.6            1.5   -6.07
shared KQR M PO                                  1.5            1.3   -9.15
shared KSFD SGA I/O b                            3.8            3.8    0.00
shared PCursor                                   5.2            5.3    0.20
shared PL/SQL MPCODE                             3.4            3.4    0.00
shared event statistics per sess                 1.5            1.5    0.00
shared free memory                              10.4           10.4    0.39
shared kglsim hash table bkts                    4.0            4.0    0.00
shared kglsim heap                               1.3            1.4    1.72
shared kglsim object batch                       2.1            2.1    1.04
shared kks stbkt                                 1.5            1.5    0.00
shared library cache                             9.5            9.6    0.57
shared private strands                           2.3            2.3    0.00
shared row cache                                 7.1            7.1    0.00
shared sql area                                 27.2           27.4    0.89
       buffer_cache                             28.0           28.0    0.00
       fixed_sga                                 1.9            1.9    0.00
       log_buffer                                6.1            6.1    0.00
          -------------------------------------------------------------

Streams CPU/IO Usage                     DB/Inst: CDB10/cdb10  Snaps: 122-123

                  No data exists for this section of the report.
          -------------------------------------------------------------

Streams Capture                           DB/Inst: CDB10/cdb10  Snaps: 122-123

                  No data exists for this section of the report.
          -------------------------------------------------------------

Streams Apply                             DB/Inst: CDB10/cdb10  Snaps: 122-123

                  No data exists for this section of the report.
          -------------------------------------------------------------

Buffered Queues                           DB/Inst: CDB10/cdb10  Snaps: 122-123

                  No data exists for this section of the report.
          -------------------------------------------------------------

Buffered Subscribers                      DB/Inst: CDB10/cdb10  Snaps: 122-123

                  No data exists for this section of the report.
          -------------------------------------------------------------

Rule Set                                  DB/Inst: CDB10/cdb10  Snaps: 122-123

                  No data exists for this section of the report.
          -------------------------------------------------------------

Resource Limit Stats                          DB/Inst: CDB10/cdb10  Snap: 123

                  No data exists for this section of the report.
          -------------------------------------------------------------

init.ora Parameters                      DB/Inst: CDB10/cdb10  Snaps: 122-123

                                                                End value
Parameter Name                Begin value                       (if different)
----------------------------- --------------------------------- --------------
audit_file_dest               /export/home/oracle10/admin/cdb10
background_dump_dest          /export/home/oracle10/admin/cdb10
compatible                    10.2.0.1.0
control_files                 /export/home/oracle10/oradata/cdb
core_dump_dest                /export/home/oracle10/admin/cdb10
db_block_size                 8192
db_cache_size                 29360128
db_domain
db_file_multiblock_read_count 8
db_name                       cdb10
db_recovery_file_dest         /export/home/oracle10/flash_recov
db_recovery_file_dest_size    2147483648
dispatchers                   (PROTOCOL=TCP) (SERVICE=cdb10XDB)
job_queue_processes           10
open_cursors                  300
pga_aggregate_target          209715200
processes                     150
remote_login_passwordfile     EXCLUSIVE
sga_max_size                  461373440
sga_target                    0
shared_pool_size              134217728
undo_management               AUTO
undo_tablespace               UNDOTBS1
user_dump_dest                /export/home/oracle10/admin/cdb10
          -------------------------------------------------------------

End of Report
}}}
{{{

WORKLOAD REPOSITORY report for

DB Name         DB Id    Instance     Inst Num Release     RAC Host
------------ ----------- ------------ -------- ----------- --- ------------
IVRS          2607950532 ivrs                1 10.2.0.3.0  NO  dbrocaix01.b

              Snap Id      Snap Time      Sessions Curs/Sess
            --------- ------------------- -------- ---------
Begin Snap:       338 17-Jan-10 06:50:58        31       2.9
  End Snap:       339 17-Jan-10 07:01:01        30       2.2
   Elapsed:               10.05 (mins)
   DB Time:               22.08 (mins)

Cache Sizes
~~~~~~~~~~~                       Begin        End
                             ---------- ----------
               Buffer Cache:       200M       196M  Std Block Size:         8K
           Shared Pool Size:        92M        96M      Log Buffer:     2,860K

Load Profile
~~~~~~~~~~~~                            Per Second       Per Transaction
                                   ---------------       ---------------
                  Redo size:             25,946.47              6,162.81
              Logical reads:             10,033.03              2,383.05
              Block changes:                147.02                 34.92
             Physical reads:              9,390.59              2,230.46
            Physical writes:                 41.20                  9.79
                 User calls:                 19.14                  4.55
                     Parses:                  9.87                  2.34
                Hard parses:                  0.69                  0.16
                      Sorts:                  3.05                  0.72
                     Logons:                  0.52                  0.12
                   Executes:                 95.91                 22.78
               Transactions:                  4.21

  % Blocks changed per Read:    1.47    Recursive Call %:    90.93
 Rollback per transaction %:    0.51       Rows per Sort: ########

Instance Efficiency Percentages (Target 100%)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            Buffer Nowait %:  100.00       Redo NoWait %:   99.99
            Buffer  Hit   %:  102.59    In-memory Sort %:  100.00
            Library Hit   %:   97.85        Soft Parse %:   93.01
         Execute to Parse %:   89.71         Latch Hit %:  100.00
Parse CPU to Parse Elapsd %:   19.56     % Non-Parse CPU:   98.43

 Shared Pool Statistics        Begin    End
                              ------  ------
             Memory Usage %:   75.99   78.27
    % SQL with executions>1:   68.86   64.10
  % Memory for SQL w/exec>1:   65.95   58.03

Top 5 Timed Events                                         Avg %Total
~~~~~~~~~~~~~~~~~~                                        wait   Call
Event                                 Waits    Time (s)   (ms)   Time Wait Class
------------------------------ ------------ ----------- ------ ------ ----------
CPU time                                            436          32.9
db file sequential read              18,506         279     15   21.1   User I/O
PX Deq Credit: send blkd             79,918         177      2   13.4      Other
direct path read                    374,300         149      0   11.2   User I/O
log file parallel write               2,299          83     36    6.2 System I/O
          -------------------------------------------------------------
Time Model Statistics                      DB/Inst: IVRS/ivrs  Snaps: 338-339
-> Total time in database user-calls (DB Time): 1324.6s
-> Statistics including the word "background" measure background process
   time, and so do not contribute to the DB time statistic
-> Ordered by % or DB time desc, Statistic name

Statistic Name                                       Time (s) % of DB Time
------------------------------------------ ------------------ ------------
sql execute elapsed time                              1,272.2         96.0
DB CPU                                                  435.7         32.9
parse time elapsed                                       52.3          3.9
hard parse elapsed time                                  42.5          3.2
Java execution elapsed time                               4.0           .3
PL/SQL execution elapsed time                             3.3           .2
PL/SQL compilation elapsed time                           0.3           .0
connection management call elapsed time                   0.1           .0
sequence load elapsed time                                0.1           .0
hard parse (sharing criteria) elapsed time                0.1           .0
repeated bind elapsed time                                0.1           .0
hard parse (bind mismatch) elapsed time                   0.0           .0
DB time                                               1,324.6          N/A
background elapsed time                                 314.3          N/A
background cpu time                                      11.6          N/A
          -------------------------------------------------------------

Wait Class                                  DB/Inst: IVRS/ivrs  Snaps: 338-339
-> s  - second
-> cs - centisecond -     100th of a second
-> ms - millisecond -    1000th of a second
-> us - microsecond - 1000000th of a second
-> ordered by wait time desc, waits desc

                                                                  Avg
                                       %Time       Total Wait    wait     Waits
Wait Class                      Waits  -outs         Time (s)    (ms)      /txn
-------------------- ---------------- ------ ---------------- ------- ---------
User I/O                      396,180     .0              488       1     156.0
Other                          88,652    5.2              259       3      34.9
System I/O                      4,903     .0              243      50       1.9
Commit                          1,418    1.3               67      48       0.6
Concurrency                        29   20.7                2      60       0.0
Configuration                       1     .0                0     247       0.0
Network                         8,410     .0                0       0       3.3
Application                        36     .0                0       0       0.0
          -------------------------------------------------------------

Wait Events                                DB/Inst: IVRS/ivrs  Snaps: 338-339
-> s  - second
-> cs - centisecond -     100th of a second
-> ms - millisecond -    1000th of a second
-> us - microsecond - 1000000th of a second
-> ordered by wait time desc, waits desc (idle events last)

                                                                   Avg
                                             %Time  Total Wait    wait     Waits
Event                                 Waits  -outs    Time (s)    (ms)      /txn
---------------------------- -------------- ------ ----------- ------- ---------
db file sequential read              18,506     .0         279      15       7.3
PX Deq Credit: send blkd             79,918     .0         177       2      31.5
direct path read                    374,300     .0         149       0     147.4
log file parallel write               2,299     .0          83      36       0.9
db file parallel write                  658     .0          79     120       0.3
PX qref latch                         6,958   64.7          79      11       2.7
log file sync                         1,418    1.3          67      48       0.6
buffer read retry                        54   81.5          43     797       0.0
control file parallel write             259     .0          42     163       0.1
log file sequential read                 54     .0          27     507       0.0
control file sequential read          1,577     .0          11       7       0.6
db file scattered read                  236     .0           9      36       0.1
direct path write temp                1,533     .0           7       4       0.6
direct path read temp                 1,533     .0           2       1       0.6
os thread startup                         5   20.0           2     321       0.0
PX Deq: Signal ACK                      182   26.4           1       8       0.1
change tracking file synchro             11     .0           1     105       0.0
Log archive I/O                          54     .0           1      17       0.0
log file switch completion                1     .0           0     247       0.0
PX Deq: Table Q qref                  1,422     .0           0       0       0.6
enq: PS - contention                     51     .0           0       3       0.0
SQL*Net more data from clien             12     .0           0      12       0.0
PX Deq: Table Q Get Keys                 40     .0           0       3       0.0
latch: library cache                      9     .0           0       9       0.0
SQL*Net message to client             8,291     .0           0       0       3.3
latch free                                7     .0           0       9       0.0
cursor: pin S wait on X                  10   50.0           0       5       0.0
latch: cache buffers lru cha             25     .0           0       2       0.0
latch: session allocation                 7     .0           0       5       0.0
log file single write                     2     .0           0       9       0.0
direct path write                        15     .0           0       1       0.0
latch: shared pool                        2     .0           0       6       0.0
latch: redo allocation                    1     .0           0      10       0.0
read by other session                     3     .0           0       3       0.0
SQL*Net break/reset to clien             36     .0           0       0       0.0
SQL*Net more data to client             107     .0           0       0       0.0
latch: object queue header o              3     .0           0       1       0.0
change tracking file synchro             12     .0           0       0       0.0
LGWR wait for redo copy                  14     .0           0       0       0.0
latch: cache buffers chains               3     .0           0       0       0.0
enq: BF - allocation content              1     .0           0       0       0.0
PX Idle Wait                          1,398   79.0       2,234    1598       0.6
class slave wait                         28   21.4       1,114   39769       0.0
PX Deq: Table Q Normal              348,049     .0         682       2     137.1
jobq slave wait                         232   94.8         670    2890       0.1
ASM background timer                    148     .0         583    3937       0.1
Streams AQ: qmn coordinator              43   51.2         577   13430       0.0
Streams AQ: qmn slave idle w             21     .0         577   27498       0.0
PX Deq: Execution Msg                 7,434    2.5         573      77       2.9
SQL*Net message from client           8,291     .0         568      68       3.3
virtual circuit status                   19  100.0         557   29296       0.0
PX Deq: Execute Reply                 5,871    1.1         508      86       2.3
PX Deq Credit: need buffer           62,922     .0          48       1      24.8
PX Deq: Table Q Sample                1,307     .0           5       4       0.5
KSV master wait                          22     .0           0      22       0.0
PX Deq: Parse Reply                     201     .0           0       1       0.1
PX Deq: Msg Fragment                    234     .0           0       1       0.1
PX Deq: Join ACK                        170     .0           0       1       0.1
SGA: MMAN sleep for componen             16   43.8           0      12       0.0
          -------------------------------------------------------------

Background Wait Events                     DB/Inst: IVRS/ivrs  Snaps: 338-339
-> ordered by wait time desc, waits desc (idle events last)

                                                                   Avg
                                             %Time  Total Wait    wait     Waits
Event                                 Waits  -outs    Time (s)    (ms)      /txn
---------------------------- -------------- ------ ----------- ------- ---------
log file parallel write               2,299     .0          82      36       0.9
db file parallel write                  654     .0          78     119       0.3
control file parallel write             259     .0          42     163       0.1
log file sequential read                 54     .0          27     507       0.0
control file sequential read            399     .0          11      26       0.2
os thread startup                         5   20.0           2     321       0.0
Log archive I/O                          54     .0           1      17       0.0
events in waitclass Other                38     .0           1      16       0.0
log file single write                     2     .0           0       9       0.0
direct path write                        13     .0           0       1       0.0
latch: shared pool                        1     .0           0      10       0.0
direct path read                         13     .0           0       0       0.0
db file sequential read                 543     .0          -1      -2       0.2
rdbms ipc message                     4,458   50.1       7,496    1681       1.8
smon timer                               39     .0         611   15662       0.0
ASM background timer                    148     .0         583    3937       0.1
pmon timer                              241  100.0         581    2412       0.1
Streams AQ: qmn coordinator              43   51.2         577   13430       0.0
Streams AQ: qmn slave idle w             21     .0         577   27498       0.0
KSV master wait                          22     .0           0      22       0.0
SGA: MMAN sleep for componen             16   43.8           0      12       0.0
          -------------------------------------------------------------

Operating System Statistics                 DB/Inst: IVRS/ivrs  Snaps: 338-339

Statistic                                       Total
-------------------------------- --------------------
BUSY_TIME                                      46,982
IDLE_TIME                                       9,587
IOWAIT_TIME                                     5,623
NICE_TIME                                         172
SYS_TIME                                       37,041
USER_TIME                                       9,589
LOAD                                                4
RSRC_MGR_CPU_WAIT_TIME                              0
PHYSICAL_MEMORY_BYTES                          50,048
NUM_CPUS                                            1
          -------------------------------------------------------------

Service Statistics                         DB/Inst: IVRS/ivrs  Snaps: 338-339
-> ordered by DB Time

                                                             Physical    Logical
Service Name                      DB Time (s)   DB CPU (s)      Reads      Reads
-------------------------------- ------------ ------------ ---------- ----------
ivrs.bayantel.com                     1,329.2        427.1  5,587,106  5,878,962
SYS$USERS                                91.6         13.5      1,357     94,224
SYS$BACKGROUND                            0.0          0.0      1,367     19,062
ivrsXDB                                   0.0          0.0          0          0
          -------------------------------------------------------------

Service Wait Class Stats                    DB/Inst: IVRS/ivrs  Snaps: 338-339
-> Wait Class info for services in the Service Statistics section.
-> Total Waits and Time Waited displayed for the following wait
   classes:  User I/O, Concurrency, Administrative, Network
-> Time Waited (Wt Time) in centisecond (100th of a second)

Service Name
----------------------------------------------------------------
 User I/O  User I/O  Concurcy  Concurcy     Admin     Admin   Network   Network
Total Wts   Wt Time Total Wts   Wt Time Total Wts   Wt Time Total Wts   Wt Time
--------- --------- --------- --------- --------- --------- --------- ---------
ivrs.bayantel.com
   394179     34576        16         6         0         0      8358         6
SYS$USERS
     1120      3538         2         1         0         0        42        14
SYS$BACKGROUND
     1310     10821         6       162         0         0         0         0
          -------------------------------------------------------------

SQL ordered by Elapsed Time                DB/Inst: IVRS/ivrs  Snaps: 338-339
-> Resources reported for PL/SQL code includes the resources used by all SQL
   statements called by the code.
-> % Total DB Time is the Elapsed Time of the SQL statement divided
   into the Total Database Time multiplied by 100

  Elapsed      CPU                  Elap per  % Total
  Time (s)   Time (s)  Executions   Exec (s)  DB Time    SQL Id
---------- ---------- ------------ ---------- ------- -------------
        90         28            1       89.6     6.8 bsdgaykhvy4xr
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select s_name, count(*) as numwait from supplier, lineitem l1, orders, nation wh
ere s_suppkey = l1.l_suppkey and o_orderkey = l1.l_orderkey and o_orderstatus =
'F' and l1.l_receiptdate > l1.l_commitdate and exists ( select * from lineitem l
2 where l2.l_orderkey = l1.l_orderkey and l2.l_suppkey <> l1.l_suppkey) and not

        89         28            2       44.5     6.7 bmfc2a2ym0kwr
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select nation, o_year, sum(amount) as sum_profit from ( select n_name as nation,
 extract(year from o_orderdate) as o_year, l_extendedprice * (1 - l_discount) -
ps_supplycost * l_quantity as amount from part, supplier, lineitem, partsupp, or
ders, nation where s_suppkey = l_suppkey and ps_suppkey = l_suppkey and ps_partk

        59          6            1       58.5     4.4 081am6psuh26j
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select sum(l_extendedprice) / 7.0 as avg_yearly from lineitem, part where p_part
key = l_partkey and p_brand = 'Brand#35' and p_container = 'LG BOX' and l_quanti
ty < ( select 0.2 * avg(l_quantity) from lineitem where l_partkey = p_partkey)

        57         22            1       56.9     4.3 6mrh6s1s5g851
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select s_name, count(*) as numwait from supplier, lineitem l1, orders, nation wh
ere s_suppkey = l1.l_suppkey and o_orderkey = l1.l_orderkey and o_orderstatus =
'F' and l1.l_receiptdate > l1.l_commitdate and exists ( select * from lineitem l
2 where l2.l_orderkey = l1.l_orderkey and l2.l_suppkey <> l1.l_suppkey) and not

        50          6            1       50.2     3.8 acgpfd4ysyfxb
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select s_name, s_address from supplier, nation where s_suppkey in ( select ps_su
ppkey from partsupp where ps_partkey in ( select p_partkey from part where p_nam
e like 'puff%') and ps_availqty > ( select 0.5 * sum(l_quantity) from lineitem w
here l_partkey = ps_partkey and l_suppkey = ps_suppkey and l_shipdate >= date '1

        49         21            1       49.2     3.7 2n4xg8c3dmd62
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select s_name, count(*) as numwait from supplier, lineitem l1, orders, nation wh
ere s_suppkey = l1.l_suppkey and o_orderkey = l1.l_orderkey and o_orderstatus =
'F' and l1.l_receiptdate > l1.l_commitdate and exists ( select * from lineitem l
2 where l2.l_orderkey = l1.l_orderkey and l2.l_suppkey <> l1.l_suppkey) and not

        46         15            1       45.7     3.4 29rqwcj4cs31u
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select c_name, c_custkey, o_orderkey, o_orderdate, o_totalprice, sum(l_quantity)
 from customer, orders, lineitem where o_orderkey in ( select l_orderkey from li
neitem group by l_orderkey having sum(l_quantity) > 313) and c_custkey = o_custk
ey and o_orderkey = l_orderkey group by c_name, c_custkey, o_orderkey, o_orderda

        40          1            1       40.1     3.0 d92h3rjp0y217
begin prvt_hdm.auto_execute( :db_id, :inst_id, :end_snap ); end;

        34         14            1       34.1     2.6 cvhgz2zwbk4qf
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select l_returnflag, l_linestatus, sum(l_quantity) as sum_qty, sum(l_extendedpri
ce) as sum_base_price, sum(l_extendedprice * (1 - l_discount)) as sum_disc_price
, sum(l_extendedprice * (1 - l_discount) * (1 + l_tax)) as sum_charge, avg(l_qua
ntity) as avg_qty, avg(l_extendedprice) as avg_price, avg(l_discount) as avg_dis

        31         14            1       30.8     2.3 7409gxv4spfj2
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
SQL ordered by Elapsed Time                DB/Inst: IVRS/ivrs  Snaps: 338-339
-> Resources reported for PL/SQL code includes the resources used by all SQL
   statements called by the code.
-> % Total DB Time is the Elapsed Time of the SQL statement divided
   into the Total Database Time multiplied by 100

  Elapsed      CPU                  Elap per  % Total
  Time (s)   Time (s)  Executions   Exec (s)  DB Time    SQL Id
---------- ---------- ------------ ---------- ------- -------------
select l_returnflag, l_linestatus, sum(l_quantity) as sum_qty, sum(l_extendedpri
ce) as sum_base_price, sum(l_extendedprice * (1 - l_discount)) as sum_disc_price
, sum(l_extendedprice * (1 - l_discount) * (1 + l_tax)) as sum_charge, avg(l_qua
ntity) as avg_qty, avg(l_extendedprice) as avg_price, avg(l_discount) as avg_dis

        29         14            1       29.3     2.2 1f0r8shtps3bu
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select nation, o_year, sum(amount) as sum_profit from ( select n_name as nation,
 extract(year from o_orderdate) as o_year, l_extendedprice * (1 - l_discount) -
ps_supplycost * l_quantity as amount from part, supplier, lineitem, partsupp, or
ders, nation where s_suppkey = l_suppkey and ps_suppkey = l_suppkey and ps_partk

        26         14            1       25.9     2.0 05jp96tzvutb6
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select l_returnflag, l_linestatus, sum(l_quantity) as sum_qty, sum(l_extendedpri
ce) as sum_base_price, sum(l_extendedprice * (1 - l_discount)) as sum_disc_price
, sum(l_extendedprice * (1 - l_discount) * (1 + l_tax)) as sum_charge, avg(l_qua
ntity) as avg_qty, avg(l_extendedprice) as avg_price, avg(l_discount) as avg_dis

        26          8            1       25.5     1.9 6aqpwwba8xvuu
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select o_year, sum(case when nation = 'GERMANY' then volume else 0 end) / sum(vo
lume) as mkt_share from ( select extract(year from o_orderdate) as o_year, l_ext
endedprice * (1 - l_discount) as volume, n2.n_name as nation from part, supplier
, lineitem, orders, customer, nation n1, nation n2, region where p_partkey = l_p

        24         11            1       23.7     1.8 8sfhj7ua3qfjf
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select c_name, c_custkey, o_orderkey, o_orderdate, o_totalprice, sum(l_quantity)
 from customer, orders, lineitem where o_orderkey in ( select l_orderkey from li
neitem group by l_orderkey having sum(l_quantity) > 312) and c_custkey = o_custk
ey and o_orderkey = l_orderkey group by c_name, c_custkey, o_orderkey, o_orderda

        23         11            2       11.6     1.8 814qvp0rkqug4
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select c_name, c_custkey, o_orderkey, o_orderdate, o_totalprice, sum(l_quantity)
 from customer, orders, lineitem where o_orderkey in ( select l_orderkey from li
neitem group by l_orderkey having sum(l_quantity) > 314) and c_custkey = o_custk
ey and o_orderkey = l_orderkey group by c_name, c_custkey, o_orderkey, o_orderda

        23          7            1       23.2     1.8 94wqqbu0ajcvn
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select o_year, sum(case when nation = 'JAPAN' then volume else 0 end) / sum(volu
me) as mkt_share from ( select extract(year from o_orderdate) as o_year, l_exten
dedprice * (1 - l_discount) as volume, n2.n_name as nation from part, supplier,
lineitem, orders, customer, nation n1, nation n2, region where p_partkey = l_par

        23          7            1       23.2     1.8 5xd0ak4417rk0
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select o_year, sum(case when nation = 'MOZAMBIQUE' then volume else 0 end) / sum
(volume) as mkt_share from ( select extract(year from o_orderdate) as o_year, l_
extendedprice * (1 - l_discount) as volume, n2.n_name as nation from part, suppl
ier, lineitem, orders, customer, nation n1, nation n2, region where p_partkey =

        22          2          539        0.0     1.7 aw9ttz9acxbc3
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
BEGIN payment(:p_w_id,:p_d_id,:p_c_w_id,:p_c_d_id,:p_c_id,:byname,:p_h_amount,:p
_c_last,:p_w_street_1,:p_w_street_2,:p_w_city,:p_w_state,:p_w_zip,:p_d_street_1,
:p_d_street_2,:p_d_city,:p_d_state,:p_d_zip,:p_c_first,:p_c_middle,:p_c_street_1
,:p_c_street_2,:p_c_city,:p_c_state,:p_c_zip,:p_c_phone,:p_c_since,:p_c_credit,:
SQL ordered by Elapsed Time                DB/Inst: IVRS/ivrs  Snaps: 338-339
-> Resources reported for PL/SQL code includes the resources used by all SQL
   statements called by the code.
-> % Total DB Time is the Elapsed Time of the SQL statement divided
   into the Total Database Time multiplied by 100

  Elapsed      CPU                  Elap per  % Total
  Time (s)   Time (s)  Executions   Exec (s)  DB Time    SQL Id
---------- ---------- ------------ ---------- ------- -------------

        21          4            2       10.6     1.6 2x4gjqru5u1xx
Module: SQL*Plus
SELECT s0.snap_id id, -- TO_CHAR(s0.END_INTERVAL_TIME,'YY/MM/DD HH24:MI') tm,
 round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440
 + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END
_INTERVAL_TIME) * 60 + EXTRACT(MINUTE FROM s1.

        21          4          546        0.0     1.6 16dhat4ta7xs9
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
begin neword(:no_w_id,:no_max_w_id,:no_d_id,:no_c_id,:no_o_ol_cnt,:no_c_discount
,:no_c_last,:no_c_credit,:no_d_tax,:no_w_tax,:no_d_next_o_id,TO_DATE(:timestamp,
'YYYYMMDDHH24MISS')); END;

        21          0            1       20.9     1.6 14wnf35dahb7v
SELECT A.ID,A.TYPE FROM SYS.WRI$_ADV_DEFINITIONS A WHERE A.NAME = :B1

        17          0           42        0.4     1.3 d4ujh5yqt1fph
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
BEGIN delivery(:d_w_id,:d_o_carrier_id,TO_DATE(:timestamp,'YYYYMMDDHH24MISS'));
END;

        16          2            1       16.5     1.2 1wzqub25cwnjm
DECLARE job BINARY_INTEGER := :job; next_date DATE := :mydate; broken BOOLEAN :
= FALSE; BEGIN wksys.wk_job.invoke(21,21); :mydate := next_date; IF broken THEN
:b := 1; ELSE :b := 0; END IF; END;

        16          0          420        0.0     1.2 5ps73nuy5f2vj
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
UPDATE ORDER_LINE SET OL_DELIVERY_D = :B4 WHERE OL_O_ID = :B3 AND OL_D_ID = :B2
AND OL_W_ID = :B1

        15          1          317        0.0     1.1 4wg725nwpxb1z
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
SELECT C_FIRST, C_MIDDLE, C_ID, C_STREET_1, C_STREET_2, C_CITY, C_STATE, C_ZIP,
C_PHONE, C_CREDIT, C_CREDIT_LIM, C_DISCOUNT, C_BALANCE, C_SINCE FROM CUSTOMER WH
ERE C_W_ID = :B3 AND C_D_ID = :B2 AND C_LAST = :B1 ORDER BY C_FIRST

        15          6            1       14.5     1.1 fcfjqugcc1zy0
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select c_count, count(*) as custdist from ( select c_custkey, count(o_orderkey)
as c_count from customer left outer join orders on c_custkey = o_custkey and o_c
omment not like '%express%requests%' group by c_custkey) c_orders group by c_cou
nt order by custdist desc, c_count desc

        14          2            9        1.6     1.1 6gvch1xu9ca3g
DECLARE job BINARY_INTEGER := :job; next_date DATE := :mydate; broken BOOLEAN :
= FALSE; BEGIN EMD_MAINTENANCE.EXECUTE_EM_DBMS_JOB_PROCS(); :mydate := next_date
; IF broken THEN :b := 1; ELSE :b := 0; END IF; END;

        14          7            1       13.9     1.0 15dxu5nmuj14a
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select o_orderpriority, count(*) as order_count from orders where o_orderdate >=
 date '1994-08-01' and o_orderdate < date '1994-08-01' + interval '3' month and
exists ( select * from lineitem where l_orderkey = o_orderkey and l_commitdate <
 l_receiptdate) group by o_orderpriority order by o_orderpriority

        14          2        5,442        0.0     1.0 8yvup05pk06ca
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
SELECT S_QUANTITY, S_DATA, S_DIST_01, S_DIST_02, S_DIST_03, S_DIST_04, S_DIST_05
SQL ordered by Elapsed Time                DB/Inst: IVRS/ivrs  Snaps: 338-339
-> Resources reported for PL/SQL code includes the resources used by all SQL
   statements called by the code.
-> % Total DB Time is the Elapsed Time of the SQL statement divided
   into the Total Database Time multiplied by 100

  Elapsed      CPU                  Elap per  % Total
  Time (s)   Time (s)  Executions   Exec (s)  DB Time    SQL Id
---------- ---------- ------------ ---------- ------- -------------
, S_DIST_06, S_DIST_07, S_DIST_08, S_DIST_09, S_DIST_10 FROM STOCK WHERE S_I_ID
= :B2 AND S_W_ID = :B1

          -------------------------------------------------------------

SQL ordered by CPU Time                    DB/Inst: IVRS/ivrs  Snaps: 338-339
-> Resources reported for PL/SQL code includes the resources used by all SQL
   statements called by the code.
-> % Total DB Time is the Elapsed Time of the SQL statement divided
   into the Total Database Time multiplied by 100

    CPU      Elapsed                  CPU per  % Total
  Time (s)   Time (s)  Executions     Exec (s) DB Time    SQL Id
---------- ---------- ------------ ----------- ------- -------------
        28         89            2       14.17     6.7 bmfc2a2ym0kwr
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select nation, o_year, sum(amount) as sum_profit from ( select n_name as nation,
 extract(year from o_orderdate) as o_year, l_extendedprice * (1 - l_discount) -
ps_supplycost * l_quantity as amount from part, supplier, lineitem, partsupp, or
ders, nation where s_suppkey = l_suppkey and ps_suppkey = l_suppkey and ps_partk

        28         90            1       28.03     6.8 bsdgaykhvy4xr
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select s_name, count(*) as numwait from supplier, lineitem l1, orders, nation wh
ere s_suppkey = l1.l_suppkey and o_orderkey = l1.l_orderkey and o_orderstatus =
'F' and l1.l_receiptdate > l1.l_commitdate and exists ( select * from lineitem l
2 where l2.l_orderkey = l1.l_orderkey and l2.l_suppkey <> l1.l_suppkey) and not

        22         57            1       21.81     4.3 6mrh6s1s5g851
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select s_name, count(*) as numwait from supplier, lineitem l1, orders, nation wh
ere s_suppkey = l1.l_suppkey and o_orderkey = l1.l_orderkey and o_orderstatus =
'F' and l1.l_receiptdate > l1.l_commitdate and exists ( select * from lineitem l
2 where l2.l_orderkey = l1.l_orderkey and l2.l_suppkey <> l1.l_suppkey) and not

        21         49            1       20.85     3.7 2n4xg8c3dmd62
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select s_name, count(*) as numwait from supplier, lineitem l1, orders, nation wh
ere s_suppkey = l1.l_suppkey and o_orderkey = l1.l_orderkey and o_orderstatus =
'F' and l1.l_receiptdate > l1.l_commitdate and exists ( select * from lineitem l
2 where l2.l_orderkey = l1.l_orderkey and l2.l_suppkey <> l1.l_suppkey) and not

        15         46            1       14.85     3.4 29rqwcj4cs31u
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select c_name, c_custkey, o_orderkey, o_orderdate, o_totalprice, sum(l_quantity)
 from customer, orders, lineitem where o_orderkey in ( select l_orderkey from li
neitem group by l_orderkey having sum(l_quantity) > 313) and c_custkey = o_custk
ey and o_orderkey = l_orderkey group by c_name, c_custkey, o_orderkey, o_orderda

        14         34            1       14.34     2.6 cvhgz2zwbk4qf
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select l_returnflag, l_linestatus, sum(l_quantity) as sum_qty, sum(l_extendedpri
ce) as sum_base_price, sum(l_extendedprice * (1 - l_discount)) as sum_disc_price
, sum(l_extendedprice * (1 - l_discount) * (1 + l_tax)) as sum_charge, avg(l_qua
ntity) as avg_qty, avg(l_extendedprice) as avg_price, avg(l_discount) as avg_dis

        14         31            1       14.08     2.3 7409gxv4spfj2
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select l_returnflag, l_linestatus, sum(l_quantity) as sum_qty, sum(l_extendedpri
ce) as sum_base_price, sum(l_extendedprice * (1 - l_discount)) as sum_disc_price
, sum(l_extendedprice * (1 - l_discount) * (1 + l_tax)) as sum_charge, avg(l_qua
ntity) as avg_qty, avg(l_extendedprice) as avg_price, avg(l_discount) as avg_dis

        14         26            1       13.69     2.0 05jp96tzvutb6
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select l_returnflag, l_linestatus, sum(l_quantity) as sum_qty, sum(l_extendedpri
ce) as sum_base_price, sum(l_extendedprice * (1 - l_discount)) as sum_disc_price
, sum(l_extendedprice * (1 - l_discount) * (1 + l_tax)) as sum_charge, avg(l_qua
ntity) as avg_qty, avg(l_extendedprice) as avg_price, avg(l_discount) as avg_dis

        14         29            1       13.58     2.2 1f0r8shtps3bu
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select nation, o_year, sum(amount) as sum_profit from ( select n_name as nation,
 extract(year from o_orderdate) as o_year, l_extendedprice * (1 - l_discount) -
SQL ordered by CPU Time                    DB/Inst: IVRS/ivrs  Snaps: 338-339
-> Resources reported for PL/SQL code includes the resources used by all SQL
   statements called by the code.
-> % Total DB Time is the Elapsed Time of the SQL statement divided
   into the Total Database Time multiplied by 100

    CPU      Elapsed                  CPU per  % Total
  Time (s)   Time (s)  Executions     Exec (s) DB Time    SQL Id
---------- ---------- ------------ ----------- ------- -------------
ps_supplycost * l_quantity as amount from part, supplier, lineitem, partsupp, or
ders, nation where s_suppkey = l_suppkey and ps_suppkey = l_suppkey and ps_partk

        11         24            1       11.47     1.8 8sfhj7ua3qfjf
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select c_name, c_custkey, o_orderkey, o_orderdate, o_totalprice, sum(l_quantity)
 from customer, orders, lineitem where o_orderkey in ( select l_orderkey from li
neitem group by l_orderkey having sum(l_quantity) > 312) and c_custkey = o_custk
ey and o_orderkey = l_orderkey group by c_name, c_custkey, o_orderkey, o_orderda

        11         23            2        5.66     1.8 814qvp0rkqug4
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select c_name, c_custkey, o_orderkey, o_orderdate, o_totalprice, sum(l_quantity)
 from customer, orders, lineitem where o_orderkey in ( select l_orderkey from li
neitem group by l_orderkey having sum(l_quantity) > 314) and c_custkey = o_custk
ey and o_orderkey = l_orderkey group by c_name, c_custkey, o_orderkey, o_orderda

         8         26            1        8.14     1.9 6aqpwwba8xvuu
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select o_year, sum(case when nation = 'GERMANY' then volume else 0 end) / sum(vo
lume) as mkt_share from ( select extract(year from o_orderdate) as o_year, l_ext
endedprice * (1 - l_discount) as volume, n2.n_name as nation from part, supplier
, lineitem, orders, customer, nation n1, nation n2, region where p_partkey = l_p

         7         23            1        6.89     1.8 5xd0ak4417rk0
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select o_year, sum(case when nation = 'MOZAMBIQUE' then volume else 0 end) / sum
(volume) as mkt_share from ( select extract(year from o_orderdate) as o_year, l_
extendedprice * (1 - l_discount) as volume, n2.n_name as nation from part, suppl
ier, lineitem, orders, customer, nation n1, nation n2, region where p_partkey =

         7         23            1        6.76     1.8 94wqqbu0ajcvn
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select o_year, sum(case when nation = 'JAPAN' then volume else 0 end) / sum(volu
me) as mkt_share from ( select extract(year from o_orderdate) as o_year, l_exten
dedprice * (1 - l_discount) as volume, n2.n_name as nation from part, supplier,
lineitem, orders, customer, nation n1, nation n2, region where p_partkey = l_par

         7         14            1        6.63     1.0 15dxu5nmuj14a
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select o_orderpriority, count(*) as order_count from orders where o_orderdate >=
 date '1994-08-01' and o_orderdate < date '1994-08-01' + interval '3' month and
exists ( select * from lineitem where l_orderkey = o_orderkey and l_commitdate <
 l_receiptdate) group by o_orderpriority order by o_orderpriority

         6         15            1        6.36     1.1 fcfjqugcc1zy0
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select c_count, count(*) as custdist from ( select c_custkey, count(o_orderkey)
as c_count from customer left outer join orders on c_custkey = o_custkey and o_c
omment not like '%express%requests%' group by c_custkey) c_orders group by c_cou
nt order by custdist desc, c_count desc

         6         50            1        6.02     3.8 acgpfd4ysyfxb
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select s_name, s_address from supplier, nation where s_suppkey in ( select ps_su
ppkey from partsupp where ps_partkey in ( select p_partkey from part where p_nam
e like 'puff%') and ps_availqty > ( select 0.5 * sum(l_quantity) from lineitem w
here l_partkey = ps_partkey and l_suppkey = ps_suppkey and l_shipdate >= date '1

         6         59            1        5.87     4.4 081am6psuh26j
SQL ordered by CPU Time                    DB/Inst: IVRS/ivrs  Snaps: 338-339
-> Resources reported for PL/SQL code includes the resources used by all SQL
   statements called by the code.
-> % Total DB Time is the Elapsed Time of the SQL statement divided
   into the Total Database Time multiplied by 100

    CPU      Elapsed                  CPU per  % Total
  Time (s)   Time (s)  Executions     Exec (s) DB Time    SQL Id
---------- ---------- ------------ ----------- ------- -------------
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select sum(l_extendedprice) / 7.0 as avg_yearly from lineitem, part where p_part
key = l_partkey and p_brand = 'Brand#35' and p_container = 'LG BOX' and l_quanti
ty < ( select 0.2 * avg(l_quantity) from lineitem where l_partkey = p_partkey)

         4         21            2        2.15     1.6 2x4gjqru5u1xx
Module: SQL*Plus
SELECT s0.snap_id id, -- TO_CHAR(s0.END_INTERVAL_TIME,'YY/MM/DD HH24:MI') tm,
 round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440
 + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END
_INTERVAL_TIME) * 60 + EXTRACT(MINUTE FROM s1.

         4         21          546        0.01     1.6 16dhat4ta7xs9
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
begin neword(:no_w_id,:no_max_w_id,:no_d_id,:no_c_id,:no_o_ol_cnt,:no_c_discount
,:no_c_last,:no_c_credit,:no_d_tax,:no_w_tax,:no_d_next_o_id,TO_DATE(:timestamp,
'YYYYMMDDHH24MISS')); END;

         2         14            9        0.27     1.1 6gvch1xu9ca3g
DECLARE job BINARY_INTEGER := :job; next_date DATE := :mydate; broken BOOLEAN :
= FALSE; BEGIN EMD_MAINTENANCE.EXECUTE_EM_DBMS_JOB_PROCS(); :mydate := next_date
; IF broken THEN :b := 1; ELSE :b := 0; END IF; END;

         2         16            1        2.12     1.2 1wzqub25cwnjm
DECLARE job BINARY_INTEGER := :job; next_date DATE := :mydate; broken BOOLEAN :
= FALSE; BEGIN wksys.wk_job.invoke(21,21); :mydate := next_date; IF broken THEN
:b := 1; ELSE :b := 0; END IF; END;

         2         14        5,442        0.00     1.0 8yvup05pk06ca
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
SELECT S_QUANTITY, S_DATA, S_DIST_01, S_DIST_02, S_DIST_03, S_DIST_04, S_DIST_05
, S_DIST_06, S_DIST_07, S_DIST_08, S_DIST_09, S_DIST_10 FROM STOCK WHERE S_I_ID
= :B2 AND S_W_ID = :B1

         2         22          539        0.00     1.7 aw9ttz9acxbc3
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
BEGIN payment(:p_w_id,:p_d_id,:p_c_w_id,:p_c_d_id,:p_c_id,:byname,:p_h_amount,:p
_c_last,:p_w_street_1,:p_w_street_2,:p_w_city,:p_w_state,:p_w_zip,:p_d_street_1,
:p_d_street_2,:p_d_city,:p_d_state,:p_d_zip,:p_c_first,:p_c_middle,:p_c_street_1
,:p_c_street_2,:p_c_city,:p_c_state,:p_c_zip,:p_c_phone,:p_c_since,:p_c_credit,:

         1         40            1        1.18     3.0 d92h3rjp0y217
begin prvt_hdm.auto_execute( :db_id, :inst_id, :end_snap ); end;

         1         15          317        0.00     1.1 4wg725nwpxb1z
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
SELECT C_FIRST, C_MIDDLE, C_ID, C_STREET_1, C_STREET_2, C_CITY, C_STATE, C_ZIP,
C_PHONE, C_CREDIT, C_CREDIT_LIM, C_DISCOUNT, C_BALANCE, C_SINCE FROM CUSTOMER WH
ERE C_W_ID = :B3 AND C_D_ID = :B2 AND C_LAST = :B1 ORDER BY C_FIRST

         0         17           42        0.01     1.3 d4ujh5yqt1fph
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
BEGIN delivery(:d_w_id,:d_o_carrier_id,TO_DATE(:timestamp,'YYYYMMDDHH24MISS'));
END;

         0         16          420        0.00     1.2 5ps73nuy5f2vj
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
UPDATE ORDER_LINE SET OL_DELIVERY_D = :B4 WHERE OL_O_ID = :B3 AND OL_D_ID = :B2
AND OL_W_ID = :B1

SQL ordered by CPU Time                    DB/Inst: IVRS/ivrs  Snaps: 338-339
-> Resources reported for PL/SQL code includes the resources used by all SQL
   statements called by the code.
-> % Total DB Time is the Elapsed Time of the SQL statement divided
   into the Total Database Time multiplied by 100

    CPU      Elapsed                  CPU per  % Total
  Time (s)   Time (s)  Executions     Exec (s) DB Time    SQL Id
---------- ---------- ------------ ----------- ------- -------------
         0         21            1        0.12     1.6 14wnf35dahb7v
SELECT A.ID,A.TYPE FROM SYS.WRI$_ADV_DEFINITIONS A WHERE A.NAME = :B1

          -------------------------------------------------------------

SQL ordered by Gets                        DB/Inst: IVRS/ivrs  Snaps: 338-339
-> Resources reported for PL/SQL code includes the resources used by all SQL
   statements called by the code.
-> Total Buffer Gets:       6,050,561
-> Captured SQL account for      72.1% of Total

                                Gets              CPU     Elapsed
  Buffer Gets   Executions    per Exec   %Total Time (s)  Time (s)    SQL Id
-------------- ------------ ------------ ------ -------- --------- -------------
       331,630            1    331,630.0    5.5    21.81     56.88 6mrh6s1s5g851
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select s_name, count(*) as numwait from supplier, lineitem l1, orders, nation wh
ere s_suppkey = l1.l_suppkey and o_orderkey = l1.l_orderkey and o_orderstatus =
'F' and l1.l_receiptdate > l1.l_commitdate and exists ( select * from lineitem l
2 where l2.l_orderkey = l1.l_orderkey and l2.l_suppkey <> l1.l_suppkey) and not

       331,630            1    331,630.0    5.5    28.03     89.61 bsdgaykhvy4xr
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select s_name, count(*) as numwait from supplier, lineitem l1, orders, nation wh
ere s_suppkey = l1.l_suppkey and o_orderkey = l1.l_orderkey and o_orderstatus =
'F' and l1.l_receiptdate > l1.l_commitdate and exists ( select * from lineitem l
2 where l2.l_orderkey = l1.l_orderkey and l2.l_suppkey <> l1.l_suppkey) and not

       331,626            1    331,626.0    5.5    20.85     49.20 2n4xg8c3dmd62
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select s_name, count(*) as numwait from supplier, lineitem l1, orders, nation wh
ere s_suppkey = l1.l_suppkey and o_orderkey = l1.l_orderkey and o_orderstatus =
'F' and l1.l_receiptdate > l1.l_commitdate and exists ( select * from lineitem l
2 where l2.l_orderkey = l1.l_orderkey and l2.l_suppkey <> l1.l_suppkey) and not

       294,409            2    147,204.5    4.9    28.34     89.09 bmfc2a2ym0kwr
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select nation, o_year, sum(amount) as sum_profit from ( select n_name as nation,
 extract(year from o_orderdate) as o_year, l_extendedprice * (1 - l_discount) -
ps_supplycost * l_quantity as amount from part, supplier, lineitem, partsupp, or
ders, nation where s_suppkey = l_suppkey and ps_suppkey = l_suppkey and ps_partk

       147,206            1    147,206.0    2.4    13.58     29.35 1f0r8shtps3bu
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select nation, o_year, sum(amount) as sum_profit from ( select n_name as nation,
 extract(year from o_orderdate) as o_year, l_extendedprice * (1 - l_discount) -
ps_supplycost * l_quantity as amount from part, supplier, lineitem, partsupp, or
ders, nation where s_suppkey = l_suppkey and ps_suppkey = l_suppkey and ps_partk

       132,996            1    132,996.0    2.2     6.89     23.19 5xd0ak4417rk0
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select o_year, sum(case when nation = 'MOZAMBIQUE' then volume else 0 end) / sum
(volume) as mkt_share from ( select extract(year from o_orderdate) as o_year, l_
extendedprice * (1 - l_discount) as volume, n2.n_name as nation from part, suppl
ier, lineitem, orders, customer, nation n1, nation n2, region where p_partkey =

       132,996            1    132,996.0    2.2     8.14     25.54 6aqpwwba8xvuu
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select o_year, sum(case when nation = 'GERMANY' then volume else 0 end) / sum(vo
lume) as mkt_share from ( select extract(year from o_orderdate) as o_year, l_ext
endedprice * (1 - l_discount) as volume, n2.n_name as nation from part, supplier
, lineitem, orders, customer, nation n1, nation n2, region where p_partkey = l_p

       132,996            1    132,996.0    2.2     6.76     23.21 94wqqbu0ajcvn
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select o_year, sum(case when nation = 'JAPAN' then volume else 0 end) / sum(volu
me) as mkt_share from ( select extract(year from o_orderdate) as o_year, l_exten
dedprice * (1 - l_discount) as volume, n2.n_name as nation from part, supplier,
lineitem, orders, customer, nation n1, nation n2, region where p_partkey = l_par

       125,774            1    125,774.0    2.1     6.39     12.83 05burzzbuh660
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select o_orderpriority, count(*) as order_count from orders where o_orderdate >=
 date '1993-05-01' and o_orderdate < date '1993-05-01' + interval '3' month and
SQL ordered by Gets                        DB/Inst: IVRS/ivrs  Snaps: 338-339
-> Resources reported for PL/SQL code includes the resources used by all SQL
   statements called by the code.
-> Total Buffer Gets:       6,050,561
-> Captured SQL account for      72.1% of Total

                                Gets              CPU     Elapsed
  Buffer Gets   Executions    per Exec   %Total Time (s)  Time (s)    SQL Id
-------------- ------------ ------------ ------ -------- --------- -------------
exists ( select * from lineitem where l_orderkey = o_orderkey and l_commitdate <
 l_receiptdate) group by o_orderpriority order by o_orderpriority

       125,774            1    125,774.0    2.1     6.12     12.15 05pqvq1019n1t
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select o_orderpriority, count(*) as order_count from orders where o_orderdate >=
 date '1996-05-01' and o_orderdate < date '1996-05-01' + interval '3' month and
exists ( select * from lineitem where l_orderkey = o_orderkey and l_commitdate <
 l_receiptdate) group by o_orderpriority order by o_orderpriority

       125,774            1    125,774.0    2.1     6.63     13.86 15dxu5nmuj14a
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select o_orderpriority, count(*) as order_count from orders where o_orderdate >=
 date '1994-08-01' and o_orderdate < date '1994-08-01' + interval '3' month and
exists ( select * from lineitem where l_orderkey = o_orderkey and l_commitdate <
 l_receiptdate) group by o_orderpriority order by o_orderpriority

       125,774            1    125,774.0    2.1     5.85     11.77 2xf48ymvbjhxv
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select l_shipmode, sum(case when o_orderpriority = '1-URGENT' or o_orderpriority
 = '2-HIGH' then 1 else 0 end) as high_line_count, sum(case when o_orderpriority
 <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end) as low_line_co
unt from orders, lineitem where o_orderkey = l_orderkey and l_shipmode in ('MAIL

       125,774            1    125,774.0    2.1     5.78     11.67 3yj8qcg6sf32h
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select l_shipmode, sum(case when o_orderpriority = '1-URGENT' or o_orderpriority
 = '2-HIGH' then 1 else 0 end) as high_line_count, sum(case when o_orderpriority
 <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end) as low_line_co
unt from orders, lineitem where o_orderkey = l_orderkey and l_shipmode in ('AIR'

       125,774            1    125,774.0    2.1     6.01     12.20 c5dr0bxu3s966
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select l_shipmode, sum(case when o_orderpriority = '1-URGENT' or o_orderpriority
 = '2-HIGH' then 1 else 0 end) as high_line_count, sum(case when o_orderpriority
 <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end) as low_line_co
unt from orders, lineitem where o_orderkey = l_orderkey and l_shipmode in ('TRUC

       114,091            1    114,091.0    1.9     6.32     12.80 bdaz68nhm6jm4
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select s_name, s_address from supplier, nation where s_suppkey in ( select ps_su
ppkey from partsupp where ps_partkey in ( select p_partkey from part where p_nam
e like 'linen%') and ps_availqty > ( select 0.5 * sum(l_quantity) from lineitem
where l_partkey = ps_partkey and l_suppkey = ps_suppkey and l_shipdate >= date '

       113,956            1    113,956.0    1.9     6.02     50.23 acgpfd4ysyfxb
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select s_name, s_address from supplier, nation where s_suppkey in ( select ps_su
ppkey from partsupp where ps_partkey in ( select p_partkey from part where p_nam
e like 'puff%') and ps_availqty > ( select 0.5 * sum(l_quantity) from lineitem w
here l_partkey = ps_partkey and l_suppkey = ps_suppkey and l_shipdate >= date '1

       113,849            1    113,849.0    1.9     5.46     10.68 cx10bjzjkg410
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select s_name, s_address from supplier, nation where s_suppkey in ( select ps_su
ppkey from partsupp where ps_partkey in ( select p_partkey from part where p_nam
e like 'moccasin%') and ps_availqty > ( select 0.5 * sum(l_quantity) from lineit
em where l_partkey = ps_partkey and l_suppkey = ps_suppkey and l_shipdate >= dat

       106,702            1    106,702.0    1.8     5.18      9.82 3v74jf7w31h8v
SQL ordered by Gets                        DB/Inst: IVRS/ivrs  Snaps: 338-339
-> Resources reported for PL/SQL code includes the resources used by all SQL
   statements called by the code.
-> Total Buffer Gets:       6,050,561
-> Captured SQL account for      72.1% of Total

                                Gets              CPU     Elapsed
  Buffer Gets   Executions    per Exec   %Total Time (s)  Time (s)    SQL Id
-------------- ------------ ------------ ------ -------- --------- -------------
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select sum(l_extendedprice) / 7.0 as avg_yearly from lineitem, part where p_part
key = l_partkey and p_brand = 'Brand#21' and p_container = 'LG DRUM' and l_quant
ity < ( select 0.2 * avg(l_quantity) from lineitem where l_partkey = p_partkey)

       106,702            1    106,702.0    1.8     5.52     10.44 5u88ac3spdu0n
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select sum(l_extendedprice* (1 - l_discount)) as revenue from lineitem, part whe
re ( p_partkey = l_partkey and p_brand = 'Brand#45' and p_container in ('SM CASE
', 'SM BOX', 'SM PACK', 'SM PKG') and l_quantity >= 1 and l_quantity <= 1 + 10 a
nd p_size between 1 and 5 and l_shipmode in ('AIR', 'AIR REG') and l_shipinstruc

       106,702            1    106,702.0    1.8     5.42     12.66 75d32g70ru6f2
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select sum(l_extendedprice* (1 - l_discount)) as revenue from lineitem, part whe
re ( p_partkey = l_partkey and p_brand = 'Brand#34' and p_container in ('SM CASE
', 'SM BOX', 'SM PACK', 'SM PKG') and l_quantity >= 3 and l_quantity <= 3 + 10 a
nd p_size between 1 and 5 and l_shipmode in ('AIR', 'AIR REG') and l_shipinstruc

       106,702            1    106,702.0    1.8     5.36     10.16 by11nan0n3nbb
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select sum(l_extendedprice* (1 - l_discount)) as revenue from lineitem, part whe
re ( p_partkey = l_partkey and p_brand = 'Brand#23' and p_container in ('SM CASE
', 'SM BOX', 'SM PACK', 'SM PKG') and l_quantity >= 1 and l_quantity <= 1 + 10 a
nd p_size between 1 and 5 and l_shipmode in ('AIR', 'AIR REG') and l_shipinstruc

       106,698            1    106,698.0    1.8     5.87     58.52 081am6psuh26j
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select sum(l_extendedprice) / 7.0 as avg_yearly from lineitem, part where p_part
key = l_partkey and p_brand = 'Brand#35' and p_container = 'LG BOX' and l_quanti
ty < ( select 0.2 * avg(l_quantity) from lineitem where l_partkey = p_partkey)

       102,798            1    102,798.0    1.7    11.47     23.72 8sfhj7ua3qfjf
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select c_name, c_custkey, o_orderkey, o_orderdate, o_totalprice, sum(l_quantity)
 from customer, orders, lineitem where o_orderkey in ( select l_orderkey from li
neitem group by l_orderkey having sum(l_quantity) > 312) and c_custkey = o_custk
ey and o_orderkey = l_orderkey group by c_name, c_custkey, o_orderkey, o_orderda

       102,774            1    102,774.0    1.7    14.85     45.70 29rqwcj4cs31u
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select c_name, c_custkey, o_orderkey, o_orderdate, o_totalprice, sum(l_quantity)
 from customer, orders, lineitem where o_orderkey in ( select l_orderkey from li
neitem group by l_orderkey having sum(l_quantity) > 313) and c_custkey = o_custk
ey and o_orderkey = l_orderkey group by c_name, c_custkey, o_orderkey, o_orderda

       102,763            2     51,381.5    1.7    11.32     23.29 814qvp0rkqug4
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select c_name, c_custkey, o_orderkey, o_orderdate, o_totalprice, sum(l_quantity)
 from customer, orders, lineitem where o_orderkey in ( select l_orderkey from li
neitem group by l_orderkey having sum(l_quantity) > 314) and c_custkey = o_custk
ey and o_orderkey = l_orderkey group by c_name, c_custkey, o_orderkey, o_orderda

       102,697            1    102,697.0    1.7    13.69     25.90 05jp96tzvutb6
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select l_returnflag, l_linestatus, sum(l_quantity) as sum_qty, sum(l_extendedpri
ce) as sum_base_price, sum(l_extendedprice * (1 - l_discount)) as sum_disc_price
, sum(l_extendedprice * (1 - l_discount) * (1 + l_tax)) as sum_charge, avg(l_qua
ntity) as avg_qty, avg(l_extendedprice) as avg_price, avg(l_discount) as avg_dis

SQL ordered by Gets                        DB/Inst: IVRS/ivrs  Snaps: 338-339
-> Resources reported for PL/SQL code includes the resources used by all SQL
   statements called by the code.
-> Total Buffer Gets:       6,050,561
-> Captured SQL account for      72.1% of Total

                                Gets              CPU     Elapsed
  Buffer Gets   Executions    per Exec   %Total Time (s)  Time (s)    SQL Id
-------------- ------------ ------------ ------ -------- --------- -------------
       102,697            1    102,697.0    1.7    14.08     30.77 7409gxv4spfj2
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select l_returnflag, l_linestatus, sum(l_quantity) as sum_qty, sum(l_extendedpri
ce) as sum_base_price, sum(l_extendedprice * (1 - l_discount)) as sum_disc_price
, sum(l_extendedprice * (1 - l_discount) * (1 + l_tax)) as sum_charge, avg(l_qua
ntity) as avg_qty, avg(l_extendedprice) as avg_price, avg(l_discount) as avg_dis

       102,697            1    102,697.0    1.7    14.34     34.07 cvhgz2zwbk4qf
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select l_returnflag, l_linestatus, sum(l_quantity) as sum_qty, sum(l_extendedpri
ce) as sum_base_price, sum(l_extendedprice * (1 - l_discount)) as sum_disc_price
, sum(l_extendedprice * (1 - l_discount) * (1 + l_tax)) as sum_charge, avg(l_qua
ntity) as avg_qty, avg(l_extendedprice) as avg_price, avg(l_discount) as avg_dis

        88,530          546        162.1    1.5     4.02     20.99 16dhat4ta7xs9
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
begin neword(:no_w_id,:no_max_w_id,:no_d_id,:no_c_id,:no_o_ol_cnt,:no_c_discount
,:no_c_last,:no_c_credit,:no_d_tax,:no_w_tax,:no_d_next_o_id,TO_DATE(:timestamp,
'YYYYMMDDHH24MISS')); END;

        80,163            2     40,081.5    1.3     4.30     21.15 2x4gjqru5u1xx
Module: SQL*Plus
SELECT s0.snap_id id, -- TO_CHAR(s0.END_INTERVAL_TIME,'YY/MM/DD HH24:MI') tm,
 round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440
 + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END
_INTERVAL_TIME) * 60 + EXTRACT(MINUTE FROM s1.

        69,716            2     34,858.0    1.2     4.26      8.54 ag9jkv5xuz0dz
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select ps_partkey, sum(ps_supplycost * ps_availqty) as value from partsupp, supp
lier, nation where ps_suppkey = s_suppkey and s_nationkey = n_nationkey and n_na
me = 'EGYPT' group by ps_partkey having sum(ps_supplycost * ps_availqty) > ( sel
ect sum(ps_supplycost * ps_availqty) * 0.0001000000 from partsupp, supplier, nat

          -------------------------------------------------------------

SQL ordered by Reads                       DB/Inst: IVRS/ivrs  Snaps: 338-339
-> Total Disk Reads:       5,663,126
-> Captured SQL account for     74.4% of Total

                               Reads              CPU     Elapsed
Physical Reads  Executions    per Exec   %Total Time (s)  Time (s)    SQL Id
-------------- ----------- ------------- ------ -------- --------- -------------
       330,210           1     330,210.0    5.8    20.85     49.20 2n4xg8c3dmd62
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select s_name, count(*) as numwait from supplier, lineitem l1, orders, nation wh
ere s_suppkey = l1.l_suppkey and o_orderkey = l1.l_orderkey and o_orderstatus =
'F' and l1.l_receiptdate > l1.l_commitdate and exists ( select * from lineitem l
2 where l2.l_orderkey = l1.l_orderkey and l2.l_suppkey <> l1.l_suppkey) and not

       330,210           1     330,210.0    5.8    21.81     56.88 6mrh6s1s5g851
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select s_name, count(*) as numwait from supplier, lineitem l1, orders, nation wh
ere s_suppkey = l1.l_suppkey and o_orderkey = l1.l_orderkey and o_orderstatus =
'F' and l1.l_receiptdate > l1.l_commitdate and exists ( select * from lineitem l
2 where l2.l_orderkey = l1.l_orderkey and l2.l_suppkey <> l1.l_suppkey) and not

       330,210           1     330,210.0    5.8    28.03     89.61 bsdgaykhvy4xr
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select s_name, count(*) as numwait from supplier, lineitem l1, orders, nation wh
ere s_suppkey = l1.l_suppkey and o_orderkey = l1.l_orderkey and o_orderstatus =
'F' and l1.l_receiptdate > l1.l_commitdate and exists ( select * from lineitem l
2 where l2.l_orderkey = l1.l_orderkey and l2.l_suppkey <> l1.l_suppkey) and not

       301,265           2     150,632.5    5.3    28.34     89.09 bmfc2a2ym0kwr
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select nation, o_year, sum(amount) as sum_profit from ( select n_name as nation,
 extract(year from o_orderdate) as o_year, l_extendedprice * (1 - l_discount) -
ps_supplycost * l_quantity as amount from part, supplier, lineitem, partsupp, or
ders, nation where s_suppkey = l_suppkey and ps_suppkey = l_suppkey and ps_partk

       151,726           1     151,726.0    2.7    13.58     29.35 1f0r8shtps3bu
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select nation, o_year, sum(amount) as sum_profit from ( select n_name as nation,
 extract(year from o_orderdate) as o_year, l_extendedprice * (1 - l_discount) -
ps_supplycost * l_quantity as amount from part, supplier, lineitem, partsupp, or
ders, nation where s_suppkey = l_suppkey and ps_suppkey = l_suppkey and ps_partk

       132,179           1     132,179.0    2.3     6.89     23.19 5xd0ak4417rk0
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select o_year, sum(case when nation = 'MOZAMBIQUE' then volume else 0 end) / sum
(volume) as mkt_share from ( select extract(year from o_orderdate) as o_year, l_
extendedprice * (1 - l_discount) as volume, n2.n_name as nation from part, suppl
ier, lineitem, orders, customer, nation n1, nation n2, region where p_partkey =

       132,179           1     132,179.0    2.3     8.14     25.54 6aqpwwba8xvuu
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select o_year, sum(case when nation = 'GERMANY' then volume else 0 end) / sum(vo
lume) as mkt_share from ( select extract(year from o_orderdate) as o_year, l_ext
endedprice * (1 - l_discount) as volume, n2.n_name as nation from part, supplier
, lineitem, orders, customer, nation n1, nation n2, region where p_partkey = l_p

       132,179           1     132,179.0    2.3     6.76     23.21 94wqqbu0ajcvn
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select o_year, sum(case when nation = 'JAPAN' then volume else 0 end) / sum(volu
me) as mkt_share from ( select extract(year from o_orderdate) as o_year, l_exten
dedprice * (1 - l_discount) as volume, n2.n_name as nation from part, supplier,
lineitem, orders, customer, nation n1, nation n2, region where p_partkey = l_par

       125,250           1     125,250.0    2.2     6.39     12.83 05burzzbuh660
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select o_orderpriority, count(*) as order_count from orders where o_orderdate >=
 date '1993-05-01' and o_orderdate < date '1993-05-01' + interval '3' month and
SQL ordered by Reads                       DB/Inst: IVRS/ivrs  Snaps: 338-339
-> Total Disk Reads:       5,663,126
-> Captured SQL account for     74.4% of Total

                               Reads              CPU     Elapsed
Physical Reads  Executions    per Exec   %Total Time (s)  Time (s)    SQL Id
-------------- ----------- ------------- ------ -------- --------- -------------
exists ( select * from lineitem where l_orderkey = o_orderkey and l_commitdate <
 l_receiptdate) group by o_orderpriority order by o_orderpriority

       125,250           1     125,250.0    2.2     6.12     12.15 05pqvq1019n1t
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select o_orderpriority, count(*) as order_count from orders where o_orderdate >=
 date '1996-05-01' and o_orderdate < date '1996-05-01' + interval '3' month and
exists ( select * from lineitem where l_orderkey = o_orderkey and l_commitdate <
 l_receiptdate) group by o_orderpriority order by o_orderpriority

       125,250           1     125,250.0    2.2     6.63     13.86 15dxu5nmuj14a
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select o_orderpriority, count(*) as order_count from orders where o_orderdate >=
 date '1994-08-01' and o_orderdate < date '1994-08-01' + interval '3' month and
exists ( select * from lineitem where l_orderkey = o_orderkey and l_commitdate <
 l_receiptdate) group by o_orderpriority order by o_orderpriority

       125,250           1     125,250.0    2.2     5.85     11.77 2xf48ymvbjhxv
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select l_shipmode, sum(case when o_orderpriority = '1-URGENT' or o_orderpriority
 = '2-HIGH' then 1 else 0 end) as high_line_count, sum(case when o_orderpriority
 <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end) as low_line_co
unt from orders, lineitem where o_orderkey = l_orderkey and l_shipmode in ('MAIL

       125,250           1     125,250.0    2.2     5.78     11.67 3yj8qcg6sf32h
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select l_shipmode, sum(case when o_orderpriority = '1-URGENT' or o_orderpriority
 = '2-HIGH' then 1 else 0 end) as high_line_count, sum(case when o_orderpriority
 <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end) as low_line_co
unt from orders, lineitem where o_orderkey = l_orderkey and l_shipmode in ('AIR'

       125,250           1     125,250.0    2.2     6.01     12.20 c5dr0bxu3s966
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select l_shipmode, sum(case when o_orderpriority = '1-URGENT' or o_orderpriority
 = '2-HIGH' then 1 else 0 end) as high_line_count, sum(case when o_orderpriority
 <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end) as low_line_co
unt from orders, lineitem where o_orderkey = l_orderkey and l_shipmode in ('TRUC

       109,730           1     109,730.0    1.9     6.02     50.23 acgpfd4ysyfxb
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select s_name, s_address from supplier, nation where s_suppkey in ( select ps_su
ppkey from partsupp where ps_partkey in ( select p_partkey from part where p_nam
e like 'puff%') and ps_availqty > ( select 0.5 * sum(l_quantity) from lineitem w
here l_partkey = ps_partkey and l_suppkey = ps_suppkey and l_shipdate >= date '1

       108,262           1     108,262.0    1.9     5.46     10.68 cx10bjzjkg410
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select s_name, s_address from supplier, nation where s_suppkey in ( select ps_su
ppkey from partsupp where ps_partkey in ( select p_partkey from part where p_nam
e like 'moccasin%') and ps_availqty > ( select 0.5 * sum(l_quantity) from lineit
em where l_partkey = ps_partkey and l_suppkey = ps_suppkey and l_shipdate >= dat

       107,978           1     107,978.0    1.9     6.32     12.80 bdaz68nhm6jm4
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select s_name, s_address from supplier, nation where s_suppkey in ( select ps_su
ppkey from partsupp where ps_partkey in ( select p_partkey from part where p_nam
e like 'linen%') and ps_availqty > ( select 0.5 * sum(l_quantity) from lineitem
where l_partkey = ps_partkey and l_suppkey = ps_suppkey and l_shipdate >= date '

       106,241           1     106,241.0    1.9     5.87     58.52 081am6psuh26j
SQL ordered by Reads                       DB/Inst: IVRS/ivrs  Snaps: 338-339
-> Total Disk Reads:       5,663,126
-> Captured SQL account for     74.4% of Total

                               Reads              CPU     Elapsed
Physical Reads  Executions    per Exec   %Total Time (s)  Time (s)    SQL Id
-------------- ----------- ------------- ------ -------- --------- -------------
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select sum(l_extendedprice) / 7.0 as avg_yearly from lineitem, part where p_part
key = l_partkey and p_brand = 'Brand#35' and p_container = 'LG BOX' and l_quanti
ty < ( select 0.2 * avg(l_quantity) from lineitem where l_partkey = p_partkey)

       106,241           1     106,241.0    1.9     5.18      9.82 3v74jf7w31h8v
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select sum(l_extendedprice) / 7.0 as avg_yearly from lineitem, part where p_part
key = l_partkey and p_brand = 'Brand#21' and p_container = 'LG DRUM' and l_quant
ity < ( select 0.2 * avg(l_quantity) from lineitem where l_partkey = p_partkey)

       106,241           1     106,241.0    1.9     5.52     10.44 5u88ac3spdu0n
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select sum(l_extendedprice* (1 - l_discount)) as revenue from lineitem, part whe
re ( p_partkey = l_partkey and p_brand = 'Brand#45' and p_container in ('SM CASE
', 'SM BOX', 'SM PACK', 'SM PKG') and l_quantity >= 1 and l_quantity <= 1 + 10 a
nd p_size between 1 and 5 and l_shipmode in ('AIR', 'AIR REG') and l_shipinstruc

       106,241           1     106,241.0    1.9     5.42     12.66 75d32g70ru6f2
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select sum(l_extendedprice* (1 - l_discount)) as revenue from lineitem, part whe
re ( p_partkey = l_partkey and p_brand = 'Brand#34' and p_container in ('SM CASE
', 'SM BOX', 'SM PACK', 'SM PKG') and l_quantity >= 3 and l_quantity <= 3 + 10 a
nd p_size between 1 and 5 and l_shipmode in ('AIR', 'AIR REG') and l_shipinstruc

       106,241           1     106,241.0    1.9     5.36     10.16 by11nan0n3nbb
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select sum(l_extendedprice* (1 - l_discount)) as revenue from lineitem, part whe
re ( p_partkey = l_partkey and p_brand = 'Brand#23' and p_container in ('SM CASE
', 'SM BOX', 'SM PACK', 'SM PKG') and l_quantity >= 1 and l_quantity <= 1 + 10 a
nd p_size between 1 and 5 and l_shipmode in ('AIR', 'AIR REG') and l_shipinstruc

       103,748           1     103,748.0    1.8    14.85     45.70 29rqwcj4cs31u
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select c_name, c_custkey, o_orderkey, o_orderdate, o_totalprice, sum(l_quantity)
 from customer, orders, lineitem where o_orderkey in ( select l_orderkey from li
neitem group by l_orderkey having sum(l_quantity) > 313) and c_custkey = o_custk
ey and o_orderkey = l_orderkey group by c_name, c_custkey, o_orderkey, o_orderda

       102,436           2      51,218.0    1.8    11.32     23.29 814qvp0rkqug4
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select c_name, c_custkey, o_orderkey, o_orderdate, o_totalprice, sum(l_quantity)
 from customer, orders, lineitem where o_orderkey in ( select l_orderkey from li
neitem group by l_orderkey having sum(l_quantity) > 314) and c_custkey = o_custk
ey and o_orderkey = l_orderkey group by c_name, c_custkey, o_orderkey, o_orderda

       102,430           1     102,430.0    1.8    11.47     23.72 8sfhj7ua3qfjf
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select c_name, c_custkey, o_orderkey, o_orderdate, o_totalprice, sum(l_quantity)
 from customer, orders, lineitem where o_orderkey in ( select l_orderkey from li
neitem group by l_orderkey having sum(l_quantity) > 312) and c_custkey = o_custk
ey and o_orderkey = l_orderkey group by c_name, c_custkey, o_orderkey, o_orderda

       102,405           1     102,405.0    1.8    13.69     25.90 05jp96tzvutb6
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select l_returnflag, l_linestatus, sum(l_quantity) as sum_qty, sum(l_extendedpri
ce) as sum_base_price, sum(l_extendedprice * (1 - l_discount)) as sum_disc_price
, sum(l_extendedprice * (1 - l_discount) * (1 + l_tax)) as sum_charge, avg(l_qua
ntity) as avg_qty, avg(l_extendedprice) as avg_price, avg(l_discount) as avg_dis

SQL ordered by Reads                       DB/Inst: IVRS/ivrs  Snaps: 338-339
-> Total Disk Reads:       5,663,126
-> Captured SQL account for     74.4% of Total

                               Reads              CPU     Elapsed
Physical Reads  Executions    per Exec   %Total Time (s)  Time (s)    SQL Id
-------------- ----------- ------------- ------ -------- --------- -------------
       102,405           1     102,405.0    1.8    14.08     30.77 7409gxv4spfj2
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select l_returnflag, l_linestatus, sum(l_quantity) as sum_qty, sum(l_extendedpri
ce) as sum_base_price, sum(l_extendedprice * (1 - l_discount)) as sum_disc_price
, sum(l_extendedprice * (1 - l_discount) * (1 + l_tax)) as sum_charge, avg(l_qua
ntity) as avg_qty, avg(l_extendedprice) as avg_price, avg(l_discount) as avg_dis

       102,405           1     102,405.0    1.8    14.34     34.07 cvhgz2zwbk4qf
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select l_returnflag, l_linestatus, sum(l_quantity) as sum_qty, sum(l_extendedpri
ce) as sum_base_price, sum(l_extendedprice * (1 - l_discount)) as sum_disc_price
, sum(l_extendedprice * (1 - l_discount) * (1 + l_tax)) as sum_charge, avg(l_qua
ntity) as avg_qty, avg(l_extendedprice) as avg_price, avg(l_discount) as avg_dis

        66,900           2      33,450.0    1.2     4.26      8.54 ag9jkv5xuz0dz
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
select ps_partkey, sum(ps_supplycost * ps_availqty) as value from partsupp, supp
lier, nation where ps_suppkey = s_suppkey and s_nationkey = n_nationkey and n_na
me = 'EGYPT' group by ps_partkey having sum(ps_supplycost * ps_availqty) > ( sel
ect sum(ps_supplycost * ps_availqty) * 0.0001000000 from partsupp, supplier, nat

          -------------------------------------------------------------

SQL ordered by Executions                  DB/Inst: IVRS/ivrs  Snaps: 338-339
-> Total Executions:          57,841
-> Captured SQL account for     18.5% of Total

                                              CPU per    Elap per
 Executions   Rows Processed  Rows per Exec   Exec (s)   Exec (s)     SQL Id
------------ --------------- -------------- ---------- ----------- -------------
       5,442           5,442            1.0       0.00        0.00 8yvup05pk06ca
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
SELECT S_QUANTITY, S_DATA, S_DIST_01, S_DIST_02, S_DIST_03, S_DIST_04, S_DIST_05
, S_DIST_06, S_DIST_07, S_DIST_08, S_DIST_09, S_DIST_10 FROM STOCK WHERE S_I_ID
= :B2 AND S_W_ID = :B1

         563             563            1.0       0.00        0.00 3c1kubcdjnppq
update sys.col_usage$ set equality_preds = equality_preds + decode(bitan
d(:flag,1),0,0,1), equijoin_preds = equijoin_preds + decode(bitand(:flag
,2),0,0,1), nonequijoin_preds = nonequijoin_preds + decode(bitand(:flag,4),0,0
,1), range_preds = range_preds + decode(bitand(:flag,8),0,0,1),

         546             546            1.0       0.01        0.04 16dhat4ta7xs9
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
begin neword(:no_w_id,:no_max_w_id,:no_d_id,:no_c_id,:no_o_ol_cnt,:no_c_discount
,:no_c_last,:no_c_credit,:no_d_tax,:no_w_tax,:no_d_next_o_id,TO_DATE(:timestamp,
'YYYYMMDDHH24MISS')); END;

         539             539            1.0       0.00        0.04 aw9ttz9acxbc3
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
BEGIN payment(:p_w_id,:p_d_id,:p_c_w_id,:p_c_d_id,:p_c_id,:byname,:p_h_amount,:p
_c_last,:p_w_street_1,:p_w_street_2,:p_w_city,:p_w_state,:p_w_zip,:p_d_street_1,
:p_d_street_2,:p_d_city,:p_d_state,:p_d_zip,:p_c_first,:p_c_middle,:p_c_street_1
,:p_c_street_2,:p_c_city,:p_c_state,:p_c_zip,:p_c_phone,:p_c_since,:p_c_credit,:

         420           4,284           10.2       0.00        0.04 5ps73nuy5f2vj
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
UPDATE ORDER_LINE SET OL_DELIVERY_D = :B4 WHERE OL_O_ID = :B3 AND OL_D_ID = :B2
AND OL_W_ID = :B1

         317           2,534            8.0       0.00        0.05 4wg725nwpxb1z
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
SELECT C_FIRST, C_MIDDLE, C_ID, C_STREET_1, C_STREET_2, C_CITY, C_STATE, C_ZIP,
C_PHONE, C_CREDIT, C_CREDIT_LIM, C_DISCOUNT, C_BALANCE, C_SINCE FROM CUSTOMER WH
ERE C_W_ID = :B3 AND C_D_ID = :B2 AND C_LAST = :B1 ORDER BY C_FIRST

         268             268            1.0       0.00        0.00 2ym6hhaq30r73
select type#,blocks,extents,minexts,maxexts,extsize,extpct,user#,iniexts,NVL(lis
ts,65535),NVL(groups,65535),cachehint,hwmincr, NVL(spare1,0),NVL(scanhint,0) fro
m seg$ where ts#=:1 and file#=:2 and block#=:3

         224             203            0.9       0.00        0.02 96g93hntrzjtr
select /*+ rule */ bucket_cnt, row_cnt, cache_cnt, null_cnt, timestamp#, sample_
size, minimum, maximum, distcnt, lowval, hival, density, col#, spare1, spare2, a
vgcln from hist_head$ where obj#=:1 and intcol#=:2

         203               0            0.0       0.00        0.00 b2gnxm5z6r51n
lock table sys.col_usage$ in exclusive mode nowait

         135             135            1.0       0.00        0.00 3m8smr0v7v1m6
INSERT INTO sys.wri$_adv_message_groups (task_id,id,seq,message#,fac,hdr,lm,nl,p
1,p2,p3,p4,p5) VALUES (:1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11,:12,:13)

          -------------------------------------------------------------

SQL ordered by Parse Calls                 DB/Inst: IVRS/ivrs  Snaps: 338-339
-> Total Parse Calls:           5,952
-> Captured SQL account for      61.4% of Total

                            % Total
 Parse Calls  Executions     Parses    SQL Id
------------ ------------ --------- -------------
         546          546      9.17 16dhat4ta7xs9
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
begin neword(:no_w_id,:no_max_w_id,:no_d_id,:no_c_id,:no_o_ol_cnt,:no_c_discount
,:no_c_last,:no_c_credit,:no_d_tax,:no_w_tax,:no_d_next_o_id,TO_DATE(:timestamp,
'YYYYMMDDHH24MISS')); END;

         539          539      9.06 aw9ttz9acxbc3
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
BEGIN payment(:p_w_id,:p_d_id,:p_c_w_id,:p_c_d_id,:p_c_id,:byname,:p_h_amount,:p
_c_last,:p_w_street_1,:p_w_street_2,:p_w_city,:p_w_state,:p_w_zip,:p_d_street_1,
:p_d_street_2,:p_d_city,:p_d_state,:p_d_zip,:p_c_first,:p_c_middle,:p_c_street_1
,:p_c_street_2,:p_c_city,:p_c_state,:p_c_zip,:p_c_phone,:p_c_since,:p_c_credit,:

         268          268      4.50 2ym6hhaq30r73
select type#,blocks,extents,minexts,maxexts,extsize,extpct,user#,iniexts,NVL(lis
ts,65535),NVL(groups,65535),cachehint,hwmincr, NVL(spare1,0),NVL(scanhint,0) fro
m seg$ where ts#=:1 and file#=:2 and block#=:3

         203          563      3.41 3c1kubcdjnppq
update sys.col_usage$ set equality_preds = equality_preds + decode(bitan
d(:flag,1),0,0,1), equijoin_preds = equijoin_preds + decode(bitand(:flag
,2),0,0,1), nonequijoin_preds = nonequijoin_preds + decode(bitand(:flag,4),0,0
,1), range_preds = range_preds + decode(bitand(:flag,8),0,0,1),

         203            0      3.41 53btfq0dt9bs9
insert into sys.col_usage$ values ( :objn, :coln, decode(bitand(:flag,1),0,0
,1), decode(bitand(:flag,2),0,0,1), decode(bitand(:flag,4),0,0,1), decode(
bitand(:flag,8),0,0,1), decode(bitand(:flag,16),0,0,1), decode(bitand(:flag,
32),0,0,1), :time)

         203          203      3.41 b2gnxm5z6r51n
lock table sys.col_usage$ in exclusive mode nowait

         135          135      2.27 3m8smr0v7v1m6
INSERT INTO sys.wri$_adv_message_groups (task_id,id,seq,message#,fac,hdr,lm,nl,p
1,p2,p3,p4,p5) VALUES (:1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11,:12,:13)

         132          132      2.22 grwydz59pu6mc
select text from view$ where rowid=:1

         130          130      2.18 f80h0xb1qvbsk
SELECT sys.wri$_adv_seq_msggroup.nextval FROM dual

         125          125      2.10 350f5yrnnmshs
lock table sys.mon_mods$ in exclusive mode nowait

         125          125      2.10 g00cj285jmgsw
update sys.mon_mods$ set inserts = inserts + :ins, updates = updates + :upd, del
etes = deletes + :del, flags = (decode(bitand(flags, :flag), :flag, flags, flags
 + :flag)), drop_segments = drop_segments + :dropseg, timestamp = :time where ob
j# = :objn

          83           83      1.39 4m7m0t6fjcs5x
update seq$ set increment$=:2,minvalue=:3,maxvalue=:4,cycle#=:5,order$=:6,cache=
:7,highwater=:8,audit$=:9,flags=:10 where obj#=:1

          82           82      1.38 0h6b2sajwb74n
select privilege#,level from sysauth$ connect by grantee#=prior privilege# and p
rivilege#>0 start with grantee#=:1 and privilege#>0

SQL ordered by Parse Calls                 DB/Inst: IVRS/ivrs  Snaps: 338-339
-> Total Parse Calls:           5,952
-> Captured SQL account for      61.4% of Total

                            % Total
 Parse Calls  Executions     Parses    SQL Id
------------ ------------ --------- -------------
          70           70      1.18 1dubbbfqnqvh9
SELECT ORA_TQ_BASE$.NEXTVAL FROM DUAL

          63           63      1.06 39m4sx9k63ba2
select /*+ index(idl_ub2$ i_idl_ub21) +*/ piece#,length,piece from idl_ub2$ wher
e obj#=:1 and part=:2 and version=:3 order by piece#

          63           63      1.06 c6awqs517jpj0
select /*+ index(idl_char$ i_idl_char1) +*/ piece#,length,piece from idl_char$ w
here obj#=:1 and part=:2 and version=:3 order by piece#

          63           63      1.06 cvn54b7yz0s8u
select /*+ index(idl_ub1$ i_idl_ub11) +*/ piece#,length,piece from idl_ub1$ wher
e obj#=:1 and part=:2 and version=:3 order by piece#

          63           63      1.06 ga9j9xk5cy9s0
select /*+ index(idl_sb4$ i_idl_sb41) +*/ piece#,length,piece from idl_sb4$ wher
e obj#=:1 and part=:2 and version=:3 order by piece#

          62           62      1.04 5hyh0360hgx2u
Module: wish8.5@dbrocaix01.bayantel.com (TNS V1-V3)
BEGIN slev(:st_w_id,:st_d_id,:threshold); END;

          -------------------------------------------------------------

SQL ordered by Sharable Memory             DB/Inst: IVRS/ivrs  Snaps: 338-339

                  No data exists for this section of the report.
          -------------------------------------------------------------

SQL ordered by Version Count               DB/Inst: IVRS/ivrs  Snaps: 338-339

                  No data exists for this section of the report.
          -------------------------------------------------------------

Instance Activity Stats                    DB/Inst: IVRS/ivrs  Snaps: 338-339

Statistic                                     Total     per Second     per Trans
-------------------------------- ------------------ -------------- -------------
CPU used by this session                     43,952           72.9          17.3
CPU used when call started                   80,217          133.0          31.6
CR blocks created                                 6            0.0           0.0
Cached Commit SCN referenced                    432            0.7           0.2
Commit SCN cached                                 1            0.0           0.0
DB time                                     374,210          620.5         147.4
DBWR checkpoint buffers written               3,433            5.7           1.4
DBWR checkpoints                                  1            0.0           0.0
DBWR transaction table writes                    20            0.0           0.0
DBWR undo block writes                          917            1.5           0.4
DFO trees parallelized                           76            0.1           0.0
IMU CR rollbacks                                  0            0.0           0.0
IMU Flushes                                     159            0.3           0.1
IMU Redo allocation size                    896,956        1,487.3         353.3
IMU commits                                   1,881            3.1           0.7
IMU contention                                    5            0.0           0.0
IMU pool not allocated                          488            0.8           0.2
IMU recursive-transaction flush                  47            0.1           0.0
IMU undo allocation size                 14,837,636       24,603.8       5,843.9
IMU- failed to get a private str                488            0.8           0.2
PX local messages recv'd                    427,618          709.1         168.4
PX local messages sent                      427,626          709.1         168.4
Parallel operations not downgrad                 76            0.1           0.0
SMON posted for undo segment shr                  0            0.0           0.0
SQL*Net roundtrips to/from clien              8,221           13.6           3.2
active txn count during cleanout                220            0.4           0.1
application wait time                             0            0.0           0.0
background checkpoints completed                  1            0.0           0.0
background checkpoints started                    1            0.0           0.0
background timeouts                           2,201            3.7           0.9
branch node splits                                0            0.0           0.0
buffer is not pinned count                  185,040          306.8          72.9
buffer is pinned count                      153,771          255.0          60.6
bytes received via SQL*Net from           2,339,345        3,879.1         921.4
bytes sent via SQL*Net to client          3,067,072        5,085.8       1,208.0
calls to get snapshot scn: kcmgs             93,092          154.4          36.7
calls to kcmgas                               4,066            6.7           1.6
calls to kcmgcs                                 276            0.5           0.1
change write time                               204            0.3           0.1
cleanout - number of ktugct call                278            0.5           0.1
cleanouts and rollbacks - consis                  0            0.0           0.0
cleanouts only - consistent read                 65            0.1           0.0
cluster key scan block gets                   1,999            3.3           0.8
cluster key scans                               991            1.6           0.4
commit batch/immediate performed                  5            0.0           0.0
commit batch/immediate requested                  5            0.0           0.0
commit cleanout failures: block                   0            0.0           0.0
commit cleanout failures: buffer                  0            0.0           0.0
commit cleanout failures: callba                 13            0.0           0.0
commit cleanout failures: cannot                  0            0.0           0.0
commit cleanouts                             21,493           35.6           8.5
commit cleanouts successfully co             21,480           35.6           8.5
commit immediate performed                        5            0.0           0.0
commit immediate requested                        5            0.0           0.0
commit txn count during cleanout                254            0.4           0.1
concurrency wait time                           168            0.3           0.1
consistent changes                               87            0.1           0.0
consistent gets                           5,981,829        9,919.1       2,356.0
consistent gets - examination               217,091          360.0          85.5
consistent gets direct                    5,802,782        9,622.2       2,285.5
Instance Activity Stats                    DB/Inst: IVRS/ivrs  Snaps: 338-339

Statistic                                     Total     per Second     per Trans
-------------------------------- ------------------ -------------- -------------
consistent gets from cache                  354,637          588.1         139.7
cursor authentications                          208            0.3           0.1
data blocks consistent reads - u                  4            0.0           0.0
db block changes                             88,663          147.0          34.9
db block gets                                68,732          114.0          27.1
db block gets direct                              6            0.0           0.0
db block gets from cache                     68,726          114.0          27.1
deferred (CURRENT) block cleanou              9,569           15.9           3.8
dirty buffers inspected                       2,347            3.9           0.9
enqueue conversions                             806            1.3           0.3
enqueue releases                             21,768           36.1           8.6
enqueue requests                             21,963           36.4           8.7
enqueue timeouts                                201            0.3           0.1
enqueue waits                                    51            0.1           0.0
execute count                                57,841           95.9          22.8
free buffer inspected                        20,379           33.8           8.0
free buffer requested                        19,793           32.8           7.8
heap block compress                             144            0.2           0.1
hot buffers moved to head of LRU              7,705           12.8           3.0
immediate (CR) block cleanout ap                 65            0.1           0.0
immediate (CURRENT) block cleano              2,074            3.4           0.8
index crx upgrade (positioned)                  498            0.8           0.2
index fast full scans (direct re                 78            0.1           0.0
index fast full scans (full)                     15            0.0           0.0
index fast full scans (rowid ran                156            0.3           0.1
index fetch by key                           82,020          136.0          32.3
index scans kdiixs1                          16,708           27.7           6.6
leaf node 90-10 splits                           10            0.0           0.0
leaf node splits                                172            0.3           0.1
lob reads                                        42            0.1           0.0
lob writes                                      178            0.3           0.1
lob writes unaligned                            178            0.3           0.1
logons cumulative                               312            0.5           0.1
messages received                             2,837            4.7           1.1
messages sent                                 2,837            4.7           1.1
no buffer to keep pinned count                    0            0.0           0.0
no work - consistent read gets            5,895,112        9,775.3       2,321.8
opened cursors cumulative                     6,773           11.2           2.7
parse count (failures)                            0            0.0           0.0
parse count (hard)                              416            0.7           0.2
parse count (total)                           5,952            9.9           2.3
parse time cpu                                  684            1.1           0.3
parse time elapsed                            3,497            5.8           1.4
physical read IO requests                   397,584          659.3         156.6
physical read bytes                  47,825,584,128   79,304,326.1  18,836,386.0
physical read total IO requests             387,784          643.0         152.7
physical read total bytes            47,903,270,912   79,433,146.3  18,866,983.4
physical read total multi block             380,329          630.7         149.8
physical reads                            5,663,126        9,390.6       2,230.5
physical reads cache                         17,948           29.8           7.1
physical reads cache prefetch                   943            1.6           0.4
physical reads direct                     5,820,136        9,650.9       2,292.3
physical reads direct (lob)                       0            0.0           0.0
physical reads direct temporary              17,299           28.7           6.8
physical reads prefetch warmup                    0            0.0           0.0
physical reads retry corrupt                     54            0.1           0.0
physical write IO requests                    5,731            9.5           2.3
physical write bytes                    203,554,816      337,534.4      80,171.3
physical write total IO requests              8,484           14.1           3.3
physical write total bytes              283,976,192      470,889.0     111,845.7
Instance Activity Stats                    DB/Inst: IVRS/ivrs  Snaps: 338-339

Statistic                                     Total     per Second     per Trans
-------------------------------- ------------------ -------------- -------------
physical write total multi block              5,019            8.3           2.0
physical writes                              24,848           41.2           9.8
physical writes direct                       17,318           28.7           6.8
physical writes direct (lob)                      0            0.0           0.0
physical writes direct temporary             17,299           28.7           6.8
physical writes from cache                    7,530           12.5           3.0
physical writes non checkpoint               23,712           39.3           9.3
pinned buffers inspected                          6            0.0           0.0
prefetch warmup blocks aged out                   0            0.0           0.0
prefetched blocks aged out befor                  2            0.0           0.0
process last non-idle time                      579            1.0           0.2
queries parallelized                             67            0.1           0.0
recursive calls                             115,742          191.9          45.6
recursive cpu usage                          43,163           71.6          17.0
redo blocks written                          32,504           53.9          12.8
redo buffer allocation retries                    1            0.0           0.0
redo entries                                 19,373           32.1           7.6
redo log space requests                           1            0.0           0.0
redo log space wait time                         25            0.0           0.0
redo size                                15,647,384       25,946.5       6,162.8
redo synch time                               5,470            9.1           2.2
redo synch writes                             2,102            3.5           0.8
redo wastage                                473,620          785.4         186.5
redo write time                               7,062           11.7           2.8
redo writer latching time                         1            0.0           0.0
redo writes                                   2,253            3.7           0.9
rollback changes - undo records                 109            0.2           0.0
rollbacks only - consistent read                  4            0.0           0.0
rows fetched via callback                    65,515          108.6          25.8
session connect time                              0            0.0           0.0
session cursor cache hits                     5,056            8.4           2.0
session logical reads                     6,050,561       10,033.0       2,383.1
session pga memory                      411,760,136      682,780.2     162,174.1
session pga memory max                5,395,314,184    8,946,503.5   2,124,976.1
session uga memory                   51,546,743,504   85,474,748.1  20,301,986.4
session uga memory max                1,043,985,628    1,731,135.7     411,179.9
shared hash latch upgrades - no               4,344            7.2           1.7
sorts (disk)                                      0            0.0           0.0
sorts (memory)                                1,839            3.1           0.7
sorts (rows)                             25,796,856       42,776.3      10,160.2
sql area evicted                                 85            0.1           0.0
sql area purged                                   0            0.0           0.0
summed dirty queue length                    13,205           21.9           5.2
switch current to new buffer                    858            1.4           0.3
table fetch by rowid                        127,462          211.4          50.2
table fetch continued row                       199            0.3           0.1
table scan blocks gotten                  5,826,518        9,661.5       2,294.8
table scan rows gotten                  342,238,570      567,499.6     134,792.7
table scans (direct read)                     3,353            5.6           1.3
table scans (long tables)                     4,229            7.0           1.7
table scans (rowid ranges)                    4,229            7.0           1.7
table scans (short tables)                    4,797            8.0           1.9
total number of times SMON poste                 39            0.1           0.0
transaction rollbacks                             5            0.0           0.0
transaction tables consistent re                  2            0.0           0.0
transaction tables consistent re                 28            0.1           0.0
undo change vector size                   5,810,908        9,635.6       2,288.7
user I/O wait time                           42,789           71.0          16.9
user calls                                   11,544           19.1           4.6
user commits                                  2,526            4.2           1.0
Instance Activity Stats                    DB/Inst: IVRS/ivrs  Snaps: 338-339

Statistic                                     Total     per Second     per Trans
-------------------------------- ------------------ -------------- -------------
user rollbacks                                   13            0.0           0.0
workarea executions - onepass                    10            0.0           0.0
workarea executions - optimal                 1,805            3.0           0.7
write clones created in foregrou                  7            0.0           0.0
          -------------------------------------------------------------

Instance Activity Stats - Absolute Values  DB/Inst: IVRS/ivrs  Snaps: 338-339
-> Statistics with absolute values (should not be diffed)

Statistic                            Begin Value       End Value
-------------------------------- --------------- ---------------
session cursor cache count                10,364          10,760
opened cursors current                        91              67
workarea memory allocated                  2,258           2,368
logons current                                31              30
          -------------------------------------------------------------

Instance Activity Stats - Thread Activity   DB/Inst: IVRS/ivrs  Snaps: 338-339
-> Statistics identified by '(derived)' come from sources other than SYSSTAT

Statistic                                     Total  per Hour
-------------------------------- ------------------ ---------
log switches (derived)                            1      5.97
          -------------------------------------------------------------

Tablespace IO Stats                        DB/Inst: IVRS/ivrs  Snaps: 338-339
-> ordered by IOs (Reads + Writes) desc

Tablespace
------------------------------
                 Av      Av     Av                       Av     Buffer Av Buf
         Reads Reads/s Rd(ms) Blks/Rd       Writes Writes/s      Waits Wt(ms)
-------------- ------- ------ ------- ------------ -------- ---------- ------
TPCHTAB
       387,123     642    0.2    14.8            2        0          3    0.0
USERS
         5,988      10   14.6     1.0        3,649        6          0    0.0
TEMP
         1,534       3    0.0    11.3        1,533        3          0    0.0
SYSTEM
         1,211       2   47.0     1.1           41        0          0    0.0
SYSAUX
           726       1  100.0     1.3          254        0          0    0.0
UNDOTBS1
             9       0    4.4     1.0          354        1          0    0.0
CCDATA
             1       0    0.0     1.0            1        0          0    0.0
CCINDEX
             1       0    0.0     1.0            1        0          0    0.0
PSE
             1       0    0.0     1.0            1        0          0    0.0
SOE
             1       0    0.0     1.0            1        0          0    0.0
SOEINDEX
             1       0    0.0     1.0            1        0          0    0.0
TPCCTAB
             1       0    0.0     1.0            1        0          0    0.0
          -------------------------------------------------------------

File IO Stats                              DB/Inst: IVRS/ivrs  Snaps: 338-339
-> ordered by Tablespace, File

Tablespace               Filename
------------------------ ----------------------------------------------------
                 Av      Av     Av                       Av     Buffer Av Buf
         Reads Reads/s Rd(ms) Blks/Rd       Writes Writes/s      Waits Wt(ms)
-------------- ------- ------ ------- ------------ -------- ---------- ------
CCDATA                   +DATA_1/ivrs/datafile/ccdata.dbf
             1       0    0.0     1.0            1        0          0    0.0
CCINDEX                  +DATA_1/ivrs/datafile/ccindex.dbf
             1       0    0.0     1.0            1        0          0    0.0
PSE                      +DATA_1/ivrs/pse.dbf
             1       0    0.0     1.0            1        0          0    0.0
SOE                      +DATA_1/ivrs/datafile/soe.dbf
             1       0    0.0     1.0            1        0          0    0.0
SOEINDEX                 +DATA_1/ivrs/datafile/soeindex.dbf
             1       0    0.0     1.0            1        0          0    0.0
SYSAUX                   +DATA_1/ivrs/datafile/sysaux.258.652821943
           726       1  100.0     1.3          254        0          0    0.0
SYSTEM                   +DATA_1/ivrs/datafile/system.267.652821909
         1,176       2   48.3     1.1           40        0          0    0.0
SYSTEM                   +DATA_1/ivrs/datafile/system_02.dbf
            35       0    4.6     1.0            1        0          0    0.0
TEMP                     +DATA_1/ivrs/tempfile/temp.256.652821953
         1,534       3    0.0    11.3        1,533        3          0    N/A
TPCCTAB                  +DATA_1/ivrs/tpcctab01.dbf
             1       0    0.0     1.0            1        0          0    0.0
TPCHTAB                  +DATA_1/ivrs/datafile/tpch_01.dbf
       387,123     642    0.2    14.8            2        0          3    0.0
UNDOTBS1                 +DATA_1/ivrs/datafile/undotbs1.257.652821933
             9       0    4.4     1.0          354        1          0    0.0
USERS                    +DATA_1/ivrs/datafile/users.263.652821963
         5,739      10   13.0     1.0        3,515        6          0    0.0
USERS                    +DATA_1/ivrs/datafile/users02.dbf
           249       0   50.3     1.0          134        0          0    0.0
          -------------------------------------------------------------

Buffer Pool Statistics                     DB/Inst: IVRS/ivrs  Snaps: 338-339
-> Standard block size Pools  D: default,  K: keep,  R: recycle
-> Default Pools for other block sizes: 2k, 4k, 8k, 16k, 32k

                                                            Free Writ     Buffer
     Number of Pool         Buffer     Physical    Physical Buff Comp       Busy
P      Buffers Hit%           Gets        Reads      Writes Wait Wait      Waits
--- ---------- ---- -------------- ------------ ----------- ---- ---- ----------
D       24,184   96        428,087       18,328       7,579    0    0          3
          -------------------------------------------------------------

Instance Recovery Stats                     DB/Inst: IVRS/ivrs  Snaps: 338-339
-> B: Begin snapshot,  E: End snapshot

  Targt  Estd                                  Log File Log Ckpt     Log Ckpt
  MTTR   MTTR   Recovery  Actual    Target       Size    Timeout     Interval
   (s)    (s)   Estd IOs Redo Blks Redo Blks  Redo Blks Redo Blks   Redo Blks
- ----- ----- ---------- --------- --------- ---------- --------- ------------
B     0    50       1945     28667    184320     184320    219902          N/A
E     0    45        490      3284    119243     184320    119243          N/A
          -------------------------------------------------------------

Buffer Pool Advisory                             DB/Inst: IVRS/ivrs  Snap: 339
-> Only rows with estimated physical reads >0 are displayed
-> ordered by Block Size, Buffers For Estimate

                                        Est
                                       Phys
    Size for   Size      Buffers for   Read          Estimated
P    Est (M) Factor         Estimate Factor     Physical Reads
--- -------- ------ ---------------- ------ ------------------
D         16     .1            1,996    3.5            550,709
D         32     .2            3,992    2.5            392,558
D         48     .2            5,988    1.8            285,114
D         64     .3            7,984    1.5            235,318
D         80     .4            9,980    1.3            209,129
D         96     .5           11,976    1.2            196,161
D        112     .6           13,972    1.2            185,692
D        128     .7           15,968    1.1            178,684
D        144     .7           17,964    1.1            172,352
D        160     .8           19,960    1.1            166,932
D        176     .9           21,956    1.0            162,491
D        192    1.0           23,952    1.0            159,080
D        196    1.0           24,451    1.0            158,303
D        208    1.1           25,948    1.0            156,344
D        224    1.1           27,944    1.0            153,879
D        240    1.2           29,940    1.0            150,890
D        256    1.3           31,936    0.9            141,958
D        272    1.4           33,932    0.9            138,023
D        288    1.5           35,928    0.9            135,507
D        304    1.6           37,924    0.8            133,447
D        320    1.6           39,920    0.8            131,793
          -------------------------------------------------------------

PGA Aggr Summary                           DB/Inst: IVRS/ivrs  Snaps: 338-339
-> PGA cache hit % - percentage of W/A (WorkArea) data processed only in-memory

PGA Cache Hit %   W/A MB Processed  Extra W/A MB Read/Written
--------------- ------------------ --------------------------
           88.6              1,083                        139
          -------------------------------------------------------------

PGA Aggr Target Stats                       DB/Inst: IVRS/ivrs  Snaps: 338-339
-> B: Begin snap   E: End snap (rows dentified with B or E contain data
   which is absolute i.e. not diffed over the interval)
-> Auto PGA Target - actual workarea memory target
-> W/A PGA Used    - amount of memory used for all Workareas (manual + auto)
-> %PGA W/A Mem    - percentage of PGA memory allocated to workareas
-> %Auto W/A Mem   - percentage of workarea memory controlled by Auto Mem Mgmt
-> %Man W/A Mem    - percentage of workarea memory under manual control

                                                %PGA  %Auto   %Man
    PGA Aggr   Auto PGA   PGA Mem    W/A PGA     W/A    W/A    W/A Global Mem
   Target(M)  Target(M)  Alloc(M)    Used(M)     Mem    Mem    Mem   Bound(K)
- ---------- ---------- ---------- ---------- ------ ------ ------ ----------
B        103         39      148.9        7.7    5.2  100.0     .0     21,094
E        103         39      154.8        7.2    4.7  100.0     .0     21,094
          -------------------------------------------------------------

PGA Aggr Target Histogram                   DB/Inst: IVRS/ivrs  Snaps: 338-339
-> Optimal Executions are purely in-memory operations

  Low     High
Optimal Optimal    Total Execs  Optimal Execs 1-Pass Execs M-Pass Execs
------- ------- -------------- -------------- ------------ ------------
     2K      4K          1,418          1,418            0            0
    64K    128K             14             14            0            0
   128K    256K             30             30            0            0
   256K    512K             12             12            0            0
   512K   1024K            140            140            0            0
     1M      2M             98             98            0            0
     2M      4M             70             70            0            0
     4M      8M             18             18            0            0
     8M     16M             12              6            6            0
    16M     32M             24             20            4            0
          -------------------------------------------------------------

PGA Memory Advisory                              DB/Inst: IVRS/ivrs  Snap: 339
-> When using Auto Memory Mgmt, minimally choose a pga_aggregate_target value
   where Estd PGA Overalloc Count is 0

                                       Estd Extra    Estd PGA   Estd PGA
PGA Target    Size           W/A MB   W/A MB Read/      Cache  Overalloc
  Est (MB)   Factr        Processed Written to Disk     Hit %      Count
---------- ------- ---------------- ---------------- -------- ----------
        13     0.1          2,834.0          3,667.8     44.0        146
        26     0.3          2,834.0          3,667.8     44.0        146
        52     0.5          2,834.0          3,664.7     44.0        145
        77     0.8          2,834.0            756.1     79.0          7
       103     1.0          2,834.0            194.9     94.0          1
       124     1.2          2,834.0             41.8     99.0          0
       144     1.4          2,834.0             41.8     99.0          0
       165     1.6          2,834.0              0.0    100.0          0
       185     1.8          2,834.0              0.0    100.0          0
       206     2.0          2,834.0              0.0    100.0          0
       309     3.0          2,834.0              0.0    100.0          0
       412     4.0          2,834.0              0.0    100.0          0
       618     6.0          2,834.0              0.0    100.0          0
       824     8.0          2,834.0              0.0    100.0          0
          -------------------------------------------------------------

Shared Pool Advisory                            DB/Inst: IVRS/ivrs  Snap: 339
-> SP: Shared Pool     Est LC: Estimated Library Cache   Factr: Factor
-> Note there is often a 1:Many correlation between a single logical object
   in the Library Cache, and the physical number of memory objects associated
   with it.  Therefore comparing the number of Lib Cache objects (e.g. in
   v$librarycache), with the number of Lib Cache Memory Objects is invalid.

                                        Est LC Est LC  Est LC Est LC
    Shared    SP   Est LC                 Time   Time    Load   Load      Est LC
      Pool  Size     Size       Est LC   Saved  Saved    Time   Time         Mem
   Size(M) Factr      (M)      Mem Obj     (s)  Factr     (s)  Factr    Obj Hits
---------- ----- -------- ------------ ------- ------ ------- ------ -----------
        60    .6       14        1,547  44,365     .8  12,137   28.4     331,775
        72    .8       24        2,600  50,039     .9   6,463   15.1     333,416
        84    .9       35        3,092  54,519    1.0   1,983    4.6     334,661
        96   1.0       45        3,178  56,075    1.0     427    1.0     335,447
       108   1.1       56        3,304  56,282    1.0     220     .5     335,896
       120   1.3       66        3,529  56,304    1.0     198     .5     336,179
       132   1.4       77        3,956  56,314    1.0     188     .4     336,411
       144   1.5       88        4,522  56,317    1.0     185     .4     336,631
       156   1.6      100        6,389  56,319    1.0     183     .4     336,791
       168   1.8      100        6,389  56,319    1.0     183     .4     336,855
       180   1.9      100        6,389  56,319    1.0     183     .4     336,865
       192   2.0      100        6,389  56,319    1.0     183     .4     336,867
          -------------------------------------------------------------

SGA Target Advisory                              DB/Inst: IVRS/ivrs  Snap: 339

SGA Target   SGA Size       Est DB     Est Physical
  Size (M)     Factor     Time (s)            Reads
---------- ---------- ------------ ----------------
       156        0.5       11,816          283,577
       234        0.8        8,316          195,068
       312        1.0        7,642          158,193
       390        1.3        7,248          137,264
       468        1.5        7,098          131,063
       546        1.8        7,093          131,063
       624        2.0        7,093          131,063
          -------------------------------------------------------------

Streams Pool Advisory                            DB/Inst: IVRS/ivrs  Snap: 339

  Size for      Size   Est Spill   Est Spill Est Unspill Est Unspill
  Est (MB)    Factor       Count    Time (s)       Count    Time (s)
---------- --------- ----------- ----------- ----------- -----------
         4       1.0           0           0           0           0
         8       2.0           0           0           0           0
        12       3.0           0           0           0           0
        16       4.0           0           0           0           0
        20       5.0           0           0           0           0
        24       6.0           0           0           0           0
        28       7.0           0           0           0           0
        32       8.0           0           0           0           0
        36       9.0           0           0           0           0
        40      10.0           0           0           0           0
        44      11.0           0           0           0           0
        48      12.0           0           0           0           0
        52      13.0           0           0           0           0
        56      14.0           0           0           0           0
        60      15.0           0           0           0           0
        64      16.0           0           0           0           0
        68      17.0           0           0           0           0
        72      18.0           0           0           0           0
        76      19.0           0           0           0           0
        80      20.0           0           0           0           0
          -------------------------------------------------------------

Java Pool Advisory                               DB/Inst: IVRS/ivrs  Snap: 339

                                        Est LC Est LC  Est LC Est LC
      Java    JP   Est LC                 Time   Time    Load   Load      Est LC
      Pool  Size     Size       Est LC   Saved  Saved    Time   Time         Mem
   Size(M) Factr      (M)      Mem Obj     (s)  Factr     (s)  Factr    Obj Hits
---------- ----- -------- ------------ ------- ------ ------- ------ -----------
         8   1.0        4          148      78    1.0     427    1.0         163
        12   1.5        4          148      78    1.0     427    1.0         163
        16   2.0        4          148      78    1.0     427    1.0         163
          -------------------------------------------------------------

Buffer Wait Statistics                      DB/Inst: IVRS/ivrs  Snaps: 338-339
-> ordered by wait time desc, waits desc

Class                    Waits Total Wait Time (s)  Avg Time (ms)
------------------ ----------- ------------------- --------------
data block                   3                   0              0
          -------------------------------------------------------------

Enqueue Activity                           DB/Inst: IVRS/ivrs  Snaps: 338-339
-> only enqueues with waits are shown
-> Enqueue stats gathered prior to 10g should not be compared with 10g data
-> ordered by Wait Time desc, Waits desc

Enqueue Type (Request Reason)
------------------------------------------------------------------------------
    Requests    Succ Gets Failed Gets       Waits  Wt Time (s) Av Wt Time(ms)
------------ ------------ ----------- ----------- ------------ --------------
PS-PX Process Reservation
       1,368        1,168         200          50            0           3.80
BF-BLOOM FILTER (allocation contention)
          78           78           0           1            0            .00
          -------------------------------------------------------------

Undo Segment Summary                       DB/Inst: IVRS/ivrs  Snaps: 338-339
-> Min/Max TR (mins) - Min and Max Tuned Retention (minutes)
-> STO - Snapshot Too Old count,  OOS - Out of Space count
-> Undo segment block stats:
-> uS - unexpired Stolen,   uR - unexpired Released,   uU - unexpired reUsed
-> eS - expired   Stolen,   eR - expired   Released,   eU - expired   reUsed

Undo   Num Undo       Number of  Max Qry   Max Tx Min/Max   STO/     uS/uR/uU/
 TS# Blocks (K)    Transactions  Len (s) Concurcy TR (mins) OOS      eS/eR/eU
---- ---------- --------------- -------- -------- --------- ----- --------------
   1        1.4           4,612       49        4 15/15     0/0   0/0/0/0/0/0
          -------------------------------------------------------------

Undo Segment Stats                          DB/Inst: IVRS/ivrs  Snaps: 338-339
-> Most recent 35 Undostat rows, ordered by Time desc

                Num Undo    Number of Max Qry  Max Tx Tun Ret STO/    uS/uR/uU/
End Time          Blocks Transactions Len (s)   Concy  (mins) OOS     eS/eR/eU
------------ ----------- ------------ ------- ------- ------- ----- ------------
17-Jan 07:07         170          198       0       3      15 0/0   0/0/0/0/0/0
17-Jan 06:57       1,200        4,414      49       4      15 0/0   0/0/0/0/0/0
          -------------------------------------------------------------

Latch Activity                             DB/Inst: IVRS/ivrs  Snaps: 338-339
-> "Get Requests", "Pct Get Miss" and "Avg Slps/Miss" are statistics for
   willing-to-wait latch get requests
-> "NoWait Requests", "Pct NoWait Miss" are for no-wait latch get requests
-> "Pct Misses" for both should be very close to 0.0

                                           Pct    Avg   Wait                 Pct
                                    Get    Get   Slps   Time       NoWait NoWait
Latch Name                     Requests   Miss  /Miss    (s)     Requests   Miss
------------------------ -------------- ------ ------ ------ ------------ ------
ASM allocation                      154    0.0    N/A      0            0    N/A
ASM db client latch                 358    0.0    N/A      0            0    N/A
ASM map headers                      66    0.0    N/A      0            0    N/A
ASM map load waiting lis             11    0.0    N/A      0            0    N/A
ASM map operation freeli             35    0.0    N/A      0            0    N/A
ASM map operation hash t        836,612    0.0    N/A      0            0    N/A
ASM network background l            302    0.0    N/A      0            0    N/A
AWR Alerted Metric Eleme          2,246    0.0    N/A      0            0    N/A
Bloom filter list latch              27    0.0    N/A      0            0    N/A
Consistent RBA                    2,298    0.0    N/A      0            0    N/A
FAL request queue                    14    0.0    N/A      0            0    N/A
FAL subheap alocation                14    0.0    N/A      0            0    N/A
FIB s.o chain latch                  26    0.0    N/A      0            0    N/A
FOB s.o list latch                  131    0.0    N/A      0            0    N/A
In memory undo latch             35,563    0.0    N/A      0        2,736    0.0
JOX SGA heap latch                  887    0.0    N/A      0            0    N/A
JS queue state obj latch          4,248    0.0    N/A      0            0    N/A
JS slv state obj latch                4    0.0    N/A      0            0    N/A
KFK SGA context latch               301    0.0    N/A      0            0    N/A
KFMD SGA                             33    0.0    N/A      0            0    N/A
KMG MMAN ready and start            213    0.0    N/A      0            0    N/A
KMG resize request state              9    0.0    N/A      0            0    N/A
KTF sga latch                         2    0.0    N/A      0          157    0.0
KWQP Prop Status                      3    0.0    N/A      0            0    N/A
MQL Tracking Latch                    0    N/A    N/A      0           11    0.0
Memory Management Latch              96    0.0    N/A      0          213    0.0
OS process                           51    0.0    N/A      0            0    N/A
OS process allocation               230    0.0    N/A      0            0    N/A
OS process: request allo             17    0.0    N/A      0            0    N/A
PL/SQL warning settings           2,329    0.0    N/A      0            0    N/A
Reserved Space Latch                  3    0.0    N/A      0            0    N/A
SGA IO buffer pool latch            128    0.0    N/A      0          164    0.0
SQL memory manager latch             48    0.0    N/A      0          179    0.0
SQL memory manager worka         16,771    0.0    1.0      0            0    N/A
Shared B-Tree                        28    0.0    N/A      0            0    N/A
active checkpoint queue             829    0.0    N/A      0            0    N/A
active service list               3,643    0.0    N/A      0          240    0.0
archive control                      16    0.0    N/A      0            0    N/A
archive process latch               193    0.0    N/A      0            0    N/A
begin backup scn array                2    0.0    N/A      0            0    N/A
buffer pool                           8    0.0    N/A      0            0    N/A
cache buffer handles             34,516    0.0    N/A      0            0    N/A
cache buffers chains            952,571    0.0    1.0      0       26,780    0.0
cache buffers lru chain          39,708    0.1    1.0      0        8,252    0.0
cache table scan latch                0    N/A    N/A      0          236    0.0
channel handle pool latc             95    0.0    N/A      0            0    N/A
channel operations paren          2,989    0.0    N/A      0            0    N/A
checkpoint queue latch           16,493    0.0    N/A      0        4,965    0.0
client/application info           1,815    0.0    N/A      0            0    N/A
compile environment latc          4,979    0.0    N/A      0            0    N/A
dml lock allocation              23,341    0.0    1.0      0            0    N/A
dummy allocation                    633    0.0    N/A      0            0    N/A
enqueue hash chains              45,427    0.0    N/A      0           30    0.0
enqueues                         19,373    0.0    N/A      0            0    N/A
error message lists                 540    0.0    N/A      0            0    N/A
event group latch                     8    0.0    N/A      0            0    N/A
file cache latch                     36    0.0    N/A      0            0    N/A
global KZLD latch for me              4    0.0    N/A      0            0    N/A
hash table column usage             222    0.0    N/A      0       48,959    0.0
hash table modification               6    0.0    N/A      0            0    N/A
Latch Activity                             DB/Inst: IVRS/ivrs  Snaps: 338-339
-> "Get Requests", "Pct Get Miss" and "Avg Slps/Miss" are statistics for
   willing-to-wait latch get requests
-> "NoWait Requests", "Pct NoWait Miss" are for no-wait latch get requests
-> "Pct Misses" for both should be very close to 0.0

                                           Pct    Avg   Wait                 Pct
                                    Get    Get   Slps   Time       NoWait NoWait
Latch Name                     Requests   Miss  /Miss    (s)     Requests   Miss
------------------------ -------------- ------ ------ ------ ------------ ------
job workq parent latch                0    N/A    N/A      0           24    0.0
job_queue_processes para             21    0.0    N/A      0            0    N/A
kks stats                         1,012    0.0    N/A      0            0    N/A
ksuosstats global area               44    0.0    N/A      0            0    N/A
ktm global data                      39    0.0    N/A      0            0    N/A
kwqbsn:qsga                          27    0.0    N/A      0            0    N/A
lgwr LWN SCN                      2,325    0.0    N/A      0            0    N/A
library cache                    50,273    0.0    1.1      0          141    0.7
library cache load lock             800    0.0    N/A      0            0    N/A
library cache lock               20,079    0.0    N/A      0            0    N/A
library cache lock alloc            590    0.0    N/A      0            0    N/A
library cache pin                17,505    0.0    N/A      0            0    N/A
library cache pin alloca            188    0.0    N/A      0            0    N/A
list of block allocation             74    0.0    N/A      0            0    N/A
loader state object free          6,844    0.0    N/A      0            0    N/A
logminer context allocat              1    0.0    N/A      0            0    N/A
longop free list parent               2    0.0    N/A      0            2    0.0
message pool operations              78    0.0    N/A      0            0    N/A
messages                         12,610    0.0    N/A      0            0    N/A
mostly latch-free SCN             2,325    0.0    N/A      0            0    N/A
msg queue                            22    0.0    N/A      0           22    0.0
multiblock read objects             840    0.0    N/A      0            0    N/A
ncodef allocation latch              11    0.0    N/A      0            0    N/A
object queue header heap          1,079    0.0    N/A      0           92    0.0
object queue header oper         65,592    0.0    1.0      0        1,285    0.0
object stats modificatio              2    0.0    N/A      0            0    N/A
parallel query alloc buf          4,364    0.0    N/A      0            0    N/A
parallel query stats                491    0.0    N/A      0            0    N/A
parameter list                      107    0.0    N/A      0            0    N/A
parameter table allocati            624    0.0    N/A      0            0    N/A
post/wait queue                   3,549    0.0    N/A      0        1,440    0.0
process allocation                   85    0.0    N/A      0            8    0.0
process group creation               17    0.0    N/A      0            0    N/A
process queue                     2,870    0.0    N/A      0            0    N/A
process queue reference       7,204,772    0.0    1.0      0      585,085    1.2
qmn task queue latch                 88    0.0    N/A      0            0    N/A
query server freelists            2,507    0.0    N/A      0            0    N/A
redo allocation                   9,876    0.0    1.0      0       19,450    0.0
redo copy                             1    0.0    N/A      0       19,449    0.1
redo writing                      8,100    0.0    N/A      0            0    N/A
reservation so alloc lat              2    0.0    N/A      0            0    N/A
resmgr group change latc            366    0.0    N/A      0            0    N/A
resmgr:actses active lis            630    0.0    N/A      0            0    N/A
resmgr:actses change gro            312    0.0    N/A      0            0    N/A
resmgr:free threads list            628    0.0    N/A      0            0    N/A
resmgr:schema config                  2    0.0    N/A      0            0    N/A
row cache objects               157,344    0.0    N/A      0          425    0.0
rules engine rule set st            200    0.0    N/A      0            0    N/A
segmented array pool                 22    0.0    N/A      0            0    N/A
sequence cache                      590    0.0    N/A      0            0    N/A
session allocation               78,343    0.0    1.2      0            0    N/A
session idle bit                 28,022    0.0    N/A      0            0    N/A
session state list latch            644    0.0    N/A      0            0    N/A
session switching                    11    0.0    N/A      0            0    N/A
session timer                       240    0.0    N/A      0            0    N/A
shared pool                      33,242    0.0    1.0      0            0    N/A
shared pool sim alloc                10    0.0    N/A      0            0    N/A
shared pool simulator            10,083    0.0    N/A      0            0    N/A
simulator hash latch             47,721    0.0    N/A      0            0    N/A
simulator lru latch              26,263    0.0    1.0      0       18,583    0.0
Latch Activity                             DB/Inst: IVRS/ivrs  Snaps: 338-339
-> "Get Requests", "Pct Get Miss" and "Avg Slps/Miss" are statistics for
   willing-to-wait latch get requests
-> "NoWait Requests", "Pct NoWait Miss" are for no-wait latch get requests
-> "Pct Misses" for both should be very close to 0.0

                                           Pct    Avg   Wait                 Pct
                                    Get    Get   Slps   Time       NoWait NoWait
Latch Name                     Requests   Miss  /Miss    (s)     Requests   Miss
------------------------ -------------- ------ ------ ------ ------------ ------
slave class                          69    0.0    N/A      0            0    N/A
slave class create                   55    1.8    1.0      0            0    N/A
sort extent pool                    321    0.0    N/A      0            0    N/A
state object free list                2    0.0    N/A      0            0    N/A
statistics aggregation              140    0.0    N/A      0            0    N/A
temp lob duration state               2    0.0    N/A      0            0    N/A
threshold alerts latch               64    0.0    N/A      0            0    N/A
transaction allocation               50    0.0    N/A      0            0    N/A
transaction branch alloc             11    0.0    N/A      0            0    N/A
undo global data                 14,398    0.0    N/A      0            0    N/A
user lock                            42    0.0    N/A      0            0    N/A
          -------------------------------------------------------------

Latch Sleep Breakdown                      DB/Inst: IVRS/ivrs  Snaps: 338-339
-> ordered by misses desc

Latch Name
----------------------------------------
  Get Requests      Misses      Sleeps  Spin Gets   Sleep1   Sleep2   Sleep3
-------------- ----------- ----------- ---------- -------- -------- --------
cache buffers lru chain
        39,708          22          23          0        0        0        0
library cache
        50,273           8           9          0        0        0        0
session allocation
        78,343           6           7          0        0        0        0
cache buffers chains
       952,571           3           3          0        0        0        0
object queue header operation
        65,592           2           2          0        0        0        0
process queue reference
     7,204,772           2           2          0        0        0        0
shared pool
        33,242           2           2          0        0        0        0
simulator lru latch
        26,263           2           2          0        0        0        0
SQL memory manager workarea list latch
        16,771           1           1          0        0        0        0
dml lock allocation
        23,341           1           1          0        0        0        0
redo allocation
         9,876           1           1          0        0        0        0
slave class create
            55           1           1          0        0        0        0
          -------------------------------------------------------------

Latch Miss Sources                         DB/Inst: IVRS/ivrs  Snaps: 338-339
-> only latches with sleeps are shown
-> ordered by name, sleeps desc

                                                     NoWait              Waiter
Latch Name               Where                       Misses     Sleeps   Sleeps
------------------------ -------------------------- ------- ---------- --------
SQL memory manager worka qesmmIRegisterWorkArea           0          1        1
cache buffers chains     kcbgtcr: kslbegin excl           0          2        3
cache buffers chains     kcbgtcr: fast path               0          1        0
cache buffers lru chain  kcbzgws_1                        0         19       20
cache buffers lru chain  kcbw_activate_granule            0          1        0
dml lock allocation      ktaiam                           0          1        0
library cache            kglScanDependency                0          3        0
library cache            kgldte: child 0                  0          3        6
library cache            kgldti: 2child                   0          1        0
library cache            kglobpn: child:                  0          1        1
object queue header oper kcbw_link_q                      0          1        0
object queue header oper kcbw_unlink_q                    0          1        1
process queue reference  kxfpqrsnd                        0          2        0
redo allocation          kcrfw_redo_gen: redo alloc       0          1        0
session allocation       ksuxds: KSUSFCLC not set         0          3        1
session allocation       ksursi                           0          2        2
session allocation       ksucri                           0          1        1
session allocation       ksuxds: KSUSFCLC set             0          1        0
shared pool              kghalo                           0          2        0
shared pool              kghfrunp: clatch: nowait         0          1        0
simulator lru latch      kcbs_simulate: simulate se       0          2        2
slave class create       ksvcreate                        0          1        0
          -------------------------------------------------------------

Parent Latch Statistics                    DB/Inst: IVRS/ivrs  Snaps: 338-339

                  No data exists for this section of the report.
          -------------------------------------------------------------

Child Latch Statistics                      DB/Inst: IVRS/ivrs  Snaps: 338-339

                  No data exists for this section of the report.
          -------------------------------------------------------------

Segments by Logical Reads                  DB/Inst: IVRS/ivrs  Snaps: 338-339
-> Total Logical Reads:       6,050,561
-> Captured Segments account for  101.7% of Total

           Tablespace                      Subobject  Obj.       Logical
Owner         Name    Object Name            Name     Type         Reads  %Total
---------- ---------- -------------------- ---------- ----- ------------ -------
TPCH       TPCHTAB    LINEITEM                        TABLE    4,960,400   81.98
TPCH       TPCHTAB    ORDERS                          TABLE      502,768    8.31
TPCH       TPCHTAB    PARTSUPP                        TABLE      161,968    2.68
TPCH       TPCHTAB    PART                            TABLE       95,984    1.59
TPCC       USERS      STOCK_I1                        INDEX       91,984    1.52
          -------------------------------------------------------------

Segments by Physical Reads                  DB/Inst: IVRS/ivrs  Snaps: 338-339
-> Total Physical Reads:       5,663,126
-> Captured Segments account for   101.7% of Total

           Tablespace                      Subobject  Obj.      Physical
Owner         Name    Object Name            Name     Type         Reads  %Total
---------- ---------- -------------------- ---------- ----- ------------ -------
TPCH       TPCHTAB    LINEITEM                        TABLE    4,947,520   87.36
TPCH       TPCHTAB    ORDERS                          TABLE      492,387    8.69
TPCH       TPCHTAB    PARTSUPP                        TABLE      158,037    2.79
TPCH       TPCHTAB    PART                            TABLE       92,064    1.63
TPCH       TPCHTAB    CUSTOMER                        TABLE       55,709     .98
          -------------------------------------------------------------

Segments by Row Lock Waits                 DB/Inst: IVRS/ivrs  Snaps: 338-339
-> % of Capture shows % of row lock waits for each top segment compared
-> with total row lock waits for all segments captured by the Snapshot

                                                                     Row
           Tablespace                      Subobject  Obj.          Lock    % of
Owner         Name    Object Name            Name     Type         Waits Capture
---------- ---------- -------------------- ---------- ----- ------------ -------
TPCC       USERS      IORDL                           INDEX           24   75.00
PERFSTAT   USERS      STATS$EVENT_HISTOGRA            INDEX            4   12.50
PERFSTAT   USERS      STATS$LATCH_PK                  INDEX            4   12.50
          -------------------------------------------------------------

Segments by ITL Waits                       DB/Inst: IVRS/ivrs  Snaps: 338-339

                  No data exists for this section of the report.
          -------------------------------------------------------------

Segments by Buffer Busy Waits               DB/Inst: IVRS/ivrs  Snaps: 338-339

                  No data exists for this section of the report.
          -------------------------------------------------------------

Dictionary Cache Stats                     DB/Inst: IVRS/ivrs  Snaps: 338-339
-> "Pct Misses"  should be very low (< 2% in most cases)
-> "Final Usage" is the number of cache entries being used

                                   Get    Pct    Scan   Pct      Mod      Final
Cache                         Requests   Miss    Reqs  Miss     Reqs      Usage
------------------------- ------------ ------ ------- ----- -------- ----------
dc_awr_control                      14    0.0       0   N/A        2          1
dc_global_oids                      91    4.4       0   N/A        0         29
dc_histogram_data                4,249    2.0       0   N/A        0      1,281
dc_histogram_defs                9,313    2.4       0   N/A        0      2,713
dc_object_grants                    26    7.7       0   N/A        0         45
dc_object_ids                    4,946    1.0       0   N/A        0        663
dc_objects                       1,968    4.0       0   N/A        3        794
dc_profiles                         16    0.0       0   N/A        0          1
dc_rollback_segments               136    0.0       0   N/A        0         16
dc_segments                      1,989    2.6       0   N/A        4        479
dc_sequences                        84    0.0       0   N/A       84          7
dc_tablespaces                  16,511    0.0       0   N/A        0         12
dc_usernames                       260    0.0       0   N/A        0         12
dc_users                        15,529    0.0       0   N/A        0         57
outstanding_alerts                  27    0.0       0   N/A        0         24
          -------------------------------------------------------------

Library Cache Activity                      DB/Inst: IVRS/ivrs  Snaps: 338-339
-> "Pct Misses"  should be very low

                         Get    Pct            Pin    Pct             Invali-
Namespace           Requests   Miss       Requests   Miss    Reloads  dations
--------------- ------------ ------ -------------- ------ ---------- --------
SQL AREA               1,117    6.1         64,285    1.8        294      154
TABLE/PROCEDURE          449    0.4          7,900    4.6        261        0
BODY                     148    0.0          1,278    1.7         22        0
TRIGGER                   42    0.0             80   13.8         11        0
INDEX                     24    0.0             80    6.3          5        0
CLUSTER                   18    0.0             59    0.0          0        0
JAVA DATA                  1    0.0              0    N/A          0        0
          -------------------------------------------------------------

Process Memory Summary                     DB/Inst: IVRS/ivrs  Snaps: 338-339
-> B: Begin snap   E: End snap
-> All rows below contain absolute values (i.e. not diffed over the interval)
-> Max Alloc is Maximum PGA Allocation size at snapshot time
-> Hist Max Alloc is the Historical Max Allocation for still-connected processes
-> ordered by Begin/End snapshot, Alloc (MB) desc

                                                            Hist
                                    Avg  Std Dev     Max     Max
               Alloc      Used    Alloc    Alloc   Alloc   Alloc    Num    Num
  Category      (MB)      (MB)     (MB)     (MB)    (MB)    (MB)   Proc  Alloc
- -------- --------- --------- -------- -------- ------- ------- ------ ------
B Other        128.6       N/A      3.5      6.1      24      25     37     37
  Freeable       9.7        .0       .6       .6       2     N/A     16     16
  SQL            3.6       2.9       .2       .3       1      25     22     15
  PL/SQL          .4        .1       .0       .0       0       0     35     33
E Other        133.6       N/A      3.7      6.1      24      24     36     36
  Freeable      12.1        .0       .7       .4       2     N/A     18     18
  SQL            2.9       2.6       .1       .3       1      26     22     14
  PL/SQL          .5        .1       .0       .0       0       0     34     32
  JAVA            .0        .0       .0       .0       0       2      1      1
          -------------------------------------------------------------

SGA Memory Summary                          DB/Inst: IVRS/ivrs  Snaps: 338-339

                                                      End Size (Bytes)
SGA regions                     Begin Size (Bytes)      (if different)
------------------------------ ------------------- -------------------
Database Buffers                       213,909,504         205,520,896
Fixed Size                               1,261,612
Redo Buffers                             2,928,640
Variable Size                          109,055,956         117,444,564
                               -------------------
sum                                    327,155,712
          -------------------------------------------------------------

SGA breakdown difference                    DB/Inst: IVRS/ivrs  Snaps: 338-339
-> ordered by Pool, Name
-> N/A value for Begin MB or End MB indicates the size of that Pool/Name was
   insignificant, or zero in that snapshot

Pool   Name                                 Begin MB         End MB  % Diff
------ ------------------------------ -------------- -------------- -------
java   free memory                               2.8            2.7   -3.98
java   joxlod exec hp                            5.0            5.1    2.23
java   joxs heap                                  .2             .2    0.00
large  ASM map operations hashta                  .2             .2    0.00
large  CTWR dba buffer                            .4             .4    0.00
large  PX msg pool                                .2             .2   20.83
large  free memory                               1.2            1.2   -3.32
large  krcc extent chunk                         2.0            2.0    0.00
shared ASH buffers                               2.0            2.0    0.00
shared CCursor                                   3.0            3.3   11.37
shared Heap0: KGL                                1.7            1.7    2.13
shared KCB Table Scan Buffer                     3.8            3.8    0.00
shared KGH: NO ACCESS                           12.0           13.9   16.25
shared KGLS heap                                 2.6            3.4   31.25
shared KQR M PO                                  2.2            2.1   -3.77
shared KSFD SGA I/O b                            3.8            3.8    0.00
shared KTI-UNDO                                  1.2            1.2    0.00
shared PCursor                                   2.0            2.0    1.70
shared PL/SQL DIANA                              N/A            1.1     N/A
shared PL/SQL MPCODE                             2.3            2.3    1.07
shared event statistics per sess                 1.3            1.3    0.00
shared free memory                              22.1           20.9   -5.56
shared kglsim hash table bkts                    2.0            2.0    0.00
shared library cache                             5.7            5.7   -0.52
shared private strands                           1.1            1.1    0.00
shared row cache                                 3.6            3.6    0.00
shared sql area                                  9.7           15.0   54.05
stream free memory                               4.0            4.0    0.00
       buffer_cache                            204.0          196.0   -3.92
       fixed_sga                                 1.2            1.2    0.00
       log_buffer                                2.8            2.8    0.00
          -------------------------------------------------------------

Streams CPU/IO Usage                       DB/Inst: IVRS/ivrs  Snaps: 338-339
-> Streams processes ordered by CPU usage
-> CPU and I/O Time in micro seconds

Session Type                    CPU Time  User I/O Time   Sys I/O Time
------------------------- -------------- -------------- --------------
QMON Coordinator                  31,890              0              0
QMON Slaves                       24,062              0              0
          -------------------------------------------------------------

Streams Capture                             DB/Inst: IVRS/ivrs  Snaps: 338-339

                  No data exists for this section of the report.
          -------------------------------------------------------------

Streams Apply                               DB/Inst: IVRS/ivrs  Snaps: 338-339

                  No data exists for this section of the report.
          -------------------------------------------------------------

Buffered Queues                             DB/Inst: IVRS/ivrs  Snaps: 338-339

                  No data exists for this section of the report.
          -------------------------------------------------------------

Buffered Subscribers                        DB/Inst: IVRS/ivrs  Snaps: 338-339

                  No data exists for this section of the report.
          -------------------------------------------------------------

Rule Set                                    DB/Inst: IVRS/ivrs  Snaps: 338-339
-> Rule Sets ordered by Evaluations

                                       Fast      SQL      CPU  Elapsed
Ruleset Name                 Evals    Evals    Execs     Time     Time
------------------------- -------- -------- -------- -------- --------
SYS.ALERT_QUE_R                  0        0        0        0        0
          -------------------------------------------------------------

Resource Limit Stats                            DB/Inst: IVRS/ivrs  Snap: 339

                  No data exists for this section of the report.
          -------------------------------------------------------------

init.ora Parameters                        DB/Inst: IVRS/ivrs  Snaps: 338-339

                                                                End value
Parameter Name                Begin value                       (if different)
----------------------------- --------------------------------- --------------
audit_file_dest               /oracle/app/oracle/admin/ivrs/adu
audit_sys_operations          TRUE
background_dump_dest          /oracle/app/oracle/admin/ivrs/bdu
compatible                    10.2.0.3.0
control_files                 +DATA_1/ivrs/control01.ctl, +DATA
core_dump_dest                /oracle/app/oracle/admin/ivrs/cdu
db_block_size                 8192
db_domain                     bayantel.com
db_file_multiblock_read_count 16
db_name                       ivrs
db_recovery_file_dest         /flash_reco/flash_recovery_area
db_recovery_file_dest_size    161061273600
dispatchers                   (PROTOCOL=TCP) (SERVICE=ivrsXDB)
job_queue_processes           10
log_archive_dest_1            LOCATION=USE_DB_RECOVERY_FILE_DES
log_archive_format            ivrs_%t_%s_%r.arc
open_cursors                  300
os_authent_prefix
os_roles                      FALSE
pga_aggregate_target          108003328
processes                     150
recyclebin                    OFF
remote_login_passwordfile     EXCLUSIVE
remote_os_authent             FALSE
remote_os_roles               FALSE
sga_target                    327155712
spfile                        +DATA_1/ivrs/spfileivrs.ora
sql92_security                TRUE
statistics_level              TYPICAL
undo_management               AUTO
undo_tablespace               UNDOTBS1
user_dump_dest                /oracle/app/oracle/admin/ivrs/udu
          -------------------------------------------------------------

End of Report
}}}
http://karlarao.wordpress.com/scripts-resources/
<<<
AWR Tableau Toolkit – create your own performance data warehouse and easily characterize the workload, CPU, IO of the entire cluster (30 instances) with months of perf data in less than 1 hour updated 20120912
I no longer update this toolkit. This served as a version 1 of a more comprehensive tool called eAdam which I started with Carlos Sierra (the main developer), Frits Hoogland, and Randy Johnson at Enkitec.
<<<
see [[eAdam]]
''AWR tableau and R toolkit - blueprint'' http://www.evernote.com/shard/s48/sh/e20c905c-694e-4950-8d57-e890a208c76b/189e50f39a739500e6b98b4511751cea

''Workload visualization notes:'' http://www.evernote.com/shard/s48/sh/0918cd46-2cec-494e-9932-eb725712bb68/9d211e0a7876d7dc41c98c0416675965

''check this out for the mind map version'' https://sites.google.com/site/karlarao/home/mindmap/awr-tableau-and-r-toolkit-visualization-examples

''the viz on the tiddlers are coming from the following data sets:''
<<<
{{{
topevents
sysstat
io workload
cpu workload
services
topsql

General Workload 
	wait class, wait events, executes/sec
CPU 
	AAS CPU, load average, NUM_CPUs
IO
	latency, IOPS breakdown, MB/s
Memory
	SGA , max PGA usage, physical memory
Storage 
	total storage size, reco size 
Services
	distribution of workload/modules
Top SQL 
	modules, SQL type, SQL_ID PIOs/LIOs , PX usage
}}}
<<<
with these data points I can easily characterize the overall behavior of the cluster 


''check this out for the mind map version'' https://sites.google.com/site/karlarao/home/mindmap/awr-tableau-and-r-toolkit-visualization-examples


{{{
set arraysize 5000

COLUMN blocksize NEW_VALUE _blocksize NOPRINT
select distinct block_size blocksize from v$datafile;

COLUMN dbid NEW_VALUE _dbid NOPRINT
select dbid from v$database;

COLUMN name NEW_VALUE _instname NOPRINT
select lower(instance_name) name from v$instance;

COLUMN name NEW_VALUE _hostname NOPRINT
select lower(host_name) name from v$instance;

COLUMN instancenumber NEW_VALUE _instancenumber NOPRINT
select instance_number instancenumber from v$instance;

-- ttitle center 'AWR CPU and IO Workload Report' skip 2
set pagesize 50000
set linesize 550

col instname    format a15              heading instname        -- instname
col hostname    format a30              heading hostname        -- hostname
col tm          format a17              heading tm              -- "tm"
col id          format 99999            heading id              -- "snapid"
col inst        format 90               heading inst            -- "inst"
col dur         format 999990.00        heading dur             -- "dur"
col cpu         format 90               heading cpu             -- "cpu"
col cap         format 9999990.00       heading cap             -- "capacity"
col dbt         format 999990.00        heading dbt             -- "DBTime"
col dbc         format 99990.00         heading dbc             -- "DBcpu"
col bgc         format 99990.00         heading bgc             -- "BGcpu"
col rman        format 9990.00          heading rman            -- "RMANcpu"
col aas         format 990.0            heading aas             -- "AAS"
col totora      format 9999990.00       heading totora          -- "TotalOracleCPU"
col busy        format 9999990.00       heading busy            -- "BusyTime"
col load        format 990.00           heading load            -- "OSLoad"
col totos       format 9999990.00       heading totos           -- "TotalOSCPU"
col mem         format 999990.00        heading mem             -- "PhysicalMemorymb"
col IORs        format 9990.000         heading IORs            -- "IOPsr"
col IOWs        format 9990.000         heading IOWs            -- "IOPsw"
col IORedo      format 9990.000         heading IORedo          -- "IOPsredo"
col IORmbs      format 9990.000         heading IORmbs          -- "IOrmbs"
col IOWmbs      format 9990.000         heading IOWmbs          -- "IOwmbs"
col redosizesec format 9990.000         heading redosizesec     -- "Redombs"
col logons      format 990              heading logons          -- "Sess"
col logone      format 990              heading logone          -- "SessEnd"
col exsraw      format 99990.000        heading exsraw          -- "Execrawdelta"
col exs         format 9990.000         heading exs             -- "Execs"
col ucs         format 9990.000         heading ucs             -- "UserCalls"
col ucoms       format 9990.000         heading ucoms           -- "Commit"
col urs         format 9990.000         heading urs             -- "Rollback"
col oracpupct   format 990              heading oracpupct       -- "OracleCPUPct"
col rmancpupct  format 990              heading rmancpupct      -- "RMANCPUPct"
col oscpupct    format 990              heading oscpupct        -- "OSCPUPct"
col oscpuusr    format 990              heading oscpuusr        -- "USRPct"
col oscpusys    format 990              heading oscpusys        -- "SYSPct"
col oscpuio     format 990              heading oscpuio         -- "IOPct"

SELECT * FROM
( 
  SELECT trim('&_instname') instname, 
         trim('&_dbid') db_id, 
         trim('&_hostname') hostname, 
          s0.snap_id id,
         TO_CHAR(s0.END_INTERVAL_TIME,'MM/DD/YY HH24:MI:SS') tm,
         s0.instance_number inst,
  round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2) dur,
  s3t1.value AS cpu,
  (round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2)*60)*s3t1.value cap,
  (s5t1.value - s5t0.value) / 1000000 as dbt,
  (s6t1.value - s6t0.value) / 1000000 as dbc,
  (s7t1.value - s7t0.value) / 1000000 as bgc,
  round(DECODE(s8t1.value,null,'null',(s8t1.value - s8t0.value) / 1000000),2) as rman,
  ((s5t1.value - s5t0.value) / 1000000)/60 /  round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2) aas,
  round(((s6t1.value - s6t0.value) / 1000000) + ((s7t1.value - s7t0.value) / 1000000),2) totora,
  -- s1t1.value - s1t0.value AS busy,  -- this is osstat BUSY_TIME
  round(s2t1.value,2) AS load,
  (s1t1.value - s1t0.value)/100 AS totos,
  ((round(((s6t1.value - s6t0.value) / 1000000) + ((s7t1.value - s7t0.value) / 1000000),2)) / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                                                                              + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                                                                              + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                                                                              + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2)*60)*s3t1.value))*100 as oracpupct,
  ((round(DECODE(s8t1.value,null,'null',(s8t1.value - s8t0.value) / 1000000),2)) / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                                                                              + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                                                                              + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                                                                              + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2)*60)*s3t1.value))*100 as rmancpupct,
  (((s1t1.value - s1t0.value)/100) / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                                                                              + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                                                                              + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                                                                              + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2)*60)*s3t1.value))*100 as oscpupct,
  (((s17t1.value - s17t0.value)/100) / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                                                                              + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                                                                              + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                                                                              + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2)*60)*s3t1.value))*100 as oscpuusr,
  (((s18t1.value - s18t0.value)/100) / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                                                                              + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                                                                              + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                                                                              + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2)*60)*s3t1.value))*100 as oscpusys,
  (((s19t1.value - s19t0.value)/100) / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                                                                              + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                                                                              + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                                                                              + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2)*60)*s3t1.value))*100 as oscpuio
FROM dba_hist_snapshot s0,
  dba_hist_snapshot s1,
  dba_hist_osstat s1t0,         -- BUSY_TIME
  dba_hist_osstat s1t1,
  dba_hist_osstat s17t0,        -- USER_TIME
  dba_hist_osstat s17t1,
  dba_hist_osstat s18t0,        -- SYS_TIME
  dba_hist_osstat s18t1,
  dba_hist_osstat s19t0,        -- IOWAIT_TIME
  dba_hist_osstat s19t1,
  dba_hist_osstat s2t1,         -- osstat just get the end value
  dba_hist_osstat s3t1,         -- osstat just get the end value
  dba_hist_sys_time_model s5t0,
  dba_hist_sys_time_model s5t1,
  dba_hist_sys_time_model s6t0,
  dba_hist_sys_time_model s6t1,
  dba_hist_sys_time_model s7t0,
  dba_hist_sys_time_model s7t1,
  dba_hist_sys_time_model s8t0,
  dba_hist_sys_time_model s8t1
WHERE s0.dbid            = &_dbid    -- CHANGE THE DBID HERE!
AND s1.dbid              = s0.dbid
AND s1t0.dbid            = s0.dbid
AND s1t1.dbid            = s0.dbid
AND s2t1.dbid            = s0.dbid
AND s3t1.dbid            = s0.dbid
AND s5t0.dbid            = s0.dbid
AND s5t1.dbid            = s0.dbid
AND s6t0.dbid            = s0.dbid
AND s6t1.dbid            = s0.dbid
AND s7t0.dbid            = s0.dbid
AND s7t1.dbid            = s0.dbid
AND s8t0.dbid            = s0.dbid
AND s8t1.dbid            = s0.dbid
AND s17t0.dbid            = s0.dbid
AND s17t1.dbid            = s0.dbid
AND s18t0.dbid            = s0.dbid
AND s18t1.dbid            = s0.dbid
AND s19t0.dbid            = s0.dbid
AND s19t1.dbid            = s0.dbid
--AND s0.instance_number   = &_instancenumber   -- CHANGE THE INSTANCE_NUMBER HERE!
AND s1.instance_number   = s0.instance_number
AND s1t0.instance_number = s0.instance_number
AND s1t1.instance_number = s0.instance_number
AND s2t1.instance_number = s0.instance_number
AND s3t1.instance_number = s0.instance_number
AND s5t0.instance_number = s0.instance_number
AND s5t1.instance_number = s0.instance_number
AND s6t0.instance_number = s0.instance_number
AND s6t1.instance_number = s0.instance_number
AND s7t0.instance_number = s0.instance_number
AND s7t1.instance_number = s0.instance_number
AND s8t0.instance_number = s0.instance_number
AND s8t1.instance_number = s0.instance_number
AND s17t0.instance_number = s0.instance_number
AND s17t1.instance_number = s0.instance_number
AND s18t0.instance_number = s0.instance_number
AND s18t1.instance_number = s0.instance_number
AND s19t0.instance_number = s0.instance_number
AND s19t1.instance_number = s0.instance_number
AND s1.snap_id           = s0.snap_id + 1
AND s1t0.snap_id         = s0.snap_id
AND s1t1.snap_id         = s0.snap_id + 1
AND s2t1.snap_id         = s0.snap_id + 1
AND s3t1.snap_id         = s0.snap_id + 1
AND s5t0.snap_id         = s0.snap_id
AND s5t1.snap_id         = s0.snap_id + 1
AND s6t0.snap_id         = s0.snap_id
AND s6t1.snap_id         = s0.snap_id + 1
AND s7t0.snap_id         = s0.snap_id
AND s7t1.snap_id         = s0.snap_id + 1
AND s8t0.snap_id         = s0.snap_id
AND s8t1.snap_id         = s0.snap_id + 1
AND s17t0.snap_id         = s0.snap_id
AND s17t1.snap_id         = s0.snap_id + 1
AND s18t0.snap_id         = s0.snap_id
AND s18t1.snap_id         = s0.snap_id + 1
AND s19t0.snap_id         = s0.snap_id
AND s19t1.snap_id         = s0.snap_id + 1
AND s1t0.stat_name       = 'BUSY_TIME'
AND s1t1.stat_name       = s1t0.stat_name
AND s17t0.stat_name       = 'USER_TIME'
AND s17t1.stat_name       = s17t0.stat_name
AND s18t0.stat_name       = 'SYS_TIME'
AND s18t1.stat_name       = s18t0.stat_name
AND s19t0.stat_name       = 'IOWAIT_TIME'
AND s19t1.stat_name       = s19t0.stat_name
AND s2t1.stat_name       = 'LOAD'
AND s3t1.stat_name       = 'NUM_CPUS'
AND s5t0.stat_name       = 'DB time'
AND s5t1.stat_name       = s5t0.stat_name
AND s6t0.stat_name       = 'DB CPU'
AND s6t1.stat_name       = s6t0.stat_name
AND s7t0.stat_name       = 'background cpu time'
AND s7t1.stat_name       = s7t0.stat_name
AND s8t0.stat_name       = 'RMAN cpu time (backup/restore)'
AND s8t1.stat_name       = s8t0.stat_name
)
-- WHERE 
-- tm > to_char(sysdate - 30, 'MM/DD/YY HH24:MI')
-- id  in (select snap_id from (select * from r2toolkit.r2_regression_data union all select * from r2toolkit.r2_outlier_data))
-- id in (336)
-- aas > 1
-- oracpupct > 50
-- oscpupct > 50
-- AND TO_CHAR(s0.END_INTERVAL_TIME,'D') >= 1     -- Day of week: 1=Sunday 7=Saturday
-- AND TO_CHAR(s0.END_INTERVAL_TIME,'D') <= 7
-- AND TO_CHAR(s0.END_INTERVAL_TIME,'HH24MI') >= 0900     -- Hour
-- AND TO_CHAR(s0.END_INTERVAL_TIME,'HH24MI') <= 1800
-- AND s0.END_INTERVAL_TIME >= TO_DATE('2010-jan-17 00:00:00','yyyy-mon-dd hh24:mi:ss')     -- Data range
-- AND s0.END_INTERVAL_TIME <= TO_DATE('2010-aug-22 23:59:59','yyyy-mon-dd hh24:mi:ss')
ORDER BY id ASC;
}}}
''For Exadata, make use of the following formulas to create Calculated Fields in Tableau, this already accounts for "ASM Normal redundancy" (see * 2), change it to * 3 for High redundancy'' also check this blog post for more on ASM redundancy effect on performance http://karlarao.wordpress.com/2012/06/29/the-effect-of-asm-redundancyparity-on-readwrite-iops-slob-test-case-for-exadata-and-non-exa-environments/
{{{
Flash IOPS       ((SIORS+MIORS) + ((SIOWS+MIOWS+IOREDO) * 2)) * ([FLASHCACHE] * .01)
Flash RIOPS      (SIORS+MIORS) * ([FLASHCACHE] *.01)
Flash WIOPS      ((SIOWS+MIOWS+IOREDO) * 2) * ([FLASHCACHE] * .01)
HD IOPS          ((SIORS+MIORS) + ((SIOWS+MIOWS+IOREDO) * 2)) * ((100 - [FLASHCACHE]) * .01)
HD RIOPS         (SIORS+MIORS) * ((100 - [FLASHCACHE]) * .01)
HD WIOPS         (((SIOWS+MIOWS+IOREDO) * 2)) * ((100 - [FLASHCACHE]) * .01)
}}}
* note, if you see way more cell flash cache read hits than physical read total IO requests then it's accumulating both the reads & writes in the same metric, the effect of this is the above formula will have negative values on the HD IOPS, to fix this create a calculated field on the FLASHCACHE measure, read more about this behavior here http://blog.tanelpoder.com/2013/12/04/cell-flash-cache-read-hits-vs-cell-writes-to-flash-cache-statistics-on-exadata/
{{{
name the calculated field as FLASHCACHE2 then just do a find/replace on the formula above
IF [FLASHCACHE] > 100 THEN 100 ELSE [FLASHCACHE] END
}}}

''Then generate the following graphs''
1) Flash vs HD IOPS
2) Flash vs HD IOPS with read/write breakdown
3) IO throughput read/write MB/s
4) Polynomial Regression (Degree 4)

''For non-Exadata just use the following formula to get the total IOPS, name the Calculated Filed as ALL_IOPS''
{{{
(SIORS+MIORS) + (SIOWS+MIOWS+IOREDO)
}}}

Here are some more examples on ''Different views of IO performance with AWR data'' check the full details on this link http://goo.gl/i660CZ 
I also mentioned about this tiddler last OakTable World 2013 http://www.slideshare.net/karlarao/o-2013-ultimate-exadata-io-monitoring-flash-harddisk-write-back-cache-overhead

SECTION 1: USER IO wait class and cell single block reads latency with curve fitting
SECTION 2: Small IOPS vs Large IOPS
SECTION 3: Flash vs HD IOPS
SECTION 4: Flash vs HD IOPS with read/write breakdown
SECTION 5: IO throughput read/write MB/s
SECTION 6: Drill down on smart scans affecting cell single block latency on 24hour period 


{{{
set arraysize 5000

COLUMN blocksize NEW_VALUE _blocksize NOPRINT
select distinct block_size blocksize from v$datafile;

COLUMN dbid NEW_VALUE _dbid NOPRINT
select dbid from v$database;

COLUMN name NEW_VALUE _instname NOPRINT
select lower(instance_name) name from v$instance;

COLUMN name NEW_VALUE _hostname NOPRINT
select lower(host_name) name from v$instance;

COLUMN instancenumber NEW_VALUE _instancenumber NOPRINT
select instance_number instancenumber from v$instance;

-- ttitle center 'AWR IO Workload Report' skip 2
set pagesize 50000
set linesize 550

col instname       format a15              heading instname            -- instname
col hostname       format a30              heading hostname            -- hostname
col tm             format a17              heading tm                  -- "tm"
col id             format 99999            heading id                  -- "snapid"
col inst           format 90               heading inst                -- "inst"
col dur            format 999990.00        heading dur                 -- "dur"
col cpu            format 90               heading cpu                 -- "cpu"
col cap            format 9999990.00       heading cap                 -- "capacity"
col dbt            format 999990.00        heading dbt                 -- "DBTime"
col dbc            format 99990.00         heading dbc                 -- "DBcpu"
col bgc            format 99990.00         heading bgc                 -- "BGcpu"
col rman           format 9990.00          heading rman                -- "RMANcpu"
col aas            format 990.0            heading aas                 -- "AAS"
col totora         format 9999990.00       heading totora              -- "TotalOracleCPU"
col busy           format 9999990.00       heading busy                -- "BusyTime"
col load           format 990.00           heading load                -- "OSLoad"
col totos          format 9999990.00       heading totos               -- "TotalOSCPU"
col mem            format 999990.00        heading mem                 -- "PhysicalMemorymb"
col IORs           format 99990.000        heading IORs                -- "IOPsr"
col IOWs           format 99990.000        heading IOWs                -- "IOPsw"
col IORedo         format 99990.000        heading IORedo              -- "IOPsredo"
col IORmbs         format 99990.000        heading IORmbs              -- "IOrmbs"
col IOWmbs         format 99990.000        heading IOWmbs              -- "IOwmbs"
col redosizesec    format 99990.000        heading redosizesec         -- "Redombs"
col logons         format 990              heading logons              -- "Sess"
col logone         format 990              heading logone              -- "SessEnd"
col exsraw         format 99990.000        heading exsraw              -- "Execrawdelta"
col exs            format 9990.000         heading exs                 -- "Execs"
col oracpupct      format 990              heading oracpupct           -- "OracleCPUPct"
col rmancpupct     format 990              heading rmancpupct          -- "RMANCPUPct"
col oscpupct       format 990              heading oscpupct            -- "OSCPUPct"
col oscpuusr       format 990              heading oscpuusr            -- "USRPct"
col oscpusys       format 990              heading oscpusys            -- "SYSPct"
col oscpuio        format 990              heading oscpuio             -- "IOPct"
col SIORs          format 99990.000        heading SIORs               -- "IOPsSingleBlockr"
col MIORs          format 99990.000        heading MIORs               -- "IOPsMultiBlockr"
col TIORmbs        format 99990.000        heading TIORmbs             -- "Readmbs"
col SIOWs          format 99990.000        heading SIOWs               -- "IOPsSingleBlockw"
col MIOWs          format 99990.000        heading MIOWs               -- "IOPsMultiBlockw"
col TIOWmbs        format 99990.000        heading TIOWmbs             -- "Writembs"
col TIOR           format 99990.000        heading TIOR                -- "TotalIOPsr"
col TIOW           format 99990.000        heading TIOW                -- "TotalIOPsw"
col TIOALL         format 99990.000        heading TIOALL              -- "TotalIOPsALL"
col ALLRmbs        format 99990.000        heading ALLRmbs             -- "TotalReadmbs"
col ALLWmbs        format 99990.000        heading ALLWmbs             -- "TotalWritembs"
col GRANDmbs       format 99990.000        heading GRANDmbs            -- "TotalmbsALL"
col readratio      format 990              heading readratio           -- "ReadRatio"
col writeratio     format 990              heading writeratio          -- "WriteRatio"
col diskiops       format 99990.000        heading diskiops            -- "HWDiskIOPs"
col numdisks       format 99990.000        heading numdisks            -- "HWNumofDisks"
col flashcache     format 990              heading flashcache          -- "FlashCacheHitsPct"
col cellpiob       format 99990.000        heading cellpiob            -- "CellPIOICmbs"
col cellpiobss     format 99990.000        heading cellpiobss          -- "CellPIOICSmartScanmbs"
col cellpiobpreoff format 99990.000        heading cellpiobpreoff      -- "CellPIOpredoffloadmbs"
col cellpiobsi     format 99990.000        heading cellpiobsi          -- "CellPIOstorageindexmbs"
col celliouncomb   format 99990.000        heading celliouncomb        -- "CellIOuncompmbs"
col cellpiobs      format 99990.000        heading cellpiobs           -- "CellPIOsavedfilecreationmbs"
col cellpiobsrman  format 99990.000        heading cellpiobsrman       -- "CellPIOsavedRMANfilerestorembs"

SELECT * FROM
( 
  SELECT trim('&_instname') instname, 
         trim('&_dbid') db_id, 
         trim('&_hostname') hostname, 
         s0.snap_id id,
         TO_CHAR(s0.END_INTERVAL_TIME,'MM/DD/YY HH24:MI:SS') tm,
         s0.instance_number inst,
  round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2) dur,
   (((s20t1.value - s20t0.value) - (s21t1.value - s21t0.value)) / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2))*60)
    ) as SIORs,
   ((s21t1.value - s21t0.value) / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2))*60)
    ) as MIORs,
   (((s22t1.value - s22t0.value)/1024/1024) / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2))*60)
    ) as TIORmbs,
   (((s23t1.value - s23t0.value) - (s24t1.value - s24t0.value)) / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2))*60)
    ) as SIOWs,
   ((s24t1.value - s24t0.value) / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2))*60)
    ) as MIOWs,
   (((s25t1.value - s25t0.value)/1024/1024) / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2))*60)
    ) as TIOWmbs,
   ((s13t1.value - s13t0.value)  / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2))*60)
    ) as IORedo, 
   (((s14t1.value - s14t0.value)/1024/1024)  / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2))*60)
    ) as redosizesec,
    ((s33t1.value - s33t0.value) / (s20t1.value - s20t0.value))*100 as flashcache,
   (((s26t1.value - s26t0.value)/1024/1024) / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2))*60)
    ) as cellpiob,
   (((s31t1.value - s31t0.value)/1024/1024) / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2))*60)
    ) as cellpiobss,
   (((s29t1.value - s29t0.value)/1024/1024) / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2))*60)
    ) as cellpiobpreoff,
   (((s30t1.value - s30t0.value)/1024/1024) / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2))*60)
    ) as cellpiobsi,
   (((s32t1.value - s32t0.value)/1024/1024) / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2))*60)
    ) as celliouncomb,
   (((s27t1.value - s27t0.value)/1024/1024) / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2))*60)
    ) as cellpiobs,
   (((s28t1.value - s28t0.value)/1024/1024) / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2))*60)
    ) as cellpiobsrman
FROM dba_hist_snapshot s0,
  dba_hist_snapshot s1,
  dba_hist_sysstat s13t0,       -- redo writes, diffed
  dba_hist_sysstat s13t1,
  dba_hist_sysstat s14t0,       -- redo size, diffed
  dba_hist_sysstat s14t1,
  dba_hist_sysstat s20t0,       -- physical read total IO requests, diffed
  dba_hist_sysstat s20t1,
  dba_hist_sysstat s21t0,       -- physical read total multi block requests, diffed
  dba_hist_sysstat s21t1,  
  dba_hist_sysstat s22t0,       -- physical read total bytes, diffed
  dba_hist_sysstat s22t1,  
  dba_hist_sysstat s23t0,       -- physical write total IO requests, diffed
  dba_hist_sysstat s23t1,
  dba_hist_sysstat s24t0,       -- physical write total multi block requests, diffed
  dba_hist_sysstat s24t1,
  dba_hist_sysstat s25t0,       -- physical write total bytes, diffed
  dba_hist_sysstat s25t1,
  dba_hist_sysstat s26t0,       -- cell physical IO interconnect bytes, diffed, cellpiob
  dba_hist_sysstat s26t1,
  dba_hist_sysstat s27t0,       -- cell physical IO bytes saved during optimized file creation, diffed, cellpiobs
  dba_hist_sysstat s27t1,
  dba_hist_sysstat s28t0,       -- cell physical IO bytes saved during optimized RMAN file restore, diffed, cellpiobsrman
  dba_hist_sysstat s28t1,
  dba_hist_sysstat s29t0,       -- cell physical IO bytes eligible for predicate offload, diffed, cellpiobpreoff
  dba_hist_sysstat s29t1,
  dba_hist_sysstat s30t0,       -- cell physical IO bytes saved by storage index, diffed, cellpiobsi
  dba_hist_sysstat s30t1,
  dba_hist_sysstat s31t0,       -- cell physical IO interconnect bytes returned by smart scan, diffed, cellpiobss
  dba_hist_sysstat s31t1,
  dba_hist_sysstat s32t0,       -- cell IO uncompressed bytes, diffed, celliouncomb
  dba_hist_sysstat s32t1,
  dba_hist_sysstat s33t0,       -- cell flash cache read hits
  dba_hist_sysstat s33t1
WHERE s0.dbid            = &_dbid    -- CHANGE THE DBID HERE!
AND s1.dbid              = s0.dbid
AND s13t0.dbid            = s0.dbid
AND s13t1.dbid            = s0.dbid
AND s14t0.dbid            = s0.dbid
AND s14t1.dbid            = s0.dbid
AND s20t0.dbid            = s0.dbid
AND s20t1.dbid            = s0.dbid
AND s21t0.dbid            = s0.dbid
AND s21t1.dbid            = s0.dbid
AND s22t0.dbid            = s0.dbid
AND s22t1.dbid            = s0.dbid
AND s23t0.dbid            = s0.dbid
AND s23t1.dbid            = s0.dbid
AND s24t0.dbid            = s0.dbid
AND s24t1.dbid            = s0.dbid
AND s25t0.dbid            = s0.dbid
AND s25t1.dbid            = s0.dbid
AND s26t0.dbid            = s0.dbid
AND s26t1.dbid            = s0.dbid
AND s27t0.dbid            = s0.dbid
AND s27t1.dbid            = s0.dbid
AND s28t0.dbid            = s0.dbid
AND s28t1.dbid            = s0.dbid
AND s29t0.dbid            = s0.dbid
AND s29t1.dbid            = s0.dbid
AND s30t0.dbid            = s0.dbid
AND s30t1.dbid            = s0.dbid
AND s31t0.dbid            = s0.dbid
AND s31t1.dbid            = s0.dbid
AND s32t0.dbid            = s0.dbid
AND s32t1.dbid            = s0.dbid
AND s33t0.dbid            = s0.dbid
AND s33t1.dbid            = s0.dbid
--AND s0.instance_number   = &_instancenumber   -- CHANGE THE INSTANCE_NUMBER HERE!
AND s1.instance_number   = s0.instance_number
AND s13t0.instance_number = s0.instance_number
AND s13t1.instance_number = s0.instance_number
AND s14t0.instance_number = s0.instance_number
AND s14t1.instance_number = s0.instance_number
AND s20t0.instance_number = s0.instance_number
AND s20t1.instance_number = s0.instance_number
AND s21t0.instance_number = s0.instance_number
AND s21t1.instance_number = s0.instance_number
AND s22t0.instance_number = s0.instance_number
AND s22t1.instance_number = s0.instance_number
AND s23t0.instance_number = s0.instance_number
AND s23t1.instance_number = s0.instance_number
AND s24t0.instance_number = s0.instance_number
AND s24t1.instance_number = s0.instance_number
AND s25t0.instance_number = s0.instance_number
AND s25t1.instance_number = s0.instance_number
AND s26t0.instance_number = s0.instance_number
AND s26t1.instance_number = s0.instance_number
AND s27t0.instance_number = s0.instance_number
AND s27t1.instance_number = s0.instance_number
AND s28t0.instance_number = s0.instance_number
AND s28t1.instance_number = s0.instance_number
AND s29t0.instance_number = s0.instance_number
AND s29t1.instance_number = s0.instance_number
AND s30t0.instance_number = s0.instance_number
AND s30t1.instance_number = s0.instance_number
AND s31t0.instance_number = s0.instance_number
AND s31t1.instance_number = s0.instance_number
AND s32t0.instance_number = s0.instance_number
AND s32t1.instance_number = s0.instance_number
AND s33t0.instance_number = s0.instance_number
AND s33t1.instance_number = s0.instance_number
AND s1.snap_id            = s0.snap_id + 1
AND s13t0.snap_id         = s0.snap_id
AND s13t1.snap_id         = s0.snap_id + 1
AND s14t0.snap_id         = s0.snap_id
AND s14t1.snap_id         = s0.snap_id + 1
AND s20t0.snap_id         = s0.snap_id
AND s20t1.snap_id         = s0.snap_id + 1
AND s21t0.snap_id         = s0.snap_id
AND s21t1.snap_id         = s0.snap_id + 1
AND s22t0.snap_id         = s0.snap_id
AND s22t1.snap_id         = s0.snap_id + 1
AND s23t0.snap_id         = s0.snap_id
AND s23t1.snap_id         = s0.snap_id + 1
AND s24t0.snap_id         = s0.snap_id
AND s24t1.snap_id         = s0.snap_id + 1
AND s25t0.snap_id         = s0.snap_id
AND s25t1.snap_id         = s0.snap_id + 1
AND s26t0.snap_id         = s0.snap_id
AND s26t1.snap_id         = s0.snap_id + 1
AND s27t0.snap_id         = s0.snap_id
AND s27t1.snap_id         = s0.snap_id + 1
AND s28t0.snap_id         = s0.snap_id
AND s28t1.snap_id         = s0.snap_id + 1
AND s29t0.snap_id         = s0.snap_id
AND s29t1.snap_id         = s0.snap_id + 1
AND s30t0.snap_id         = s0.snap_id
AND s30t1.snap_id         = s0.snap_id + 1
AND s31t0.snap_id         = s0.snap_id
AND s31t1.snap_id         = s0.snap_id + 1
AND s32t0.snap_id         = s0.snap_id
AND s32t1.snap_id         = s0.snap_id + 1
AND s33t0.snap_id         = s0.snap_id
AND s33t1.snap_id         = s0.snap_id + 1
AND s13t0.stat_name       = 'redo writes'
AND s13t1.stat_name       = s13t0.stat_name
AND s14t0.stat_name       = 'redo size'
AND s14t1.stat_name       = s14t0.stat_name
AND s20t0.stat_name       = 'physical read total IO requests'
AND s20t1.stat_name       = s20t0.stat_name
AND s21t0.stat_name       = 'physical read total multi block requests'
AND s21t1.stat_name       = s21t0.stat_name
AND s22t0.stat_name       = 'physical read total bytes'
AND s22t1.stat_name       = s22t0.stat_name
AND s23t0.stat_name       = 'physical write total IO requests'
AND s23t1.stat_name       = s23t0.stat_name
AND s24t0.stat_name       = 'physical write total multi block requests'
AND s24t1.stat_name       = s24t0.stat_name
AND s25t0.stat_name       = 'physical write total bytes'
AND s25t1.stat_name       = s25t0.stat_name
AND s26t0.stat_name       = 'cell physical IO interconnect bytes'
AND s26t1.stat_name       = s26t0.stat_name
AND s27t0.stat_name       = 'cell physical IO bytes saved during optimized file creation'
AND s27t1.stat_name       = s27t0.stat_name
AND s28t0.stat_name       = 'cell physical IO bytes saved during optimized RMAN file restore'
AND s28t1.stat_name       = s28t0.stat_name
AND s29t0.stat_name       = 'cell physical IO bytes eligible for predicate offload'
AND s29t1.stat_name       = s29t0.stat_name
AND s30t0.stat_name       = 'cell physical IO bytes saved by storage index'
AND s30t1.stat_name       = s30t0.stat_name
AND s31t0.stat_name       = 'cell physical IO interconnect bytes returned by smart scan'
AND s31t1.stat_name       = s31t0.stat_name
AND s32t0.stat_name       = 'cell IO uncompressed bytes'
AND s32t1.stat_name       = s32t0.stat_name
AND s33t0.stat_name       = 'cell flash cache read hits'
AND s33t1.stat_name       = s33t0.stat_name
)
-- WHERE 
-- tm > to_char(sysdate - 30, 'MM/DD/YY HH24:MI')
-- id  in (select snap_id from (select * from r2toolkit.r2_regression_data union all select * from r2toolkit.r2_outlier_data))
-- id in (338)
-- aas > 1
-- oscpuio > 50
-- rmancpupct > 0
-- AND TO_CHAR(s0.END_INTERVAL_TIME,'D') >= 1     -- Day of week: 1=Sunday 7=Saturday
-- AND TO_CHAR(s0.END_INTERVAL_TIME,'D') <= 7
-- AND TO_CHAR(s0.END_INTERVAL_TIME,'HH24MI') >= 0900     -- Hour
-- AND TO_CHAR(s0.END_INTERVAL_TIME,'HH24MI') <= 1800
-- AND s0.END_INTERVAL_TIME >= TO_DATE('2010-jan-17 00:00:00','yyyy-mon-dd hh24:mi:ss')     -- Data range
-- AND s0.END_INTERVAL_TIME <= TO_DATE('2010-aug-22 23:59:59','yyyy-mon-dd hh24:mi:ss')
ORDER BY id ASC;
}}}
this SQL only pulls the following info for non-Exadata environments
-- redo writes
-- redo size
-- physical read total IO requests
-- physical read total multi block requests
-- physical write total IO requests
-- physical write total multi block requests

{{{
set arraysize 5000

COLUMN blocksize NEW_VALUE _blocksize NOPRINT
select distinct block_size blocksize from v$datafile;

COLUMN dbid NEW_VALUE _dbid NOPRINT
select dbid from v$database;

COLUMN name NEW_VALUE _instname NOPRINT
select lower(instance_name) name from v$instance;

COLUMN name NEW_VALUE _hostname NOPRINT
select lower(host_name) name from v$instance;

COLUMN instancenumber NEW_VALUE _instancenumber NOPRINT
select instance_number instancenumber from v$instance;

-- ttitle center 'AWR IO Workload Report' skip 2
set pagesize 50000
set linesize 550

col instname       format a15              heading instname            -- instname
col hostname       format a30              heading hostname            -- hostname
col tm             format a17              heading tm                  -- "tm"
col id             format 99999            heading id                  -- "snapid"
col inst           format 90               heading inst                -- "inst"
col dur            format 999990.00        heading dur                 -- "dur"
col cpu            format 90               heading cpu                 -- "cpu"
col cap            format 9999990.00       heading cap                 -- "capacity"
col dbt            format 999990.00        heading dbt                 -- "DBTime"
col dbc            format 99990.00         heading dbc                 -- "DBcpu"
col bgc            format 99990.00         heading bgc                 -- "BGcpu"
col rman           format 9990.00          heading rman                -- "RMANcpu"
col aas            format 990.0            heading aas                 -- "AAS"
col totora         format 9999990.00       heading totora              -- "TotalOracleCPU"
col busy           format 9999990.00       heading busy                -- "BusyTime"
col load           format 990.00           heading load                -- "OSLoad"
col totos          format 9999990.00       heading totos               -- "TotalOSCPU"
col mem            format 999990.00        heading mem                 -- "PhysicalMemorymb"
col IORs           format 99990.000        heading IORs                -- "IOPsr"
col IOWs           format 99990.000        heading IOWs                -- "IOPsw"
col IORedo         format 99990.000        heading IORedo              -- "IOPsredo"
col IORmbs         format 99990.000        heading IORmbs              -- "IOrmbs"
col IOWmbs         format 99990.000        heading IOWmbs              -- "IOwmbs"
col redosizesec    format 99990.000        heading redosizesec         -- "Redombs"
col logons         format 990              heading logons              -- "Sess"
col logone         format 990              heading logone              -- "SessEnd"
col exsraw         format 99990.000        heading exsraw              -- "Execrawdelta"
col exs            format 9990.000         heading exs                 -- "Execs"
col oracpupct      format 990              heading oracpupct           -- "OracleCPUPct"
col rmancpupct     format 990              heading rmancpupct          -- "RMANCPUPct"
col oscpupct       format 990              heading oscpupct            -- "OSCPUPct"
col oscpuusr       format 990              heading oscpuusr            -- "USRPct"
col oscpusys       format 990              heading oscpusys            -- "SYSPct"
col oscpuio        format 990              heading oscpuio             -- "IOPct"
col SIORs          format 99990.000        heading SIORs               -- "IOPsSingleBlockr"
col MIORs          format 99990.000        heading MIORs               -- "IOPsMultiBlockr"
col TIORmbs        format 99990.000        heading TIORmbs             -- "Readmbs"
col SIOWs          format 99990.000        heading SIOWs               -- "IOPsSingleBlockw"
col MIOWs          format 99990.000        heading MIOWs               -- "IOPsMultiBlockw"
col TIOWmbs        format 99990.000        heading TIOWmbs             -- "Writembs"
col TIOR           format 99990.000        heading TIOR                -- "TotalIOPsr"
col TIOW           format 99990.000        heading TIOW                -- "TotalIOPsw"
col TIOALL         format 99990.000        heading TIOALL              -- "TotalIOPsALL"
col ALLRmbs        format 99990.000        heading ALLRmbs             -- "TotalReadmbs"
col ALLWmbs        format 99990.000        heading ALLWmbs             -- "TotalWritembs"
col GRANDmbs       format 99990.000        heading GRANDmbs            -- "TotalmbsALL"
col readratio      format 990              heading readratio           -- "ReadRatio"
col writeratio     format 990              heading writeratio          -- "WriteRatio"
col diskiops       format 99990.000        heading diskiops            -- "HWDiskIOPs"
col numdisks       format 99990.000        heading numdisks            -- "HWNumofDisks"
col flashcache     format 990              heading flashcache          -- "FlashCacheHitsPct"
col cellpiob       format 99990.000        heading cellpiob            -- "CellPIOICmbs"
col cellpiobss     format 99990.000        heading cellpiobss          -- "CellPIOICSmartScanmbs"
col cellpiobpreoff format 99990.000        heading cellpiobpreoff      -- "CellPIOpredoffloadmbs"
col cellpiobsi     format 99990.000        heading cellpiobsi          -- "CellPIOstorageindexmbs"
col celliouncomb   format 99990.000        heading celliouncomb        -- "CellIOuncompmbs"
col cellpiobs      format 99990.000        heading cellpiobs           -- "CellPIOsavedfilecreationmbs"
col cellpiobsrman  format 99990.000        heading cellpiobsrman       -- "CellPIOsavedRMANfilerestorembs"

SELECT * FROM
( 
  SELECT trim('&_instname') instname, 
         trim('&_dbid') db_id, 
         trim('&_hostname') hostname, 
         s0.snap_id id,
         TO_CHAR(s0.END_INTERVAL_TIME,'MM/DD/YY HH24:MI:SS') tm,
         s0.instance_number inst,
  round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2) dur,
   (((s20t1.value - s20t0.value) - (s21t1.value - s21t0.value)) / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2))*60)
    ) as SIORs,
   ((s21t1.value - s21t0.value) / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2))*60)
    ) as MIORs,
   (((s23t1.value - s23t0.value) - (s24t1.value - s24t0.value)) / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2))*60)
    ) as SIOWs,
   ((s24t1.value - s24t0.value) / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2))*60)
    ) as MIOWs,
   ((s13t1.value - s13t0.value)  / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2))*60)
    ) as IORedo, 
   (((s14t1.value - s14t0.value)/1024/1024)  / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2))*60)
    ) as redosizesec
FROM dba_hist_snapshot s0,
  dba_hist_snapshot s1,
  dba_hist_sysstat s13t0,       -- redo writes, diffed
  dba_hist_sysstat s13t1,
  dba_hist_sysstat s14t0,       -- redo size, diffed
  dba_hist_sysstat s14t1,
  dba_hist_sysstat s20t0,       -- physical read total IO requests, diffed
  dba_hist_sysstat s20t1,
  dba_hist_sysstat s21t0,       -- physical read total multi block requests, diffed
  dba_hist_sysstat s21t1,  
  dba_hist_sysstat s23t0,       -- physical write total IO requests, diffed
  dba_hist_sysstat s23t1,
  dba_hist_sysstat s24t0,       -- physical write total multi block requests, diffed
  dba_hist_sysstat s24t1
WHERE s0.dbid            = &_dbid    -- CHANGE THE DBID HERE!
AND s1.dbid              = s0.dbid
AND s13t0.dbid            = s0.dbid
AND s13t1.dbid            = s0.dbid
AND s14t0.dbid            = s0.dbid
AND s14t1.dbid            = s0.dbid
AND s20t0.dbid            = s0.dbid
AND s20t1.dbid            = s0.dbid
AND s21t0.dbid            = s0.dbid
AND s21t1.dbid            = s0.dbid
AND s23t0.dbid            = s0.dbid
AND s23t1.dbid            = s0.dbid
AND s24t0.dbid            = s0.dbid
AND s24t1.dbid            = s0.dbid
--AND s0.instance_number   = &_instancenumber   -- CHANGE THE INSTANCE_NUMBER HERE!
AND s1.instance_number   = s0.instance_number
AND s13t0.instance_number = s0.instance_number
AND s13t1.instance_number = s0.instance_number
AND s14t0.instance_number = s0.instance_number
AND s14t1.instance_number = s0.instance_number
AND s20t0.instance_number = s0.instance_number
AND s20t1.instance_number = s0.instance_number
AND s21t0.instance_number = s0.instance_number
AND s21t1.instance_number = s0.instance_number
AND s23t0.instance_number = s0.instance_number
AND s23t1.instance_number = s0.instance_number
AND s24t0.instance_number = s0.instance_number
AND s24t1.instance_number = s0.instance_number
AND s1.snap_id            = s0.snap_id + 1
AND s13t0.snap_id         = s0.snap_id
AND s13t1.snap_id         = s0.snap_id + 1
AND s14t0.snap_id         = s0.snap_id
AND s14t1.snap_id         = s0.snap_id + 1
AND s20t0.snap_id         = s0.snap_id
AND s20t1.snap_id         = s0.snap_id + 1
AND s21t0.snap_id         = s0.snap_id
AND s21t1.snap_id         = s0.snap_id + 1
AND s23t0.snap_id         = s0.snap_id
AND s23t1.snap_id         = s0.snap_id + 1
AND s24t0.snap_id         = s0.snap_id
AND s24t1.snap_id         = s0.snap_id + 1
AND s13t0.stat_name       = 'redo writes'
AND s13t1.stat_name       = s13t0.stat_name
AND s14t0.stat_name       = 'redo size'
AND s14t1.stat_name       = s14t0.stat_name
AND s20t0.stat_name       = 'physical read total IO requests'
AND s20t1.stat_name       = s20t0.stat_name
AND s21t0.stat_name       = 'physical read total multi block requests'
AND s21t1.stat_name       = s21t0.stat_name
AND s23t0.stat_name       = 'physical write total IO requests'
AND s23t1.stat_name       = s23t0.stat_name
AND s24t0.stat_name       = 'physical write total multi block requests'
AND s24t1.stat_name       = s24t0.stat_name
)
-- WHERE 
-- tm > to_char(sysdate - 30, 'MM/DD/YY HH24:MI')
-- id  in (select snap_id from (select * from r2toolkit.r2_regression_data union all select * from r2toolkit.r2_outlier_data))
-- id in (338)
-- aas > 1
-- oscpuio > 50
-- rmancpupct > 0
-- AND TO_CHAR(s0.END_INTERVAL_TIME,'D') >= 1     -- Day of week: 1=Sunday 7=Saturday
-- AND TO_CHAR(s0.END_INTERVAL_TIME,'D') <= 7
-- AND TO_CHAR(s0.END_INTERVAL_TIME,'HH24MI') >= 0900     -- Hour
-- AND TO_CHAR(s0.END_INTERVAL_TIME,'HH24MI') <= 1800
-- AND s0.END_INTERVAL_TIME >= TO_DATE('2010-jan-17 00:00:00','yyyy-mon-dd hh24:mi:ss')     -- Data range
-- AND s0.END_INTERVAL_TIME <= TO_DATE('2010-aug-22 23:59:59','yyyy-mon-dd hh24:mi:ss')
ORDER BY id ASC;
}}}
{{{
set arraysize 5000

COLUMN dbid NEW_VALUE _dbid NOPRINT
select dbid from v$database;

COLUMN name NEW_VALUE _instname NOPRINT
select lower(instance_name) name from v$instance;

COLUMN name NEW_VALUE _hostname NOPRINT
select lower(host_name) name from v$instance;

COLUMN instancenumber NEW_VALUE _instancenumber NOPRINT
select instance_number instancenumber from v$instance;

-- ttitle center 'AWR Services Statistics Report' skip 2
set pagesize 50000
set linesize 550

col instname    format a15
col hostname    format a30
col tm          format a15              heading tm           --"Snap|Start|Time"
col id          format 99999            heading id           --"Snap|ID"
col inst        format 90               heading inst         --"i|n|s|t|#"
col dur         format 999990.00        heading dur          --"Snap|Dur|(m)"
col cpu         format 90               heading cpu          --"C|P|U"
col cap         format 9999990.00       heading cap          --"***|Total|CPU|Time|(s)"
col dbt         format 999990.00        heading dbt          --"DB|Time"
col dbc         format 99990.00         heading dbc          --"DB|CPU"
col bgc         format 99990.00         heading bgc          --"Bg|CPU"
col rman        format 9990.00          heading rman         --"RMAN|CPU"
col aas         format 990.0            heading aas          --"A|A|S"
col totora      format 9999990.00       heading totora       --"***|Total|Oracle|CPU|(s)"
col busy        format 9999990.00       heading busy         --"Busy|Time"
col load        format 990.00           heading load         --"OS|Load"
col totos       format 9999990.00       heading totos        --"***|Total|OS|CPU|(s)"
col mem         format 999990.00        heading mem          --"Physical|Memory|(mb)"
col IORs        format 9990.000         heading IORs         --"IOPs|r"
col IOWs        format 9990.000         heading IOWs         --"IOPs|w"
col IORedo      format 9990.000         heading IORedo       --"IOPs|redo"
col IORmbs      format 9990.000         heading IORmbs       --"IO r|(mb)/s"
col IOWmbs      format 9990.000         heading IOWmbs       --"IO w|(mb)/s"
col redosizesec format 9990.000         heading redosizesec  --"Redo|(mb)/s"
col logons      format 990              heading logons       --"Sess"
col logone      format 990              heading logone       --"Sess|End"
col exsraw      format 99990.000        heading exsraw       --"Exec|raw|delta"
col exs         format 9990.000         heading exs          --"Exec|/s"
col oracpupct   format 990              heading oracpupct    --"Oracle|CPU|%"
col rmancpupct  format 990              heading rmancpupct   --"RMAN|CPU|%"
col oscpupct    format 990              heading oscpupct     --"OS|CPU|%"
col oscpuusr    format 990              heading oscpuusr     --"U|S|R|%"
col oscpusys    format 990              heading oscpusys     --"S|Y|S|%"
col oscpuio     format 990              heading oscpuio      --"I|O|%"
col phy_reads   format 99999990.00      heading phy_reads    --"physical|reads"
col log_reads   format 99999990.00      heading log_reads    --"logical|reads"

select  trim('&_instname') instname, trim('&_dbid') db_id, trim('&_hostname') hostname, snap_id,
        TO_CHAR(tm,'MM/DD/YY HH24:MI:SS') tm, 
        inst,
        dur,
        service_name, 
        round(db_time / 1000000, 1) as dbt, 
        round(db_cpu  / 1000000, 1) as dbc,
        phy_reads, 
        log_reads,
        aas
 from (select 
          s1.snap_id,
          s1.tm,
          s1.inst,
          s1.dur,
          s1.service_name, 
          sum(decode(s1.stat_name, 'DB time', s1.diff, 0)) db_time,
          sum(decode(s1.stat_name, 'DB CPU',  s1.diff, 0)) db_cpu,
          sum(decode(s1.stat_name, 'physical reads', s1.diff, 0)) phy_reads,
          sum(decode(s1.stat_name, 'session logical reads', s1.diff, 0)) log_reads,
          round(sum(decode(s1.stat_name, 'DB time', s1.diff, 0))/1000000,1)/60 / s1.dur as aas
   from
     (select s0.snap_id snap_id,
             s0.END_INTERVAL_TIME tm,
             s0.instance_number inst,
            round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2) dur,
             e.service_name     service_name, 
             e.stat_name        stat_name, 
             e.value - b.value  diff
       from dba_hist_snapshot s0,
            dba_hist_snapshot s1,
            dba_hist_service_stat b,
            dba_hist_service_stat e
       where 
         s0.dbid                  = &_dbid            -- CHANGE THE DBID HERE!
         and s1.dbid              = s0.dbid
         and b.dbid               = s0.dbid
         and e.dbid               = s0.dbid
         --and s0.instance_number   = &_instancenumber  -- CHANGE THE INSTANCE_NUMBER HERE!
         and s1.instance_number   = s0.instance_number
         and b.instance_number    = s0.instance_number
         and e.instance_number    = s0.instance_number
         and s1.snap_id           = s0.snap_id + 1
         and b.snap_id            = s0.snap_id
         and e.snap_id            = s0.snap_id + 1
         and b.stat_id            = e.stat_id
         and b.service_name_hash  = e.service_name_hash) s1
   group by 
     s1.snap_id, s1.tm, s1.inst, s1.dur, s1.service_name
   order by 
     snap_id asc, aas desc, service_name)
-- where 
-- AND TO_CHAR(tm,'D') >= 1     -- Day of week: 1=Sunday 7=Saturday
-- AND TO_CHAR(tm,'D') <= 7
-- AND TO_CHAR(tm,'HH24MI') >= 0900     -- Hour
-- AND TO_CHAR(tm,'HH24MI') <= 1800
-- AND tm >= TO_DATE('2010-jan-17 00:00:00','yyyy-mon-dd hh24:mi:ss')     -- Data range
-- AND tm <= TO_DATE('2010-aug-22 23:59:59','yyyy-mon-dd hh24:mi:ss')
-- snap_id = 338
-- and snap_id >= 335 and snap_id <= 339
-- aas > .5
;
}}}
to derive the transactions/seconds put this as a calculated field in Tableau
{{{
TRX = (UCOMS + URS) / DUR 
}}}

{{{
set arraysize 5000

COLUMN blocksize NEW_VALUE _blocksize NOPRINT
select distinct block_size blocksize from v$datafile;

COLUMN dbid NEW_VALUE _dbid NOPRINT
select dbid from v$database;

COLUMN name NEW_VALUE _instname NOPRINT
select lower(instance_name) name from v$instance;

COLUMN name NEW_VALUE _hostname NOPRINT
select lower(host_name) name from v$instance;

COLUMN instancenumber NEW_VALUE _instancenumber NOPRINT
select instance_number instancenumber from v$instance;

-- ttitle center 'AWR CPU and IO Workload Report' skip 2
set pagesize 50000
set linesize 550

col instname    format a15              heading instname        -- instname
col hostname    format a30              heading hostname        -- hostname
col tm          format a17              heading tm              -- "tm"
col id          format 99999            heading id              -- "snapid"
col inst        format 90               heading inst            -- "inst"
col dur         format 999990.00        heading dur             -- "dur"
col cpu         format 90               heading cpu             -- "cpu"
col cap         format 9999990.00       heading cap             -- "capacity"
col dbt         format 999990.00        heading dbt             -- "DBTime"
col dbc         format 99990.00         heading dbc             -- "DBcpu"
col bgc         format 99990.00         heading bgc             -- "BGcpu"
col rman        format 9990.00          heading rman            -- "RMANcpu"
col aas         format 990.0            heading aas             -- "AAS"
col totora      format 9999990.00       heading totora          -- "TotalOracleCPU"
col busy        format 9999990.00       heading busy            -- "BusyTime"
col load        format 990.00           heading load            -- "OSLoad"
col totos       format 9999990.00       heading totos           -- "TotalOSCPU"
col mem         format 999990.00        heading mem             -- "PhysicalMemorymb"
col IORs        format 9990.000         heading IORs            -- "IOPsr"
col IOWs        format 9990.000         heading IOWs            -- "IOPsw"
col IORedo      format 9990.000         heading IORedo          -- "IOPsredo"
col IORmbs      format 9990.000         heading IORmbs          -- "IOrmbs"
col IOWmbs      format 9990.000         heading IOWmbs          -- "IOwmbs"
col redosizesec format 9990.000         heading redosizesec     -- "Redombs"
col logons      format 990              heading logons          -- "Sess"
col logone      format 990              heading logone          -- "SessEnd"
col exsraw      format 99990.000        heading exsraw          -- "Execrawdelta"
col exs         format 9990.000         heading exs             -- "Execs"
col ucs         format 9990.000         heading ucs             -- "UserCalls"
col ucoms       format 9990.000         heading ucoms           -- "Commit"
col urs         format 9990.000         heading urs             -- "Rollback"
col lios        format 9999990.00       heading lios            -- "LIOs"
col oracpupct   format 990              heading oracpupct       -- "OracleCPUPct"
col rmancpupct  format 990              heading rmancpupct      -- "RMANCPUPct"
col oscpupct    format 990              heading oscpupct        -- "OSCPUPct"
col oscpuusr    format 990              heading oscpuusr        -- "USRPct"
col oscpusys    format 990              heading oscpusys        -- "SYSPct"
col oscpuio     format 990              heading oscpuio         -- "IOPct"

SELECT * FROM
( 
  SELECT trim('&_instname') instname, 
         trim('&_dbid') db_id, 
         trim('&_hostname') hostname, 
          s0.snap_id id,
         TO_CHAR(s0.END_INTERVAL_TIME,'MM/DD/YY HH24:MI:SS') tm,
         s0.instance_number inst,
  round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2) dur,
  round(s4t1.value/1024/1024/1024,2) AS memgb,
  round(s37t1.value/1024/1024/1024,2) AS sgagb,
  round(s36t1.value/1024/1024/1024,2) AS pgagb,
     s9t0.value logons, 
   ((s10t1.value - s10t0.value)  / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2))*60)
    ) as exs, 
   ((s40t1.value - s40t0.value)  / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2))*60)
    ) as ucs, 
   ((s38t1.value - s38t0.value)  / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2))*60)
    ) as ucoms, 
   ((s39t1.value - s39t0.value)  / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2))*60)
    ) as urs,
   ((s41t1.value - s41t0.value)  / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2))*60)
    ) as lios
FROM dba_hist_snapshot s0,
  dba_hist_snapshot s1,
  dba_hist_osstat s4t1,         -- osstat just get the end value 
  (select snap_id, dbid, instance_number, sum(value) value from dba_hist_sga group by snap_id, dbid, instance_number) s37t1, -- total SGA allocated, just get the end value
  dba_hist_pgastat s36t1,		-- total PGA allocated, just get the end value 
  dba_hist_sysstat s9t0,        -- logons current, sysstat absolute value should not be diffed
  dba_hist_sysstat s10t0,       -- execute count, diffed
  dba_hist_sysstat s10t1,
  dba_hist_sysstat s38t0,       -- user commits, diffed
  dba_hist_sysstat s38t1,
  dba_hist_sysstat s39t0,       -- user rollbacks, diffed
  dba_hist_sysstat s39t1,
  dba_hist_sysstat s40t0,       -- user calls, diffed
  dba_hist_sysstat s40t1,
  dba_hist_sysstat s41t0,       -- session logical reads, diffed
  dba_hist_sysstat s41t1
WHERE s0.dbid            = &_dbid    -- CHANGE THE DBID HERE!
AND s1.dbid              = s0.dbid
AND s4t1.dbid            = s0.dbid
AND s9t0.dbid            = s0.dbid
AND s10t0.dbid            = s0.dbid
AND s10t1.dbid            = s0.dbid
AND s36t1.dbid            = s0.dbid
AND s37t1.dbid            = s0.dbid
AND s38t0.dbid            = s0.dbid
AND s38t1.dbid            = s0.dbid
AND s39t0.dbid            = s0.dbid
AND s39t1.dbid            = s0.dbid
AND s40t0.dbid            = s0.dbid
AND s40t1.dbid            = s0.dbid
AND s41t0.dbid            = s0.dbid
AND s41t1.dbid            = s0.dbid
--AND s0.instance_number   = &_instancenumber   -- CHANGE THE INSTANCE_NUMBER HERE!
AND s1.instance_number   = s0.instance_number
AND s4t1.instance_number = s0.instance_number
AND s9t0.instance_number = s0.instance_number
AND s10t0.instance_number = s0.instance_number
AND s10t1.instance_number = s0.instance_number
AND s36t1.instance_number = s0.instance_number
AND s37t1.instance_number = s0.instance_number
AND s38t0.instance_number = s0.instance_number
AND s38t1.instance_number = s0.instance_number
AND s39t0.instance_number = s0.instance_number
AND s39t1.instance_number = s0.instance_number
AND s40t0.instance_number = s0.instance_number
AND s40t1.instance_number = s0.instance_number
AND s41t0.instance_number = s0.instance_number
AND s41t1.instance_number = s0.instance_number
AND s1.snap_id           = s0.snap_id + 1
AND s4t1.snap_id         = s0.snap_id + 1
AND s36t1.snap_id        = s0.snap_id + 1
AND s37t1.snap_id        = s0.snap_id + 1
AND s9t0.snap_id         = s0.snap_id
AND s10t0.snap_id         = s0.snap_id
AND s10t1.snap_id         = s0.snap_id + 1
AND s38t0.snap_id         = s0.snap_id
AND s38t1.snap_id         = s0.snap_id + 1
AND s39t0.snap_id         = s0.snap_id
AND s39t1.snap_id         = s0.snap_id + 1
AND s40t0.snap_id         = s0.snap_id
AND s40t1.snap_id         = s0.snap_id + 1
AND s41t0.snap_id         = s0.snap_id
AND s41t1.snap_id         = s0.snap_id + 1
AND s4t1.stat_name       = 'PHYSICAL_MEMORY_BYTES'
AND s36t1.name           = 'total PGA allocated'
AND s9t0.stat_name       = 'logons current'
AND s10t0.stat_name       = 'execute count'
AND s10t1.stat_name       = s10t0.stat_name
AND s38t0.stat_name       = 'user commits'
AND s38t1.stat_name       = s38t0.stat_name
AND s39t0.stat_name       = 'user rollbacks'
AND s39t1.stat_name       = s39t0.stat_name
AND s40t0.stat_name       = 'user calls'
AND s40t1.stat_name       = s40t0.stat_name
AND s41t0.stat_name       = 'session logical reads'
AND s41t1.stat_name       = s41t0.stat_name
)
-- WHERE 
-- tm > to_char(sysdate - 30, 'MM/DD/YY HH24:MI')
-- id  in (select snap_id from (select * from r2toolkit.r2_regression_data union all select * from r2toolkit.r2_outlier_data))
-- id in (336)
-- aas > 1
-- oracpupct > 50
-- oscpupct > 50
-- AND TO_CHAR(s0.END_INTERVAL_TIME,'D') >= 1     -- Day of week: 1=Sunday 7=Saturday
-- AND TO_CHAR(s0.END_INTERVAL_TIME,'D') <= 7
-- AND TO_CHAR(s0.END_INTERVAL_TIME,'HH24MI') >= 0900     -- Hour
-- AND TO_CHAR(s0.END_INTERVAL_TIME,'HH24MI') <= 1800
-- AND s0.END_INTERVAL_TIME >= TO_DATE('2010-jan-17 00:00:00','yyyy-mon-dd hh24:mi:ss')     -- Data range
-- AND s0.END_INTERVAL_TIME <= TO_DATE('2010-aug-22 23:59:59','yyyy-mon-dd hh24:mi:ss')
ORDER BY id ASC;
}}}
only shows the following 
- 'PHYSICAL_MEMORY_BYTES'
- 'total PGA allocated'
- 'logons current'
- 'execute count'

which is all the data needed to characterize the SGA,PGA requirements of the databases
and characterize the load activity by the metric "execute count" which pretty much drives the trx/s metric
the range of 25K ex/s is a high load OLTP environment 

{{{
set arraysize 5000

COLUMN blocksize NEW_VALUE _blocksize NOPRINT
select distinct block_size blocksize from v$datafile;

COLUMN dbid NEW_VALUE _dbid NOPRINT
select dbid from v$database;

COLUMN name NEW_VALUE _instname NOPRINT
select lower(instance_name) name from v$instance;

COLUMN name NEW_VALUE _hostname NOPRINT
select lower(host_name) name from v$instance;

COLUMN instancenumber NEW_VALUE _instancenumber NOPRINT
select instance_number instancenumber from v$instance;

-- ttitle center 'AWR CPU and IO Workload Report' skip 2
set pagesize 50000
set linesize 550

col instname    format a15              heading instname        -- instname
col hostname    format a30              heading hostname        -- hostname
col tm          format a17              heading tm              -- "tm"
col id          format 99999            heading id              -- "snapid"
col inst        format 90               heading inst            -- "inst"
col dur         format 999990.00        heading dur             -- "dur"
col cpu         format 90               heading cpu             -- "cpu"
col cap         format 9999990.00       heading cap             -- "capacity"
col dbt         format 999990.00        heading dbt             -- "DBTime"
col dbc         format 99990.00         heading dbc             -- "DBcpu"
col bgc         format 99990.00         heading bgc             -- "BGcpu"
col rman        format 9990.00          heading rman            -- "RMANcpu"
col aas         format 990.0            heading aas             -- "AAS"
col totora      format 9999990.00       heading totora          -- "TotalOracleCPU"
col busy        format 9999990.00       heading busy            -- "BusyTime"
col load        format 990.00           heading load            -- "OSLoad"
col totos       format 9999990.00       heading totos           -- "TotalOSCPU"
col mem         format 999990.00        heading mem             -- "PhysicalMemorymb"
col IORs        format 9990.000         heading IORs            -- "IOPsr"
col IOWs        format 9990.000         heading IOWs            -- "IOPsw"
col IORedo      format 9990.000         heading IORedo          -- "IOPsredo"
col IORmbs      format 9990.000         heading IORmbs          -- "IOrmbs"
col IOWmbs      format 9990.000         heading IOWmbs          -- "IOwmbs"
col redosizesec format 9990.000         heading redosizesec     -- "Redombs"
col logons      format 990              heading logons          -- "Sess"
col logone      format 990              heading logone          -- "SessEnd"
col exsraw      format 99990.000        heading exsraw          -- "Execrawdelta"
col exs         format 9990.000         heading exs             -- "Execs"
col ucs         format 9990.000         heading ucs             -- "UserCalls"
col ucoms       format 9990.000         heading ucoms           -- "Commit"
col urs         format 9990.000         heading urs             -- "Rollback"
col lios        format 9999990.00       heading lios            -- "LIOs"
col oracpupct   format 990              heading oracpupct       -- "OracleCPUPct"
col rmancpupct  format 990              heading rmancpupct      -- "RMANCPUPct"
col oscpupct    format 990              heading oscpupct        -- "OSCPUPct"
col oscpuusr    format 990              heading oscpuusr        -- "USRPct"
col oscpusys    format 990              heading oscpusys        -- "SYSPct"
col oscpuio     format 990              heading oscpuio         -- "IOPct"

SELECT * FROM
( 
  SELECT trim('&_instname') instname, 
         trim('&_dbid') db_id, 
         trim('&_hostname') hostname, 
          s0.snap_id id,
         TO_CHAR(s0.END_INTERVAL_TIME,'MM/DD/YY HH24:MI:SS') tm,
         s0.instance_number inst,
  round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2) dur,
  round(s4t1.value/1024/1024/1024,2) AS memgb,
  round(s37t1.value/1024/1024/1024,2) AS sgagb,
  round(s36t1.value/1024/1024/1024,2) AS pgagb,
     s9t0.value logons, 
   ((s10t1.value - s10t0.value)  / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                  + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                  + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                  + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2))*60)
    ) as exs
FROM dba_hist_snapshot s0,
  dba_hist_snapshot s1,
  dba_hist_osstat s4t1,         -- osstat just get the end value 
  (select snap_id, dbid, instance_number, sum(value) value from dba_hist_sga group by snap_id, dbid, instance_number) s37t1, -- total SGA allocated, just get the end value
  dba_hist_pgastat s36t1,		-- total PGA allocated, just get the end value 
  dba_hist_sysstat s9t0,        -- logons current, sysstat absolute value should not be diffed
  dba_hist_sysstat s10t0,       -- execute count, diffed
  dba_hist_sysstat s10t1
WHERE s0.dbid            = &_dbid    -- CHANGE THE DBID HERE!
AND s1.dbid              = s0.dbid
AND s4t1.dbid            = s0.dbid
AND s9t0.dbid            = s0.dbid
AND s10t0.dbid            = s0.dbid
AND s10t1.dbid            = s0.dbid
AND s36t1.dbid            = s0.dbid
AND s37t1.dbid            = s0.dbid
--AND s0.instance_number   = &_instancenumber   -- CHANGE THE INSTANCE_NUMBER HERE!
AND s1.instance_number   = s0.instance_number
AND s4t1.instance_number = s0.instance_number
AND s9t0.instance_number = s0.instance_number
AND s10t0.instance_number = s0.instance_number
AND s10t1.instance_number = s0.instance_number
AND s36t1.instance_number = s0.instance_number
AND s37t1.instance_number = s0.instance_number
AND s1.snap_id           = s0.snap_id + 1
AND s4t1.snap_id         = s0.snap_id + 1
AND s36t1.snap_id        = s0.snap_id + 1
AND s37t1.snap_id        = s0.snap_id + 1
AND s9t0.snap_id         = s0.snap_id
AND s10t0.snap_id         = s0.snap_id
AND s10t1.snap_id         = s0.snap_id + 1
AND s4t1.stat_name       = 'PHYSICAL_MEMORY_BYTES'
AND s36t1.name           = 'total PGA allocated'
AND s9t0.stat_name       = 'logons current'
AND s10t0.stat_name       = 'execute count'
AND s10t1.stat_name       = s10t0.stat_name
)
-- WHERE 
-- tm > to_char(sysdate - 30, 'MM/DD/YY HH24:MI')
-- id  in (select snap_id from (select * from r2toolkit.r2_regression_data union all select * from r2toolkit.r2_outlier_data))
-- id in (336)
-- aas > 1
-- oracpupct > 50
-- oscpupct > 50
-- AND TO_CHAR(s0.END_INTERVAL_TIME,'D') >= 1     -- Day of week: 1=Sunday 7=Saturday
-- AND TO_CHAR(s0.END_INTERVAL_TIME,'D') <= 7
-- AND TO_CHAR(s0.END_INTERVAL_TIME,'HH24MI') >= 0900     -- Hour
-- AND TO_CHAR(s0.END_INTERVAL_TIME,'HH24MI') <= 1800
-- AND s0.END_INTERVAL_TIME >= TO_DATE('2010-jan-17 00:00:00','yyyy-mon-dd hh24:mi:ss')     -- Data range
-- AND s0.END_INTERVAL_TIME <= TO_DATE('2010-aug-22 23:59:59','yyyy-mon-dd hh24:mi:ss')
ORDER BY id ASC;
}}}
{{{
set arraysize 5000

COLUMN dbid NEW_VALUE _dbid NOPRINT
select dbid from v$database;

COLUMN name NEW_VALUE _instname NOPRINT
select lower(instance_name) name from v$instance;

COLUMN name NEW_VALUE _hostname NOPRINT
select lower(host_name) name from v$instance;

COLUMN instancenumber NEW_VALUE _instancenumber NOPRINT
select instance_number instancenumber from v$instance;

-- ttitle center 'AWR Top Events Report' skip 2
set pagesize 50000
set linesize 550

col instname    format a15              
col hostname    format a30              
col snap_id     format 99999            heading snap_id       -- "snapid"   
col tm          format a17              heading tm            -- "tm"       
col inst        format 90               heading inst          -- "inst"     
col dur         format 999990.00        heading dur           -- "dur"      
col event       format a55              heading event         -- "Event"    
col event_rank  format 90               heading event_rank    -- "EventRank"
col waits       format 9999999990.00    heading waits         -- "Waits"    
col time        format 9999999990.00    heading time          -- "Timesec"  
col avgwt       format 99990.00         heading avgwt         -- "Avgwtms"  
col pctdbt      format 9990.0           heading pctdbt        -- "DBTimepct"
col aas         format 990.0            heading aas           -- "Aas"      
col wait_class  format a15              heading wait_class    -- "WaitClass"

spool awr_topevents-tableau-&_instname-&_hostname..csv
select trim('&_instname') instname, trim('&_dbid') db_id, trim('&_hostname') hostname, snap_id, tm, inst, dur, event, event_rank, waits, time, avgwt, pctdbt, aas, wait_class
from 
      (select snap_id, TO_CHAR(tm,'MM/DD/YY HH24:MI:SS') tm, inst, dur, event, waits, time, avgwt, pctdbt, aas, wait_class, 
            DENSE_RANK() OVER (
          PARTITION BY snap_id ORDER BY time DESC) event_rank
      from 
              (
              select * from 
                    (select * from 
                          (select 
                            s0.snap_id snap_id,
                            s0.END_INTERVAL_TIME tm,
                            s0.instance_number inst,
                            round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                    + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                    + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                    + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2) dur,
                            e.event_name event,
                            e.total_waits - nvl(b.total_waits,0)       waits,
                            round ((e.time_waited_micro - nvl(b.time_waited_micro,0))/1000000, 2)  time,     -- THIS IS EVENT (sec)
                            round (decode ((e.total_waits - nvl(b.total_waits, 0)), 0, to_number(NULL), ((e.time_waited_micro - nvl(b.time_waited_micro,0))/1000) / (e.total_waits - nvl(b.total_waits,0))), 2) avgwt,
                            ((round ((e.time_waited_micro - nvl(b.time_waited_micro,0))/1000000, 2)) / NULLIF(((s5t1.value - nvl(s5t0.value,0)) / 1000000),0))*100 as pctdbt,     -- THIS IS EVENT (sec) / DB TIME (sec)
                            (round ((e.time_waited_micro - nvl(b.time_waited_micro,0))/1000000, 2))/60 /  round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                                            + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                                            + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                                            + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2) aas,     -- THIS IS EVENT (min) / SnapDur (min) TO GET THE % DB CPU ON AAS
                            e.wait_class wait_class
                            from 
                                 dba_hist_snapshot s0,
                                 dba_hist_snapshot s1,
                                 dba_hist_system_event b,
                                 dba_hist_system_event e,
                                 dba_hist_sys_time_model s5t0,
                                 dba_hist_sys_time_model s5t1
                            where 
                              s0.dbid                   = &_dbid            -- CHANGE THE DBID HERE!
                              AND s1.dbid               = s0.dbid
                              and b.dbid(+)             = s0.dbid
                              and e.dbid                = s0.dbid
                              AND s5t0.dbid             = s0.dbid
                              AND s5t1.dbid             = s0.dbid
                              --AND s0.instance_number    = &_instancenumber  -- CHANGE THE INSTANCE_NUMBER HERE!
                              AND s1.instance_number    = s0.instance_number
                              and b.instance_number(+)  = s0.instance_number
                              and e.instance_number     = s0.instance_number
                              AND s5t0.instance_number = s0.instance_number
                              AND s5t1.instance_number = s0.instance_number
                              AND s1.snap_id            = s0.snap_id + 1
                              AND b.snap_id(+)          = s0.snap_id
                              and e.snap_id             = s0.snap_id + 1
                              AND s5t0.snap_id         = s0.snap_id
                              AND s5t1.snap_id         = s0.snap_id + 1
                              AND s5t0.stat_name       = 'DB time'
                              AND s5t1.stat_name       = s5t0.stat_name
                                    and b.event_id            = e.event_id
                                    and e.wait_class          != 'Idle'
                                    and e.total_waits         > nvl(b.total_waits,0)
                                    and e.event_name not in ('smon timer', 
                                                             'pmon timer', 
                                                             'dispatcher timer',
                                                             'dispatcher listen timer',
                                                             'rdbms ipc message')
                                  order by snap_id, time desc, waits desc, event)
                    union all
                              select 
                                       s0.snap_id snap_id,
                                       s0.END_INTERVAL_TIME tm,
                                       s0.instance_number inst,
                                       round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                            + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                            + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                            + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2) dur,
                                        'CPU time',
                                        0,
                                        round ((s6t1.value - s6t0.value) / 1000000, 2) as time,     -- THIS IS DB CPU (sec)
                                        0,
                                        ((round ((s6t1.value - s6t0.value) / 1000000, 2)) / NULLIF(((s5t1.value - nvl(s5t0.value,0)) / 1000000),0))*100 as pctdbt,     -- THIS IS DB CPU (sec) / DB TIME (sec)..TO GET % OF DB CPU ON DB TIME FOR TOP 5 TIMED EVENTS SECTION
                                        (round ((s6t1.value - s6t0.value) / 1000000, 2))/60 /  round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                                                    + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                                                    + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                                                    + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2) aas,  -- THIS IS DB CPU (min) / SnapDur (min) TO GET THE % DB CPU ON AAS
                                        'CPU'
                                      from 
                                        dba_hist_snapshot s0,
                                        dba_hist_snapshot s1,
                                        dba_hist_sys_time_model s6t0,
                                        dba_hist_sys_time_model s6t1,
                                        dba_hist_sys_time_model s5t0,
                                        dba_hist_sys_time_model s5t1
                                      WHERE 
                                      s0.dbid                   = &_dbid              -- CHANGE THE DBID HERE!
                                      AND s1.dbid               = s0.dbid
                                      AND s6t0.dbid            = s0.dbid
                                      AND s6t1.dbid            = s0.dbid
                                      AND s5t0.dbid            = s0.dbid
                                      AND s5t1.dbid            = s0.dbid
                                      --AND s0.instance_number    = &_instancenumber    -- CHANGE THE INSTANCE_NUMBER HERE!
                                      AND s1.instance_number    = s0.instance_number
                                      AND s6t0.instance_number = s0.instance_number
                                      AND s6t1.instance_number = s0.instance_number
                                      AND s5t0.instance_number = s0.instance_number
                                      AND s5t1.instance_number = s0.instance_number
                                      AND s1.snap_id            = s0.snap_id + 1
                                      AND s6t0.snap_id         = s0.snap_id
                                      AND s6t1.snap_id         = s0.snap_id + 1
                                      AND s5t0.snap_id         = s0.snap_id
                                      AND s5t1.snap_id         = s0.snap_id + 1
                                      AND s6t0.stat_name       = 'DB CPU'
                                      AND s6t1.stat_name       = s6t0.stat_name
                                      AND s5t0.stat_name       = 'DB time'
                                      AND s5t1.stat_name       = s5t0.stat_name
                    union all
                                      (select 
                                               dbtime.snap_id,
                                               dbtime.tm,
                                               dbtime.inst,
                                               dbtime.dur,
                                               'CPU wait',
                                                0,
                                                round(dbtime.time - accounted_dbtime.time, 2) time,     -- THIS IS UNACCOUNTED FOR DB TIME (sec)
                                                0,
                                                ((dbtime.aas - accounted_dbtime.aas)/ NULLIF(nvl(dbtime.aas,0),0))*100 as pctdbt,     -- THIS IS UNACCOUNTED FOR DB TIME (sec) / DB TIME (sec)
                                                round(dbtime.aas - accounted_dbtime.aas, 2) aas,     -- AAS OF UNACCOUNTED FOR DB TIME
                                                'CPU wait'
                                      from
                                                  (select  
                                                     s0.snap_id, 
                                                     s0.END_INTERVAL_TIME tm,
                                                     s0.instance_number inst,
                                                    round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                                    + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                                    + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                                    + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2) dur,
                                                    'DB time',
                                                    0,
                                                    round ((s5t1.value - s5t0.value) / 1000000, 2) as time,     -- THIS IS DB time (sec)
                                                    0,
                                                    0,
                                                     (round ((s5t1.value - s5t0.value) / 1000000, 2))/60 /  round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                                                                    + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                                                                    + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                                                                    + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2) aas,
                                                    'DB time'
                                                  from 
                                                                    dba_hist_snapshot s0,
                                                                    dba_hist_snapshot s1,
                                                                    dba_hist_sys_time_model s5t0,
                                                                    dba_hist_sys_time_model s5t1
                                                                  WHERE 
                                                                  s0.dbid                   = &_dbid              -- CHANGE THE DBID HERE!
                                                                  AND s1.dbid               = s0.dbid
                                                                  AND s5t0.dbid            = s0.dbid
                                                                  AND s5t1.dbid            = s0.dbid
                                                                  --AND s0.instance_number    = &_instancenumber    -- CHANGE THE INSTANCE_NUMBER HERE!
                                                                  AND s1.instance_number    = s0.instance_number
                                                                  AND s5t0.instance_number = s0.instance_number
                                                                  AND s5t1.instance_number = s0.instance_number
                                                                  AND s1.snap_id            = s0.snap_id + 1
                                                                  AND s5t0.snap_id         = s0.snap_id
                                                                  AND s5t1.snap_id         = s0.snap_id + 1
                                                                  AND s5t0.stat_name       = 'DB time'
                                                                  AND s5t1.stat_name       = s5t0.stat_name) dbtime, 
                                                  (select snap_id, inst, sum(time) time, sum(AAS) aas from 
                                                          (select * from (select 
                                                                s0.snap_id snap_id,
                                                                s0.END_INTERVAL_TIME tm,
                                                                s0.instance_number inst,
                                                                round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                                                        + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                                                        + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                                                        + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2) dur,
                                                                e.event_name event,
                                                                e.total_waits - nvl(b.total_waits,0)       waits,
                                                                round ((e.time_waited_micro - nvl(b.time_waited_micro,0))/1000000, 2)  time,     -- THIS IS EVENT (sec)
                                                                round (decode ((e.total_waits - nvl(b.total_waits, 0)), 0, to_number(NULL), ((e.time_waited_micro - nvl(b.time_waited_micro,0))/1000) / (e.total_waits - nvl(b.total_waits,0))), 2) avgwt,
                                                                ((round ((e.time_waited_micro - nvl(b.time_waited_micro,0))/1000000, 2)) / NULLIF(((s5t1.value - nvl(s5t0.value,0)) / 1000000),0))*100 as pctdbt,     -- THIS IS EVENT (sec) / DB TIME (sec)
                                                                (round ((e.time_waited_micro - nvl(b.time_waited_micro,0))/1000000, 2))/60 /  round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                                                                                + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                                                                                + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                                                                                + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2) aas,     -- THIS IS EVENT (min) / SnapDur (min) TO GET THE % DB CPU ON AAS
                                                                e.wait_class wait_class
                                                          from 
                                                               dba_hist_snapshot s0,
                                                               dba_hist_snapshot s1,
                                                               dba_hist_system_event b,
                                                               dba_hist_system_event e,
                                                               dba_hist_sys_time_model s5t0,
                                                               dba_hist_sys_time_model s5t1
                                                          where 
                                                            s0.dbid                   = &_dbid            -- CHANGE THE DBID HERE!
                                                            AND s1.dbid               = s0.dbid
                                                            and b.dbid(+)             = s0.dbid
                                                            and e.dbid                = s0.dbid
                                                            AND s5t0.dbid             = s0.dbid
                                                            AND s5t1.dbid             = s0.dbid
                                                            --AND s0.instance_number    = &_instancenumber  -- CHANGE THE INSTANCE_NUMBER HERE!
                                                            AND s1.instance_number    = s0.instance_number
                                                            and b.instance_number(+)  = s0.instance_number
                                                            and e.instance_number     = s0.instance_number
                                                            AND s5t0.instance_number = s0.instance_number
                                                            AND s5t1.instance_number = s0.instance_number
                                                            AND s1.snap_id            = s0.snap_id + 1
                                                            AND b.snap_id(+)          = s0.snap_id
                                                            and e.snap_id             = s0.snap_id + 1
                                                            AND s5t0.snap_id         = s0.snap_id
                                                            AND s5t1.snap_id         = s0.snap_id + 1
                                                      AND s5t0.stat_name       = 'DB time'
                                                      AND s5t1.stat_name       = s5t0.stat_name
                                                            and b.event_id            = e.event_id
                                                            and e.wait_class          != 'Idle'
                                                            and e.total_waits         > nvl(b.total_waits,0)
                                                            and e.event_name not in ('smon timer', 
                                                                                     'pmon timer', 
                                                                                     'dispatcher timer',
                                                                                     'dispatcher listen timer',
                                                                                     'rdbms ipc message')
                                                          order by snap_id, time desc, waits desc, event)
                                                    union all
                                                          select 
                                                                   s0.snap_id snap_id,
                                                                   s0.END_INTERVAL_TIME tm,
                                                                   s0.instance_number inst,
                                                                   round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                                                        + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                                                        + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                                                        + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2) dur,
                                                                    'CPU time',
                                                                    0,
                                                                    round ((s6t1.value - s6t0.value) / 1000000, 2) as time,     -- THIS IS DB CPU (sec)
                                                                    0,
                                                                    ((round ((s6t1.value - s6t0.value) / 1000000, 2)) / NULLIF(((s5t1.value - nvl(s5t0.value,0)) / 1000000),0))*100 as pctdbt,     -- THIS IS DB CPU (sec) / DB TIME (sec)..TO GET % OF DB CPU ON DB TIME FOR TOP 5 TIMED EVENTS SECTION
                                                                    (round ((s6t1.value - s6t0.value) / 1000000, 2))/60 /  round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                                                                                + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                                                                                + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                                                                                + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2) aas,  -- THIS IS DB CPU (min) / SnapDur (min) TO GET THE % DB CPU ON AAS
                                                                    'CPU'
                                                                  from 
                                                                    dba_hist_snapshot s0,
                                                                    dba_hist_snapshot s1,
                                                                    dba_hist_sys_time_model s6t0,
                                                                    dba_hist_sys_time_model s6t1,
                                                                    dba_hist_sys_time_model s5t0,
                                                                    dba_hist_sys_time_model s5t1
                                                                  WHERE 
                                                                  s0.dbid                   = &_dbid              -- CHANGE THE DBID HERE!
                                                                  AND s1.dbid               = s0.dbid
                                                                  AND s6t0.dbid            = s0.dbid
                                                                  AND s6t1.dbid            = s0.dbid
                                                                  AND s5t0.dbid            = s0.dbid
                                                                  AND s5t1.dbid            = s0.dbid
                                                                  --AND s0.instance_number    = &_instancenumber    -- CHANGE THE INSTANCE_NUMBER HERE!
                                                                  AND s1.instance_number    = s0.instance_number
                                                                  AND s6t0.instance_number = s0.instance_number
                                                                  AND s6t1.instance_number = s0.instance_number
                                                                  AND s5t0.instance_number = s0.instance_number
                                                                  AND s5t1.instance_number = s0.instance_number
                                                                  AND s1.snap_id            = s0.snap_id + 1
                                                                  AND s6t0.snap_id         = s0.snap_id
                                                                  AND s6t1.snap_id         = s0.snap_id + 1
                                                                  AND s5t0.snap_id         = s0.snap_id
                                                                  AND s5t1.snap_id         = s0.snap_id + 1
                                                                  AND s6t0.stat_name       = 'DB CPU'
                                                                  AND s6t1.stat_name       = s6t0.stat_name
                                                                  AND s5t0.stat_name       = 'DB time'
                                                                  AND s5t1.stat_name       = s5t0.stat_name
                                                          ) group by snap_id, inst) accounted_dbtime
                                                            where dbtime.snap_id = accounted_dbtime.snap_id 
                                                            and dbtime.inst = accounted_dbtime.inst 
                                        )
                    )
              )
      )
WHERE event_rank <= 5
-- AND tm > to_char(sysdate - 30, 'MM/DD/YY HH24:MI')
-- AND TO_CHAR(tm,'D') >= 1     -- Day of week: 1=Sunday 7=Saturday
-- AND TO_CHAR(tm,'D') <= 7
-- AND TO_CHAR(tm,'HH24MI') >= 0900     -- Hour
-- AND TO_CHAR(tm,'HH24MI') <= 1800
-- AND tm >= TO_DATE('2010-jan-17 00:00:00','yyyy-mon-dd hh24:mi:ss')     -- Data range
-- AND tm <= TO_DATE('2010-aug-22 23:59:59','yyyy-mon-dd hh24:mi:ss')
-- and snap_id = 495
-- and snap_id >= 495 and snap_id <= 496
-- and event = 'db file sequential read'
-- and event like 'CPU%'
-- and avgwt > 5
-- and aas > .5
-- and wait_class = 'CPU'
-- and wait_class like '%I/O%'
-- and event_rank in (1,2,3)
ORDER BY snap_id;
}}}
{{{

set arraysize 5000

COLUMN dbid NEW_VALUE _dbid NOPRINT
select dbid from v$database;

COLUMN name NEW_VALUE _instname NOPRINT
select lower(instance_name) name from v$instance;

COLUMN name NEW_VALUE _hostname NOPRINT
select lower(host_name) name from v$instance;

COLUMN instancenumber NEW_VALUE _instancenumber NOPRINT
select instance_number instancenumber from v$instance;

-- ttitle center 'AWR Top Segments' skip 2
set pagesize 50000
set linesize 550


SELECT  
  trim('&_instname') instname, 
  trim('&_dbid') db_id, 
  trim('&_hostname') hostname, 
  snap_id, tm, inst, 
  owner, 
  tablespace_name, 
  dataobj#, 
  object_name, 
  subobject_name, 
  object_type, 
  physical_rw,
  LOGICAL_READS_DELTA,             
  BUFFER_BUSY_WAITS_DELTA,         
  DB_BLOCK_CHANGES_DELTA,          
  PHYSICAL_READS_DELTA,            
  PHYSICAL_WRITES_DELTA,           
  PHYSICAL_READS_DIRECT_DELTA,     
  PHYSICAL_WRITES_DIRECT_DELTA,    
  ITL_WAITS_DELTA,                 
  ROW_LOCK_WAITS_DELTA,            
  GC_CR_BLOCKS_SERVED_DELTA,       
  GC_CU_BLOCKS_SERVED_DELTA,       
  GC_BUFFER_BUSY_DELTA,            
  GC_CR_BLOCKS_RECEIVED_DELTA,     
  GC_CU_BLOCKS_RECEIVED_DELTA,     
  SPACE_USED_DELTA,                
  SPACE_ALLOCATED_DELTA,           
  TABLE_SCANS_DELTA,               
  CHAIN_ROW_EXCESS_DELTA,          
  PHYSICAL_READ_REQUESTS_DELTA,    
  PHYSICAL_WRITE_REQUESTS_DELTA,   
  OPTIMIZED_PHYSICAL_READS_DELTA,
  seg_rank
FROM 
    ( 
        SELECT 
          r.snap_id, 
          TO_CHAR(r.tm,'MM/DD/YY HH24:MI:SS') tm, 
          r.inst, 
          n.owner, 
          n.tablespace_name, 
          n.dataobj#, 
          n.object_name, 
          CASE 
            WHEN LENGTH(n.subobject_name) < 11 
            THEN n.subobject_name 
            ELSE SUBSTR(n.subobject_name,LENGTH(n.subobject_name)-9) 
          END subobject_name, 
          n.object_type, 
          (r.PHYSICAL_READS_DELTA + r.PHYSICAL_WRITES_DELTA) as physical_rw,
          r.LOGICAL_READS_DELTA,             
          r.BUFFER_BUSY_WAITS_DELTA,         
          r.DB_BLOCK_CHANGES_DELTA,          
          r.PHYSICAL_READS_DELTA,            
          r.PHYSICAL_WRITES_DELTA,           
          r.PHYSICAL_READS_DIRECT_DELTA,     
          r.PHYSICAL_WRITES_DIRECT_DELTA,    
          r.ITL_WAITS_DELTA,                 
          r.ROW_LOCK_WAITS_DELTA,            
          r.GC_CR_BLOCKS_SERVED_DELTA,       
          r.GC_CU_BLOCKS_SERVED_DELTA,       
          r.GC_BUFFER_BUSY_DELTA,            
          r.GC_CR_BLOCKS_RECEIVED_DELTA,     
          r.GC_CU_BLOCKS_RECEIVED_DELTA,     
          r.SPACE_USED_DELTA,                
          r.SPACE_ALLOCATED_DELTA,           
          r.TABLE_SCANS_DELTA,               
          r.CHAIN_ROW_EXCESS_DELTA,          
          r.PHYSICAL_READ_REQUESTS_DELTA,    
          r.PHYSICAL_WRITE_REQUESTS_DELTA,   
          r.OPTIMIZED_PHYSICAL_READS_DELTA,
          DENSE_RANK() OVER (PARTITION BY r.snap_id ORDER BY r.PHYSICAL_READS_DELTA + r.PHYSICAL_WRITES_DELTA DESC) seg_rank
        FROM  
              dba_hist_seg_stat_obj n, 
              ( 
                SELECT  
                  s0.snap_id snap_id, 
                  s0.END_INTERVAL_TIME tm, 
                  s0.instance_number inst, 
                  b.dataobj#, 
                  b.obj#, 
                  b.dbid,                 
                  sum(b.LOGICAL_READS_DELTA) LOGICAL_READS_DELTA,            
                  sum(b.BUFFER_BUSY_WAITS_DELTA) BUFFER_BUSY_WAITS_DELTA,        
                  sum(b.DB_BLOCK_CHANGES_DELTA) DB_BLOCK_CHANGES_DELTA,         
                  sum(b.PHYSICAL_READS_DELTA) PHYSICAL_READS_DELTA,           
                  sum(b.PHYSICAL_WRITES_DELTA) PHYSICAL_WRITES_DELTA,         
                  sum(b.PHYSICAL_READS_DIRECT_DELTA) PHYSICAL_READS_DIRECT_DELTA,    
                  sum(b.PHYSICAL_WRITES_DIRECT_DELTA) PHYSICAL_WRITES_DIRECT_DELTA,  
                  sum(b.ITL_WAITS_DELTA) ITL_WAITS_DELTA,               
                  sum(b.ROW_LOCK_WAITS_DELTA) ROW_LOCK_WAITS_DELTA,           
                  sum(b.GC_CR_BLOCKS_SERVED_DELTA) GC_CR_BLOCKS_SERVED_DELTA,      
                  sum(b.GC_CU_BLOCKS_SERVED_DELTA) GC_CU_BLOCKS_SERVED_DELTA,     
                  sum(b.GC_BUFFER_BUSY_DELTA) GC_BUFFER_BUSY_DELTA,           
                  sum(b.GC_CR_BLOCKS_RECEIVED_DELTA) GC_CR_BLOCKS_RECEIVED_DELTA,    
                  sum(b.GC_CU_BLOCKS_RECEIVED_DELTA) GC_CU_BLOCKS_RECEIVED_DELTA,    
                  sum(b.SPACE_USED_DELTA) SPACE_USED_DELTA,              
                  sum(b.SPACE_ALLOCATED_DELTA) SPACE_ALLOCATED_DELTA,         
                  sum(b.TABLE_SCANS_DELTA) TABLE_SCANS_DELTA,              
                  sum(b.CHAIN_ROW_EXCESS_DELTA) CHAIN_ROW_EXCESS_DELTA,         
                  sum(b.PHYSICAL_READ_REQUESTS_DELTA) PHYSICAL_READ_REQUESTS_DELTA,   
                  sum(b.PHYSICAL_WRITE_REQUESTS_DELTA) PHYSICAL_WRITE_REQUESTS_DELTA,  
                  sum(b.OPTIMIZED_PHYSICAL_READS_DELTA) OPTIMIZED_PHYSICAL_READS_DELTA
                FROM  
                    dba_hist_snapshot s0, 
                    dba_hist_snapshot s1, 
                    dba_hist_seg_stat b 
                WHERE  
                    s0.dbid                  = &_dbid     
                    AND s1.dbid              = s0.dbid 
                    AND b.dbid               = s0.dbid 
                    --AND s0.instance_number   = &_instancenumber   
                    AND s1.instance_number   = s0.instance_number 
                    AND b.instance_number    = s0.instance_number 
                    AND s1.snap_id           = s0.snap_id + 1 
                    AND b.snap_id            = s0.snap_id + 1 
                    --AND s0.snap_id = 35547 
                GROUP BY  
                  s0.snap_id, s0.END_INTERVAL_TIME, s0.instance_number, b.dataobj#, b.obj#, b.dbid 
              ) r 
        WHERE n.dataobj#     = r.dataobj# 
        AND n.obj#           = r.obj# 
        AND n.dbid           = r.dbid 
        AND r.PHYSICAL_READS_DELTA + r.PHYSICAL_WRITES_DELTA > 0 
        ORDER BY physical_rw DESC, 
          object_name, 
          owner, 
          subobject_name 
    ) 
WHERE 
seg_rank <=10
--and snap_id in (35547,35548,35549)
order by inst, snap_id, seg_rank asc;

}}}


''References:''
SPACE_ALLOCATED_DELTA http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:7867887875624

This script is very handy for characterizing the resource hogging SQLs, once the data is pulled from tableau it's very easy to sort stuff and you'll be done in a couple of minutes.. 
<<<
''Per instance''	
	 top elap / exec
	 top disk reads
	 top buffer gets
	 top executes
	 top app wait
	 top concurrency wait
	 top cluster wait
	
''Per App Module (parsing schema)''

''or by other dimensions (inst, sql_id, module)''
<<<

{{{
set arraysize 5000

COLUMN blocksize NEW_VALUE _blocksize NOPRINT
select distinct block_size blocksize from v$datafile;

COLUMN dbid NEW_VALUE _dbid NOPRINT
select dbid from v$database;

COLUMN name NEW_VALUE _instname NOPRINT
select lower(instance_name) name from v$instance;

COLUMN name NEW_VALUE _hostname NOPRINT
select lower(host_name) name from v$instance;

COLUMN instancenumber NEW_VALUE _instancenumber NOPRINT
select instance_number instancenumber from v$instance;

-- ttitle center 'AWR Top SQL Report' skip 2
set pagesize 50000
set linesize 550

col snap_id             format 99999            heading -- "Snap|ID"
col tm                  format a15              heading -- "Snap|Start|Time"
col inst                format 90               heading -- "i|n|s|t|#"
col dur                 format 990.00           heading -- "Snap|Dur|(m)"
col sql_id              format a15              heading -- "SQL|ID"
col phv                 format 99999999999      heading -- "Plan|Hash|Value"
col module              format a50
col elap                format 999990.00        heading -- "Ela|Time|(s)"
col elapexec            format 999990.00        heading -- "Ela|Time|per|exec|(s)"
col cput                format 999990.00        heading -- "CPU|Time|(s)"
col iowait              format 999990.00        heading -- "IO|Wait|(s)"
col appwait             format 999990.00        heading -- "App|Wait|(s)"
col concurwait          format 999990.00        heading -- "Ccr|Wait|(s)"
col clwait              format 999990.00        heading -- "Cluster|Wait|(s)"
col bget                format 99999999990      heading -- "LIO"
col dskr                format 99999999990      heading -- "PIO"
col dpath               format 99999999990      heading -- "Direct|Writes"
col rowp                format 99999999990      heading -- "Rows"
col exec                format 9999990          heading -- "Exec"
col prsc                format 999999990        heading -- "Parse|Count"
col pxexec              format 9999990          heading -- "PX|Server|Exec"
col icbytes             format 99999990         heading -- "IC|MB"           
col offloadbytes        format 99999990         heading -- "Offload|MB"
col offloadreturnbytes  format 99999990         heading -- "Offload|return|MB"
col flashcachereads     format 99999990         heading -- "Flash|Cache|MB"   
col uncompbytes         format 99999990         heading -- "Uncomp|MB"       
col pctdbt              format 990              heading -- "DB Time|%"
col aas                 format 990.00           heading -- "A|A|S"
col time_rank           format 90               heading -- "Time|Rank"
col sql_text            format a6               heading -- "SQL|Text"

     select *
       from (
             select
                  trim('&_instname') instname, 
                  trim('&_dbid') db_id, 
                  trim('&_hostname') hostname, 
                  sqt.snap_id snap_id,
                  TO_CHAR(sqt.tm,'MM/DD/YY HH24:MI:SS') tm,
                  sqt.inst inst,
                  sqt.dur dur,
                  sqt.aas aas,
                  nvl((sqt.elap), to_number(null)) elap,
                  nvl((sqt.elapexec), 0) elapexec,
                  nvl((sqt.cput), to_number(null)) cput,
                  sqt.iowait iowait,
                  sqt.appwait appwait,
                  sqt.concurwait concurwait,
                  sqt.clwait clwait,
                  sqt.bget bget, 
                  sqt.dskr dskr, 
                  sqt.dpath dpath,
                  sqt.rowp rowp,
                  sqt.exec exec, 
                  sqt.prsc prsc, 
                  sqt.pxexec pxexec,
                  sqt.icbytes, 
                  sqt.offloadbytes, 
                  sqt.offloadreturnbytes, 
                  sqt.flashcachereads, 
                  sqt.uncompbytes,
                  sqt.time_rank time_rank,
                  sqt.sql_id sql_id,   
                  sqt.phv phv,     
                  sqt.parse_schema parse_schema,
                  substr(to_clob(decode(sqt.module, null, null, sqt.module)),1,50) module, 
                  st.sql_text sql_text     -- PUT/REMOVE COMMENT TO HIDE/SHOW THE SQL_TEXT
             from        (
                          select snap_id, tm, inst, dur, sql_id, phv, parse_schema, module, elap, elapexec, cput, iowait, appwait, concurwait, clwait, bget, dskr, dpath, rowp, exec, prsc, pxexec, icbytes, offloadbytes, offloadreturnbytes, flashcachereads, uncompbytes, aas, time_rank
                          from
                                             (
                                               select 
                                                      s0.snap_id snap_id,
                                                      s0.END_INTERVAL_TIME tm,
                                                      s0.instance_number inst,
                                                      round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                                              + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                                              + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                                              + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2) dur,
                                                      e.sql_id sql_id, 
                                                      e.plan_hash_value phv, 
                                                      e.parsing_schema_name parse_schema,
                                                      max(e.module) module,
                                                      sum(e.elapsed_time_delta)/1000000 elap,
                                                      decode((sum(e.executions_delta)), 0, to_number(null), ((sum(e.elapsed_time_delta)) / (sum(e.executions_delta)) / 1000000)) elapexec,
                                                      sum(e.cpu_time_delta)/1000000     cput, 
                                                      sum(e.iowait_delta)/1000000 iowait,
                                                      sum(e.apwait_delta)/1000000 appwait,
                                                      sum(e.ccwait_delta)/1000000 concurwait,
                                                      sum(e.clwait_delta)/1000000 clwait,
                                                      sum(e.buffer_gets_delta) bget,
                                                      sum(e.disk_reads_delta) dskr, 
                                                      sum(e.direct_writes_delta) dpath,
                                                      sum(e.rows_processed_delta) rowp,
                                                      sum(e.executions_delta)   exec,
                                                      sum(e.parse_calls_delta) prsc,
                                                      sum(e.px_servers_execs_delta) pxexec,
                                                      sum(e.io_interconnect_bytes_delta)/1024/1024 icbytes,  
                                                      sum(e.io_offload_elig_bytes_delta)/1024/1024 offloadbytes,  
                                                      sum(e.io_offload_return_bytes_delta)/1024/1024 offloadreturnbytes,   
                                                      (sum(e.optimized_physical_reads_delta)* &_blocksize)/1024/1024 flashcachereads,   
                                                      sum(e.cell_uncompressed_bytes_delta)/1024/1024 uncompbytes, 
                                                      (sum(e.elapsed_time_delta)/1000000) / ((round(EXTRACT(DAY FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 1440 
                                                                                            + EXTRACT(HOUR FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) * 60 
                                                                                            + EXTRACT(MINUTE FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) 
                                                                                            + EXTRACT(SECOND FROM s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME) / 60, 2))*60) aas,
                                                      DENSE_RANK() OVER (
                                                      PARTITION BY s0.snap_id ORDER BY e.elapsed_time_delta DESC) time_rank
                                               from 
                                                   dba_hist_snapshot s0,
                                                   dba_hist_snapshot s1,
                                                   dba_hist_sqlstat e
                                                   where 
                                                    s0.dbid                   = &_dbid                -- CHANGE THE DBID HERE!
                                                    AND s1.dbid               = s0.dbid
                                                    and e.dbid                = s0.dbid                                                
                                                    --AND s0.instance_number    = &_instancenumber      -- CHANGE THE INSTANCE_NUMBER HERE!
                                                    AND s1.instance_number    = s0.instance_number
                                                    and e.instance_number     = s0.instance_number                                                 
                                                    AND s1.snap_id            = s0.snap_id + 1
                                                    and e.snap_id             = s0.snap_id + 1                                              
                                               group by 
                                                    s0.snap_id, s0.END_INTERVAL_TIME, s0.instance_number, e.sql_id, e.plan_hash_value, e.parsing_schema_name, e.elapsed_time_delta, s1.END_INTERVAL_TIME - s0.END_INTERVAL_TIME
                                             )
                          where 
                          time_rank <= 5                                     -- GET TOP 5 SQL ACROSS SNAP_IDs... YOU CAN ALTER THIS TO HAVE MORE DATA POINTS
                         ) 
                        sqt,
                        (select sql_id, dbid, nvl(b.name, a.command_type) sql_text from dba_hist_sqltext a, audit_actions b where a.command_type =  b.action(+)) st
             where st.sql_id(+)             = sqt.sql_id
             and st.dbid(+)                 = &_dbid
-- AND TO_CHAR(tm,'D') >= 1                                                  -- Day of week: 1=Sunday 7=Saturday
-- AND TO_CHAR(tm,'D') <= 7
-- AND TO_CHAR(tm,'HH24MI') >= 0900                                          -- Hour
-- AND TO_CHAR(tm,'HH24MI') <= 1800
-- AND tm >= TO_DATE('2010-jan-17 00:00:00','yyyy-mon-dd hh24:mi:ss')     -- Data range
-- AND tm <= TO_DATE('2010-aug-22 23:59:59','yyyy-mon-dd hh24:mi:ss')
-- AND snap_id in (338,339)
-- AND snap_id = 338
-- AND snap_id >= 335 and snap_id <= 339
-- AND lower(st.sql_text) like 'select%'
-- AND lower(st.sql_text) like 'insert%'
-- AND lower(st.sql_text) like 'update%'
-- AND lower(st.sql_text) like 'merge%'
-- AND pxexec > 0
-- AND aas > .5
             order by 
             snap_id                             -- TO GET SQL OUTPUT ACROSS SNAP_IDs SEQUENTIALLY AND ASC
             -- nvl(sqt.elap, -1) desc, sqt.sql_id     -- TO GET SQL OUTPUT BY ELAPSED TIME
             )
-- where rownum <= 20
;
}}}
Sample storage forecast here https://www.evernote.com/shard/s48/sh/9594b0d9-cf51-4bea-b0e1-ce68915c0357/a7626bde5789e0964b25d79bbcf1f6ca

Use the first two SQLs below and extract each of them in a CSV file as input to Tableau, the "per day" is the monthly high level number and the "per snap_id" would be the detail
{{{

-- per day
  SELECT a.month,
    used_size_mb ,
    used_size_mb - LAG (used_size_mb,1) OVER (PARTITION BY a.name ORDER BY a.name,a.month) inc_used_size_mb
  FROM
    (SELECT TO_CHAR(sp.begin_interval_time,'MM/DD/YY') month ,
      ts.name ,
      MAX(ROUND((tsu.tablespace_usedsize* dt.block_size )/(1024*1024),2)) used_size_mb
    FROM DBA_HIST_TBSPC_SPACE_USAGE tsu,
      v$tablespace ts ,
      DBA_HIST_SNAPSHOT sp,
      DBA_TABLESPACES dt
    WHERE tsu.tablespace_id    = ts.ts#
    AND tsu.snap_id            = sp.snap_id
    AND ts.name              = dt.tablespace_name
    GROUP BY TO_CHAR(sp.begin_interval_time,'MM/DD/YY'),
      ts.name
    ORDER BY 
      month
    ) A;

-- detail per snap_id
select *  from 
(
SELECT 
  s0.snap_id id,
  TO_CHAR(s0.END_INTERVAL_TIME,'MM/DD/YY HH24:MI:SS') tm,
  ts.ts#, 
  ts.name ,
  MAX(ROUND((tsu0.tablespace_maxsize    * dt.block_size )/(1024*1024),2) ) max_size_MB ,
  MAX(ROUND((tsu0.tablespace_size       * dt.block_size )/(1024*1024),2) ) cur_size_MB ,
  MAX(ROUND((tsu0.tablespace_usedsize   * dt.block_size )/(1024*1024),2)) used_size_MB,
  MAX(ROUND(( (tsu1.tablespace_usedsize - tsu0.tablespace_usedsize)  * dt.block_size )/(1024*1024),2)) diff_used_size_MB
FROM 
  dba_hist_snapshot s0,
  dba_hist_snapshot s1,
  DBA_HIST_TBSPC_SPACE_USAGE tsu0,
  DBA_HIST_TBSPC_SPACE_USAGE tsu1,
  v$tablespace ts,
  DBA_TABLESPACES dt
WHERE s1.snap_id        = s0.snap_id + 1
AND tsu0.snap_id        = s0.snap_id
AND tsu1.snap_id        = s0.snap_id + 1
AND tsu0.tablespace_id   = ts.ts#
AND tsu1.tablespace_id   = ts.ts#
AND ts.name             = dt.tablespace_name
GROUP BY s0.snap_id, TO_CHAR(s0.END_INTERVAL_TIME,'MM/DD/YY HH24:MI:SS'), ts.ts#, ts.name
)
--where 
--tm > to_char(sysdate - 7, 'MM/DD/YY HH24:MI')
--and name = 'SYSAUX'
--and id in (224,225,226)
--and id = 225
ORDER BY id asc;



-- without dba_hist_snapshot
SELECT 
  sp.snap_id, 
  TO_CHAR (sp.begin_interval_time,'DD-MM-YYYY') days ,
  ts.name ,
  MAX(ROUND((tsu.tablespace_maxsize    * dt.block_size )/(1024*1024),2) ) max_size_MB ,
  MAX(ROUND((tsu.tablespace_size       * dt.block_size )/(1024*1024),2) ) cur_size_MB ,
  MAX(ROUND((tsu.tablespace_usedsize   * dt.block_size )/(1024*1024),2)) used_size_MB
FROM 
  DBA_HIST_TBSPC_SPACE_USAGE tsu,
  v$tablespace ts,
  DBA_HIST_SNAPSHOT sp,
  DBA_TABLESPACES dt
WHERE tsu.tablespace_id = ts.ts#
AND tsu.snap_id         = sp.snap_id
AND ts.name             = dt.tablespace_name
--and sp.snap_id = 225
GROUP BY sp.snap_id, TO_CHAR (sp.begin_interval_time,'DD-MM-YYYY'), ts.name
ORDER BY ts.name,
  days;


}}}
http://timurakhmadeev.wordpress.com/2012/02/15/ruoug-in-saint-petersburg/
http://iusoltsev.wordpress.com/2012/02/12/awr-snapshot-suspend-oracle-11g/

http://arjudba.blogspot.com/2010/08/ora-13516-awr-operation-failed-swrf.html
Mythbusters: AWR retention days and SYSAUX tablespace usage on it?
http://goo.gl/jTjsk

{{{
-- TO VIEW RETENTION INFORMATION
select * from dba_hist_wr_control;
set lines 300
select b.name, a.DBID,
   ((TRUNC(SYSDATE) + a.SNAP_INTERVAL - TRUNC(SYSDATE)) * 86400)/60 AS SNAP_INTERVAL_MINS,
   ((TRUNC(SYSDATE) + a.RETENTION - TRUNC(SYSDATE)) * 86400)/60 AS RETENTION_MINS,
   ((TRUNC(SYSDATE) + a.RETENTION - TRUNC(SYSDATE)) * 86400)/60/60/24 AS RETENTION_DAYS,
   TOPNSQL
from dba_hist_wr_control a, v$database b
where a.dbid = b.dbid;

/*
-- SET RETENTION PEROID TO 31 DAYS (UNIT IS MINUTES)
execute dbms_workload_repository.modify_snapshot_settings (interval => 30, retention => 43200);
-- SET RETENTION PEROID TO 365 DAYS (UNIT IS MINUTES)
exec dbms_workload_repository.modify_snapshot_settings (interval => 30, retention => 525600);

}}}

AWR snap difference (15mins and 60mins) effect on CPU sizing
''Consolidate 4 instances with different snap intervals - link'' http://www.evernote.com/shard/s48/sh/b7147378-ebb4-4eec-afb5-61222259ce2d/f94d5d98afea81c3ab10af8016775048
Master Note on AWR Warehouse (Doc ID 1907335.1)

Oracle® Database 2 Day + Performance Tuning Guide 12c Release 1 (12.1)
http://docs.oracle.com/database/121/TDPPT/tdppt_awr_warehouse.htm#TDPPT145

Analyze Long-term Performance Across Enterprise Databases Using AWR Warehouse
https://apex.oracle.com/pls/apex/f?p=44785:24:0::NO:24:P24_CONTENT_ID,P24_PREV_PAGE:9887,29

blogs about it 
http://www.dbi-services.com/index.php/blog/entry/oracle-oem-cloud-control-12104-awr-warehouse
http://dbakevlar.com/2014/07/awr-warehouse-status/


! the workflow
''source''
when awr warehouse is deployed on a target.. it deploys jobs, and this is an agent push only
source exports the awr dump as a job on the local filesystem, this doesn't have to be the same directory path as the warehouse
if you have a 12 month retention, it will not do it all at once, it does the export per 2GB every 3hours
it first exports the oldest snap_id 

''oms''
oms does an agent to agent talk when source is transferring the dump file and then puts on the "warehouse stage directory"
oms agent checks the directory every 5 mins and if there's a new file that file gets imported to the warehouse

''warehouse''
warehouse has this ETL job and databases are partitioned per DBID 
there's a mapping table to map the database to DBID
ideally if you want to put other data on the warehouse put it on another schema and views as well, because a warehouse upgrade or patch may wipe them out
as long as you have a diag pack license on the source, you are good with the warehouse license, this is pretty much like the licensing scheme of OMS


<<<
Karl Arao
kellyn, question on awr warehouse, so it is recommended to be on a separate database. and on that separate database it requires a separate diag pack license?
so let's say you have a diag and tuning pack on the source... and then you've got to have diag pack on the target awr warehouse?
thanks!
Kellyn Pot'vin
11:09am
Kellyn Pot'vin
No,  you're diag pack from source db grants the limited ee license for the awrw
Does that make sense?
Karl Arao
11:09am
Karl Arao
i see
essentially it's free
because source would have diag and tuning pack anyway
Kellyn Pot'vin
11:10am
Kellyn Pot'vin
It took them while to come up with that,  but same for em12c omr
Now, if you add anything, rac or data guard,  then you have to license that
Karl Arao
11:11am
Karl Arao
yeap which is also the case on omr
Kellyn Pot'vin
11:12am
Kellyn Pot'vin
Exactly
Karl Arao
11:12am
Karl Arao
now, can we add anymore tables on the awr warehouse
let's say i want that to be my longer retention data for my metric extension as well
Kellyn Pot'vin
11:13am
Kellyn Pot'vin
Yes, but no additional partitioning and it may impact patches/upgrades
Karl Arao
11:13am
Karl Arao
sure
Kellyn Pot'vin
11:14am
Kellyn Pot'vin
I wouldn't do triggers or partitions
Views are cool
Karl Arao
11:16am
Karl Arao
we are going to evaluate this soon, just upgraded to r4
Kellyn Pot'vin
11:16am
Kellyn Pot'vin
Otn will post a new article of advance awr usage next week from me
Karl Arao
11:16am
Karl Arao
another question,
on my source i have 12months of data
Kellyn Pot'vin
11:17am
Kellyn Pot'vin
And know exadata team is asking how to incorporate it as part of healthcheck design
Karl Arao
11:17am
Karl Arao
will it ETL that to the warehouse
like 1 shot
Kellyn Pot'vin
11:17am
Kellyn Pot'vin
That is my focus in dev right now
Karl Arao
11:17am
Karl Arao
that's going to be 160GB of data
and with exp warehouse
there's going to be an impact for sure
Kellyn Pot'vin
11:18am
Kellyn Pot'vin
No, it has throttle and will take 2gb file loads in 3hr intervals, oldest snapshots first
Karl Arao
11:18am
Karl Arao
I'm just curious on the etl
what do you mean 3hours intervals ?
2GB to finish in 3hours
Kellyn Pot'vin
11:19am
Kellyn Pot'vin
Tgen go back to 24 hr interval auto after any catchup, same on downtime catchup
<<<



Mmm.. It's a long story, just check out this blog post..  http://karlarao.wordpress.com/2010/04/10/my-personal-wiki-karlarao-tiddlyspot-com/   :)

Also check out my Google profile here https://plus.google.com/102472804060828276067/about to know more about my web/social media presence

http://www.ardentperf.com/2011/08/19/developer-access-to-10046-trace-files/
http://dioncho.wordpress.com/2009/03/19/another-way-to-use-trace-file/
http://kb.acronis.com/content/2788
http://kb.acronis.com/search/apachesolr_search/true%20image%202012%20slow%20backup?filters=%20type%3Aarticle
http://forum.acronis.com/forum/5399
http://kb.acronis.com/content/2293


''Amanda'' http://www.amanda.org/   <-- but this requires a client agent
http://gjilevski.wordpress.com/2010/03/14/creating-oracle-11g-active-standby-database-from-physical-standby-database/


''Read only and vice versa''
http://www.adp-gmbh.ch/ora/data_guard/standby_read_only.html
http://juliandyke.wordpress.com/2010/10/14/oracle-11gr2-active-data-guard/
http://www.oracle-base.com/articles/11g/data-guard-setup-11gr2.php#read_only_active_data_guard


! to be in Active DG, remove "read only" step for normal managed recovery
{{{
startup mount
alter database open read only;
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE disconnect;
}}}





http://kerryosborne.oracle-guy.com/papers/12c_Adaptive_Optimization.pdf
http://www.oracle-base.com/articles/11g/AwrBaselineEnhancements_11gR1.php <-- a good HOWTO
http://neerajbhatia.files.wordpress.com/2010/10/adaptive-thresholds.pdf
http://oracledoug.com/serendipity/index.php?/archives/1496-Adaptive-Thresholds-in-10g-Part-1-Metric-Baselines.html
http://oracledoug.com/serendipity/index.php?/archives/1497-Adaptive-Thresholds-in-10g-Part-2-Time-Grouping.html
http://oracledoug.com/serendipity/index.php?/archives/1498-Adaptive-Thresholds-in-10g-Part-3-Setting-Thresholds.html
http://oracledoug.com/metric_baselines_10g.pdf  <-- ''GOOD STUFF''
http://oracledoug.com/adaptive_thresholds_faq.pdf <-- ''GOOD STUFF''
http://www.cmg.org/conference/cmg2007/awards/7122.pdf
http://optimaldba.com/papers/IEDBMgmt.pdf
http://www.oracle-base.com/articles/11g/AwrBaselineEnhancements_11gR1.php
Strategies for Monitoring Large Data Centers with Oracle Enterprise Manager http://gavinsoorma.com/wp-content/uploads/2011/03/monitoring_large_data_centers_with_OEM.pdf
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1525205200346930663
<<<
{{{
You Asked

In version 11g of Oracle database, there is a new feature whereby current performance data (obtained from AWR snapshots) can be compared against an AWR baseline and an alarm triggered if a given metric exceeds a certain threshold. From what I understand, there are 3 types of thresholds : fixed value, percent of maximum and significance level. The first type (fixed value) is very easy to understand - alarms are triggered whenever the metric in question exceeds certain fixed values specified for the warning and critical alerts (without reference to the baseline). The 2nd type (percent of maximum) presumably means that an alert is triggered whenever the current value of the metric exceeds the specified percent of the maximum value of the metric that was observed in the whole baseline period (if I understood this correctly - correct me if I'm wrong). 
However, the 3rd type (significance level) is not at all easy to understand. The Oracle documentation is not at all clear on that point, nor could I find any Metalink notes on the subject. I also tried searching the OTN forums, to no avail. Could you please explain, in very simple terms, when exactly an alarm would be triggered if "significance level" is specified for the threshold type, if possible by giving a simple example. There are apparently 4 levels of such thresholds (high, very high, severe and extreme). 
and we said...

I asked Graham Wood and John Beresniewicz for their input on this, they are the experts in this particular area 

they said: 

Graham Wood wrote: 
> Sure, 
> Copying JB as this is his specialty area, in case I don't get it right. :-) 
> 
> The basic idea of using significance level thresholds for alerting is that we are trying to detect outliers in the distribution of metric values, rather than setting a simple threshold value. 
> 
> By looking at the historical metric data from AWR we can identify values for 25th, 50th (median), 75th, 90th, 95th and 99th percentiles. Using a curve fitting algorithm we also extrapolate the 99.9th and 99.99th percentiles. We derive these percentiles based on time grouping, such as day, night, and hour of day. 
> 
> In the adaptive baselines feature in 11g we allow the user to specify the alert level, which equates to one of these percentile values: 
> High 95th percentile 
> Very High 99th percentile 
> Severe 99.9th percentile 
> Extreme 99.99th percentile 
> 
> Using the AWR history (actually the SYSTEM_MOVING_WINDOW baseline) the database will automatically determine the threshold level for a metric that corresponds to the selected significance level for the current time period. 
> 
> Setting a significance level of Extreme means that we would only alert on values that we would only expect to see once in a 10000 observations (approximately once in every years for hourly thresholds). 
> 
> Cheers, Graham 

JB wrote: 
Shorter answer: 
--------------- 
The significance level thresholds are intended to produce alert threshold values for key performance metrics that represent the following: 

"Automatically set threshold such that values observed above the threshold are statistically unusual (i.e. significant) at the Nth percentile based on actual data observed for this metric over the SYSTEM_MOVING_WINDOW baseline." 

The premise here is that systems with relatively stable performance characteristics should show statistical stability in core performance metric values, and when unusual but high-impact performance events occur we expect these will be reflected in highly unusual observations in one or more (normally statistically stable) metrics. The significance level thresholds give users a way to specify alerting in terms of "how unusual" rather than "how much". 


Longer (original) reply: 
----------------------------- 
Hi Tom - 
Graham did a pretty good job, but I'll add some stuff. 

Fixed thresholds are set explicitly by user, and change only when user unsets or sets a different threshold. They are based entirely on user understanding of the underlying metrics in relation to the underlying application and workload. This is the commonly understood paradigm for detecting performance issues: trigger an alert when metric threshold is crossed. There are numerous issues we perceived with this basic mechanism: 

1) "Performance" expectations, and thus alert thresholds, often vary by application, workload, database size, etc. This results in what I call the MxN problem, which is that M metrics over N systems becomes MxN threshold decisions each of which can be very specific (i.e. threshold decisions not transferable.) This is potentially very manually intensive for users with many databases. 

2) Workload may vary predictably on system (e.g. online day vs. batch night) and different performance expectations (and thus alert thresholds) may pertain to different workloads, so one threshold for all workloads is inappropriate. 

3) Systems evolve over time and thresholds applicable for the system supporting 1,000 users may need to be altered when system supports 10,000 users. 

The adaptive thresholds feature tries to address these issues as follows: 

A) Thresholds are computed by the system based on a context of prior observations of this metric on this system. System-and-metric-specific thresholds are developed without obliging user to understand the specifics (helps relieve the MxN problem.) 

B) Thresholds are periodically recomputed using statistical characterizations of metric values over the SYSTEM_MOVING_WINDOW baseline. Thus the thresholds adapt to slowly evolving workload or demand, as the moving window moves forward. 

C) Metric statistics for adaptive thresholds are computed over grouping buckets (which we call "time groups") that can accommodate the common workload periodicities (day/night, weekday/weekend, etc.) Thresholds resets can happen as frequently as every hour. 

So the net-net is that metric alert thresholds are determined and set automatically by the system using actual metric observations as their basis and using metric-and-system-independent semantics (significance level or pct of max.) 

JB 

From Tom - Thanks both! 
}}}
<<<


''Oracle By Example:''
http://docs.oracle.com/cd/E11882_01/server.112/e16638/autostat.htm#CHDHBGJD
metric baseline http://www.oracle.com/webfolder/technetwork/tutorials/demos/db/10g/r2/metric_baselines.viewlet/metric_baselines_viewlet_swf.html
create baseline http://www.oracle.com/webfolder/technetwork/tutorials/demos/db/11g/r2/11gr2_baseline/11gr2_baseline_viewlet_swf.html
OEM system monitoring http://www.oracle.com/webfolder/technetwork/tutorials/obe/em/emgc10gr2/quick_start/system_monitoring/system_monitoring.htm
**Creating the Monitoring Template
**Creating the User-Defined Metrics
**Setting the Metric Baseline
SQL baseline http://www.oracle.com/webfolder/technetwork/tutorials/demos/db/10g/r2/sql_baseline.viewlet/sql_baseline_viewlet_swf.html





''Proactive Database Monitoring'' http://docs.oracle.com/cd/B28359_01/server.111/b28301/montune001.htm
''15 User-Defined Metrics'' http://docs.oracle.com/cd/B16240_01/doc/em.102/e10954/udm2.htm
''3 Cluster Database'' http://docs.oracle.com/cd/B19306_01/em.102/b25986/rac_database.htm
http://oracledoug.com/serendipity/index.php?/archives/1302-Oracle-Workload-Metrics.html
http://oracledoug.com/serendipity/index.php?/archives/1470-Time-Matters-Throughput-vs.-Response-Time.html
http://docs.oracle.com/cd/B14099_19/manage.1012/b16241/Monitoring.htm#sthref333
http://carymillsap.blogspot.com/2008/12/performance-as-service-part-2.html





-- notes and ideas about R2 and adaptive thresholds
[img[ https://lh5.googleusercontent.com/-JNRShrEzpiQ/T4W3xfgGzII/AAAAAAAABiY/VBPKaiA-zus/s800/AdaptiveThresholds.JPG ]]



http://en.wikipedia.org/wiki/Control_chart
http://en.wikipedia.org/wiki/Exponential_smoothing
http://www.sciencedirect.com/science/article/pii/S0169207003001134

http://prodlife.wordpress.com/2013/10/14/control-charts/

















http://kerryosborne.oracle-guy.com/2009/06/oracle-11g-adaptive-cursor-sharing-acs/
http://aychin.wordpress.com/2011/04/04/adaptive-cursor-sharing-and-spm/

Adaptive Cursor Sharing: Worked Example [ID 836256.1]
http://jarneil.wordpress.com/2010/11/05/11gr2-database-services-and-instance-shutdown/   <-- 11gR2 version.. 

http://pat98.tistory.com/531 <-- good stuff, well explained difference on admin and policy managed services
do this to collect the most recent occurrence of the error on any of the trace files 
{{{
find . -type f -printf '%TY-%Tm-%Td %TT %p\n' | sort
}}}

files to look out
{{{

Agent Log and Trace files

Note: if there are multiple Agents experiencing problems, the files must be uploaded for each Agent.

From $ORACLE_HOME/sysman/log/*.* directory for a single agent. 
From $ORACLE_HOME/host/sysman/log/*.* for a RAC agent. 
The files are: 
emagent.nohup: Agent watchdog log file, Startup errors are recorded in this file. 
emagent.log: Main agent log file 
emagent.trc: Main agent trace file 
emagentfetchlet.log: Log file for Java Fetchlets 
emagentfetchlet.trc: Trace file for Java Fetchlets

<OMS_HOME>/sysman/log/emoms.trc
<OMS_HOME>/sysman/log/emoms.log
}}}

output below 
{{{

2011-06-28 10:20:11 ./sysman/emd/state/0005.dlt
2011-06-28 10:20:11 ./sysman/emd/state/snapshot
2011-06-28 10:26:00 ./sysman/emd/cputrack/emagent_11747_2011-06-28_10-26-00_cpudiag.trc
2011-06-28 10:26:00 ./sysman/log/emctl.log
2011-06-28 10:28:43 ./sysman/emd/upload/EM_adaptive_thresholds.dat
2011-06-28 10:30:32 ./sysman/emd/state/parse-log-3CBBC0C79ED9B7E65B93EAC0D7457308
2011-06-28 10:30:39 ./sysman/emd/upload/mgmt_db_hdm_metric_helper.dat
2011-06-28 10:30:54 ./sysman/emd/upload/rawdata8.dat
2011-06-28 10:31:05 ./sysman/emd/state/adr/141DB5270B29BDF93743E123C2DF1231.alert.log.xml.state
2011-06-28 10:32:13 ./sysman/emd/state/adr/C12313AF3162E92001DE7952A752106A.alert.log.xml.state
2011-06-28 10:32:37 ./sysman/emd/upload/mgmt_ha_mttr.dat
2011-06-28 10:32:51 ./sysman/emd/upload/rawdata3.dat
2011-06-28 10:33:08 ./sysman/emd/state/adr/5A9DF4683EEF44F8898ABA391E70D194.alert.log.xml.state
2011-06-28 10:33:08 ./sysman/emd/upload/rawdata5.dat
2011-06-28 10:33:54 ./sysman/emd/agntstmp.txt
2011-06-28 10:33:55 ./sysman/emd/upload/rawdata0.dat
2011-06-28 10:34:06 ./sysman/emd/upload/rawdata9.dat
2011-06-28 10:34:09 ./sysman/emd/upload/rawdata2.dat
2011-06-28 10:34:21 ./sysman/emd/upload/rawdata4.dat
2011-06-28 10:34:25 ./sysman/emd/state/3CBBC0C79ED9B7E65B93EAC0D7457308.alerttd01db01.log
2011-06-28 10:34:25 ./sysman/emd/state/progResUtil.log
2011-06-28 10:34:27 ./sysman/emd/upload/rawdata7.dat
2011-06-28 10:34:28 ./sysman/log/emagent.trc


2011-06-28 09:51:42,537 Thread-1118013760 ERROR recvlets.aq: duplicate registration of metric Recovery_Area for target dbm rac_database
2011-06-28 09:51:42,537 Thread-1118013760 ERROR recvlets.aq: Unable to add metric Recovery_Area to AQDatabase [oracle_database dbm_dbm1] for rac_database dbm
2011-06-28 09:51:42,537 Thread-1118013760 ERROR recvlets: Error adding metric Recovery_Area, target dbm rac_database, to recvlet AQMetrics
2011-06-28 09:51:42,538 Thread-1118013760 ERROR recvlets.aq: duplicate registration of metric Snap_Shot_Too_Old for target dbm rac_database
2011-06-28 09:51:42,538 Thread-1118013760 ERROR recvlets.aq: Unable to add metric Snap_Shot_Too_Old to AQDatabase [oracle_database dbm_dbm1] for rac_database dbm
2011-06-28 09:51:42,538 Thread-1118013760 ERROR recvlets: Error adding metric Snap_Shot_Too_Old, target dbm rac_database, to recvlet AQMetrics
2011-06-28 09:51:42,538 Thread-1118013760 ERROR recvlets.aq: duplicate registration of metric WCR for target dbm rac_database
2011-06-28 09:51:42,538 Thread-1118013760 ERROR recvlets.aq: Unable to add metric WCR to AQDatabase [oracle_database dbm_dbm1] for rac_database dbm
2011-06-28 09:51:42,538 Thread-1118013760 ERROR recvlets: Error adding metric WCR, target dbm rac_database, to recvlet AQMetrics
2011-06-28 09:51:42,539 Thread-1118013760 ERROR recvlets.aq: duplicate registration of metric wrc_client for target dbm rac_database
2011-06-28 09:51:42,539 Thread-1118013760 ERROR recvlets.aq: Unable to add metric wrc_client to AQDatabase [oracle_database dbm_dbm1] for rac_database dbm
2011-06-28 09:51:42,539 Thread-1118013760 ERROR recvlets: Error adding metric wrc_client, target dbm rac_database, to recvlet AQMetrics
2011-06-28 09:51:42,540 Thread-1118013760 WARN  recvlets.aq: [oracle_database dbm_dbm1] deferred nmevqd_refreshState for dbm rac_database
2011-06-28 09:51:42,540 Thread-1118013760 WARN  upload: Upload manager has no Failure script: disabled
2011-06-28 09:51:48,569 Thread-1136912704 WARN  collector: the column name first_message_age in this condition does not exist in metric aq_msgs_persistentq_per_subscriber
2011-06-28 09:51:48,571 Thread-1136912704 WARN  collector: the column name first_message_age in this condition does not exist in metric aq_msgs_persistentq_per_subscriber
2011-06-28 09:51:48,575 Thread-1136912704 ERROR recvlets.aq: duplicate registration of metric problemTbsp for target dbm rac_database
2011-06-28 09:51:48,575 Thread-1136912704 ERROR recvlets.aq: Unable to add metric problemTbsp to AQDatabase [oracle_database dbm_dbm1] for rac_database dbm
2011-06-28 09:51:48,575 Thread-1136912704 ERROR recvlets: Error adding metric problemTbsp, target dbm rac_database, to recvlet AQMetrics
2011-06-28 09:51:48,576 Thread-1136912704 ERROR recvlets.aq: duplicate registration of metric Suspended_Session for target dbm rac_database
2011-06-28 09:51:48,576 Thread-1136912704 ERROR recvlets.aq: Unable to add metric Suspended_Session to AQDatabase [oracle_database dbm_dbm1] for rac_database dbm
2011-06-28 09:51:48,576 Thread-1136912704 ERROR recvlets: Error adding metric Suspended_Session, target dbm rac_database, to recvlet AQMetrics
2011-06-28 09:51:48,576 Thread-1136912704 ERROR recvlets.aq: duplicate registration of metric Recovery_Area for target dbm rac_database
2011-06-28 09:51:48,576 Thread-1136912704 ERROR recvlets.aq: Unable to add metric Recovery_Area to AQDatabase [oracle_database dbm_dbm1] for rac_database dbm
2011-06-28 09:51:48,576 Thread-1136912704 ERROR recvlets: Error adding metric Recovery_Area, target dbm rac_database, to recvlet AQMetrics
2011-06-28 09:51:48,576 Thread-1136912704 ERROR recvlets.aq: duplicate registration of metric Snap_Shot_Too_Old for target dbm rac_database
2011-06-28 09:51:48,576 Thread-1136912704 ERROR recvlets.aq: Unable to add metric Snap_Shot_Too_Old to AQDatabase [oracle_database dbm_dbm1] for rac_database dbm
2011-06-28 09:51:48,576 Thread-1136912704 ERROR recvlets: Error adding metric Snap_Shot_Too_Old, target dbm rac_database, to recvlet AQMetrics
2011-06-28 09:51:48,577 Thread-1136912704 ERROR recvlets.aq: duplicate registration of metric WCR for target dbm rac_database
2011-06-28 09:51:48,577 Thread-1136912704 ERROR recvlets.aq: Unable to add metric WCR to AQDatabase [oracle_database dbm_dbm1] for rac_database dbm
2011-06-28 09:51:48,577 Thread-1136912704 ERROR recvlets: Error adding metric WCR, target dbm rac_database, to recvlet AQMetrics
2011-06-28 09:51:48,577 Thread-1136912704 ERROR recvlets.aq: duplicate registration of metric wrc_client for target dbm rac_database
2011-06-28 09:51:48,577 Thread-1136912704 ERROR recvlets.aq: Unable to add metric wrc_client to AQDatabase [oracle_database dbm_dbm1] for rac_database dbm
2011-06-28 09:51:48,577 Thread-1136912704 ERROR recvlets: Error adding metric wrc_client, target dbm rac_database, to recvlet AQMetrics
2011-06-28 09:51:48,578 Thread-1136912704 WARN  recvlets.aq: [oracle_database dbm_dbm1] deferred nmevqd_refreshState for dbm rac_database
2011-06-28 09:51:48,579 Thread-1136912704 WARN  upload: Upload manager has no Failure script: disabled
2011-06-28 09:51:48,615 Thread-1136912704 WARN  collector: the column name first_message_age in this condition does not exist in metric aq_msgs_persistentq_per_subscriber
2011-06-28 09:51:48,617 Thread-1136912704 WARN  recvlets.aq: [oracle_database dbm_dbm1] deferred nmevqd_refreshState for dbm rac_database
2011-06-28 09:52:03,663 Thread-1130613056 WARN  collector: the column name first_message_age in this condition does not exist in metric aq_msgs_persistentq_per_subscriber
2011-06-28 09:52:03,669 Thread-1130613056 WARN  collector: the column name first_message_age in this condition does not exist in metric aq_msgs_persistentq_per_subscriber
2011-06-28 09:52:03,675 Thread-1130613056 WARN  collector: the column name first_message_age in this condition does not exist in metric aq_msgs_persistentq_per_subscriber
2011-06-28 09:52:03,678 Thread-1130613056 WARN  collector: the column name first_message_age in this condition does not exist in metric aq_msgs_persistentq_per_subscriber
2011-06-28 09:52:03,690 Thread-1130613056 WARN  recvlets.aq: [rac_database dbm] deferred nmevqd_refreshState for dbm rac_database
2011-06-28 09:52:03,691 Thread-1130613056 WARN  upload: Upload manager has no Failure script: disabled
2011-06-28 09:54:21,234 Thread-1136912704 ERROR vpxoci: ORA-03113: end-of-file on communication channel
2011-06-28 09:59:52,513 Thread-1146362176 ERROR util.fileops: error: file /u01/app/oracle/product/grid/agent11g/bin/nmo is not a setuid file
2011-06-28 09:59:52,513 Thread-1146362176 WARN  Authentication: nmo binary in current oraHome doesn't have setuid privileges !!!
2011-06-28 09:59:52,513 Thread-1146362176 ERROR Authentication: altNmo binary doesn't exist ... reverting back to nmo
2011-06-28 10:00:41,308 Thread-1084578112 ERROR util.fileops: error: file /u01/app/oracle/product/grid/agent11g/bin/nmo is not a setuid file
2011-06-28 10:00:41,309 Thread-1084578112 WARN  Authentication: nmo binary in current oraHome doesn't have setuid privileges !!!
2011-06-28 10:00:41,309 Thread-1084578112 ERROR Authentication: altNmo binary doesn't exist ... reverting back to nmo
2011-06-28 10:00:54,251 Thread-1146362176 ERROR util.fileops: error: file /u01/app/oracle/product/grid/agent11g/bin/nmo is not a setuid file
2011-06-28 10:00:54,251 Thread-1146362176 WARN  Authentication: nmo binary in current oraHome doesn't have setuid privileges !!!
2011-06-28 10:00:54,252 Thread-1146362176 ERROR Authentication: altNmo binary doesn't exist ... reverting back to nmo
2011-06-28 10:01:11,931 Thread-1121163584 ERROR util.fileops: error: file /u01/app/oracle/product/grid/agent11g/bin/nmo is not a setuid file
2011-06-28 10:01:11,931 Thread-1121163584 WARN  Authentication: nmo binary in current oraHome doesn't have setuid privileges !!!
2011-06-28 10:01:11,932 Thread-1121163584 ERROR Authentication: altNmo binary doesn't exist ... reverting back to nmo
2011-06-28 10:01:53,036 Thread-1130613056 ERROR util.fileops: error: file /u01/app/oracle/product/grid/agent11g/bin/nmo is not a setuid file
2011-06-28 10:01:53,036 Thread-1130613056 WARN  Authentication: nmo binary in current oraHome doesn't have setuid privileges !!!
2011-06-28 10:01:53,036 Thread-1130613056 ERROR Authentication: altNmo binary doesn't exist ... reverting back to nmo
2011-06-28 10:34:28,828 Thread-1130613056 ERROR util.fileops: error: file /u01/app/oracle/product/grid/agent11g/bin/nmo is not a setuid file
2011-06-28 10:34:28,828 Thread-1130613056 WARN  Authentication: nmo binary in current oraHome doesn't have setuid privileges !!!
2011-06-28 10:34:28,828 Thread-1130613056 ERROR Authentication: altNmo binary doesn't exist ... reverting back to nmo

2011-06-28 10:20:11 ./sysman/emd/state/snapshot
2011-06-28 10:26:00 ./sysman/emd/cputrack/emagent_11747_2011-06-28_10-26-00_cpudiag.trc
2011-06-28 10:26:00 ./sysman/log/emctl.log
2011-06-28 10:28:43 ./sysman/emd/upload/EM_adaptive_thresholds.dat
2011-06-28 10:30:32 ./sysman/emd/state/parse-log-3CBBC0C79ED9B7E65B93EAC0D7457308
2011-06-28 10:30:54 ./sysman/emd/upload/rawdata8.dat
2011-06-28 10:32:13 ./sysman/emd/state/adr/C12313AF3162E92001DE7952A752106A.alert.log.xml.state
2011-06-28 10:32:51 ./sysman/emd/upload/rawdata3.dat
2011-06-28 10:33:08 ./sysman/emd/state/adr/5A9DF4683EEF44F8898ABA391E70D194.alert.log.xml.state
2011-06-28 10:34:06 ./sysman/emd/upload/rawdata9.dat
2011-06-28 10:34:25 ./sysman/emd/state/3CBBC0C79ED9B7E65B93EAC0D7457308.alerttd01db01.log
2011-06-28 10:34:25 ./sysman/emd/state/progResUtil.log
2011-06-28 10:34:27 ./sysman/emd/upload/rawdata7.dat
2011-06-28 10:35:17 ./sysman/emd/upload/mgmt_ha_mttr.dat
2011-06-28 10:35:21 ./sysman/emd/upload/rawdata5.dat
2011-06-28 10:35:58 ./sysman/emd/upload/rawdata2.dat
2011-06-28 10:36:05 ./sysman/emd/state/adr/141DB5270B29BDF93743E123C2DF1231.alert.log.xml.state
2011-06-28 10:36:28 ./sysman/emd/upload/mgmt_db_hdm_metric_helper.dat
2011-06-28 10:36:32 ./sysman/emd/upload/rawdata4.dat
2011-06-28 10:36:37 ./sysman/log/emagent.trc
2011-06-28 10:36:51 ./sysman/emd/upload/rawdata0.dat
2011-06-28 10:36:54 ./sysman/emd/agntstmp.txt

[td01db01:oracle:dbm1] /home/oracle
> dcli -l oracle -g dbs_group id oracle
td01db01: uid=500(oracle) gid=500(oinstall) groups=500(oinstall),101(fuse),501(dba)
td01db02: uid=500(oracle) gid=500(oinstall) groups=500(oinstall),101(fuse),501(dba)
td01db03: uid=500(oracle) gid=500(oinstall) groups=500(oinstall),101(fuse),501(dba)
td01db04: uid=500(oracle) gid=500(oinstall) groups=500(oinstall),101(fuse),501(dba)

[td01db01:oracle:dbm1] /home/oracle
>

[td01db01:oracle:dbm1] /home/oracle
> dcli -l oracle -g dbs_group ls -l /u01/app/oracle/product/grid/agent11g/bin/nmo
td01db01: -rwxr-xr-x 1 oracle oinstall 32872 Jun 22 17:02 /u01/app/oracle/product/grid/agent11g/bin/nmo
td01db02: -rws--x--- 1 root oinstall 32872 Jun 22 16:07 /u01/app/oracle/product/grid/agent11g/bin/nmo
td01db03: -rws--x--- 1 root oinstall 32872 Jun 22 16:14 /u01/app/oracle/product/grid/agent11g/bin/nmo
td01db04: -rws--x--- 1 root oinstall 32872 Jun 22 16:14 /u01/app/oracle/product/grid/agent11g/bin/nmo


2011-06-28 10:01:53,036 Thread-1130613056 ERROR Authentication: altNmo binary doesn't exist ... reverting back to nmo
2011-06-28 10:34:28,828 Thread-1130613056 ERROR util.fileops: error: file /u01/app/oracle/product/grid/agent11g/bin/nmo is not a setuid file
2011-06-28 10:34:28,828 Thread-1130613056 WARN  Authentication: nmo binary in current oraHome doesn't have setuid privileges !!!
2011-06-28 10:34:28,828 Thread-1130613056 ERROR Authentication: altNmo binary doesn't exist ... reverting back to nmo
2011-06-28 10:36:37,862 Thread-1130613056 ERROR util.fileops: error: file /u01/app/oracle/product/grid/agent11g/bin/nmo is not a setuid file
2011-06-28 10:36:37,862 Thread-1130613056 WARN  Authentication: nmo binary in current oraHome doesn't have setuid privileges !!!
2011-06-28 10:36:37,863 Thread-1130613056 ERROR Authentication: altNmo binary doesn't exist ... reverting back to nmo


-rwxr-xr-x 1 oracle oinstall     5985 Jun 22 16:14 owm        | -rwxr-xr-x 1 oracle oinstall     5985 Jun 22 17:02 owm
-rwxr-xr-x 1 oracle oinstall     2994 Jun 22 16:14 orapki     | -rwxr-xr-x 1 oracle oinstall     2994 Jun 22 17:02 orapki
-rwxr-xr-x 1 oracle oinstall     2680 Jun 22 16:14 mkstore    | -rwxr-xr-x 1 oracle oinstall     2680 Jun 22 17:02 mkstore
-rwxr-xr-x 1 oracle oinstall     2326 Jun 22 16:14 bndlchk    | -rwxr-xr-x 1 oracle oinstall     2326 Jun 22 17:02 bndlchk
-rwxr-xr-x 1 oracle oinstall     3602 Jun 22 16:14 umu        | -rwxr-xr-x 1 oracle oinstall     3602 Jun 22 17:02 umu
-rwxr-xr-x 1 oracle oinstall     1641 Jun 22 16:14 eusm       | -rwxr-xr-x 1 oracle oinstall     1641 Jun 22 17:02 eusm
-rwxr-xr-x 1 oracle oinstall    60783 Jun 22 16:14 chronos_se | -rwxr-xr-x 1 oracle oinstall    60783 Jun 22 17:02 chronos_se
-rwxr-xr-x 1 oracle oinstall     1551 Jun 22 16:14 chronos_se | -rwxr-xr-x 1 oracle oinstall     1551 Jun 22 17:02 chronos_se
-rwxr-x--x 1 oracle oinstall    19217 Jun 22 16:14 tnsping    | -rwxr-x--x 1 oracle oinstall    19217 Jun 22 17:02 tnsping
-rwxr-x--x 1 oracle oinstall   418787 Jun 22 16:14 wrc        | -rwxr-x--x 1 oracle oinstall   418787 Jun 22 17:02 wrc
-rwxr-x--x 1 oracle oinstall    25297 Jun 22 16:14 adrci      | -rwxr-x--x 1 oracle oinstall    25297 Jun 22 17:02 adrci
-rwxr-x--x 1 oracle oinstall 16793110 Jun 22 16:14 rmanO      | -rwxr-x--x 1 oracle oinstall 16793110 Jun 22 17:02 rmanO
-rwxr-xr-x 1 oracle oinstall   227069 Jun 22 16:14 ojmxtool   | -rwxr-xr-x 1 oracle oinstall   227069 Jun 22 17:02 ojmxtool
-rwxr-xr-x 1 oracle oinstall    26061 Jun 22 16:14 nmupm      | -rwxr-xr-x 1 oracle oinstall    26061 Jun 22 17:02 nmupm
-rwxr-xr-x 1 oracle oinstall    84093 Jun 22 16:14 nmei       | -rwxr-xr-x 1 oracle oinstall    84093 Jun 22 17:02 nmei
-rwx------ 1 oracle oinstall   112352 Jun 22 16:14 emdctl     | -rwx------ 1 oracle oinstall   112352 Jun 22 17:02 emdctl
-rwxr-xr-x 1 oracle oinstall    37130 Jun 22 16:14 emagtmc    | -rwxr-xr-x 1 oracle oinstall    54596 Jun 22 17:02 emagtm
-rwxr-xr-x 1 oracle oinstall    54596 Jun 22 16:14 emagtm     | -rwx------ 1 oracle oinstall    15461 Jun 22 17:02 emagent
-rwx------ 1 oracle oinstall    15461 Jun 22 16:14 emagent    | -rwxr-xr-x 1 oracle oinstall      656 Jun 22 17:02 commonenv.
-rwxr-xr-x 1 oracle oinstall      656 Jun 22 16:14 commonenv. | -rwx------ 1 oracle oinstall      347 Jun 22 17:02 opmnassoci
-rwx------ 1 oracle oinstall      347 Jun 22 16:14 opmnassoci | -rwxr-xr-x 1 oracle oinstall     2934 Jun 22 17:02 onsctl.opm
-rwxr-xr-x 1 oracle oinstall     2934 Jun 22 16:14 onsctl.opm | -rwxr-xr-x 1 oracle oinstall   484287 Jun 22 17:02 nmosudo
-rwxr-xr-x 1 oracle oinstall   484287 Jun 22 16:14 nmosudo    | -rwxr-xr-x 1 oracle oinstall    24725 Jun 22 17:02 nmocat
-rwxr-xr-x 1 oracle oinstall    24725 Jun 22 16:14 nmocat     | -rwxr-xr-x 1 oracle oinstall    32872 Jun 22 17:02 nmo.0
-rwxr-xr-x 1 oracle oinstall    32872 Jun 22 16:14 nmo.0      | -rwxr-xr-x 1 oracle oinstall    32872 Jun 22 17:02 nmo
-rws--x--- 1 root   oinstall    32872 Jun 22 16:14 nmo        | -rwxr-xr-x 1 oracle oinstall    58483 Jun 22 17:02 nmhs.0
-rwxr-xr-x 1 oracle oinstall    58483 Jun 22 16:14 nmhs.0     | -rwxr-xr-x 1 oracle oinstall    58483 Jun 22 17:02 nmhs
-rws--x--- 1 root   oinstall    58483 Jun 22 16:14 nmhs       | -rwxr-xr-x 1 oracle oinstall    22746 Jun 22 17:02 nmb.0
-rwxr-xr-x 1 oracle oinstall    22746 Jun 22 16:14 nmb.0      | -rwxr-xr-x 1 oracle oinstall    22746 Jun 22 17:02 nmb
-rws--x--- 1 root   oinstall    22746 Jun 22 16:14 nmb        | -rwsr-s--- 1 oracle oinstall    76234 Jun 22 17:02 emtgtctl2
-rwsr-s--- 1 oracle oinstall    76234 Jun 22 16:14 emtgtctl2  | -rwxr-xr-x 1 oracle oinstall  3895446 Jun 22 17:02 emsubagent
-rwxr-xr-x 1 oracle oinstall  3895446 Jun 22 16:14 emsubagent | -rwxr-xr-x 1 oracle oinstall    37130 Jun 22 17:02 emagtmc
-rwxr-xr-x 1 oracle oinstall  3031365 Jun 22 16:14 e2eme      | -rwxr-xr-x 1 oracle oinstall  3031365 Jun 22 17:02 e2eme
-rwx------ 1 oracle oinstall     1634 Jun 22 16:14 dmstool    | -rwx------ 1 oracle oinstall     1634 Jun 22 17:02 dmstool
-rwxr-xr-x 1 oracle oinstall     2639 Jun 22 16:14 db2gc      | -rwxr-xr-x 1 oracle oinstall     2639 Jun 22 17:02 db2gc
-rwxr-xr-x 1 oracle oinstall     5258 Jun 22 16:14 emutil     | -rwxr-xr-x 1 oracle oinstall     5258 Jun 22 17:02 emutil
-rwxr-xr-x 1 oracle oinstall     1516 Jun 22 16:14 emtgtctl   | -rwxr-xr-x 1 oracle oinstall     1516 Jun 22 17:02 emtgtctl
-rwx------ 1 oracle oinstall    19063 Jun 22 16:14 emctl.pl   | -rwx------ 1 oracle oinstall    19063 Jun 22 17:02 emctl.pl
-rwxr--r-- 1 oracle oinstall    14476 Jun 22 16:14 emctl      | -rwxr--r-- 1 oracle oinstall    14476 Jun 22 17:02 emctl
-rwxr-xr-x 1 oracle oinstall      641 Jun 22 16:14 commonenv  | -rwxr-xr-x 1 oracle oinstall      641 Jun 22 17:02 commonenv
-rwxr-xr-x 1 oracle oinstall      701 Jun 22 16:14 agentca    | -rwxr-xr-x 1 oracle oinstall      701 Jun 22 17:02 agentca
-rwxr-x--x 1 oracle oinstall 16792553 Jun 22 16:14 rman       | -rwxr-x--x 1 oracle oinstall 16792553 Jun 22 17:03 rman

}}}
Grid Control Target Maintenance: Steps to Diagnose Issues Related to "Agent Unreachable" Status [ID 271126.1]
In Grid Control Receiving Agent Unreachable Notification Emails Very Often After 10.2.0.4 Agent Upgrade [ID 752296.1]
https://blogs.oracle.com/db/entry/oracle_support_master_note_for_10g_grid_control_enterprise_manager_communication_and_upload_issues_d
http://wikis.sun.com/display/Performance/Aligning+Flash+Modules+for+Optimal+Performance
http://blogs.oracle.com/lisan/entry/io_sizes_and_alignments_with
http://guyharrison.squarespace.com/blog/2011/6/8/a-first-look-at-oracle-on-amazon-rds.html

High perf IOPS on AWS http://aws.typepad.com/aws/2012/09/new-high-performance-provisioned-iops-amazon-rds.html

service dashboard status http://status.aws.amazon.com/

''a Systematic Look at EC2 I/O'' http://blog.scalyr.com/2012/10/16/a-systematic-look-at-ec2-io/

''EC2 compute units'' http://gevaperry.typepad.com/main/2009/03/figuring-out-the-roi-of-infrastructureasaservice.html, http://stackoverflow.com/questions/4849723/a-question-about-amazon-ec2-compute-units
Find Answers Faster
By Jonathan Gennick and Anthony Molinaro 
http://www.oracle.com/technology/oramag/oracle/05-mar/o25dba.html

LAG
http://www.appsdba.com/blog/?p=383

CAST function
http://www.oracle.com/technetwork/database/focus-areas/manageability/diag-pack-ow08-131537.pdf
http://psoug.org/reference/cast.html

SQL – RANK, MAX Analytical Functions, DECODE, SIGN
http://hoopercharles.wordpress.com/2009/12/26/sql-–-rank-max-analytical-functions-decode-sign/


http://www.slideshare.net/hamcdc/sep13-analytics
http://www.odtug.com/p/cm/ld/fid=65&tid=35&sid=972
http://www.amazon.com/Window-Functions-SQL-Jonathan-Gennick-ebook/dp/B006YITKJO/ref=sr_1_2?ie=UTF8&qid=1385753351&sr=8-2&keywords=window+functions+in+sql
http://gennick.com/database/?tag=WindowSS

Analytic Functions in Oracle 8i Srikanth Bellamkonda  http://infolab.stanford.edu/infoseminar/archive/SpringY2000/speakers/agupta/paper.pdf
Enhanced subquery optimizations in Oracle http://www.vldb.org/pvldb/2/vldb09-423.pdf
Analytic SQL in 12c http://www.oracle.com/technetwork/database/bi-datawarehousing/wp-in-database-analytics-12c-2132656.pdf
Adaptive and big data scale parallel execution in oracle http://dl.acm.org/citation.cfm?id=2536235






https://forums.oracle.com/forums/thread.jspa?threadID=2220970

''analyze table sysadm.PSOPRDEFN                   validate structure cascade online ; ''
''andrew ng''
publications http://cs.stanford.edu/people/ang/?page_id=414
http://en.wikipedia.org/wiki/Andrew_Ng
http://cs.stanford.edu/people/ang/
http://creiley.wordpress.com/
https://www.coursera.org/course/ml

Oracle Clusterware and Application Failover Management [ID 790189.1]

Application Management http://www.oracle.com/technetwork/oem/app-mgmt/app-mgmt-084358.html


http://onlineappsdba.com/index.php/2010/08/30/time-out-while-waiting-for-a-managed-process-to-stop-http_server/

cman http://arup.blogspot.com/2011/08/setting-up-oracle-connection-manager.html
Database Resident Connection Pool (drcp) http://www.oracle-base.com/articles/11g/database-resident-connection-pool-11gr1.php	

[img(50%,50%)[ https://lh6.googleusercontent.com/-TEaGT5fnFH0/UZpDd8TgAaI/AAAAAAAAB7A/EqsT3qE_WLg/w599-h798-no/timfoxconnectionpool.JPG ]]

[img(50%,50%)[ https://lh3.googleusercontent.com/-7PfskV3MC1o/UZpHKolfKeI/AAAAAAAAB7w/wvj7c22xHWk/w458-h610-no/timfoxconnectionpool2.JPG ]]
{{{
http://www.oracle.com/technology/software/products/ias/files/ha-certification.html

How to Obtain Pre-Requisites for Oracle Application Server 10g Installation
  	Doc ID: 	Note:433077.1

Oracle Application Server 10g Release 3 (10.1.3) Support Status and Alerts
  	Doc ID: 	Note:397022.1

How to Find Certification Details for Oracle Application Server 10g
  	Doc ID: 	Note:431578.1


How to Verify 9iAS Release 2 (9.0.2) Components
  	Doc ID: 	Note:226187.1 	

What is a 9iAS (9.0.2) Farm
  	Doc ID: 	Note:218038.1

What is a 9iAS (9.0.2) Cluster
  	Doc ID: 	Note:218039.1



Steps to Maintain Oracle Application Server 10g Release 2 (10.1.2)
  	Doc ID: 	Note:415222.1




Subject: 	Installing Oracle Application Server 10g with Oracle E-Business Suite Release 11i
  	Doc ID: 	Note:233436.1
  	
Oracle Application Server 10g Release 2 (10.1.2) Support Status and Alerts
  	Doc ID: 	Note:329361.1 	
  	
Oracle Application Server 10g Examples for Critical Patch Updates
  	Doc ID: 	Note:405972.1
  	
Using Oracle Applications with a Split Configuration Database Tier on Oracle 10g Release 2
  	Doc ID: 	Note:369693.1
  	
Using Oracle Applications with a Split Configuration Database Tier on Oracle 10g Release 1
  	Doc ID: 	Note:356839.1
  	
How to Obtain Pre-Requisites for Oracle Application Server 10g Installation
  	Doc ID: 	Note:433077.1
  	
Oracle Application Server with Oracle E-Business Suite Release 11i FAQ
  	Doc ID: 	Note:186981.1
  	
How to Find Certification Details for Oracle Application Server 10g
  	Doc ID: 	Note:431578.1
  	









Oracle Server - Export Data Pump and Import DataPump FAQ
  	Doc ID: 	Note:556636.1
  	
Oracle E-Business Suite Release 11i Technology Stack Documentation Roadmap
  	Doc ID: 	Note:207159.1
  	
Using Oracle Applications with a Split Configuration Database Tier on Oracle 10g Release 1
  	Doc ID: 	Note:356839.1
  	
10g Release 2 Export/Import Process for Oracle Applications Release 11i
  	Doc ID: 	Note:362205.1
  	
Oracle Application Server with Oracle E-Business Suite Release 12 FAQ
  	Doc ID: 	Note:415007.1
  	
About Oracle E-Business Suite Applied Technology Family Pack ATG_PF.H
  	Doc ID: 	Note:284086.1
  	
Installing Oracle Application Server 10g with Oracle E-Business Suite Release 11i
  	Doc ID: 	Note:233436.1
  	
Oracle Applications Documentation Resources, Release 12
  	Doc ID: 	Note:394692.1
  	
https://metalink.oracle.com/metalink/plsql/f?p=130:14:491566816839019350::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,461709.1,1,1,1,helvetica
Implement, Upgrade and Optimize  �  Upgrade Guide  � Oracle E-Business Suite Upgrade Resource � Oracle E-Business Suite Upgrade Resource Plan

Globalization Guide for Oracle Applications Release 12
  	Doc ID: 	Note:393861.1
  	
Oracle Applications Release 12 Technology Stack Documentation Resources
  	Doc ID: 	Note:396957.1
  	
Oracle E-Business Suite Release 12 Technology Stack Documentation Roadmap
  	Doc ID: 	Note:380482.1
  	 	
How to Migrate OAS 4.x Applications to 9iAS Release 1 (1.0.2)
  	Doc ID: 	Note:122826.1 	
  	
  	
Disaster Recovery Setup: Middle Tier and Collocated Infrastructure on the Same Server
  	Doc ID: 	Note:420824.1

Understanding OracleAS 10g High Availability - A Roadmap
  	Doc ID: 	Note:412159.1

What make and version of Cluster Managers are supported by Oracle in an OracleAS Cold Failover Cluster setup?
  	Doc ID: 	Note:303161.1

Examples of Building Highly Available, Highly Secure, Scalable OracleAS 10g Solutions
  	Doc ID: 	Note:435025.1

Storage Solutions for OracleAS 10g R2 and OracleAS 10g R3
  	Doc ID: 	Note:371251.1



9.0.2.0.1 documentation
http://download-uk.oracle.com/docs/cd/B10202_07/index.htm


Oracle9iAS Release 2 (9.0.3) Support Status and Alerts
  	Doc ID: 	Note:248328.1

Installation and Connection Issues with 9iAS 1.0.2.2 and 9i
  	Doc ID: 	Note:162843.1

9iAS Release 1 and Release 2 Install Options
  	Doc ID: 	Note:203509.1

Explanation of 9iAS Release 1 Installation Prompts
  	Doc ID: 	Note:158688.1

9iAS 1.0.2.2.2A Installation Hangs at 100% on Windows
  	Doc ID: 	Note:180418.1

Installing 9iAS Release 1 (1.0.2.2) and RDBMS 8.1.7 on the Same Windows Server
  	Doc ID: 	Note:170756.1

9iAS Release 1 (1.0.2.2) Installation Requirements Checklist for Linux
  	Doc ID: 	Note:158856.1

9iAS Release 1 (1.0.2.2) EE Installation Requirements Checklist (Microsoft Windows NT/2000)
  	Doc ID: 	Note:158863.1

ALERT: Windows NT/2000 - 9iAS v.1.0.2.2.1 Unsupported on Pentium 4
  	Doc ID: 	Note:136038.1

Checking 9iAS Release 1 Installation Requirements
  	Doc ID: 	Note:158634.1

Oracle9i Application Server (9iAS) 9.0.3.1 FAQ
  	Doc ID: 	Note:251781.1








--########## FORMS  	

The History and Methods of Running Oracle Forms Over The Web
  	Doc ID: 	Note:166640.1 	

Overview of Oracle Forms and Using the Oracle Forms Builder
  	Doc ID: 	Note:358712.1

Note 166640.1 - The History and Methods of Running Oracle Forms Over The Web
Note 2056834.6 - Does Oracle Support the Use of Emulators to Run Oracle Products?
Note 266541.1 - Patching Lifecycle / Strategy of Oracle Developer (Forms and Reports)
Note 299938.1 - Moving Forms Applications From One Platform To Another
Note 340215.1 - Required Support Files (RSF) in Oracle Forms and Reports
Note 68047.1 - Support of Terminal Emulators, Terminal Server ( e.g. Citrix) with Developer Tools
Note 73736.1 - Installing Developer on a LAN - Is This Supported?
Note 74145.1 - Developer Production and Patchset Version Numbers on MS Windows

How to Web Deploy Oracle Forms Using The Static HTML File Method?
  	Doc ID: 	Note:232371.1

Are Unix Clients Supported for Deploying Oracle Forms over the Web?
  	Doc ID: 	Note:266439.1

Changing the Oracle Password in Oracle Forms
  	Doc ID: 	Note:16365.1

Failed To Detect Change Window Password Of Oracle Forms 6
  	Doc ID: 	Note:563955.1

Changing the Oracle Password in Oracle Forms
  	Doc ID: 	Note:16365.1


--########## JINITIATOR VERSIONS

oracle 9iR1	-	1.1.8.7
oracle10gr2 AS 	- 	1.3.1.22




  	
--########## PORTAL

Overview of the Portal Export-Import Process
  	Doc ID: 	Note:306785.1
  	




Note 456456.1 How to Find the Oracle Application Server 10g Upgrade and Compatibility Guide
     
Note 433077.1 How to Obtain Pre-Requisites for Oracle Application Server 10g Installation
     
Note 431028.1 Oracle Fusion Middleware Support of IPv6
     
Note 429995.1 Is it Supported to Run OracleAS Components on Different Operating Systems and Versions?
     
Note 420210.1 What User Can Be Used to Perform the IAS Patches/Upgrades?
     
Note 412439.1 Can A Manually Managed Cluster Be Installed Across Windows And Unix/Linux?
     
Note 394525.1 How to Know If a New Patch is Released ?
     
Note 400134.1 How to force Oracle Installer to use Virtual Hostname When Installing an OracleAS Instance?
     
Note 302535.1 Can Oracle AS 10g Release 2 (10.1.2) Be Installed to Upgrade Forms, Reports and Portal 10g (9.0.4)?

Note 317085.1 OracleAS 10g (10.1.2) Installation Requirements for Linux Red Hat 4.0 / Oracle Enterprise Linux





-- 9.0.3

Oracle9iAS Release 2 (9.0.3) Support Status and Alerts
  	Doc ID: 	Note:248328.1

Installation and Connection Issues with 9iAS 1.0.2.2 and 9i
  	Doc ID: 	Note:162843.1

9iAS Release 1 and Release 2 Install Options
  	Doc ID: 	Note:203509.1

Explanation of 9iAS Release 1 Installation Prompts
  	Doc ID: 	Note:158688.1

9iAS Release 1 and Release 2 Install Options
  	Doc ID: 	Note:203509.1

9iAS Release 1 (1.0.2.2) Installation Requirements Checklist for Linux
  	Doc ID: 	Note:158856.1

9iAS Release 1 (1.0.2.2) EE Installation Requirements Checklist (Microsoft Windows NT/2000)
  	Doc ID: 	Note:158863.1

ALERT: Windows NT/2000 - 9iAS v.1.0.2.2.1 Unsupported on Pentium 4
  	Doc ID: 	Note:136038.1

Checking 9iAS Release 1 Installation Requirements
  	Doc ID: 	Note:158634.1

Oracle9i Application Server (9iAS) 9.0.3.1 FAQ
  	Doc ID: 	Note:251781.1

Unable to Bind to Server Machine After Install of Discoverer 4.1.37
  	Doc ID: 	Note:149678.1




-- HTTP SERVER

HTTP Server Intermittently Restarted By OPMN
  	Doc ID: 	469720.1

Linux OS Service 'httpd'
  	Doc ID: 	550870.1

Is There a Way to Increase the Maximum Value of ThreadsperChild on Windows?
  	Doc ID: 	460443.1

Unable to Increase Value of Maxclients Above 256 in httpd.conf File
  	Doc ID: 	149874.1

How Apache Works
  	Doc ID: 	334763.1

OC4J_SECURITY Is Falling To Start After Problems With Database
  	Doc ID: 	Note:550631.1







-- TUNING / TROUBLESHOOTING

Troubleshooting Web Deployed Oracle Forms Performance Issues
  	Doc ID: 	363285.1

Configurable Connection Limits in Application Server Components
  	Doc ID: 	289908.1





-- AIX

Does OracleAS 10g Support AIX VIO Logical Partitioning (LPAR)?
  	Doc ID: 	Note:470083.1



-- EBUSINESS SUITE

Oracle Application Server with Oracle E-Business Suite Release 11i FAQ
  	Doc ID: 	Note:186981.1

}}}
{{{
col dest_name format a30
select inst_id, dest_name, status, error, gap_status from gV$ARCHIVE_DEST_STATUS;

SELECT name, free_mb, total_mb, free_mb/total_mb*100 "%" FROM v$asm_diskgroup;

set lines 100
col name format a60
select name, floor(space_limit / 1024 / 1024) "Size MB", ceil(space_used / 1024 / 1024) "Used MB"
from v$recovery_file_dest
order by name;

}}}

{{{

alter system set db_recovery_file_dest_size=<bigger size>;
archive log all;


crosscheck archivelog all;
list expired archivelog all; 
delete expired archivelog all;
OR
delete archivelog all completed before 'sysdate-1';

}}}
----------------------------------------------------
Archivelog Mode On RAC 10G, 11g
----------------------------------------------------

1) In Oracle 10.1, you cannot directly enable archive logging in a RAC database. Instead, you must temporarily convert your RAC database to a single-instance database to issue the command. First change the CLUSTER_DATABASE parameter in the SPFILE to FALSE

      ALTER SYSTEM SET CLUSTER_DATABASE = FALSE SCOPE = SPFILE;

  In Oracle 10.2 and 11g, you can run the ALTER DATABASE SQL statement to change the archiving mode in RAC as long as the database is mounted by the local instance but not open in any instances. You do not need to modify parameter settings to run this statement.

2) Set parameters

  If you are using a filesystem do this:
      alter system set log_archive_format='orcl_%t_%s_%r.arc' scope=spfile;
      alter system set log_archive_dest_1 = 'LOCATION=/u03/flash_recovery_area/ORCL/archivelog' scope=both;

  If you are using ASM do this:
      alter system set log_archive_format='orcl_%t_%s_%r.arc' scope=spfile;
      alter system set db_recovery_file_dest_size=800G scope=both;
      alter system set db_recovery_file_dest='+RECOVERY_1' scope=both;
      alter system set log_archive_dest_1='LOCATION=USE_DB_RECOVERY_FILE_DEST';

3) shutdown the database

      srvctl stop database -d RAC

4) Start a single instance using the following:

      srvctl start instance -d RAC - i RACl -o mount

5) Enable archiving as follows:

      ALTER DATABASE ARCHIVELOG;

6) In Oracle 10.1, Change the CLUSTER_DATABASE parameter in the SPFILE back to TRUE:

      ALTER SYSTEM SET CLUSTER_DATABASE = TRUE SCOPE = SPFILE;

7) The next time the database is stopped and started, it will be a RAC database. Use the following command to stop the instance:

      srvctl stop instance -d RAC -i RACl

8) start the database

      srvctl start database -d RAC

9) do other stuff: 

    -- Edit related parameters 
    alter system set control_file_record_keep_time=14; 
    alter database enable block change tracking using file '+RECOVERY_1/ORCL/orcl.bct';

    -- Configure RMAN settings and related directories
    on +RECOVERY_1... mkdir AUTOBACKUP BACKUPSET

    CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
    CONFIGURE BACKUP OPTIMIZATION OFF;
    CONFIGURE DEFAULT DEVICE TYPE TO DISK;
    CONFIGURE CONTROLFILE AUTOBACKUP ON;
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '+RECOVERY_1/ORCL/AUTOBACKUP/%d-%F';
    CONFIGURE DEVICE TYPE DISK PARALLELISM 4 BACKUP TYPE TO COMPRESSED BACKUPSET;
    CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1;
    CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1;
    CONFIGURE CHANNEL DEVICE TYPE DISK MAXPIECESIZE 2 G FORMAT   '+RECOVERY_1/ORCL/BACKUPSET/%d-%T-%U';
    CONFIGURE MAXSETSIZE TO UNLIMITED;
    CONFIGURE ENCRYPTION FOR DATABASE OFF;
    CONFIGURE ENCRYPTION ALGORITHM 'AES128';
    CONFIGURE COMPRESSION ALGORITHM 'BZIP2'; # default
    CONFIGURE ARCHIVELOG DELETION POLICY TO NONE;
    CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+RECOVERY_1/ORCL/sncf_orcl.f';

      List of directories on +RECOVERY_1:
	Y    ARCHIVELOG/
	N    AUTOBACKUP/
	N    BACKUPSET/
	Y    CHANGETRACKING/
	Y    CONTROLFILE/





----------------------------------------------------
Archivelog Mode On RAC 9i by ORACLE-BASE
----------------------------------------------------

This article highlights the differences between resetting the archive log mode on a single node instance and a Real Application Clusters (RAC).

On a single node instance the archive log mode is reset as follows:
	ALTER SYSTEM SET log_archive_start=TRUE SCOPE=spfile;
	ALTER SYSTEM SET log_archive_dest_1='location=/u01/oradata/MYSID/archive/' SCOPE=spfile;
	ALTER SYSTEM SET log_archive_format='arch_%t_%s.arc' SCOPE=spfile;
	
	SHUTDOWN IMMEDIATE;
	STARTUP MOUNT;
	ARCHIVE LOG START;
	ALTER DATABASE ARCHIVELOG;
	ALTER DATABASE OPEN;


The ALTER DATABASE ARCHIVELOG command can only be performed if the database in mounted in exclusive mode. This means the whole clustered database must be stopped before the operation can be performed. First we set the relevant archive parameters:
	ALTER SYSTEM SET log_archive_start=TRUE SCOPE=spfile;
	ALTER SYSTEM SET log_archive_dest_1='location=/u01/oradata/MYSID/archive/' SCOPE=spfile;
	ALTER SYSTEM SET log_archive_format='arch_%t_%s.arc' SCOPE=spfile;
Since we need to mount the database in exclusive mode we must also alter the following parameter:
	ALTER SYSTEM SET cluster_database=FALSE SCOPE=spfile;
From the command line we can stop the entire cluster using:
	srvctl stop database -d MYSID
With the cluster down we can connect to a single node and issue the following commands:
	STARTUP MOUNT;
	ARCHIVE LOG START;
	ALTER DATABASE ARCHIVELOG;
	ALTER SYSTEM SET cluster_database=TRUE SCOPE=spfile;
	SHUTDOWN IMMEDIATE;
Notice that the CLUSTER_DATABASE parameter has been reset to it's original value. Since the datafiles and spfile are shared between all instances this operation only has to be done from a single node.

From the command line we can now start the cluster again using:
	srvctl start database -d MYSID
The current settings place all archive logs in the same directory. This is acceptible since the thread (%t) is part of the archive format preventing any name conflicts between instances. If node-specific locations are required the LOG_ARCHIVE_DEST_1 parameter can be repeated for each instance with the relevant SID prefix.
Archiver Best Practices
  	Doc ID: 	Note:45042.1
http://www.linuxjournal.com/content/arduino-open-hardware-and-ide-combo

Python Meets the Arduino http://www.youtube.com/watch?v=54XwSUC8klI
http://makeprojects.com/Project/Arduino+and+Python%3A+Learn+Serial+Programming/667/1#.UKSnQYc70hU
http://www.arduino.cc/playground/interfacing/python
https://python.sys-con.com/node/2386200


http://designcodelearn.com/blog/2012/12/01/how-to-make-$10m-in-one-night/
Logical I/O(consistent get) and Arraysize relation with SQL*PLUS
http://tonguc.wordpress.com/2007/01/04/logical-ioconsistent-get-and-arraysize-relation-with-sqlplus/
{{{


Master Note for Automatic Storage Management (ASM) [ID 1187723.1]


-- HOMEs COMPATIBILITY MATRIX

Note 337737.1 Oracle Clusterware - ASM - Database Version Compatibility
Note 363254.1 Applying one-off Oracle Clusterware patches in a mixed version home environment


-- BEST PRACTICE

ASM Technical Best Practices (Doc ID 265633.1)


-- SETUP 
How To Setup ASM on Linux Using ASMLIB Disks, Raw Devices or Block Devices? [ID 580153.1] <— mentions 10gR2 and 11gR2 configuration
Device Persistence and Oracle Linux ASMLib [ID 394959.1]


MOVING ORACLE_HOME
  	Doc ID: 	Note:28433.1

Recover database after disk loss
  	Doc ID: 	Note:230829.1

Doing Incomplete Recovery and Moving Redo Logs From Corrupted Disk
  	Doc ID: 	Note:77643.1 	

Cross-Platform Migration Using Rman Convert Database on Destination Host ( Windows 32-bit to Linux 32-bit )
  	Doc ID: 	Note:414878.1

How to recover and open the database if the archivelog required for recovery is either missing, lost or corrupted?
  	Doc ID: 	Note:465478.1

Recovering From A Lost Control File
  	Doc ID: 	Note:1014504.6

ORACLE V6 INSTALLATION PROCEDURES
  	Doc ID: 	Note:11196.1




-- TROUBLESHOOTING

How To Gather/Backup ASM Metadata In A Formatted Manner?
  	Doc ID: 	470211.1

Troubleshooting a multi-node ASMLib installation (Doc ID 811457.1)
ASM is Unable to Detect ASMLIB Disks/Devices. (Doc ID 457369.1)


HOW TO MAP ASM FILES WITH ONLINE DATABASE FILES
  	Doc ID: 	552082.1



-- TRACE DEVICES
How to identify exactly which disks on a SAN have been allocated to an ASM Diskgroup (Doc ID 398435.1)
How to map device name to ASMLIB disk (Doc ID 1098682.1)



-- IMBALANCE

Script to Report the Percentage of Imbalance in all Mounted Diskgroups (Doc ID 367445.1)



-- PERFORMANCE
Comparing ASM to Filesystem in benchmarks [ID 1153664.1]
File System's Buffer Cache versus Direct I/O [ID 462072.1]
question regarding "ASM Performance", version 10.2.0 http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:2109833600346625821
http://kevinclosson.wordpress.com/2007/02/11/what-performs-better-direct-io-or-direct-io-there-is-no-such-thing-as-a-stupid-question/
http://www.freelists.org/post/oracle-l/filesystemio-options-setting,4
http://www.freelists.org/post/oracle-l/split-block-torn-page-problem,6
ASM Inherently Performs Asynchronous I/O Regardless of filesystemio_options Parameter [ID 751463.1]







--======================
-- ASM
--======================

Problems with ASM in 10gR2
  	Doc ID: 	Note:353065.1

Deployment of very large databases (10TB to PB range) with Automatic Storage Management (ASM)
  	Doc ID: 	Note:368055.1

ASMIOSTAT Script to collect iostats for ASM disks
  	Doc ID: 	Note:437996.1

How to copy a datafile from ASM to a file system not using RMAN
  	Doc ID: 	Note:428893.1

How to upgrade ASM instance from 10.1 to 10.2 (Single Instance)
  	Doc ID: 	Note:329987.1

Problems with ASM in 10gR2
  	Doc ID: 	Note:353065.1

Unable to startup ASM instance after OS kernel upgrade
  	Doc ID: 	Note:313833.1

How To Extract Datapump File From ASM Diskgroup To Local Filesystem?
  	Doc ID: 	Note:566941.1

How To Determinate If An EMCPOWER Partition Is Valid For ASMLIB?
  	Doc ID: 	Note:566676.1

HOW TO MAP ASM FILES WITH ONLINE DATABASE FILES
  	Doc ID: 	Note:552082.1

How To Add a New Disk(s) to An Existing Diskgroup on RAC (Best Practices).
  	Doc ID: 	Note:557348.1

Diagnosing Disk not getting discovered in ASM
  	Doc ID: 	Note:311926.1

How To Gather/Backup ASM Metadata In A Formatted Manner?
  	Doc ID: 	Note:470211.1

How To Move The Database To Different Diskgroup (Change Diskgroup Redundancy)
  	Doc ID: 	Note:438580.1

Tips On Installing and Using ASMLib on Linux
  	Doc ID: 	Note:394953.1

RHEL5 and ASMLib
  	Doc ID: 	Note:434775.1

Oracle Linux ASMLib README Documentation
  	Doc ID: 	Note:454035.1

ASM Using Files Instead of Real Devices on Linux
  	Doc ID: 	Note:266028.1

CHECKSUMS DIFFER FOR ASM DATAFILES WHEN COPIED USING XDB/FTP
  	Doc ID: 	Note:459819.1

How to rename/move a datafile in the same ASM diskgroup
  	Doc ID: 	Note:564993.1

How To Remove An Empty ASM System Directory
  	Doc ID: 	Note:444812.1

Database Instance Crashes In Case Of Path Offlined In Multipath Storage
  	Doc ID: 	Note:555371.1

How To Change ASM SYS PASSWORD ?
  	Doc ID: 	Note:452076.1

ASM Instances Are Not Mounted Consistently
  	Doc ID: 	Note:351114.1

How To Delete Archive Log Files Out Of +Asm?
  	Doc ID: 	Note:300472.1

ENABLE/DISABLE ARCHIVELOG MODE AND FLASH RECOVERY AREA IN A DATABASE USING ASM
  	Doc ID: 	Note:468984.1

Unable To Make Disks Available From Asmlib Using SAN
  	Doc ID: 	Note:302020.1

Oracle ASM and Multi-Pathing Technologies
  	Doc ID: 	Note:294869.1

How to rename ASM disks?
  	Doc ID: 	Note:418542.1

Does Asm Survive Change Of Disc Path?
  	Doc ID: 	Note:466231.1

Steps To Migrate/Move a Database From Non-ASM to ASM And Vice-Versa
  	Doc ID: 	Note:252219.1

Raw Devices and Cluster Filesystems With Real Application Clusters
  	Doc ID: 	Note:183408.1

How To Resize An ASM Disk On Release 10.2.0.X?
  	Doc ID: 	Note:470209.1

ASM Fast Mirror Resync - Example To Simulate Transient Disk Failure And Restore Disk
  	Doc ID: 	Note:443835.1


----------------------------------------------------------------------------------




Note:294869.1 Oracle ASM and Multi-Pathing Technologies
Note:461079.1 ASM does not discover disk(s) on AIX platform
Note:353761.1 Assigning a PVID To An Existing ASM Disk Corrupts the ASM Disk Header
Note:279353.1 Multiple 10g Oracle Home installation - ASM
Note:265633.1 ASM Technical Best Practices
Note:243245.1 10G New Storage Features and Enhancements
Note:282036.1 Minimum Software Versions and Patches Required to Support Oracle Products on IBM pSeries
Note:249992.1 New Feature on ASM (Automatic Storage Manager)
Note:252219.1 Steps To Migrate Database From Non-ASM to ASM And Vice-Versa
Note:303760.1 ASM & ASMlib Using Files Instead of Real Devices on Linux
Note:266028.1 ASM Using Files Instead of Real Devices on Linux
Note:471877.1 Raw Slice Not Showing Up When Trying To Add In Existing ASM Diskgroup
Note:551205.1 11g ASM New Features Technical White Paper
Note:402526.1 Asm Devices Are Still Held Open After Dismount or Drop
Note:452076.1 How To Change ASM SYS PASSWORD 
Note:340277.1 How to connect to ASM instance from a remote client (SQL*NET)
Note:351866.1 How To Reclaim Asm Disk Space
Note:470573.1 How To Delete SPFILE in +ASM DISKGROUP And Recreate in $ORACLE_HOME Directory
Note:458419.1 How to Bind RAW devices to Physical Partitions on Linux to be used by ASM
Note:469082.1 How To Setup ASM (10.2) on Windows Platforms
Note:471055.1 OUI Complains That ASM Is Not Release 2 While Installing 10g Database
Note:390274.1 How to move a datafile from a file system to ASM
Note:460909.1 Asm Can'T See Disks After Upgrade to 10.2.0.3 on Itanium
Note:382669.1 Duplicate database from non ASM to ASM (vise versa) to a different host
Note:413389.1 Asynchonous I/O not reported in /proc/slabinfo KIOCB slabdata
Note:437555.1 Created ASM Stamped Disks But Unable To Create Diskgroup
Note:370355.1 How to upgrade an ASM Instance From 10.2.0 lower version To higher version
Note:452924.1 How to Prepare Storage for ASM
Note:313387.1 HOWTO Which Disks Are Handled by ASMLib Kernel Driver
Note:331661.1 How to Re-configure Asm Disk Group
Note:428893.1 How to copy a datafile from ASM to a file system not using RMAN
Note:416046.1 ASM - Internal Handling of Block Corruptions
Note:340848.1 Performing duplicate database with ASM-OMF-RMAN
Note:342234.1 How to relocate an spfile from one ASM diskgroup to another on a RAC environment
Note:330084.1 Install: How To Migrate Oracle10g R1 ASM Database To 10g R2
Note:209850.1 RAC Survival Kit ORA-29702
Note:467354.1 ASM Crashes When Rebooting a Server With ORA-29702 Error
Note:334726.1 Cannot configure ASM because CSS Does Not Start on AIX 5L



STARTUP
Note:404728.1 Automatic Database Startup Does not Work With ASM through DBSTART.
Note:264235.1 ORA-29701 On Reboot When Instance Uses Automatic Storage Management (ASM)



DBMS_FILE_TRANSFER
Note:330103.1 How to Move Asm Database Files From one Diskgroup To Another


Async IO
Note:432854.1 Asynchronous IO Support on OCFS-OCFS2 and Related Settings filesystemio_options, disk_asynch_io
Note 237299.1 HOW TO CHECK IF ASYNCHRONOUS IO IS WORKING ON LINUX


Windows
Note 331796.1 How to setup ASM on Windows


11g
Note:429098.1 11g ASM New Feature
Note:443835.1 ASM Fast Mirror Resync - Example To Simulate Transient Disk Failure And Restore Disk
Note:445037.1 ASM Fast Rebalance





Note 199457.1 Step-By-Step Installation of RAC on IBM AIX (RS/6000)
Note:240575.1 RAC on Linux Best Practices
Note:245356.1 Oracle9i - AIX5L Installation Tips


Note:29676.1 Making the decision to use raw devices
Note:38281.1 RAID and Oracle - 20 Common Questions and Answers
ASM & ASMlib Using Files Instead of Real Devices on Linux
  	Doc ID: 	Note:303760.1
Configuring Oracle ASMLib on Multipath Disks
  	Doc ID: 	Note:309815.1
Tips On Installing and Using ASMLib on Linux
  	Doc ID: 	Note:394953.1
Raw Devices on Linux
  	Doc ID: 	Note:224302.1









-- PERFORMANCE 

File System's Buffer Cache versus Direct I/O
  	Doc ID: 	Note:462072.1

ASMIOSTAT Script to collect iostats for ASM disks
  	Doc ID: 	437996.1










Note:341782.1 Linux Quick Reference
Note:264736.1 How to Create a Filesystem inside of a Linux File (loop device)




-- 11gR2 BUG DETECT ASM ON OCR
Device Checks for ASM Fails with PRVF-5150: Path ORCL: is not a valid path [ID 1210863.1]
FAQ ASMLIB CONFIGURE,VERIFY, TROUBLESHOOT [ID 359266.1]
http://oraclue.com/2010/11/09/grid-11-2-0-2-install-nightmare/
http://gjilevski.wordpress.com/2010/10/03/fresh-oracle-11-2-0-2-grid-infrastructure-installation-prvf-5150-prvf-5184/
PRVF-5449 : Check of Voting Disk location "ORCL:(ORCL:)" failed [ID 1267569.1]



-- DROP DISK ISSUE, BUG

ORA-15041 V$ASM_DISK Shows HUNG State for Dropped Disks
  	Doc ID: 	Note:419014.1

ORA-15041 IN A DISKGROUP ALTHOUGH FREE_MB REPORTS SUFFICIENT SPACE
  	Doc ID: 	Note:460155.1



-- DROP/CREATE

How To Add Back An ASM Disk or Failgroup (Normal or High Redundancy) After A Transient Failure Occurred (On Release 10.2. or 10.1)? (Doc ID 946213.1)




-- BUG FIXES ON AIX 64bit 10.2.0.2

Note 433399.1-Could not add datafile due to ORA-01119, ORA-17502 and ORA-15041

	1. Apply fix for Patch 4691191.
	OR
	2. Apply 10.2.0.3.




-- AIX

Subject: 	ASM does not discover disk(s) on AIX platform
  	Doc ID: 	Note:461079.1 	Type: 	PROBLEM
  	Last Revision Date: 	24-JAN-2008 	Status: 	PUBLISHED


-- UPGRADE ASM

How to upgrade ASM instance from 10.1 to 10.2 (Single Instance)
  	Doc ID: 	Note:329987.1
  	
How To Upgrade ASM from 10.2 to 11.1 (single Instance configuration / Non-RAC)?
 	Doc ID:	Note:736121.1
 	
How To Upgrade ASM from 10.2 to 11.1 (RAC)?
 	Doc ID:	Note:736127.1
 	
How to upgrade an ASM Instance From 10.2.0 lower version To higher version? from 10.2.0.1 to patchset 10.2.0.2
 	Doc ID:	Note:370355.1
 	
Install: How To Migrate Oracle10g R1 ASM Database To 10g R2
 	Doc ID:	Note:330084.1
  	
Asm Can'T See Disks After Upgrade to 10.2.0.3 on Itanium
 	Doc ID:	Note:460909.1
 	


-- UNINSTALL

How to cleanup ASM installation (RAC and Non-RAC)
  	Doc ID: 	Note:311350.1




-- QUERY

ASM Extent Size 
  Doc ID:  Note:465039.1 

How To Identify If A Disk/Partition Is Still Used By ASM, Has Been Used by ASM Or Has Not Been Used by ASM (Unix/Linux)?
  	Doc ID: 	603210.1



-- DEBUG

Information to gather when diagnosing ASM space issues
 	Doc ID:	Note:351117.1

How To Gather/Backup ASM Metadata In A Formatted Manner? 
  Doc ID:  Note:470211.1 
 	
 	
 	
-- COMPATIBLE.ASM

Bug 7173616 - CREATE DISKGROUP with compatible.asm=10.2 fails (OERI:kfdAllocateAu_00)
 	Doc ID:	Note:7173616.8
 	
 	
-- 11g NEW FEATURE

11g ASM New Feature
 	Doc ID:	Note:429098.1
 	
 	


-- RESIZE

How to resize a physical disk or LUN and an ASM DISKGROUP
  	Doc ID: 	311619.1



-- RAC ASM

How to Convert a Single-Instance ASM to Cluster ASM
  	Doc ID: 	452758.1




-- LABEL

Adding The Label To ASMLIB Disk Using 'oracleasm renamedisk' Command
  	Doc ID: 	280650.1 	


-- REMOVE INSTANCE

How to remove an ASM instance and its corresponding database(s) on WINDOWS?
  	Doc ID: 	342530.1 	



-- ADD DISK

How To Add a New Disk(s) to An Existing Diskgroup on RAC (Best Practices). (Doc ID 557348.1)



-- ADD DISK WINDOWS

RAC Assurance Support Team: RAC Starter Kit and Best Practices (Windows) [ID 811271.1]
How To Setup ASM (10.2) on Windows Platforms [ID 469082.1]
ORA-17502 and ORA-15081 when creating a datafile on a ASM diskgroup [ID 369898.1]
New Partitions in Windows 2003 RAC Environments Not Visible on Remote Nodes [ID 454607.1]
RAC: Frequently Asked Questions [ID 220970.1]
Oracle Tools Available for Working With RAW Partitions on Windows Platforms [ID 555645.1]  	 
How to Extend A Raw Logical Volume in Windows [ID 555273.1]  	 
OCR / Vote disk Maintenance Operations: (ADD/REMOVE/REPLACE/MOVE), including moving from RAW Devices to Block Devices. [ID 428681.1]   <-- helpful
Asmtoolg Generates An Access Violation When Stamping Disks [ID 443635.1]
Disk Is not Discovered in ASM, Diskgroup Creation Fails with Ora-15018 Ora-15031 Ora-15014 [ID 431013.1]  	 



-- REMOVE DISK

How to Dynamically Add and Remove SCSI Devices on Linux
  	Doc ID: 	603868.1


-- RESYNC

ASM 11g New Features - How ASM Disk Resync Works. (Doc ID 466326.1)



-- RENAME DISK

How to rename ASM disks? (Doc ID 418542.1)
Adding The Label To ASMLIB Disk Using 'oracleasm renamedisk' Command (Doc ID 280650.1)
Oracleasm Createdisk Fails: Device '/dev/emcpoweraxx Is Not A Partition [Failed] (Doc ID 469163.1)
New ASMLib / oracleasm Disk Gets "header_status=Unknown" - Cannot be Added to Diskgroup (Doc ID 391136.1)
Oracleasm Createdisk Fails: Device '/dev/emcpoweraxx Is Not A Partition [Failed] (Doc ID 469163.1)



-- PASSWORD

How To Change ASM SYS PASSWORD ?
  	Doc ID: 	452076.1


-- CSS MISCOUNT

How to Increase CSS Misscount in single instance ASM installations
 	Doc ID:	Note:729878.1
 	
10g RAC: Steps To Increase CSS Misscount, Reboottime and Disktimeout
 	Doc ID:	Note:284752.1



-- CLEAN UP ASM INSTALL, UNINSTALL

How to cleanup ASM installation (RAC and Non-RAC)
  	Doc ID: 	311350.1



-- RECREATE ASM DISKGROUPS

Steps to Re-Create ASM Diskgroups
  	Doc ID: 	Note:268481.1



-- DUPLICATE CONTROLFILE

Note 345180.1 - How to duplicate a controlfile when ASM is involved



-- MULTIPLE ASM HOME

Multiple 10g Oracle Home installation - ASM
  	Doc ID: 	279353.1



-- 11g CP command

ASMCMD cp command fails with ORA-15046
  	Doc ID: 	452158.1

ASMCMD - New commands in 11g
  	Doc ID: 	451900.1

Copying File Using ASMCMD Copy Command Failed With ASMCMD-08010
  	Doc ID: 	786364.1

Unable To Copy Directory Using ASMCMD Cp -r Command
  	Doc ID: 	829040.1

Asmcmd CP Command Can Not Copy Files Larger Than 2 GB
  	Doc ID: 	786258.1



-- EXPDP

Creating dumpsets in ASM
  	Doc ID: 	559878.1

How To Extract Datapump File From ASM Diskgroup To Local Filesystem?
  	Doc ID: 	566941.1



-- MIGRATION

How to Prepare Storage for ASM
  	Doc ID: 	452924.1

Exact Steps To Migrate ASM Diskgroups To Another SAN Without Downtime.
  	Doc ID: 	837308.1

Steps To Migrate/Move a Database From Non-ASM to ASM And Vice-Versa
  	Doc ID: 	252219.1

How To Migrate From OCFS To ASM
  	Doc ID: 	579468.1

Install: How To Migrate Oracle10g R1 ASM Database To 10g R2
  	Doc ID: 	330084.1

Migrating Raw Devices to ASMLib on Linux
  	Doc ID: 	394955.1

How To Migrate ASMLIB devices to Block Devices (non-ASMLIB)?
  	Doc ID: 	567508.1



-- FAILOVER

Does Oracle Support Failover Of Asm Based Instance
  	Doc ID: 	762674.1



-- MOVE FILES IN ASM

How to move a datafile from a file system to ASM [ID 390274.1]
How to Copy Archivelog Files From ASM to Filesystem and vice versa [ID 944831.1]
How to transfer backups from ASM to filesystem when restoring to a new host [ID 345134.1]
How To Move Controlfile To ASM [ID 468458.1]
Can RMAN duplex backups to Flash Recovery Area and a Disk location [ID 434222.1]
How to restore archive logs to an alternative location when they already reside on disk [ID 399894.1]
How To Backup Database When Files Are On Raw Devices/File System [ID 469716.1]
RMAN10g: backup copy of database [ID 266980.1]
How To Move The Database To Different Diskgroup (Change Diskgroup Redundancy) [ID 438580.1]  	 



-- 11gR2, Grid Infra
ASM 11.2 Configuration KIT (ASM 11gR2 Installation & Configuration, Deinstallation, Upgrade, ASM Job Role Separation. [ID 1092213.1]
11gR2 Clusterware and Grid Home - What You Need to Know [ID 1053147.1]
Pre 11.2 Database Issues in 11gR2 Grid Infrastructure Environment [ID 948456.1]
Database Creation on 11.2 Grid Infracture with Role Separation ( ORA-15025, KFSG-00312, ORA-15081 ) [ID 1084186.1]




-- ACFS - backup and recovery, rman acfs
https://forums.oracle.com/forums/thread.jspa?threadID=2175933
http://download.oracle.com/docs/cd/E11882_01/server.112/e16102/asmfiles.htm#g1030822   <-- supported files on acfs



-- Backing Up an ASM Instance [ID 333257.1]




-- RAW DEVICES

Raw Devices and Cluster Filesystems With Real Application Clusters
  	Doc ID: 	183408.1



-- ASM SEPARATE HOME

DBCA Rejects Asm Password When Creating a New Database
  	Doc ID: 	431312.1

DBCA Is Unable To Connect To +ASM Instance With Error : Invalid Credentials
  	Doc ID: 	277223.1



Diskgroup Mount with Long ASMLib Labels Fails with ORA-15040 ORA-15042
  	Doc ID: 	787082.1

Placeholder for AMDU binaries and using with ASM 10g
  	Doc ID: 	553639.1

How To Migrate ASMLIB devices to Block Devices (non-ASMLIB)?
  	Doc ID: 	567508.1

Bug 5039964 - ASM disks show as provisioned although kfed shows valid disk header
  	Doc ID: 	5039964.8

ORA-15063 When Mounting a Diskgroup After Storage Cloning
  	Doc ID: 	784776.1

ORA-15036 When Starting An ASM Instance
  	Doc ID: 	553319.1

CASE STUDY - WHAT CAUSED ERROR ora-1186 ora-1122 on RAC with ASM
  	Doc ID: 	333816.1

ASM Using Files Instead of Real Devices on Linux
  	Doc ID: 	266028.1





}}}


http://kerryosborne.oracle-guy.com/2009/07/how-to-attach-a-sql-profile-to-a-different-statement/

HOWTO: bad plan to good plan switch http://www.evernote.com/shard/s48/sh/308af73e-47bc-4598-ab31-77ab74cbbed9/7acc32b91ebb64639116d3931a4e9935
http://www.oraclemusings.com/?p=103
http://www.oaktable.net/content/auto-dop-and-direct-path-inserts
http://www.pythian.com/news/27867/secrets-of-oracles-automatic-degree-of-parallelism/
http://uhesse.wordpress.com/2011/10/12/auto-dop-differences-of-parallel_degree_policyautolimited/
http://uhesse.wordpress.com/2009/11/24/automatic-dop-in-11gr2/
http://www.rittmanmead.com/2010/01/in-memory-parallel-execution-in-oracle-database-11gr2/


! AUTO DOP
{{{
delete from resource_io_calibrate$;
insert into resource_io_calibrate$ values(current_timestamp, current_timestamp, 0, 0, 200, 0, 0);
commit;
alter system set parallel_degree_policy=AUTO scope=both sid='*';
alter system flush shared_pool;
select 'alter table '||owner||'.'||table_name||' parallel (degree default);' from dba_tables where owner='<app schema>'
}}}

! AUTO DOP + PX queueing, with no in-mem PX
{{{
delete from resource_io_calibrate$;
insert into resource_io_calibrate$ values(current_timestamp, current_timestamp, 0, 0, 200, 0, 0);
commit;
alter system set parallel_degree_policy=LIMITED scope=both sid='*';
alter system set "_parallel_statement_queuing"=TRUE scope=both sid='*';
}}}

''and some other config variations....''
<<<
!AUTO DOP PATH AND IGNORE HINTS
{{{
1) Calibrate the IO
 
delete from resource_io_calibrate$;
insert into resource_io_calibrate$ values(current_timestamp, current_timestamp, 0, 0, 200, 0, 0);
commit;
 
2) Parallel_Degree_policy=limited
3) _parallel_statement_queueing=true
4) alter session set "_optimizer_ignore_hints" = TRUE ;
5) set the table and index to “default” degree
}}}
 
! NO AUTO DOP PATH AND IGNORE HINTS
{{{
1) Calibrate the IO
 
delete from resource_io_calibrate$;
insert into resource_io_calibrate$ values(current_timestamp, current_timestamp, 0, 0, 200, 0, 0);
commit;
 
2) Resource manager directive to limit the PX per session  = per session 4
3) alter session set "_optimizer_ignore_hints" = TRUE ;
4) _parallel_statement_queueing=true
}}}
 
! NO AUTO DOP PATH WITHOUT IGNORING HINTS
{{{
1) Calibrate the IO
 
delete from resource_io_calibrate$;
insert into resource_io_calibrate$ values(current_timestamp, current_timestamp, 0, 0, 200, 0, 0);
commit;
 
2) Resource manager directive to limit the PX per session  = per session 4
3) _parallel_statement_queueing=true
}}}
<<<


! Monitoring
<<<
! determine if PX underscore params are set
{{{
select a.ksppinm name, b.ksppstvl value
from x$ksppi a, x$ksppsv b
where a.indx = b.indx
and a.ksppinm in ('_parallel_cluster_cache_pct','_parallel_cluster_cache_policy','_parallel_statement_queuing','_optimizer_ignore_hints')
order by 1,2
/
}}}

! list if SQLs are using in-mem PX
{{{
The fourth column indicates whether the cursor was satisfied using In-Memory PX; if the 
number of parallel servers is greater than zero but the bytes eligible for predicate offload is
zero, it’s a good indication that In-Memory PX was in use.

select ss.sql_id,
sum(ss.PX_SERVERS_EXECS_total) px_servers,
decode(sum(ss.io_offload_elig_bytes_total),0,'No','Yes') offloadelig,
decode(sum(ss.io_offload_elig_bytes_total),0,'Yes','No') impx,
sum(ss.io_offload_elig_bytes_total)/1024/1024 offloadbytes,
sum(ss.elapsed_time_total)/1000000/sum(ss.px_servers_execs_total) elps,
dbms_lob.substr(st.sql_text,60,1) st
from dba_hist_sqlstat ss, dba_hist_sqltext st
where ss.px_servers_execs_total > 0
and ss.sql_id=st.sql_id
and upper(st.sql_text) like '%IN-MEMORY PX T1%'
group by ss.sql_id,dbms_lob.substr(st.sql_text,60,1)
order by 5
/
}}}
<<<



! Quick PX test case
{{{

select degree,num_rows from dba_tables
where owner='&owner' and table_name='&table_name';

#!/bin/sh
for i in 1 2 3 4 5
do
nohup sqlplus oracle/oracle @px_test.sql $i &
done

set serveroutput on size 20000
variable n number
exec :n := dbms_utility.get_time;
spool autodop_&1..lst
select /* queue test 0 */ count(*) from big_table;
begin
dbms_output.put_line
( (round((dbms_utility.get_time - :n)/100,2)) || ' seconds' );
end;
/
spool off
exit

}}}

Related articles:
http://jamesmorle.wordpress.com/2010/06/02/log-file-sync-and-awr-not-good-bedfellows/
http://rnm1978.wordpress.com/2010/09/14/the-danger-of-averages-measuring-io-throughput/


Investigate on metric tables.. especially the fileio metric which has 10 minutes deltas.. 

-- note: average_read_time is in centiseconds.. *10 to make it ms.. 
alter session set nls_date_format='dd-mm-yyyy hh24:mi';
select begin_time, end_time, file_id, 
physical_reads reads, 
nvl(physical_reads,0)/603 rps, 
average_read_time*10 atpr, 
nvl(physical_block_reads,0) / decode(nvl(physical_reads,0),0,to_number(NULL),physical_reads) bpr, 
physical_writes writes,
nvl(physical_writes,0)/603 wps,
average_write_time*10 atpwt,  
nvl(physical_block_writes,0)/ decode(nvl(physical_writes,0),0,to_number(NULL),physical_writes) bpw,
physical_reads + physical_writes ios,
nvl((physical_reads + physical_writes),0) / 60000 iops
from v$filemetric_history order by 1 asc;


{{{
sys@IVRS> set lines 300
drop table ioms;
create table ioms as select 
                                      file#
                                      , nvl(b.phyrds,0)  phyrds
                                      , nvl(b.readtim,0)  readtim
                                      , nvl(b.phywrts,0)  phywrts
                                      , nvl(b.phyblkrd,0) phyblkrd
from v$filestat b;

exec dbms_lock.sleep(seconds => 600);

select 
                                        e.file#
                                      , nvl(e.phyrds,0)  ephyrds
                                      , nvl(e.readtim,0)  ereadtim
                                      , nvl(e.phywrts,0)  ephywrts
                                      , nvl(e.phyblkrd,0) ephyblkrd
                                      , e.phyrds - i.phyrds                       reads
                                      , (e.phyrds - nvl(i.phyrds,0))/ 603                rps
                                      , decode ((e.phyrds - nvl(i.phyrds, 0)), 0, to_number(NULL), ((e.readtim  - nvl(i.readtim,0)) / (e.phyrds   - nvl(i.phyrds,0)))*10)         atpr_ms
                                      , decode ((e.phyrds - nvl(i.phyrds, 0)), 0, to_number(NULL), (e.phyblkrd - nvl(i.phyblkrd,0)) / (e.phyrds   - nvl(i.phyrds,0)) )             bpr
                                      , e.phywrts - nvl(i.phywrts,0)                    writes
                                      , (e.phywrts - nvl(i.phywrts,0))/ 603             wps
                                      , (e.phyrds  - nvl(i.phyrds,0)) + (e.phywrts - nvl(i.phywrts,0))                     ios,
                                     ((e.phyrds  - nvl(i.phyrds,0)) + (e.phywrts - nvl(i.phywrts,0))) / 600 iops     
from v$filestat e, ioms i
where e.file# = i.file#;sys@IVRS> 
Table dropped.

sys@IVRS>   2    3    4    5    6    7  
Table created.

sys@IVRS> sys@IVRS> 

PL/SQL procedure successfully completed.

sys@IVRS> sys@IVRS>   2    3    4    5    6    7    8    9   10   11   12   13   14   15   16  
     FILE#    EPHYRDS	EREADTIM   EPHYWRTS  EPHYBLKRD	    READS	 RPS	ATPR_MS        BPR     WRITES	     WPS	IOS	  IOPS
---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ----------
	 1	 7374	   12818	446	 10365		1 .001658375	      0 	 1	   26 .043117745	 27	  .045
	 2	   62	     144	472	    62		0	   0				   26 .043117745	 26 .043333333
	 3	 2990	    4699	907	  9525		0	   0				   10 .016583748	 10 .016666667
	 4	 8803	    4715       1104	 37702		9 .014925373 6.66666667 	 1	   78 .129353234	 87	  .145
	 5	   66	     115	  9	    93		0	   0				    0	       0	  0	     0
	 6	    5	       6	  1	     5		0	   0				    0	       0	  0	     0
	 7	    5	       1	  1	     5		0	   0				    0	       0	  0	     0
	 8	    5	       2	  1	     5		0	   0				    0	       0	  0	     0
	 9	    5	       2	  1	     5		0	   0				    0	       0	  0	     0
	10	    5	       2	  1	     5		0	   0				    0	       0	  0	     0
	11	    5	       2	  1	     5		0	   0				    0	       0	  0	     0
	12	    5	      15	  1	     5		0	   0				    0	       0	  0	     0
	13	 2341	    2333       1297	 10584	       16 .026533997	  5.625 	 1	   76 .126036484	 92 .153333333

13 rows selected.
}}}


{{{
BEGIN_TIME	 END_TIME	     FILE_ID AVERAGE_READ_TIME*10 AVERAGE_WRITE_TIME*10 PHYSICAL_READS PHYSICAL_WRITES PHYSICAL_BLOCK_READS PHYSICAL_BLOCK_WRITES
---------------- ---------------- ---------- -------------------- --------------------- -------------- --------------- -------------------- ---------------------
17-06-2010 01:28 17-06-2010 01:38	  12			0		      0 	     0		     0			  0			0
17-06-2010 01:28 17-06-2010 01:38	  11			0		      0 	     0		     0			  0			0
17-06-2010 01:28 17-06-2010 01:38	  10			0		      0 	     0		     0			  0			0
17-06-2010 01:28 17-06-2010 01:38	   9			0		      0 	     0		     0			  0			0
17-06-2010 01:28 17-06-2010 01:38	   8			0		      0 	     0		     0			  0			0
17-06-2010 01:28 17-06-2010 01:38	   7			0		      0 	     0		     0			  0			0
17-06-2010 01:28 17-06-2010 01:38	  13		    5.625		      0 	    16		    76			 16		      179
17-06-2010 01:28 17-06-2010 01:38	   2			0		      0 	     0		    26			  0		       83
17-06-2010 01:28 17-06-2010 01:38	   3			0		      0 	     0		    10			  0		       10
17-06-2010 01:28 17-06-2010 01:38	   4	       6.66666667		      0 	     9		    78			  9		       93
17-06-2010 01:28 17-06-2010 01:38	   5			0		      0 	     0		     0			  0			0
17-06-2010 01:28 17-06-2010 01:38	   6			0		      0 	     0		     0			  0			0
17-06-2010 01:28 17-06-2010 01:38	   1			0		      0 	     1		    28			  1		       30
}}}
{{{
Karl@Karl-LaptopDell /cygdrive/c/Users/Karl/Desktop
$ cat awk.txt
11 12 13
21 22 23
31 32 33

Karl@Karl-LaptopDell /cygdrive/c/Users/Karl/Desktop
$ cat awk.txt | awk 'FNR == 2 {print $2}'				<-- output line 2 column 2
22

$ cat awk.txt | awk '$2=="12"||$2=="32" {print $0}'		<-- filter rows on column 2 with "12" or "32"
11 12 13
31 32 33

$ cat awr_genwl.txt | awk '{print $0}'						<-- output all rows and columns

$ cat awr_genwl.txt | awk '{print $2}'						<-- output only column 2

$ cat awr_genwl.txt | awk '$4=="1" {print $0}'			<-- filter on column 4 (instance number) with value "1" and output all rows with that value

$ cat awr_genwl.txt | awk '$4=="1" &&  $12>10 {print $0}'		<-- filter on column 4 and 12 (AAS) with values "1" and "AAS greater than 10" and output all rows with that value
}}}

{{{
cat awr_iowlexa.txt | awk '$6>1 {print $1,$2,$3,$6}' | less    <-- will show snap_id, tm, aas > 1
cat awr_topsqlexa2.txt | awk '$6>1 {print $1,$6,$27,$28,$29,$30}' | less     <-- will show snap_id, sql, aas > 1 
}}}


''awk dcli vmstat output''
dcli -l root -g cell_group --vmstat 1 > oslogs.txt
{{{
-- add the usr and sys columns
 cat osload.txt | grep cx02db01 | awk '{print $14 + $15}' > cx02db01.txt

-- add the usr and sys columns for storage cells
cat osload.txt | egrep "cx02cel01|cx02cel02|cx02cel03" | awk '{print $14 + $15}' > storagecells.txt


-- discover the bad lines in vmstat output
cat snap_724-725_1057-1107.txt | grep cx02db01 | grep -v memory | grep -v buff | perl -p -e "s|  | |g" -| perl -p -e "s|  | |g" - | perl -p -e "s|  | |g" - | awk 'BEGIN {x=1}; {print x++ " " $1 " " $2 " " $3 " " $4 " " $5 " " $6 " " $7 " " $8 " " $9 " " $10 " " $11 " " $12 " " $13 " " $14 " " $15 " " $16;}' | column -t | less


-- gives you bad vmstat lines where cs and us columns are not aligning
cat snap_724-725_1057-1107.txt | grep cx02db01 | grep -v memory | grep -v buff | perl -p -e "s|  | |g" -| perl -p -e "s|  | |g" - | perl -p -e "s|  | |g" - | awk 'BEGIN {x=1}; {print x++ " " $1 " " $2 " " $3 " " $4 " " $5 " " $6 " " $7 " " $8 " " $9 " " $10 " " $11 " " $12 " " $13 " " $14 " " $15 " " $16;}' | column -t | grep '\:[0-9]' | less


-- will show the data bug !!!!
cat oslogs.txt | awk 'BEGIN{buf=""} /[0-9]:[0-9][0-9]:[0-9]/{buf=$0} /cx02db01/{print $0,buf}' | column -t | grep '[a-zA-Z0-9]\{8\}:[0-9]\{2\}' | wc -l


prints the usr sys
 cat fixed.txt | awk '{print $14, $15, $16}'

prints usr without the newline and us
cat start.txt | awk '{ print $1 }' | grep . | grep -v us | less


-- discard zero 
cat finalout.txt | awk ' $0>0 { print $0 }' | less
}}}

''Final''
{{{
# vmstat.sh
# usage:
# sh vmstat.sh <text file output> <hostname filter>
# sh vmstat.sh oslogs.txt cx02db01

# cleanup
rm $2_datapoints.txt &> /dev/null

# regex stuff
foo=`echo "$2"| wc -c`; count=$((${foo}-1))
regexp=[a-zA-Z0-9]'\'{$count'\'}:[0-9]'\'{2'\'}

cat > $2_execvmstat.sh << EOF

# fix the vmstat data bug
cat $1 | awk 'BEGIN{buf=""} /[0-9]:[0-9][0-9]:[0-9]/{buf=\$0} /$2/{print \$0,buf}' | column -t | grep -v '$regexp' > $2_good.txt
cat $1 | awk 'BEGIN{buf=""} /[0-9]:[0-9][0-9]:[0-9]/{buf=\$0} /$2/{print \$0,buf}' | column -t | grep '$regexp' > $2_bad.txt
cat $2_good.txt | awk '{print \$19, "$2", \$14, \$15, \$16, \$17, \$18, \$14+\$15+\$17+\$18 }' | column -t >> $2_datapoints.txt
cat $2_bad.txt | awk '{print \$18, "$2", \$13, \$14, \$15, \$16, \$17, \$13+\$14+\$16+\$17}' | column -t >> $2_datapoints.txt

# create files for statistical analysis
sort -k1 $2_datapoints.txt | awk '\$8>0 {print \$8}' | sort -n > $2_graph_totcpu.txt
sort -k1 $2_datapoints.txt | awk '\$3+\$4>0 {print \$3+\$4}' | sort -n > $2_graph_usrsys.txt
sort -k1 $2_datapoints.txt | awk '\$6>0 {print \$6}' | sort -n > $2_graph_wa.txt

# show data points above 70pct total cpu 
sort -k1 $2_datapoints.txt | awk '\$8>70 {print \$0}' > $2_data_totcpu_gt70pct.txt

# show data points above 70pct usr and sys
sort -k1 $2_datapoints.txt | awk '\$3+\$4>70 {print \$0}' > $2_data_usrsys_gt70pct.txt

# show data points above 0pct wait io
sort -k1 $2_datapoints.txt | awk '\$6>0 {print \$0}' > $2_data_wa_gt0pct.txt

# wc on all output files
wc -l $2_graph_totcpu.txt
wc -l $2_graph_usrsys.txt
wc -l $2_graph_wa.txt
wc -l $2_data_totcpu_gt70pct.txt
wc -l $2_data_usrsys_gt70pct.txt
wc -l $2_data_wa_gt0pct.txt

EOF

sh $2_execvmstat.sh
}}}

http://stackoverflow.com/questions/3600170/how-to-cat-two-files-after-each-other-but-omit-the-last-first-line-respectively
http://www.google.com.ph/search?q=cat+filter+2+lines+before&hl=tl&prmd=ivns&ei=yR7MTZO4E9Sutweo_8XrBw&start=20&sa=N
http://www.ibm.com/developerworks/aix/library/au-badunixhabits.html
http://www.linuxquestions.org/questions/linux-software-2/cat-output-specific-number-of-lines-130360/
http://stackoverflow.com/questions/4643022/awk-and-cat-how-to-ignore-multiple-lines
http://tldp.org/LDP/abs/html/textproc.html <-- GOOD STUFF
http://www.ibm.com/developerworks/linux/library/l-lpic1-v3-103-2/ <-- GOOD STUFF
http://www.google.com.ph/search?sourceid=chrome&ie=UTF-8&q=grep+2+lines+before
http://www.dbforums.com/unix-shell-scripts/1069858-printing-2-2-line-numbers-including-grep-word-line.html 
http://www.google.com.ph/search?q=how+to+grep+specific+lines&hl=tl&prmd=ivnsfd&ei=nyDMTemaMcOgtgejksT5Bw&start=10&sa=N <-- GOOD STUFF
http://www.computing.net/answers/unix/grep-to-find-a-specific-line-number/6484.html
http://www.unix.com/shell-programming-scripting/67045-grep-specific-line-file.html  <-- grep specific line
http://stackoverflow.com/questions/2914197/how-to-grep-out-specific-line-ranges-of-a-file
http://forums.devshed.com/unix-help-35/displaying-lines-above-grep-ed-line-173427.html
http://vim.1045645.n5.nabble.com/How-to-go-a-file-at-a-specific-line-number-using-the-output-from-grep-td1186768.html
http://www.google.com.ph/search?q=grep+usr+column+vmstat&hl=tl&prmd=ivns&ei=MyjMTdy0OoOutwfjqqDjBw&start=10&sa=N  <-- vmstat cs usr
http://www.tuschy.com/nagios/plugins/check_cpu_usage
http://ytrudeau.wordpress.com/2007/11/20/generating-graphs-from-vmstat-output/  <-- GOOD STUFF
http://sourceforge.net/projects/gnuplot/files/gnuplot/4.4.3/ <-- gnuplot
http://www.google.com.ph/search?q=vmstat+aligning&hl=tl&prmd=ivns&ei=qi7MTauxJ8jj0gH4p4n4Bg&start=20&sa=N <-- vmstat aligning
http://stackoverflow.com/questions/3259776/vmstat-and-column <-- GOOD STUFF column -t
http://www.robelle.com/smugbook/regexpr.html <-- GOOD STUFF searching files on linux
http://unix.ittoolbox.com/groups/technical-functional/ibm-aix-l/vmstat-and-ps-ef-columns-not-aligning-786668 <-- GOOD STUFF cs and usr column issue
http://www.issociate.de/board/post/235976/sed_and_newline_(x0a).html
http://www.commandlinefu.com/commands/view/2942/remove-newlines-from-output  <-- GOOD STUFF remove newline
http://linux.dsplabs.com.au/rmnl-remove-new-line-characters-tr-awk-perl-sed-c-cpp-bash-python-xargs-ghc-ghci-haskell-sam-ssam-p65/ <-- GOOD STUFF remove new line
http://www.tek-tips.com/viewthread.cfm?qid=1211423&page=1
http://www.computing.net/answers/unix/sed-newline/5640.html
## additional links on the script creation
http://3spoken.wordpress.com/2006/12/10/cpu-steal-time-the-new-statistic/   <-- GOOD STUFF "Steal Time" cpu statistic
http://goo.gl/OPukP  <-- put in one line
http://compgroups.net/comp.unix.solaris/Adding-date-time-to-line-in-vmstat  <-- GOOD STUFF vmstat with time output 
             vmstat 2 | while read line; do echo "`date +%T/%m/%d/%y`" "$line" ; done
http://bytes.com/topic/db2/answers/644323-include-date-time-vmstat
http://mishmashmoo.com/blog/?p=65   <-- GOOD STUFF from a performance tester.. reformating vmstat/sar/iostat logs :: loadrunner analysis
http://www.regexbuddy.com/create.html <-- GOOD STUFF regex buddy
http://gskinner.com/RegExr/ <-- regex tool
http://www.fileformat.info/tool/regex.htm <-- regex tool
http://www.txt2re.com/index-perl.php3?s=cx02db01:25&-24&-1 <-- regex tool 
http://www.regular-expressions.info/reference.html <-- GOOD STUFF reference for REGEX!!!
http://stackoverflow.com/questions/304864/how-do-i-use-regular-expressions-in-bash-scripts
http://work.lauralemay.com/samples/perl.html <-- GOOD STUFF chapter on regex
http://ask.metafilter.com/80862/how-split-a-string-in-bash  <-- split a string in bash
http://www.linuxforums.org/forum/programming-scripting/136269-bash-scripting-can-i-split-word-letter.html <-- split word
http://www.google.com.ph/search?sourceid=chrome&ie=UTF-8&q=grep+%5C%3A%5B0-9%5D <-- search grep \:[0-9]
http://www.unix.com/unix-dummies-questions-answers/128913-finding-files-numbers-file-name.html <-- find file numbers name
http://www.cyberciti.biz/faq/grep-regular-expressions/ <-- GOOD STUFF on regex CYBERCITI
http://www.robelle.com/smugbook/regexpr.html <-- REALLY GOOD STUFF.. got the idea of awk a-zA-Z0-9
http://goo.gl/KV47w <-- search bash word count
http://linux.byexamples.com/archives/57/word-count/#comments <-- GOOD STUFF word count
http://www.softpanorama.org/Scripting/Shellorama/arithmetic_expressions.shtml 
http://stackoverflow.com/questions/673016/bash-how-to-do-a-variable-expansion-within-an-arithmetic-expression <-- REALLY GOOD STUFF word count
http://goo.gl/dyYsf   <-- search on grep: Invalid content of \{\} variable
http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg53360.html
http://marc.info/?l=logcheck-devel&m=114076370027762
http://us.generation-nt.com/answer/bug-575204-initscripts-grep-complains-about-invalid-back-reference-umountfs-help-196593881.html
http://www.unix.com/unix-dummies-questions-answers/158405-modifying-shell-script-without-using-editor.html <-- REALLY GOOD STUFF create script w/o editor
http://goo.gl/LLaPG <-- search sed + put space
http://www.unix.com/shell-programming-scripting/41417-add-white-space-end-line-sed.html
http://www.unix.com/shell-programming-scripting/150966-help-sed-insert-space-between-string-form-xxxaxxbcx-without-replacing-pattern.html
http://goo.gl/LeDay <-- search bash sort column
http://www.skorks.com/2010/05/sort-files-like-a-master-with-the-linux-sort-command-bash/ <-- REALLY GOOD STUFF BASH SORTING
http://www.linuxquestions.org/questions/linux-newbie-8/sorting-columns-in-bash-664705/ <-- REALLY GOOD STUFF sort -k1















''References:''

Filter records in a file with sed or awk (UNIX)
http://p2p.wrox.com/other-programming-languages/70727-filter-records-file-sed-awk-unix.html  <-- GOOD STUFF

how to get 2 row 2 column
http://studentwebsite.blogspot.com/2010/11/how-to-get-2-row-2-column-using-awk.html  <-- GOOD STUFF

Filtering rows for first two instances of a value
http://www.unix.com/shell-programming-scripting/135452-filtering-rows-first-two-instances-value.html

Deleting specific rows in large files having rows greater than 100000
http://www.unix.com/shell-programming-scripting/125807-deleting-specific-rows-large-files-having-rows-greater-than-100000-a.html

awk notes
http://www.i-justblog.com/2009/07/awk-notes.html

awk to select a column from particular line number
http://www.unix.com/shell-programming-scripting/27255-awk-select-column-particular-line-number.html

select row and element in awk
http://stackoverflow.com/questions/1506521/select-row-and-element-in-awk

Filter and migrate data from row to column
http://www.unix.com/shell-programming-scripting/137404-filter-migrate-data-row-column.html

Extracting particular column name values using sed/ awk/ perl
http://stackoverflow.com/questions/1630710/extracting-particular-column-name-values-using-sed-awk-perl

AWK SELECTION
https://www.prodigyone.com/in/doc/docs.php?view=1&nid=317


AWK one liners
http://www.krazyworks.com/useful-awk-one-liners/   <-- AWK NR==




http://www.idevelopment.info/data/Oracle/DBA_tips/LOBs/LOBS_1.shtml
http://www.idevelopment.info/data/Oracle/DBA_tips/LOBs/LOBS_5.shtml

-- quick example
{{{

mkdir -p /home/oracle/oralobfiles
grant create any directory to hr;


DROP TABLE test_lob CASCADE CONSTRAINTS
/

CREATE TABLE test_lob (
      id           NUMBER(15)
    , clob_field   CLOB
    , blob_field   BLOB
    , bfile_field  BFILE
)
/

CREATE OR REPLACE DIRECTORY
    EXAMPLE_LOB_DIR
    AS
    '/home/oracle/oralobfiles'
/

INSERT INTO test_lob
    VALUES (  1001
            , 'Some data for record 1001'
            , '48656C6C6F' || UTL_RAW.CAST_TO_RAW(' there!') 
            , BFILENAME('EXAMPLE_LOB_DIR', 'file1.txt')
    );

COMMIT;

col clob format a30
col blob format a30
SELECT
      id
    , clob_field "Clob"
    , UTL_RAW.CAST_TO_VARCHAR2(blob_field) "Blob"
FROM test_lob;

  Id Clob                      Blob
---- ------------------------- -------------
1001 Some data for record 1001 Hello there!
}}}
http://en.wikipedia.org/wiki/Backplane
''passive backplane'' http://www.webopedia.com/TERM/B/backplane.html
http://electronicstechnician.tpub.com/14091/css/14091_36.htm
''back plane vs mother board'' http://www.freelists.org/post/si-list/back-plane-vs-mother-board,1
<<<
Basically a backplane has nothing but connectors, and maybe passive
terminating networks for transmission lines, on it.  The cards that do
the real work plug into the backplane.

A motherboard, such as those used in personal computers (PC's), usually
has a processor, logic, memory, DC-DC converters, etc. along with a
backplane-like section for adapter/daughter cards.  I designed a couple
of motherboards for my previous employer.  Layout can really be a bear,
because you keep finding yourself blocked by these big connectors whose
locations, orientations, and pinouts have been fixed in advance for
mechanical and electrical compatibility reasons.
<<<

Recovery Manager RMAN Documentation Index
 	Doc ID:	Note:286589.1

RMAN Myths Dispelled: Common RMAN Performance Misconceptions
  	Doc ID: 	134214.1



-- RMAN COMPATIBILITY

RMAN Compatibility Oracle8i 8.1.7.4 - Oracle10g 10.1.0.4
  	Doc ID: 	Note:307022.1

RMAN Compatibility Matrix
  	Doc ID: 	Note:73431.1

RMAN Standard and Entrprise Edition Compatibility (Doc ID 730193.1)

Answers To FAQ For Restoring Or Duplicating Between Different Versions And Platforms (Doc ID 369644.1)
<<<
It is possible to use the 10.2 RMAN executable to restore a 9.2 database (same for 11.2 to 11.1 or 11.1 to 10.2, etc) even if the restored datafiles will be stored in ASM. 
<<<



-- SCENARIOS

List of Database Outages
  	Doc ID: 	Note:76449.1

Backup and Recovery Scenarios
 	Doc ID:	Note:94114.1




-- BEST PRACTICES

Top 10 Backup and Recovery best practices.
  	Doc ID: 	Note:388422.1

Oracle 9i Media Recovery Best Practices
  	Doc ID: 	Note:240875.1

Oracle Suggested Strategy & Backup Retention 
  Doc ID:  Note:351455.1 



-- SAMPLE SCRIPTS

RMAN Backup Shell Script Example
  	Doc ID: 	Note:137181.1



-- NOLOGGING

Note 290161.1 The Gains and Pains of Nologging Operations



-- 32bit to 64bit

RMAN Restoring A 32 bit Database to 64 bit - An Example
  	Doc ID: 	Note:467676.1

How I Solved a Problem During a Migration of 32 bit to 64 bit on 10.2.0.2
  	Doc ID: 	452416.1


-- RMAN BUG

Successful backups are not shown in the list backup.Not able to restore them also.
  	Doc ID: 	284002.1




-- 9iR2 stuff
RMAN Restore/Recovery When the Recovery Catalog and Controlfile are Lost in 9i (Doc ID 174623.1)
How To Catalog Backups / Archivelogs / Datafile Copies / Controlfile Copies (Doc ID 470463.1)
Create Standby Database using RMAN changing backuppiece location (Doc ID 753902.1)
Rolling a Standby Forward using an RMAN Incremental Backup in 9i (Doc ID 290817.1)
RMAN : Block-Level Media Recovery - Concept & Example (Doc ID 144911.1)
Persistent Controlfile configurations for RMAN in 9i and 10g. (Doc ID 305565.1)
Using RMAN to Restore and Recover a Database When the Repository and Spfile/Init.ora Files Are Also Lost (Doc ID 372996.1)
How To Restore Controlfile From A Backupset Without A Catalog Or Autobackup (Doc ID 403883.1)
https://docs.google.com/viewer?url=http://www.nyoug.org/Presentations/2005/20050929rman.pdf
http://www.orafaq.com/wiki/Oracle_database_Backup_and_Recovery_FAQ#Can_one_restore_RMAN_backups_without_a_CONTROLFILE_and_RECOVERY_CATALOG.3F


-- RMAN PERFORMANCE

Advise On How To Improve Rman Performance
  	Doc ID: 	Note:579158.1

RMAN Backup Performance 
  Doc ID:  Note:360443.1 

Known RMAN Performance Problems 
  Doc ID:  Note:247611.1 

TROUBLESHOOTING GUIDE: Common Performance Tuning Issues 
  Doc ID:  Note:106285.1 

RMAN Myths Dispelled: Common RMAN Performance Misconceptions 
  Doc ID:  Note:134214.1 




-- FRA, Flash Recovery Area, Fast Recovery Area
Flash Recovery Area - FAQ [ID 833663.1]





-- SHARED DISK ERROR

RAC BACKUP FAILS WITH ORA-00245: CONTROL FILE BACKUP OPERATION FAILED [ID 1268725.1]






-- DUPLICATE CONTROLFILE

Note 345180.1 - How to duplicate a controlfile when ASM is involved



-- RECREATE CONTROLFILE

How to Recover Having Lost Controlfiles and Online Redo Logs
  	Doc ID: 	103176.1

http://www.orafaq.com/wiki/Control_file_recovery

http://www.databasejournal.com/features/oracle/article.php/3738736/Recovering-from-Loss-of-All-Control-Files.htm

Recreating the Controlfile in RAC and OPS
  	Doc ID: 	118931.1

How to Recreate a Controlfile for Locally Managed Tablespaces
  	Doc ID: 	221656.1

How to Recreate a Controlfile
  	Doc ID: 	735106.1

Step By Step Guide On How To Recreate Standby Control File When Datafiles Are On ASM And Using Oracle Managed Files
  	Doc ID: 	734862.1

RECREATE CONTROLFILE, USERS ACCEPT SYS LOSE THEIR SYSDBA/SYSOPER PRIVS
  	Doc ID: 	335971.1

Steps to recreate a Physical Standby Controlfile
  	Doc ID: 	459411.1

http://www.freelists.org/post/oracle-l/Recreate-standby-controlfile-for-DB-that-uses-OMF-and-ASM

Steps to recreate a Physical Standby Controlfile (Doc ID 459411.1)

Steps to perform for Rolling forward a standby database using RMAN incremental backup when primary and standby are in ASM filesystem (Doc ID 836986.1)




-- DISK LOSS

Recover database after disk loss
  	Doc ID: 	Note:230829.1

Disk Lost in External Redundancy FLASH Diskgroup Having Controlfile and Redo Member
  	Doc ID: 	Note:387103.1



-- LOST DATAFILE

Note 1060605.6 Recover A Lost Datafile With No Backup
Note 1029252.6 How to resize a datafile
Note 30910.1   Recreating database objects
Note 1013221.6 Recovering from a lost datafile in a ROLLBACK tablespace
Note 198640.1  How to Recover from a Lost Datafile with Different Scenarios
How to 'DROP' a Datafile from a Tablespace
  	Doc ID: 	111316.1
Common Causes and Solutions on ORA-1157 Error Found in Backup & Recovery
  	Doc ID: 	184327.1
How to Recover from a Lost Datafile with Different Scenarios
  	Doc ID: 	198640.1



-- REDO LOG 
	
How To Recover Using The Online Redo Log (Doc ID 186137.1)
Loss Of Online Redo Log And ORA-312 And ORA-313 (Doc ID 117481.1)



-- RESETLOGS

Recovering READONLY tablespace backups made before a RESETLOGS Open
  	Doc ID: 	Note:266991.1 	


-- INCARNATION

RMAN RESTORE fails with RMAN-06023 or ORA-19505 or RMAN-06100 inspite of proper backups (Doc ID 457769.1)
RMAN RESTORE FAILS WITH RMAN-06023 BUT THERE ARE BACKUPS AVAILABLE [ID 965122.1]
RMAN-06023 when Duplicating a Database [ID 108883.1]
Rman Restore Fails With 'RMAN-06023: no backup ...of datafile .. to restore' Although Backup is Available [ID 793401.1]
RMAN-06023 DURING RMAN DUPLICATE [ID 414384.1]

ORA-19909 datafile 1 belongs to an orphan incarnation - http://www.the-playground.de/joomla//index.php?option=com_content&task=view&id=216&Itemid=29
Impact of Partial Recovery and subsequent resetlogs on daily Incrementally Updated Backups [ID 455543.1]
Recovery through resetlogs using User Managed Online Backups [ID 431816.1]
How to duplicate a databaset to a previous Incarnation [ID 293717.1]
RMAN restore of database fails with ORA-01180: Cannot create datafile 1 [ID 392237.1]
How to Recover Through a Resetlogs Command Using RMAN [ID 237232.1]
RMAN: Point-in-Time Recovery of a Backup From Before Last Resetlogs [ID 1070453.6]
How to recover an older incarnation without a controlfile from that time [ID 284510.1]
RMAN-6054 report during recover database [ID 880536.1]
RMAN-06054 While Recovering a Database in NOARCHIVELOG mode [ID 577939.1]
http://oraware.blogspot.com/2008/05/recovery-with-old-controlfilerecover.html
http://hemantoracledba.blogspot.com/2009/09/rman-can-identify-and-catalog-use.html
http://oracle.ittoolbox.com/groups/technical-functional/oracle-db-l/ora01190-controlfile-or-data-file-1-is-from-before-the-last-resetlogs-870241





-- READ ONLY

RMAN Backup With Skip Read Only Takes More Time 
  Doc ID:  Note:561071.1 




-- RESTORE

How To Restore From An Old Backupset Using RMAN?
  	Doc ID: 	209214.1

RMAN : Consistent Backup, Restore and Recovery using RMAN
  	Doc ID: 	162855.1

RMAN: Restoring an RMAN Backup to Another Node
  	Doc ID: 	Note:73974.1




-- RESTORE HIGHER PATCHSET

Restoring a database to a higher patchset
      Doc ID:     558408.1

Oracle Database Upgrade Path Reference List 
  Doc ID:  Note:730365.1 

Database Server Upgrade/Downgrade Compatibility Matrix 
  Doc ID:  Note:551141.1 



-- CATALOG

RMAN: How to Query the RMAN Recovery Catalog
  	Doc ID: 	98342.1

RMAN Troubleshooting Catalog Performance Issues 
  Doc ID:  Note:748257.1 

How To Catalog Multiple Archivelogs in Unix and Windows
  	Doc ID: 	Note:404515.1





-- FLASH RECOVERY AREA

Flash Recovery area - Space management Warning & Alerts
  	Doc ID: 	Note:305812.1

ENABLE/DISABLE ARCHIVELOG MODE AND FLASH RECOVERY AREA IN A DATABASE USING ASM
  	Doc ID: 	468984.1

How To Delete Archive Log Files Out Of +Asm?
  	Doc ID: 	300472.1

How do you prevent extra archivelog files from being created in the flash recovery area?
  	Doc ID: 	Note:353106.1
  	
  	
  	
-- ORA-1157

Common Causes and Solutions on ORA-1157 Error Found in Backup & Recovery
 	Doc ID:	Note:184327.1



-- Ora-19660

Restore Validate Database Always Fails Ora-19660
  	Doc ID: 	353614.1

OERR: ORA 19660 some files in the backup set could not be verified
  	Doc ID: 	49356.1

Corrupted Blocks Found During Restore of Backup with RMAN and TIVOLI ORA-19612
  	Doc ID: 	181080.1




-- 8i RMAN

Note 50875.1 Getting Started with Server-Managed Recovery (SMR) and RMAN 8.0-8i 

RMAN 8.0 to 8i - Getting Started
 	Doc ID:	Note:120084.1

How To Show Rman Configuration Parameters on Oracle 8.1.7 ?
 	Doc ID:	Note:725922.1

Maintaining V8.0 and V8.1 RMAN Repository
 	Doc ID:	Note:125303.1

RMAN: How to Recover a Database from a Total Failure Using RMAN 8i
 	Doc ID:	Note:121227.1

How To Use RMAN to Backup Archive Logs
 	Doc ID:	Note:237407.1




-- INCREMENTAL, CUMMULATIVE

How To Determine If A RMAN Backup Is Differential Or Cumulative 
  Doc ID:  Note:356349.1 

Does RMAN Oracle10g Db support Incremental Level 2 backups? 
  Doc ID:  Note:733535.1 

Incrementally Updated Backup In 10G 
  Doc ID:  Note:303861.1 

RMAN versus EXPORT Incremental backups 
  Doc ID:  Note:123146.1 

Merged Incremental Strategy creates backups larger than expected 
  Doc ID:  Note:413265.1 

Merged Incremental Backup Strategies
  	Doc ID: 	745798.1



-- RETENTION POLICY

Rman backup retention policy 
  Doc ID:  Note:462978.1 

How to ensure that backup metadata is retained in the controlfile when setting a retention policy and an RMAN catalog is NOTused. 
  Doc ID:  Note:461125.1 

RMAN Delete Obsolete Command Deletes Archivelog Backups Inside Retention Policy 
  Doc ID:  Note:734323.1 
 	
 	
 	
-- OBSOLETE

Delete Obsolete Does Not Delete Obsolete Backups 
  Doc ID:  Note:314217.1 



-- BACKUP OPTIMIZATION

RMAN 9i: Backup Optimization 
  Doc ID:  Note:142962.1 



-- LIST, REPORT

LIST and REPORT Commands in RMAN 
  Doc ID:  Note:114284.1 




-- FORMAT

What are the various % format code used during RMAN backups 
  Doc ID:  Note:553927.1 




-- CONTROL_FILE_RECORD_KEEP_TIME

Setting CONTROL_FILE_RECORD_KEEP_TIME For Incrementally Updated Backups 
  Doc ID:  Note:728471.1 



-- TAPE, MEDIA LIBRARY, SBT_LIBRARY=oracle.disksbt

RMAN Tape Simulation - virtual tape
http://www.appsdba.com/blog/?p=205
http://groups.google.com/group/oracle_dba_experts/browse_thread/thread/6990d83752256e20?pli=1

RMAN and Specific Media Managers Environment Variables. 
  Doc ID:  Note:312737.1 

Does Unused Block Compression Works With Tape ?
  	Doc ID: 	565237.1

RMAN 10gR2 Tape vs Disk Backup Performance When Database is 99% Empty
  	Doc ID: 	428344.1	

How to Configure RMAN to Work with Netbackup for Oracle 
  Doc ID:  Note:162355.1 




-- COMPRESSION

A Complete Understanding of RMAN Compression
  	Doc ID: 	563427.1


-- MEMORY CORRUPTION
FAQ Memory Corruption [ID 429380.1]


-- BLOCK CORRUPTIONS

Handling Oracle Block Corruptions in Oracle7/8/8i/9i/10g 
  Doc ID:  Note:28814.1 

CAUSES OF BLOCK CORRUPTIONS
  	Doc ID: 	77589.1

BLOCK CORRUPTIONS ON ORACLE AND UNIX
  	Doc ID: 	77587.1

TECH: Database Block Checking Features
  	Doc ID: 	32969.1

DBMS_REPAIR example
  	Doc ID: 	Note:68013.1

BLOCK CORRUPTIONS ON ORACLE AND UNIX
  	Doc ID: 	Note:77587.1

FAQ: Physical Corruption
  	Doc ID: 	Note:403747.1

V$Database_Block_Corruption Does not clear after Block Recover Command 
  Doc ID:  Note:422889.1 

How to Format Corrupted Block Not Part of Any Segment 
  Doc ID:  Note:336133.1 

V$DATABASE_BLOCK_CORRUPTION Shows a File Which Does not Exist 
  Doc ID:  Note:298137.1 

RMAN 9i: Block-Level Media Recovery - Concept & Example
  	Doc ID: 	144911.1

Does Block Recovery use Incremental Backups?? -- BLOCKRECOVER command will ONLY use archivelog backups to complete it's recovery
  	Doc ID: 	727706.1

HOW TO PERFORM BLOCK MEDIA RECOVERY (BMR) WHEN BACKUPS ARE NOT TAKEN BY RMAN.
  	Doc ID: 	342972.1

How to Find All the Corrupted Objects in Your Database.
  	Doc ID: 	472231.1

RMAN Does not Report a Corrupt Block if it is not Part of Any Segment
  	Doc ID: 	463821.1

Note 336133.1  -  How to Format Corrupted Block Not Part of Any Segment. 

Note 269028.1 - DBV Reports Corruption Even After Drop/Recreate Object

Note 209691.1 - V$BACKUP_CORRUPTION Contains Information About Corrupt Blocks

How to Check Archivelogs for Corruption using RMAN
  	Doc ID: 	377146.1

Warnings : Recovery is repairing media corrupt block 
  Doc ID:  213311.1 

Is it possible to use RMAN Block Media Recovery to recover LOGICALLY corrupt blocks? <-- NO
  Doc ID:  391120.1 

TECH: Database Block Checking Features	<-- with 11g
  Doc ID:  32969.1 

DBVerify Reports Blocks as 'influx - most likely media corrupt' 
  Doc ID:  468995.1 

Meaning of the message "Block found already corrupt" when running dbverify 
  Doc ID:  139425.1 

BLOCK CORRUPTIONS ON ORACLE AND UNIX 
  Doc ID:  77587.1 

How To Check For Corrupt Or Invalid Archived Log Files 
  Doc ID:  177559.1 

CORRUPT BLOCK INFO NOT REPORTED TO ALERT.LOG 
  Doc ID:  114357.1 

Best Practices for Avoiding and Detecting Corruption 
  Doc ID:  428570.1 

-----
Block Corruption FAQ
  	Doc ID: 	47955.1

Physycal and Logical Block Corruptions. All you wanted to know about it.
  	Doc ID: 	840978.1

ORA-1578 Main Reference Index for Solutions
  	Doc ID: 	830997.1

How to identify the corrupt Object reported by ORA-1578 / RMAN / DBVERIFY
  	Doc ID: 	819533.1

Frequently Encountered Corruption Errors, Diagnostics and Resolution - Reference
  	Doc ID: 	463479.1

Data Recovery Advisor -Reference Guide.
  	Doc ID: 	466682.1

Extracting Data from a Corrupt Table using ROWID Range Scans in Oracle8 and higher
  	Doc ID: 	61685.1

Some Statements Referencing a Table with WHERE Clause Fails with ORA-01578
  	Doc ID: 	146851.1

Extracting Data from a Corrupt Table using SKIP_CORRUPT_BLOCKS or Event 10231
  	Doc ID: 	33405.1

How to identify all the Corrupted Objects in the Database reported by RMAN
  	Doc ID: 	472231.1

ORA-1578 / ORA-26040 Corrupt blocks by NOLOGGING - Error explanation and solution
  	Doc ID: 	794505.1

ORA-1578 ORA-26040 in a LOB segment - Script to solve the errors
  	Doc ID: 	293515.1

OERR: ORA-1578 "ORACLE data block corrupted (file # %s, block # %s)"
  	Doc ID: 	18976.1

Diagnosing and Resolving 1578 reported on a Local Index of a Partitioned table
  	Doc ID: 	432923.1

HOW TO TROUBLESHOOT AND RESOLVE an ORA-1110
  	Doc ID: 	434013.1

Cannot Reuse a Corrupt Block in Flashback Mode, ORA-1578
  	Doc ID: 	729433.1

ORA-01578, ORA-0122, ORA-01204: On Startup
  	Doc ID: 	1041424.6

ORA-01578 After Recovering Database Running In NOARCHIVELOG Mode
  	Doc ID: 	122266.1

Identify the corruption extension using RMAN/DBV/ANALYZE etc
  	Doc ID: 	836658.1

"hcheck.sql" script to check for known problems in Oracle8i, Oracle9i, Oracle10g and Oracle 11g
  	Doc ID: 	136697.1

Introduction to the "H*" Helper Scripts
  	Doc ID: 	101466.1

"hout.sql" script to install the "hOut" helper package
  	Doc ID: 	101468.1

ASM - Internal Handling of Block Corruptions
  	Doc ID: 	416046.1

BLOCK CORRUPTIONS ON ORACLE AND UNIX
  	Doc ID: 	77587.1

Introduction to the Corruption Category
  	Doc ID: 	68117.1

Note 33405.1   Extracting Data from a Corrupt Table using SKIP_CORRUPT_BLOCKS or Event 10231
	Note 34371.1   Extracting Data from a Corrupt Table using ROWID or Index Scans in Oracle7
	Note 61685.1   Extracting Data from a Corrupt Table using ROWID Range Scans in Oracle8/8i 
	Note 1029883.6 Extracting Data from a Corrupt Table using SALVAGE Scripts / Programs 
	Note 97357.1   SALVAGE.PC  - Oracle8i Pro*C Code to Extract Data from a Corrupt Table
	Note 2077307.6 SALVAGE.PC  - Oracle7 Pro*C Code to Extract Data from a Corrupt Table
	Note 2064553.4 SALVAGE.SQL - PL/SQL Code to Extract Data from a Corrupt Table

ORA-1578, ORA-1110, ORA-26040 on Standby Database Using Index Subpartitions
  	Doc ID: 	431435.1

FAQ: Physical Corruption
  	Doc ID: 	403747.1

Note 250968.1 Block Corruption Error Messages in Alert Log File 

How we identified and fixed the workflow tables corruption errors after the database restore
  	Doc ID: 	736033.1

ORA-01578 'ORACLE data block corrupted' When Attempting to Drop a Materialized View
  	Doc ID: 	454955.1

Cloned Olap Database Gets ORA-01578 Nologging
  	Doc ID: 	374036.1 	

ORA-01578: AGAINST A NEW DATAFILE
  	Doc ID: 	1068001.6

Query of Table Using Index Fails With ORA-01578
  	Doc ID: 	153888.1

Extracting Datafile Blocks From ASM
  	Doc ID: 	294727.1

ORA-1578: Oracle Data Block Corrupted (File # 148, Block # 237913)
  	Doc ID: 	103845.1

Data Corruption fixes in Red Hat AS 2.1 e.24 kernel
  	Doc ID: 	241820.1

TECH: Database Block Checking Features
  	Doc ID: 	32969.1

Analyze Table Validate Structure Cascade Online Is Slow
  	Doc ID: 	434857.1

ANALYZE INDEX VALIDATE STRUCTURE ONLINE DOES NOT POPULATE INDEX_STATS
  	Doc ID: 	283974.1

Meaning of the message "Block found already corrupt" when running dbverify
  	Doc ID: 	139425.1

RMAN Does not Report a Corrupt Block if it is not Part of Any Segment
  	Doc ID: 	463821.1

How to Format Corrupted Block Not Part of Any Segment
  	Doc ID: 	336133.1

DBV Reports Corruption Even After Drop/Recreate Object
  	Doc ID: 	269028.1

TFTS: Converting DBA's (Database Addresses) to File # and Block #
  	Doc ID: 	113005.1

Bug 7329252 - ORA-8102/ORA-1499/OERI[kdsgrp1] Index corruption after rebuild index ONLINE
  	Doc ID: 	7329252.8

ORA-600 [qertbfetchbyrowid]
  	Doc ID: 	300637.1

ORA-600 [qertbfetchbyuserrowid]
  	Doc ID: 	809259.1

ORA-600 [kdsgrp1]
  	Doc ID: 	285586.1

ORA-1499. Table/Index row count mismatch
  	Doc ID: 	563070.1





-- BLOCK CORRUPTION PREVENTION

How To Use RMAN To Check For Logical & Physical Database Corruption
  	Doc ID: 	283053.1

How to check for physical and logical database corruption using "backup validate check logical database" command for database on a non-archivelog mode
  	Doc ID: 	466875.1

How To Check (Validate) If RMAN Backup(s) Are Good
  	Doc ID: 	338607.1

SCHEMA VALIDATION UTILITY
  	Doc ID: 	286619.1

11g New Feature V$Database_block_corruption Enhancements and Rman Validate Command
  	Doc ID: 	471716.1

How to Check/Validate That RMAN Backups Are Good
  	Doc ID: 	466221.1

Which Blocks Will RMAN Check For Corruption Or Include In A Backupset?
  	Doc ID: 	561010.1

Best Practices for Avoiding and Detecting Corruption
  	Doc ID: 	428570.1

v$DATABASE_BLOCK_CORRUPTION Reports Corruption Even After Tablespace is Dropped
  	Doc ID: 	454431.1

V$DATABASE_BLOCK_CORRUPTION Shows a File Which Does not Exist
  	Doc ID: 	298137.1

Performing a Test Backup (VALIDATE BACKUP) Using RMAN
  	Doc ID: 	121109.1






-- DBV

DBVERIFY - Database file Verification Utility (7.3.2 - 10.2) 
  Doc ID:  Note:35512.1 



DBVERIFY enhancement - How to scan an object/segment 
  Doc ID:  Note:139962.1 



Extract rows from a CORRUPT table creating ROWID from DBA_EXTENTS
  	Doc ID: 	Note:422547.1

ORA-8103 Diagnostics and Solution
  	Doc ID: 	Note:268302.1

Init.ora Parameter "DB_BLOCK_CHECKING" Reference Note
  	Doc ID: 	Note:68483.1

ORA-00600 [510] and ORA-1578 Reported with DB_BLOCK_CHECKING Set to True
  	Doc ID: 	Note:456439.1

New Parameter DB_ULTRA_SAFE introduce In 11g
  	Doc ID: 	Note:465130.1

ORA-600s and possible corruptions using the RAC TCPIP Interconnect.
  	Doc ID: 	Note:244940.1

TECH: Database Block Checking Features
  	Doc ID: 	Note:32969.1

[8.1.5] (14) Initialization Parameters
  	Doc ID: 	Note:68895.1

Export/Import DataPump Parameter ACCESS_METHOD - How to Enforce a Method of Loading and Unloading Data ?
  	Doc ID: 	Note:552424.1




-- RMAN ERRORS

RMAN-20020 Error after Registering Database Twice in a Session 
  Doc ID:  Note:102776.1 

Main Index of Common Causes for ORA-19511
  	Doc ID: 	227517.1



-- STUCK RECOVERY

ORA-600 [3020] "Stuck Recovery" 
  Doc ID:  Note:30866.1 


Resolving ORA-600[3020] Raised During Recovery 
  Doc ID:  Note:361172.1 


Resolving ORA-00600 [3020] Against A Data Guard Database. 
  Doc ID:  Note:470220.1 


ORA-600 [3020] "Stuck Recovery" 
  Doc ID:  Note:30866.1 


Stuck recovery of database ORA-00600[3020] 
  Doc ID:  Note:283269.1 


Trial Recovery 
  Doc ID:  Note:283262.1 

Resolving ORA-00600 [3020] Against A Data Guard Database. 
  Doc ID:  Note:470220.1 

Bug 4594917 - Write IO error can cause incorrect file header checkpoint information 
  Doc ID:  Note:4594917.8 


ORA-00313 During RMAN Recovery 
  Doc ID:  Note:437319.1 


RMAN Tablespace Recovery Fails With ORA-00283 RMAN-11003 ORA-01579 
  Doc ID:  Note:419692.1 


RMAN Recovery Until Time Failed When Redo-Logs Missed - ORA-00313, ORA-00312 AND ORA-27037 
  Doc ID:  Note:550077.1 


RMAN-11003 and ORA-01153 When Doing Recovery through RMAN 
  Doc ID:  Note:264113.1 


ORA-600 [kccocx_01] Reported During Primary Database Shutdown 
  Doc ID:  Note:466571.1 


ORA-1122, ORA-1110, ORA-120X 
  Doc ID:  Note:1011557.6 


OERR: ORA 1205 not a datafile - type number in header is  
  Doc ID:  Note:18777.1 

Rman/Nsr Restore Fails. Attempt to Recover Results in ora-01205 
  Doc ID:  Note:260150.1 




-- CLONE / DUPLICATE

Database Cloning Process in case of Shutdown Abort
  	Doc ID: 	428623.1

How to clone/duplicate a database with added datafile with no backup.
  	Doc ID: 	Note:292947.1

Answers To FAQ For Restoring Or Duplicating Between Different Versions And Platforms
  	Doc ID: 	Note:369644.1

RMAN Duplicate Database From RAC ASM To RAC ASM
  	Doc ID: 	Note:461479.1

Subject: 	RMAN-06023 DURING RMAN DUPLICATE
  	Doc ID: 	Note:414384.1 

How To Make A Copy Of An Open Database For Duplication To A Different Machine
  	Doc ID: 	224274.1

How to Make a Copy of a Database on the Same Unix Machine
  	Doc ID: 	18070.1

Duplicate Database Without Connecting To Target And Without Using RMAN
  	Doc ID: 	732625.1

Performing duplicate database with ASM/OMF/RMAN [ID 340848.1]

Article on How to do Rman Duplicate on ASM/RAC/OMF/Single Instance
  	Doc ID: 	840647.1

Creating a physical standby from ASM primary
  	Doc ID: 	787793.1

RMAN Duplicate Database From RAC ASM To RAC ASM
  	Doc ID: 	461479.1


How To Create A Production (Full or Partial) Duplicate On The Same Host
  	Doc ID: 	388424.1




-- DUPLICATE ERRORS

Rman Duplicate fails with ORA-19870 ORA-19587 ORA-17507
  	Doc ID: 	469132.1

ORA-19870 Control File Not Found When Creating Standby Database With RMAN
  	Doc ID: 	430621.1

ORA-19505 ORA-27037 FAILED TO IDENTIFY FILE
  	Doc ID: 	444610.1

Database Instance Will Not Mount. Ora-19808
  	Doc ID: 	391828.1

RMAN-06136 On Duplicate Database for Standby with OMF and ASM
  	Doc ID: 	341591.1





-- RMAN RAC backup

RMAN: RAC Backup and Recovery using RMAN 
  Doc ID:  Note:243760.1 

HowTo Restore RMAN Disk backups of RAC Database to Single Instance On Another Node
  	Doc ID: 	415579.1




-- MISSING ARCHIVELOG 

NT: Online Backups 
  Doc ID:  41946.1 

Which System Privileges are required for a User to Perform Backup Operator Tasks 
  Doc ID:  180019.1 

Scripts To Perform Dynamic Hot/Online Backups 
  Doc ID:  152111.1 

EVENT: 10231 "skip corrupted blocks on _table_scans_" 
  Doc ID:  21205.1 

RECOVER A DATAFILE WITH MISSING ARCHIVELOGS 
  Doc ID:  418476.1 

How to recover and open the database if the archivelog required for recovery is either missing, lost or corrupted? 	<--- FUJI
  Doc ID:  465478.1 

Incomplete Recover Fails with ORA-01194, ORA-01110 and Warning "Recovering from Fuzzy File". 
  Doc ID:  165671.1 

Fuzzy File Warning When Recovering From Cold Backup 
  Doc ID:  103100.1 

How to recover and open the database if the archivelog required for recovery is either missing, lost or corrupted?
  	Doc ID: 	Note:465478.1

RECOVER A DATAFILE WITH MISSING ARCHIVELOGS
  	Doc ID: 	Note:418476.1



-- MISSING

RECREATE MISSING TABLESPACE AND DATAFILE
  	Doc ID: 	Note:2072805.6

DATAFILES ARE MISSING AFTER DATABASE IS OPEN IN RESETLOGS
  	Doc ID: 	Note:420730.1



-- CROSS PLATFORM

Migration of Oracle Instances Across OS Platforms
  	Doc ID: 	Note:733205.1

How To Use RMAN CONVERT DATABASE for Cross Platform Migration
  	Doc ID: 	Note:413586.1

Export/Import DataPump Parameter VERSION - Compatibility of Data Pump Between Different Oracle Versions
  	Doc ID: 	Note:553337.1

10g : Transportable Tablespaces Across Different Platforms
  	Doc ID: 	Note:243304.1



-- TAG

How to use RMAN TAG name with different attributes or variables.
  	Doc ID: 	580283.1

How to use Substitution Variables in RMAN commands
  	Doc ID: 	427229.1


-- DATA GUARD ROLL FORWARD

Rolling a Standby Forward using an RMAN Incremental Backup in 10g
  	Doc ID: 	290814.1


-- BACKUP ON RAW DEVICE

How To Backup Database When Files Are On Raw Devices/File System
  	Doc ID: 	469716.1


-- BACKUP COPY OF DATABASE

RMAN10g: backup copy of database
  	Doc ID: 	266980.1




-- ORACLE SECURE BACKUP

OSB Cloud Module - FAQ (Doc ID 740226.1)
How To Determine The Free Space On A Tape? (Doc ID 415026.1)





-- REDO LOG

How To Mulitplex Redo Logs So That One Copy Will Be In FRA ?
  	Doc ID: 	833553.1



-- TSPITR

Limitations of RMAN TSPITR
  	Doc ID: 	304305.1

What Checks Oracle Does during Tablespace Point-In-Time Recovery (TSPITR)
  	Doc ID: 	153981.1

Perform Tablespace Point-In-Time Recovery Using Transportable Tablespace
  	Doc ID: 	100698.1

TSPITR:How to check dependency of the objects and identifying objects that will be lost after TSPITR
  	Doc ID: 	304308.1

How to Recover a Drop Tablespace with RMAN
  	Doc ID: 	455865.1

RMAN: Tablespace Point In Time Recovery (TSPITR) Procedure.
  	Doc ID: 	109979.1

Automatic TSPITR in 10G RMAN -A walk Through
  	Doc ID: 	335851.1




-- TRANSPORTABLE TABLESPACE

Transportable Tablespaces -- An Example to setup and use
  	Doc ID: 	77523.1



-- RMAN TEMPFILES

Recovery Manager and Tempfiles
  	Doc ID: 	305993.1











In that case use RMAN to take the backup to filesystem, here is an example, note that RMAN will not copy redo log members, then in case of needed to restore, the database will need to be open using resetlogs:

rman nocatalog target /
shutdown immediate
startup mount
backup as copy database format '/oracle/bkp/Df_%U';
copy current controlfile to '/oracle/bkp/%d_controlfile.ctl';
backup spfile format '/oracle/bkp/%d_spfile.ora';
shutdown immediate;


mkdir /u04/oradata/RAC/backup/
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/u04/oradata/RAC/backup/%F';
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u04/oradata/RAC/backup/snapcf_RAC.f';
BACKUP FORMAT '/u04/oradata/RAC/backup/%d_D_%T_%u_s%s_p%p' DATABASE;
-- BACKUP CURRENT CONTROLFILE FOR STANDBY FORMAT '/u04/oradata/RAC/backup/%d_C_%U'; -- if creating standby database
BACKUP CURRENT CONTROLFILE FORMAT '/u04/oradata/RAC/backup/%d_C_%U';
SQL "ALTER SYSTEM ARCHIVE LOG CURRENT";
BACKUP FILESPERSET 10 ARCHIVELOG ALL FORMAT '/u04/oradata/RAC/backup/%d_A_%T_%u_s%s_p%p';



or we could copy the backupset using backup backupset...
http://www.freelists.org/post/oracle-l/Experiencesthoughts-about-hardware-recommendations    <-- this is the BIG question

http://structureddata.org/2009/12/22/the-core-performance-fundamentals-of-oracle-data-warehousing-balanced-hardware-configuration/

http://dsstos.blogspot.com/2009/09/download-link-for-storage-design-for.html


{{{
The Core Performance Fundamentals Of Oracle Data Warehousing – Balanced Hardware Configuration
http://structureddata.org/?p=716

Balanced Hardware Configuration
http://download.oracle.com/docs/cd/E11882_01/server.112/e10578/tdpdw_system.htm#CFHFJEDD

General Performance and I/O Topics
http://kevinclosson.wordpress.com/kevin-closson-index/general-performance-and-io-topics/

Oracle Real Application Clusters: Sizing and Capacity Planning Then and Now
http://www.oracleracsig.org/pls/apex/Z?p_url=RAC_SIG.download_my_file?p_file=1001042&p_id=1001042&p_cat=documents&p_user=KARAO&p_company=994323795175833

RAC Performance Experts Reveal All  http://www.scribd.com/doc/6850001/RAC-Performance-Experts-Reveal-All

“Storage Design for Datawarehousing”
http://dsstos.blogspot.com/2009/09/download-link-for-storage-design-for.html

Oracle Database Capacity Planning
http://dsstos.blogspot.com/2008/08/oracle-database-capacity-planning.html

Simple Userland tools on Unix to help analyze application impact as a non-root user – Storage Subsystem
http://dsstos.blogspot.com/2008/07/simple-userland-tools-on-unix-to-help.html
}}}
''Docs'' http://wiki.bash-hackers.org/doku.php , ''FAQ'' http://mywiki.wooledge.org/BashFAQ


Sorting data by dates, numbers and much much more
http://prefetch.net/blog/index.php/2010/06/24/sorting-data-by-dates-numbers-and-much-much-more/

{{{
This is crazy useful, and I didn’t realize sort could be used to sort by date. I put this to use today, when I had to sort a slew of data that looked similar to this:
Jun 10 05:17:47 some_data_string
May 20 05:17:48 some_data_string2
Jun 17 05:17:49 some_data_string0
I was able to first sort by the month, and then by the day of the month:
$ awk ‘{printf “%-3s %-2s %-8s %-50s\n”, $1, $2, $3, $4 }’ data | sort -k1M -k2n
May 17 05:17:49 some_data_string0
Jun 01 05:17:47 some_data_string
Jun 20 05:17:48 some_data_string2
}}}

http://www.linuxconfig.org/Bash_scripting_Tutorial
http://www.oracle.com/technetwork/articles/servers-storage-dev/kornshell-1523970.html
* jmeter http://jakarta.apache.org/jmeter/
* httperf http://httperf.comlore.com/
* misc stuff http://www.idsia.ch/~andrea/sim/simvis.html
* geekbench http://browse.geekbench.ca/


http://blogs.netapp.com/virtualization/

SPEC - Standard Performance Evaluation Corporation http://www.spec.org/
spec sfs http://queue.acm.org/blogposting.cfm?id=11445

SPEC FAQ http://www.spec.org/spec/faq/

Ideas International - Benchmark Gateway
http://www.ideasinternational.com/benchmark/ben010.aspx

comp.benchmarks FAQ
http://pages.cs.wisc.edu/~thomas/comp.benchmarks.FAQ.html

PDS: The Performance Database Server
http://performance.netlib.org/performance/html/PDStop.html

Iozone Filesystem Benchmark
http://www.iozone.org/
''What is big data?'' http://radar.oreilly.com/2012/01/what-is-big-data.html
http://www.slideshare.net/ksankar/the-art-of-big-data


''What is data science?'' http://radar.oreilly.com/2010/06/what-is-data-science.html


nutanix guy https://sites.google.com/site/mohitaron/research



''Big Data Videos'' 
http://www.zdnet.com/big-data-projects-is-the-hardware-infrastructure-overlooked-7000005940/
http://www.livestream.com/fbtechtalks/video?clipId=pla_a3d62538-1238-4202-a3be-e257cd866bb9
<<<
If you're a database guy you'll love this 2 hour video, facebook engineers discussed the following – performance focus, server provisioning, automatic server rebuilds, backup & recovery, online schema changes, sharding, HBase and Hadoop, the Q&A part at the end is also interesting at 1:28:46 Mark Callaghan also answered why they chose MySQL vs commercial databases that already have the features that their engineers are hacking. Good stuff!
<<<




http://kerryosborne.oracle-guy.com/2009/03/bind-variable-peeking-drives-me-nuts/
http://www.pythian.com/news/867/stabilize-oracle-10gs-bind-peeking-behaviour-by-cutting-histograms/
http://psoug.org/reference/bindvars.html
http://surachartopun.com/2008/12/todateoctmon-ora-01843-not-valid-month.html

http://www-03.ibm.com/systems/bladecenter/resources/benchmarks/whitepapers/
http://husnusensoy.wordpress.com/2008/07/28/readonly-tablespace-vs-block-change-tracking-file/

Data Loss on BCT
http://sai-oracle.blogspot.com/2010/09/beware-of-data-loss-in-bct-based-rman.html
<<<
"Reliability of BCT:
On 11.2.0.1 standby, I've seen managed standby recovery failing to start until BCT is reset at least while running the above tests. It doesn't seem like matured enough to be used on the physical standby. I'm working with Oracle support to get all these issues fixed.
As of 11.2.0.1, I don't recommend using BCT on the standby for running RMAN backups. I think it is pretty safe to use it on the primary database."
<<<
http://dsstos.blogspot.com/2009/07/map-disk-block-devices-on-linux-host.html
{{{

2013/09/22: <a href="http://karlarao.wordpress.com/2013/09/22/oow-and-oaktable-world-2013/">OOW and OakTable World 2013</a>
2013/05/23: <a href="http://karlarao.wordpress.com/2013/05/23/speaking-at-e4-2013-and-some-exadata-patents-good-stuff/">Speaking at E4 2013! … and some Exadata Patents good stuff</a>
2013/02/05: <a href="http://karlarao.wordpress.com/2013/02/05/rmoug-ioug-collaborate-kscope-and-e4-2013/">RMOUG, IOUG Collaborate, KSCOPE, and E4 2013</a>
2012/10/16: <a href="http://karlarao.wordpress.com/2012/10/16/oracle-big-data-appliance-first-boot/">Oracle Big Data Appliance First Boot</a>
2012/09/27: <a href="http://karlarao.wordpress.com/2012/09/27/oaktable-world-2012/">OakTable World 2012</a>
2012/06/29: <a href="http://karlarao.wordpress.com/2012/06/29/speaking-at-e4/">Speaking at E4!</a>
2012/06/29: <a href="http://karlarao.wordpress.com/2012/06/29/the-effect-of-asm-redundancyparity-on-readwrite-iops-slob-test-case-for-exadata-and-non-exa-environments/">The effect of ASM redundancy/parity on read/write IOPS – SLOB test case! for Exadata and non-Exa environments</a>
2012/05/14: <a href="http://karlarao.wordpress.com/2012/05/14/iosaturationtoolkit-v2-with-iorm-and-awesome-text-graph">IOsaturationtoolkit-v2 with IORM and AWESOME text graph</a>
2012/03/24: <a href="http://karlarao.wordpress.com/2012/03/24/fast-analytics-of-awr-top-events/">Fast Analytics of AWR Top Events</a>
2012/02/13: <a href="http://karlarao.wordpress.com/2012/02/13/rmoug-2012-training-days/">RMOUG 2012 training days</a>
2012/02/11: <a href="http://karlarao.wordpress.com/2012/02/11/sqltxplain-quick-tips-and-tricks-and-db-optimizer-vst/">SQLTXPLAIN quick tips and tricks and DB Optimizer VST</a>
2011/12/31: <a href="http://karlarao.wordpress.com/2011/12/31/easy-and-fast-environment-framework/">Easy and fast environment framework</a>
2011/12/06: <a href="http://karlarao.wordpress.com/2011/12/06/mining-emgc-notification-alerts">Mining EMGC Notification Alerts</a>
2011/09/21: <a href="http://karlarao.wordpress.com/2011/09/21/oracle-database-appliance-oda-installation-configuration/">Oracle Database Appliance (ODA) Installation / Configuration</a>
2011/07/18: <a href="http://karlarao.wordpress.com/2011/07/18/virtathon-mining-the-awr/">VirtaThon – Mining the AWR</a>
2011/07/14: <a href="http://karlarao.wordpress.com/2011/07/14/enkitec-university-exadata-courses-for-developers-and-dbas/">Enkitec University – Exadata Courses for Developers and DBAs</a>
2011/05/17: <a href="http://karlarao.wordpress.com/2011/05/17/nocoug-journal-ask-the-oracle-aces-why-is-my-database-slow/">NoCOUG Journal – Ask the Oracle ACEs – Why is my database slow?</a>
2011/03/23: <a href="http://karlarao.wordpress.com/2011/03/23/oracle-by-example-portal-now-shows-12g/">Oracle by Example portal now shows 12g</a>
2011/03/11: <a href="http://karlarao.wordpress.com/2011/03/11/hotsos-2011-mining-the-awr-repository-for-capacity-planning-visualization-and-other-real-world-stuff">Hotsos 2011 – Mining the AWR Repository for Capacity Planning, Visualization, and other Real World Stuff</a>
2011/01/30: <a href="http://karlarao.wordpress.com/2011/01/30/migrating-your-vms-from-vmware-to-virtualbox-on-a-netbook">Migrating your VMs from VMware to VirtualBox (on a Netbook)</a>
2010/12/21: <a href="http://karlarao.wordpress.com/2010/12/21/wheeew-i-am-now-a-redhat-certified-engineer">Wheeew, I am now a RedHat Certified Engineer!</a>
2010/11/07: <a href="http://karlarao.wordpress.com/2010/11/07/ill-be-speaking-at-hotsos-2011">I’ll be speaking at HOTSOS 2011!</a>
2010/10/07: <a href="http://karlarao.wordpress.com/2010/10/07/after-oow-my-laptop-broke-down-data-rescue-scenario">After OOW, my laptop broke down – data rescue scenario</a>
2010/09/24: <a href="http://karlarao.wordpress.com/2010/09/24/oracle-closed-world-and-unconference-presentations">Oracle Closed World and Unconference Presentations</a>
2010/09/20: <a href="http://karlarao.wordpress.com/2010/09/20/oow-2010-the-highlights">OOW 2010 - the highlights</a>
2010/09/12: <a href="http://karlarao.wordpress.com/2010/09/12/oow-2010-my-schedule">OOW 2010 - my schedule</a>
2010/08/31: <a href="http://karlarao.wordpress.com/2010/08/31/statistically-summarize-oracle-performance-data">Statistically summarize Oracle Performance data</a>
2010/07/27: <a href="http://karlarao.wordpress.com/2010/07/27/guesstimations">Guesstimations</a>
2010/07/25: <a href="http://karlarao.wordpress.com/2010/07/25/graphing-the-aas-with-perfsheet-a-la-enterprise-manager">Graphing the AAS with Perfsheet a la Enterprise Manager</a>
2010/07/05: <a href="http://karlarao.wordpress.com/2010/07/05/oracle-datafile-io-latency-part-1">Oracle datafile IO latency - Part 1</a>
2010/06/28: <a href="http://karlarao.wordpress.com/2010/06/28/the-not-a-problem-problem-and-other-related-stuff">The “Not a Problem” Problem and other related stuff</a>
2010/06/18: <a href="http://karlarao.wordpress.com/2010/06/18/oracle-mix-oow-2010-suggest-a-session">Oracle Mix - OOW 2010 Suggest-A-Session</a>
2010/05/30: <a href="http://karlarao.wordpress.com/2010/05/30/seeing-exadata-in-action">Seeing Exadata in action</a>
2010/04/10: <a href="http://karlarao.wordpress.com/2010/04/10/my-personal-wiki-karlarao-tiddlyspot-com">My Personal Wiki - karlarao.tiddlyspot.com</a>
2010/03/27: <a href="http://karlarao.wordpress.com/2010/03/27/ideas-build-off-ideas-making-use-of-social-networking-sites">“Ideas build off ideas”… making use of Social Networking sites</a>
2010/02/04: <a href="http://karlarao.wordpress.com/2010/02/04/devcon-luzon-2010">DEVCON Luzon 2010</a>
2010/02/01: <a href="http://karlarao.wordpress.com/2010/02/01/craig-shallahamer-is-now-blogging">Craig Shallahamer is now blogging!</a>
2010/01/31: <a href="http://karlarao.wordpress.com/2010/01/31/workload-characterization-using-dba_hist-tables-and-ksar">Workload characterization using DBA_HIST tables and kSar</a>
2009/12/31: <a href="http://karlarao.wordpress.com/2009/12/31/50-sql-performance-optimization-scenarios/">50+ SQL Performance Optimization scenarios</a>
2009/11/21: <a href="http://karlarao.wordpress.com/2009/11/21/rac-system-load-testing-and-test-plan/">RAC system load testing and test plan</a>
2009/11/03: <a href="http://karlarao.wordpress.com/2009/11/03/rhev-red-hat-enterprise-virtualization-is-out/">RHEV (Red Hat Enterprise Virtualization) is out!!!</a>
2009/08/15: <a href="http://karlarao.wordpress.com/2009/08/15/knowing-the-trend-of-deadlock-occurrences-from-the-alert-log">Knowing the trend of Deadlock occurrences from the Alert Log</a>
2009/07/30: <a href="http://karlarao.wordpress.com/2009/07/30/lucky-to-find-it">Lucky to find it..</a>
2009/06/07: <a href="http://karlarao.wordpress.com/2009/06/07/diagnosing-and-resolving-gc-block-lost">Diagnosing and Resolving “gc block lost”</a>
2009/05/08: <a href="http://karlarao.wordpress.com/2009/05/08/yast-on-oel">Yast on OEL</a>
2009/05/08: <a href="http://karlarao.wordpress.com/2009/05/08/understanding-the-scn">Understanding the SCN</a>
2009/04/20: <a href="http://karlarao.wordpress.com/2009/04/20/advanced-oracle-troubleshooting-by-tanel-poder-in-singapore">Advanced Oracle Troubleshooting by Tanel Poder in Singapore</a>
2009/04/06: <a href="http://karlarao.wordpress.com/2009/04/06/os-thread-startup">OS Thread Startup</a>
2009/04/04: <a href="http://karlarao.wordpress.com/2009/04/04/single-instance-and-rac-kernel-os-upgrade">Single Instance and RAC Kernel/OS upgrade</a>
2009/02/27: <a href="http://karlarao.wordpress.com/2009/02/27/security-forecasting-oracle-performance-and-some-stuff-to-post-soon">Security, Forecasting Oracle Performance and Some stuff to post… soon…</a>
2009/01/03: <a href="http://karlarao.wordpress.com/2009/01/03/migrate-from-windows-xp-64bit-to-ubuntu-intrepid-ibex-810-64bit">Migrate from Windows XP 64bit to Ubuntu Intrepid Ibex 8.10 64bit</a>
2008/11/07: <a href="http://karlarao.wordpress.com/2008/11/07/oraclevalidatedinstallationonoel45">Oracle-Validated RPM on OEL 4.5</a>

<span style="color:white;"> </span>
<span style="color:white;"> </span>
<h1>By Category</h1>
<!--more-->

<h3><span style="text-decoration:underline;">Performance/Troubleshooting</span></h3>
<ul>
<li>Capacity Planning
    <ul>
    <li><a href="http://karlarao.wordpress.com/2010/01/31/workload-characterization-using-dba_hist-tables-and-ksar">Workload characterization using DBA_HIST tables and kSar</a></li>
	<li><a href="http://karlarao.wordpress.com/2010/08/31/statistically-summarize-oracle-performance-data">Statistically summarize Oracle Performance data</a></li>
    </ul>
</li>
<li>Database Tuning
    <ul>
    <li><a href="http://karlarao.wordpress.com/2010/07/05/oracle-datafile-io-latency-part-1">Oracle datafile IO latency - Part 1</a></li>
    </ul>
</li>
<li>Hardware and Operating System
    <ul>
	<li>Exadata
	       <ul>
	               <li><a href="http://karlarao.wordpress.com/2010/05/30/seeing-exadata-in-action">Seeing Exadata in action</a></li>
                   <li><a href="http://karlarao.wordpress.com/2012/05/14/iosaturationtoolkit-v2-with-iorm-and-awesome-text-graph">IOsaturationtoolkit-v2 with IORM and AWESOME text graph</a></li> 
                   <li><a href="http://karlarao.wordpress.com/2012/06/29/the-effect-of-asm-redundancyparity-on-readwrite-iops-slob-test-case-for-exadata-and-non-exa-environments/">The effect of ASM redundancy/parity on read/write IOPS – SLOB test case! for Exadata and non-Exa environments</a></li>
	       </ul>
	</li>
    <li>Oracle Database Appliance
	       <ul>
	               <li><a href="http://karlarao.wordpress.com/2011/09/21/oracle-database-appliance-oda-installation-configuration/">Oracle Database Appliance (ODA) Installation / Configuration</a></li>
	       </ul>
	</li>
    <li>Oracle Big Data Appliance
	       <ul>
	               <li><a href="http://karlarao.wordpress.com/2012/10/16/oracle-big-data-appliance-first-boot/">Oracle Big Data Appliance First Boot</a></li>
	       </ul>
	</li>
	<li>VirtualBox
	       <ul>
	               <li><a href="http://karlarao.wordpress.com/2011/01/30/migrating-your-vms-from-vmware-to-virtualbox-on-a-netbook">Migrating your VMs from VMware to VirtualBox (on a Netbook)</a></li>
	       </ul>
	</li>
    </ul>
</li>
<li>SQL Tuning
    <ul>
    <li><a href="http://karlarao.wordpress.com/2009/12/31/50-sql-performance-optimization-scenarios/">50+ SQL Performance Optimization scenarios</a></li>
    <li><a href="http://karlarao.wordpress.com/2012/02/11/sqltxplain-quick-tips-and-tricks-and-db-optimizer-vst/">SQLTXPLAIN quick tips and tricks and DB Optimizer VST</a> </li>
    </ul>
</li>
<li>Troubleshooting & Internals
    <ul>
	<li>Wait Events
	       <ul>
	               <li><a href="http://karlarao.wordpress.com/2009/04/06/os-thread-startup">OS Thread Startup</a></li>
	               <li><a href="http://karlarao.wordpress.com/2009/06/07/diagnosing-and-resolving-gc-block-lost">Diagnosing and Resolving “gc block lost”</a></li>
	       </ul>
	</li>
	<li>Deadlock
	       <ul>
	               <li><a href="http://karlarao.wordpress.com/2009/08/15/knowing-the-trend-of-deadlock-occurrences-from-the-alert-log">Knowing the trend of Deadlock occurrences from the Alert Log</a></li>
	       </ul>
	</li>
	<li>Systematic Approach and Method
	       <ul>
	               <li><a href="http://karlarao.wordpress.com/2010/06/28/the-not-a-problem-problem-and-other-related-stuff">The “Not a Problem” Problem and other related stuff</a></li>
	               <li><a href="http://karlarao.wordpress.com/2010/07/25/graphing-the-aas-with-perfsheet-a-la-enterprise-manager">Graphing the AAS with Perfsheet a la Enterprise Manager</a></li>
	               <li><a href="http://karlarao.wordpress.com/2010/07/27/guesstimations">Guesstimations</a></li>
                   <li><a href="http://karlarao.wordpress.com/2011/05/17/nocoug-journal-ask-the-oracle-aces-why-is-my-database-slow/">NoCOUG Journal – Ask the Oracle ACEs – Why is my database slow?</a></li>
                   <li><a href="http://karlarao.wordpress.com/2012/03/24/fast-analytics-of-awr-top-events/">Fast Analytics of AWR Top Events</a></li>
	       </ul>
	</li>
    </ul>
</li>
</ul>

<h3><span style="text-decoration:underline;">RAC</span></h3>
<ul>
<li>Upgrade
    <ul>
    <li><a href="http://karlarao.wordpress.com/2009/04/04/single-instance-and-rac-kernel-os-upgrade">Single Instance and RAC Kernel/OS upgrade</a></li>
    </ul>
</li>
<li>Benchmark and Testing
    <ul>
    <li><a href="http://karlarao.wordpress.com/2009/11/21/rac-system-load-testing-and-test-plan/">RAC system load testing and test plan</a></li>
    </ul>
</li>
<li>Performance
    <ul>
    <li><a href="http://karlarao.wordpress.com/2009/06/07/diagnosing-and-resolving-gc-block-lost">Diagnosing and Resolving “gc block lost”</a></li>
    </ul>
</li>
</ul>

<h3><span style="text-decoration:underline;">Enterprise Manager</span></h3>
<ul>
<li>EM troubleshooting
    <ul>
    <li><a href="http://karlarao.wordpress.com/2011/12/06/mining-emgc-notification-alerts">Mining EMGC Notification Alerts</a></li>
    </ul>
</li>
</ul>

<h3><span style="text-decoration:underline;">Linux</span></h3>
<ul>
<li>RedHat
    <ul>
    <li>RHEV
<ul>
<li><a href="http://karlarao.wordpress.com/2009/11/03/rhev-red-hat-enterprise-virtualization-is-out/">RHEV (Red Hat Enterprise Virtualization) is out!!!</a></li>
</ul>
    </li>
<li>RHCE
<ul>
<li><a href="http://karlarao.wordpress.com/2010/12/21/wheeew-i-am-now-a-redhat-certified-engineer">Wheeew, I am now a RedHat Certified Engineer!</a></li>
</ul>
    </li>
    </ul>
</li>
<li>OEL
    <ul>
    <li><a href="http://karlarao.wordpress.com/2008/11/07/oraclevalidatedinstallationonoel45">Oracle-Validated RPM on OEL 4.5</a></li>
    <li><a href="http://karlarao.wordpress.com/2009/05/08/yast-on-oel">Yast on OEL</a></li>
    </ul>
</li>
<li>Ubuntu
    <ul>
    <li><a href="http://karlarao.wordpress.com/2009/01/03/migrate-from-windows-xp-64bit-to-ubuntu-intrepid-ibex-810-64bit">Migrate from Windows XP 64bit to Ubuntu Intrepid Ibex 8.10 64bit</a></li>
    </ul>
</li>
<li>Fedora
    <ul>
    <li><a href="http://karlarao.wordpress.com/2010/10/07/after-oow-my-laptop-broke-down-data-rescue-scenario">After OOW, my laptop broke down – data rescue scenario</a></li>
    </ul>
</li>
</ul>

<h3><span style="text-decoration:underline;">Reviews</span></h3>
<ul>
<li><a href="http://karlarao.wordpress.com/2009/02/27/security-forecasting-oracle-performance-and-some-stuff-to-post-soon">Security, Forecasting Oracle Performance and Some stuff to post… soon…</a></li>
<li><a href="http://karlarao.wordpress.com/2009/04/20/advanced-oracle-troubleshooting-by-tanel-poder-in-singapore">Advanced Oracle Troubleshooting by Tanel Poder in Singapore</a></li>
<li><a href="http://karlarao.wordpress.com/2009/07/30/lucky-to-find-it">Lucky to find it..</a></li>
<li><a href="http://karlarao.wordpress.com/2010/02/01/craig-shallahamer-is-now-blogging">Craig Shallahamer is now blogging!</a></li>
</ul>

<h3><span style="text-decoration:underline;">Backup and Recovery</span></h3>
<ul>
<li><a href="http://karlarao.wordpress.com/2009/05/08/understanding-the-scn">Understanding the SCN</a></li>
</ul>

<h3><span style="text-decoration:underline;">Community</span></h3>
<ul>
<li><a href="http://karlarao.wordpress.com/2010/02/04/devcon-luzon-2010">DEVCON Luzon 2010</a></li>
<li><a href="http://karlarao.wordpress.com/2010/03/27/ideas-build-off-ideas-making-use-of-social-networking-sites">“Ideas build off ideas”… making use of Social Networking sites</a></li>
<li><a href="http://karlarao.wordpress.com/2010/04/10/my-personal-wiki-karlarao-tiddlyspot-com">My Personal Wiki - karlarao.tiddlyspot.com</a></li>
<li><a href="http://karlarao.wordpress.com/2010/06/18/oracle-mix-oow-2010-suggest-a-session">Oracle Mix - OOW 2010 Suggest-A-Session</a></li>
<li><a href="http://karlarao.wordpress.com/2010/09/12/oow-2010-my-schedule">OOW 2010 - my schedule</a></li>
<li><a href="http://karlarao.wordpress.com/2010/09/20/oow-2010-the-highlights">OOW 2010 - the highlights</a></li>
<li><a href="http://karlarao.wordpress.com/2010/09/24/oracle-closed-world-and-unconference-presentations">Oracle Closed World and Unconference Presentations</a></li>
<li><a href="http://karlarao.wordpress.com/2010/11/07/ill-be-speaking-at-hotsos-2011">I’ll be speaking at HOTSOS 2011!</a></li>
<li><a href="http://karlarao.wordpress.com/2011/03/11/hotsos-2011-mining-the-awr-repository-for-capacity-planning-visualization-and-other-real-world-stuff">Hotsos 2011 – Mining the AWR Repository for Capacity Planning, Visualization, and other Real World Stuff</a></li>
<li><a href="http://karlarao.wordpress.com/2011/03/23/oracle-by-example-portal-now-shows-12g/">Oracle by Example portal now shows 12g</a></li>
<li><a href="http://karlarao.wordpress.com/2011/07/14/enkitec-university-exadata-courses-for-developers-and-dbas/">Enkitec University – Exadata Courses for Developers and DBAs</a></li>
<li><a href="http://karlarao.wordpress.com/2011/07/18/virtathon-mining-the-awr/">VirtaThon – Mining the AWR</a></li>
<li><a href="http://karlarao.wordpress.com/2011/12/31/easy-and-fast-environment-framework/">Easy and fast environment framework</a></li> 
<li><a href="http://karlarao.wordpress.com/2012/02/13/rmoug-2012-training-days/">RMOUG 2012 training days</a></li>
<li><a href="http://karlarao.wordpress.com/2012/06/29/speaking-at-e4/">Speaking at E4!</a></li>
<li><a href="http://karlarao.wordpress.com/2012/09/27/oaktable-world-2012/">OakTable World 2012</a></li>
<li><a href="http://karlarao.wordpress.com/2013/02/05/rmoug-ioug-collaborate-kscope-and-e4-2013/">RMOUG, IOUG Collaborate, KSCOPE, and E4 2013</a></li>
<li><a href="http://karlarao.wordpress.com/2013/05/23/speaking-at-e4-2013-and-some-exadata-patents-good-stuff/">Speaking at E4 2013! … and some Exadata Patents good stuff</a></li>
<li><a href="http://karlarao.wordpress.com/2013/09/22/oow-and-oaktable-world-2013/">OOW and OakTable World 2013</a></li>
</ul>
<span style="color:white;"> </span>
<span style="color:white;"> </span>
<span style="color:white;"> </span>
<span style="color:white;"> </span>
<span style="color:white;"> </span>

}}}
http://thecomingstorm.us/smf/index.php?topic=323.0
http://golanzakai.blogspot.com/2012/01/openvswitch-with-virtualbox.html
http://www.evernote.com/shard/s48/sh/f5866bf1-97c9-46b1-8830-205d7fa4cde6/ba217e6d8c137d6e30917e1bf375a519
http://www.brendangregg.com/dtrace.html

http://www.brendangregg.com/DTrace/dtrace_oneliners.txt
the paper
http://queue.acm.org/detail.cfm?id=2413037

here's the video of the USE method
http://dtrace.org/blogs/brendan/2012/09/21/fisl13-the-use-method/
Rappler's Mood Navigator
https://www.evernote.com/shard/s48/sh/2a8e6b17-e499-49cb-a1b7-2944be0eb88e/967899d7670f3e470380b8206bb184c5
POWERLINK - buffer io error
http://knowledgebase.emc.com/emcice/documentDisplay.do;jsessionid=E5086F44F54525E1C3E2930AD5ABB7D9?docType=1006&clusterName=DefaultCluster&resultType=5002&groupId=1&page=&docProp=$solution_id&docPropValue=emc187631&passedTitle=null
http://knowledgebase.emc.com/emcice/documentDisplay.do?docType=1006&clusterName=DefaultCluster&resultType=5002&groupId=1&page=&docProp=$solution_id&docPropValue=emc199974&passedTitle=null
http://knowledgebase.emc.com/emcice/documentDisplay.do?docType=1006&clusterName=DefaultCluster&resultType=5002&groupId=1&page=&docProp=$solution_id&docPropValue=emc157139&passedTitle=null
http://knowledgebase.emc.com/emcice/documentDisplay.do?docType=1006&clusterName=DefaultCluster&resultType=5002&groupId=1&page=&docProp=$solution_id&docPropValue=emc203991&passedTitle=null

{{{
"Linux host devices log I/O errors during server reboot"
ID:	emc157139

URL:
http://knowledgebase.emc.com/emcice/documentDisplay.do?docType=1006&clusterName=DefaultCluster&resultType=5002&groupId=1&page=&docProp=$solution_id&docPropValue=emc157139&passedTitle=null

Knowledgebase Solution	 

Environment:	OS: Red Hat Linux
Environment:	Product: CLARiiON CX-series
Environment:	Product: CLARiiON CX3-series
Environment:	EMC SW: PowerPath
Problem:	Linux host devices log I/O errors during server reboot.
Problem:	Dmesg log or messages log have:
Buffer I/O error on device sdm, logical block 2
Buffer I/O error on device sdm, logical block 3
Buffer I/O error on device sdm, logical block 4
Buffer I/O error on device sdm, logical block 5
Device sdm not ready.
end_request: I/O error, dev sdm, sector 16
Buffer I/O error on device sdm, logical block 2
Device sdm not ready.
end_request: I/O error, dev sdm, sector 128

Problem:	Output of powermt display dev=all shows:
Pseudo name=emcpowera
CLARiiON ID=CK200063301081 [SG2]
Logical device ID=600601604EE419004A308F0C5AD0DB11 [LUN 61]
state=alive; policy=CLAROpt; priority=0; queued-IOs=0
Owner: default=SP A, current=SP A
==============================================================================
---------------- Host ---------------   - Stor -   -- I/O Path -  -- Stats ---
### HW Path                 I/O Paths    Interf.   Mode    State  Q-IOs Errors
==============================================================================
   0 qla2xxx                   sdm       SP B0     active  alive      0      0

Change:	Server rebooted for maintenance
Root Cause:	The devices logging the I/O error are assigned to SP-B, but currently "owned" by SP-A.  The CLARiiON array is an active-passive array so this is normal behavior when multiple paths are utilized.
Fix:	These messages logged at boot up may be ignored.
}}}
-- HASH GROUP BY

_GBY_HASH_AGGREGATION_ENABLED=FALSE
_UNNEST_SUBQUERY = FALSE

in Metalink3 even in patch set 10.2.0.4, PeopleSoft have a workaround on the bug by using the hidden parameter

Wrong Results Possible on 10.2 When New "HASH GROUP BY" Feature is Used
  	Doc ID: 	Note:387958.1

Bug 4604970 - Wrong results with 'hash group by' aggregation enabled
  	Doc ID: 	Note:4604970.8

ORA-00600 [32695] [hash aggregation can't be done] During Insert.
  	Doc ID: 	Note:729447.1

Bug 6471770 - OERI [32695] [hash aggregation can't be done] from Hash GROUP BY
  	Doc ID: 	Note:6471770.8

10.2.0.3 Patch Set - List of Bug Fixes by Problem Type [ID 391116.1]





-- running out of OS kernelI/O resources

WARNING:1 Oracle process running out of OS kernelI/O resources
  	Doc ID: 	748607.1

Bug 6687381 - "WARNING: Oracle process running out of OS kernel I/O resources" messages
  	Doc ID: 	6687381.8
http://www.devx.com/dbzone/10MinuteSolution/22191/1954
http://www.dba-oracle.com/t_delete_performance_speed.htm

-- speedup delete
http://dbaforums.org/oracle/index.php?showtopic=534
https://forums.oracle.com/forums/thread.jspa?threadID=987536
http://www.mail-archive.com/oracle-l@fatcity.com/msg15356.html

Lawrence To - COE List of database outages
https://docs.google.com/fileview?id=0B5H46jS7ZPdJNGUxNmNiYWQtZGYxZC00OWFhLWEzMmMtYThlYTlhNjQzNjU3&hl=en

Lawrence To - COE Outage Prevention, Detection, And Repair
https://docs.google.com/fileview?id=0B5H46jS7ZPdJNjIzMDNlZjQtYjgyZi00M2M4LWE4OTUtNDFkMDUwYzQ2MjA4&hl=en
http://hackingexpose.blogspot.com/2012/05/oracle-wont-patch-four-year-old-zero.html
http://www.freelists.org/post/oracle-l/Oracle-Security-Alert-for-CVE20121675-10g-extended-support,3
https://blogs.oracle.com/security/entry/security_alert_for_cve_2012
http://asanga-pradeep.blogspot.com/2012/05/using-class-of-secure-transport-cost-to.html
http://seclists.org/fulldisclosure/2012/Apr/343
http://seclists.org/fulldisclosure/2012/Apr/204

Using Class of Secure Transport (COST) to Restrict Instance Registration in Oracle RAC (Doc ID 1340831.1)
2s8c16t - 2sockets,8cores,16threads
1s4c8t - 1socket,4cores,8threads

-list of xeon CPUs
http://en.wikipedia.org/wiki/List_of_Intel_Xeon_microprocessors

CPU CPI 
Intel Xeon Phi Coprocessor High Performance Programming http://goo.gl/Ycri3u
Optimization and Performance Tuning for Intel® Xeon Phi™ Coprocessors, Part 2: Understanding and Using Hardware Events http://software.intel.com/en-us/articles/optimization-and-performance-tuning-for-intel-xeon-phi-coprocessors-part-2-understanding
Simultaneous Multi-Threading - CPI http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.ibm.aix.genprogc/doc/genprogc/smt.htm
HOWTO processor numbers http://www.intel.com/content/www/us/en/processors/processor-numbers.html
E7 family http://www.intel.com/content/dam/www/public/us/en/documents/white-papers/xeon-e7-family-performance-model-numbers-paper.pdf
SKUs bin example http://www.anandtech.com/show/5475/intel-releases-seven-sandy-bridge-cpus

''Intel price list''
Intel® Xeon® Processor 5500 Series price list http://ark.intel.com/products/series/39565/Intel-Xeon-Processor-5500-Series

''AMD price list''
http://www.amd.com/us/products/pricing/Pages/server-opteron.aspx


{{{
Exadata updating to Xeon E5 (Fall 2012)..(X3-2,X3-2L,X2-4)
QPI replaces FSB 
memory is still in parallel bus which doesn't mingle well with the serial bus

Intel 2 level memory Nahelem is the death of the FSB
}}}
http://en.wikipedia.org/wiki/Uncore
<<<
The uncore is a term used by Intel to describe the functions of a microprocessor that are not in the Core, but which are essential for Core performance.[1] The Core contains the components of the processor involved in executing instructions, including the ALU, FPU, L1 and L2 cache. Uncore functions include QPI controllers, L3 cache, snoop agent pipeline, on-die memory controller, and Thunderbolt controller.[2] Other bus controllers such as PCI Express and SPI are part of the chipset.[3]
The Intel Uncore design stems from its origin as the Northbridge. The design of the Intel Uncore reorganizes the functions critical to the Core, making them physically closer to the Core on-die, thereby reducing their access latency. Functions from the Northbridge which are less essential for the Core, such as PCI Express or the Power Control Unit (PCU), are not integrated into the Uncore -- they remain as part of the Chipset.[4]
''Specifically, the micro-architecture of the Intel Uncore is broken down into a number of modular units. The main Uncore interface to the Core is the Cache Box (CBox), which interfaces with the Last Level Cache (LLC) and is responsible for managing cache coherency. Multiple internal and external QPI links are managed by Physical Layer units, referred to as PBox. Connections between the PBox, CBox, and one or more iMC's (MBox) are managed by System Config Controller (UBox) and a Router (RBox). [5]''
Removal of serial bus controllers from the Intel Uncore further enables increased performance by allowing the Uncore clock (UCLK) to run at a base of 2.66 GHz, with upwards overclocking limits in excess of 3.44 GHz.[6] This increased clock rate allows the Core to access critical functions (such as the iMC) with significantly less latency (typically reducing Core access to DRAM by 10ns or more).
<<<

''CPU Core'' - contains the components of the processor involved in executing instructions
* ALU
* FPU
* L1 and L2 cache

''CPU Uncore''
* QPI controllers
* L3 cache
* snoop agent pipeline
* on-die memory controller
* Thunderbolt

''Chipset'' http://en.wikipedia.org/wiki/Chipset
* PCI Express 
* SPI


http://www.evernote.com/shard/s48/sh/3ca3db4e-6cc9-4139-9548-716d22a9ec32/ab43be72457b9ff412efd509f58ca1e6
The Xeon E5520: Popular for VMWare http://h30507.www3.hp.com/t5/Eye-on-Blades-Blog-Trends-in/The-Xeon-E5520-Popular-for-VMWare/ba-p/79934#.Uvmtn0JdWig
{{{
top - 12:14:35 up 10 days, 10:42, 24 users,  load average: 20.15, 19.97, 19.14
Tasks: 351 total,   1 running, 350 sleeping,   0 stopped,   0 zombie
Cpu(s):  2.3%us, 27.7%sy,  1.7%ni, 40.7%id, 27.1%wa,  0.2%hi,  0.2%si,  0.0%st
Mem:  16344352k total,  6098504k used, 10245848k free,     1912k buffers
Swap: 20021240k total,   988764k used, 19032476k free,    83860k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
12442 root      15   0 1135m 4704 3068 S 36.1  0.0 162:59.73 /usr/lib/virtualbox/VirtualBox --comment x_x3 --startvm 94756484-d2d5-4bdb
12413 root      15   0 1196m 5004 3196 S 30.3  0.0  67:55.23 /usr/lib/virtualbox/VirtualBox --comment x_x2 --startvm cc54fb4c-170b-430a
12384 root      15   0 1195m 7660 3248 S 26.1  0.0 162:04.52 /usr/lib/virtualbox/VirtualBox --comment x_x1 --startvm e266cad2-403f-4d98
 3972 root      15   0 60376 4588 1524 S  7.7  0.0 583:04.20 /usr/bin/ssh -x -oForwardAgent no -oPermitLocalCommand no -oClearAllForwardings
 1053 root      15   0 1526m 5496 3048 S  4.9  0.0 386:27.97 /usr/lib/virtualbox/VirtualBox --comment windows7 --startvm 3da776bd-1d5e-4eec-
 3971 root      18   0 54300 1020  848 D  1.6  0.0  49:15.64 scp -rpv 20111015-backup 192.168.0.100 /DataVolume/shares/Public/Backup
12226 root      15   0  251m 9876 2268 S  0.6  0.1 686:00.02 /usr/lib/nspluginwrapper/npviewer.bin --plugin /usr/lib/mozilla/plugins/libflas
12786 root      15   0 1476m 4624 3072 S  0.6  0.0   6:38.29 /usr/lib/virtualbox/VirtualBox --comment x_db1 --startvm 1c3b929d-bdbd-40da-8
12947 root      15   0 1478m 4360 2904 S  0.5  0.0   7:36.47 /usr/lib/virtualbox/VirtualBox --comment x_db2 --startvm f3e1060d-28f5-4a72-8
 4620 root      15   0 76600 5500 1252 S  0.2  0.0  78:13.20 Xvnc :1 -desktop desktopserver.localdomain:1 (root) -httpd /usr/share/vnc/class
 4729 root      18   0  543m  13m 3668 D  0.2  0.1   9:41.13 nautilus --no-default-window --sm-client-id default3
 5808 root      15   0  348m 2576 1324 S  0.2  0.0  39:54.52 /usr/lib/virtualbox/VBoxSVC --auto-shutdown
 5754 oracle    16   0  260m 1220  988 S  0.1  0.0   0:25.12 gnome-terminal
 5800 root      15   0  112m  856  756 S  0.1  0.0  18:51.71 /usr/lib/virtualbox/VBoxXPCOMIPCD
 5899 root      15   0  303m 6264 1860 S  0.1  0.0  15:42.25 gnome-terminal
13941 root      15   0 12892 1216  768 R  0.1  0.0   0:05.06 top -c
29960 root      16   0  109m 6716 1176 S  0.1  0.0  82:39.70 /usr/bin/perl -w /usr/bin/collectl --all -o T -o D
30089 root      15   0  109m 4336 1072 S  0.1  0.0  33:21.60 /usr/bin/perl -w /usr/bin/collectl -sD --verbose -o T -o D
    1 root      15   0 10368   88   60 S  0.0  0.0   0:04.05 init [5]
    2 root      RT  -5     0    0    0 S  0.0  0.0   0:00.02 [migration/0]
    3 root      34  19     0    0    0 S  0.0  0.0  11:11.08 [ksoftirqd/0]
    4 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 [watchdog/0]
    5 root      RT  -5     0    0    0 S  0.0  0.0   0:00.35 [migration/1]
    6 root      34  19     0    0    0 S  0.0  0.0   0:00.62 [ksoftirqd/1]
    7 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 [watchdog/1]
    8 root      RT  -5     0    0    0 S  0.0  0.0   0:01.26 [migration/2]
    9 root      34  19     0    0    0 S  0.0  0.0   0:00.72 [ksoftirqd/2]
   10 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 [watchdog/2]
   11 root      RT  -5     0    0    0 S  0.0  0.0   0:04.89 [migration/3]
   12 root      34  19     0    0    0 S  0.0  0.0   0:00.63 [ksoftirqd/3]
   13 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 [watchdog/3]
   14 root      RT  -5     0    0    0 S  0.0  0.0   0:02.66 [migration/4]
   15 root      34  19     0    0    0 S  0.0  0.0   0:41.68 [ksoftirqd/4]
   16 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 [watchdog/4]
   17 root      RT  -5     0    0    0 S  0.0  0.0   0:01.27 [migration/5]
   18 root      34  19     0    0    0 S  0.0  0.0   0:12.36 [ksoftirqd/5]
   19 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 [watchdog/5]

root@192.168.0.101's password:
Last login: Fri Oct 21 10:43:53 2011 from desktopserver.localdomain
[root@desktopserver ~]# vmstat 1 100000 | while read line; do echo "`date +%T`" "$line" ; done
12:13:36 procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
12:13:36 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
12:13:36 4  3 988016 10329664   1916  70672    4    1   502   322    5    4  2  4 91  2  0
12:13:36 4  3 988016 10316972   1964  79892 4592    0 15488     4 4689 19386  4 28 47 22  0
12:13:37 5  3 987760 10309344   2000  82368 5500    0 16196    52 4555 16869  4 28 48 20  0
12:13:38 3  3 987636 10314420   1776  62736 3456    0 57144     8 2967 13880  3 28 51 17  0
12:13:44 3  5 987636 10424500   1416  18448 5032    0 35004  3060 5930 24333  4 32 42 22  0
12:13:47 2 27 987820 10446888   1508  17316 4632 14944 14096 16088 6657 13410  3 21 31 46  0
12:13:47 0 34 988132 10471332   1540  14196 3460 10840 13916 10892 4853 9797  2 15 47 37  0
12:13:47 2 31 988132 10458716   1616  21952 8076 1768 17948  1768 3684 9470  2  6 62 30  0
12:13:47 3 27 988372 10466144   1588  15752 6540 2916 10832  2968 2154 6603  1 21 57 21  0
12:13:47 1 27 988372 10466100   1588  16508 9128   16 18148    20 1970 6116  2 23 56 18  0
12:13:47 4 25 988368 10440804   1636  28680 13864    0 27728    32 3783 10942  2 24 53 21  0
12:13:47 3 19 988368 10410040   1784  44260 14644    0 33052     0 5570 18623  3 20 45 32  0
12:13:48 4  6 988328 10381236   1848  56596 16680    0 29676     0 4648 23356  4 23 39 34  0
12:13:49 3  6 988328 10356104   1872  67584 14004    0 27300    40 4966 23598  4 30 42 24  0
12:13:50 4  5 987876 10332532   1928  77784 13932    0 25780     0 4908 19443  4 28 47 21  0
12:13:51 5  6 987876 10336848   1760  68392 9140    0 82780     0 3112 13723  3 29 45 23  0
12:13:52 5  5 987876 10356808   1752  47148 5464    0 18388  1440 4893 17567  5 29 48 19  0
12:13:53 4  4 987820 10353080   1880  45368 6124    0 18932     0 4608 17808  4 30 48 18  0
12:13:54 6  2 987696 10344684   1900  56192 4452    0 15092    44 4694 22556  4 29 48 18  0
12:14:01 3 23 988248 10454908   1472  14144 5692 15532 26980 23396 10868 28611  4 22 33 41  0
12:14:02 2 36 989052 10478864   1552  11596 6976 14452 15120 14924 4457 9650  2 25 41 32  0
12:14:02 procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
12:14:02 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
12:14:02 2 34 989076 10468140   1536  16912 16380  608 42292   696 7441 19332  3 19 48 30  0
12:14:02 3 33 989076 10449392   1620  23468 13628    0 21540     0 2065 5908  1 17 49 32  0
12:14:02 1 22 989072 10427880   1736  28984 16260    0 24148    40 2129 7560  1 11 44 45  0
12:14:02 4 19 989072 10409308   1764  34976 13268    0 20720     0 2642 11492  2 16 54 28  0
12:14:02 4 10 989072 10316360   1884  54384 13684    0 35704     0 4805 22982  4 27 43 26  0
12:14:03 3  5 989072 10362300   1776  57220 12468    0 84288    16 4556 16173  4 30 44 23  0
12:14:04 3  6 988756 10359512   1824  43856 17520    0 34060   340 5176 23298  4 26 46 24  0
12:14:05 4  7 988748 10345436   1832  55780 8660    0 21276     0 4631 19355  4 28 38 30  0
12:14:06 4  5 988700 10331388   1844  62976 12920    0 25012     0 5087 19602  4 29 49 18  0
12:14:07 5  3 988520 10325812   1900  69584 4964    0 16312     4 4738 17187  4 32 45 19  0
12:14:08 3  4 988520 10368964   1792  38452 5004    0 17408  2020 5246 18092  5 29 50 16  0
12:14:16 1 37 988864 10450680   1448  14028 3684 13940 18928 17804 8262 20373  3 24 29 44  0
12:14:16 0 37 989068 10476748   1500  10940 7156 14072 13328 14112 4870 6545  0  4 56 39  0
12:14:16 0 49 989080 10404760   1556  23028 17332 3652 41824  3652 4791 9224  1  2 64 33  0
12:14:16 1 37 989076 10409020   1680  24412 12204    0 32676    16 2168 5833  1 14 49 35  0
12:14:16 2 24 989076 10381452   1784  42528 14900    0 35860     0 2040 6524  1 18 43 38  0
12:14:16 2 20 989060 10370832   1788  76880 14364    0 59880    24 3810 13617  3 11 54 33  0
12:14:16 3  8 989060 10358380   1848  78412 14528    0 32416     0 4995 28265  3 21 41 34  0
12:14:17 5  5 989040 10358372   1916  72364 6144    0 18348     0 4715 16760  4 29 39 27  0
12:14:18 4  7 989004 10354776   1980  61908 13700    0 26612   204 4820 16973  4 29 43 24  0
12:14:19 3  4 988660 10345956   1992  60504 12496    0 27176   108 5166 21841  4 32 46 18  0



on /vbox... not blocked
------------------------------------------------------------------------------------------------------------------------------

[root@desktopserver ~]# vmstat 1 100000 | while read line; do echo "`date +%T`" "$line" ; done
12:28:04 procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
12:28:04 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
12:28:04 5  5 967424 10157364   1728 125884    4    1   505   322    6    1  2  4 91  2  0
12:28:05 5  5 967424 10113688   1816 167580   36    0 39196    20 11806 58927 12 48 25 15  0
12:28:06 6  3 967424 10101692   1764 178888  104    0 33756    92 10547 55163 11 44 26 19  0
12:28:07 6  2 967424 9993612   1896 284384   12    0 120744     0 8168 36067  8 38 33 21  0
12:28:08 4  3 967424 9989976   1836 289252   36    0 28224  2084 9152 46527  9 41 29 20  0
12:28:09 4  3 967424 10186920   1592  94984   20    0 21336 96740 8117 44754  8 39 38 16  0
12:28:10 3  5 967424 10080256   1572 140400  236    0 48252 24100 11487 57187 12 43 28 17  0
12:28:11 6  3 967424 9993084   1772 285304   28    0 108504    68 7980 34287  8 37 40 15  0
12:28:12 6  2 967424 9986940   1776 290368   64    0 38116     0 11581 56771 11 44 31 13  0
12:28:13 5  3 967424 9895152   1828 342476   48    0 60348     0 10379 45136 10 42 30 19  0
12:28:15 5  4 967424 9838808   1952 436660  284    0 94468     0 8581 41748  9 37 38 16  0
12:28:15 6  5 967424 10095720   1840 181592   80    0 34988 124936 11126 53636 11 44 25 20  0
12:28:16 4  2 967424 10077976   1612 165864   48    0 60840    32 9095 46720  9 40 30 22  0
12:28:17 4  3 967424 10053744   1720 226140   84    0 69404     0 11419 54791 11 44 27 18  0
12:28:18 6  1 967424 10165980   1652 114008    0    0 72700 60800 12525 59365 12 46 29 13  0
12:28:19 6  5 967424 10079536   1552 201004   12    0 91700     0 8773 41036  9 37 36 18  0
12:28:20 5  5 967424 10010352   1640 267340    0    0 36484     0 11164 49569 11 41 35 13  0
12:28:21 5  2 967424 9946732   1720 278668    0    0 81480    40 10572 49893 10 43 34 13  0
12:28:22 6  3 967424 9941164   1812 336472   92    0 73448   820 8063 35725  8 34 38 20  0
12:28:23 7  2 967424 10185156   1708  95096    0    0 37880 116020 11820 56886 11 45 30 14  0
12:28:24 4  4 967424 10158376   1532 122232   16    0 29000 14540 9389 47092  9 41 33 17  0
12:28:25 procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
12:28:25 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
12:28:25 9  3 967424 9995728   1720 282168    0    0 109168     0 5062 24050  5 32 50 14  0
12:28:26 6  3 967424 9975200   1764 302068    8    0 35616     0 10937 48511 11 43 32 15  0
12:28:27 6  3 967424 9898512   1844 376736   44    0 37016    40 11216 47423 11 42 33 14  0
12:28:28 5  2 967424 9777288   1944 464060   28    0 89372    32 7675 44210  9 38 39 14  0
12:28:29 7  4 967424 10187020   1508  93940   52    0 49944 188124 7343 41070  9 40 32 19  0
12:28:30 6  2 967424 10167236   1580 114732   36    0 40932    64 12227 56547 12 39 35 13  0
12:28:31 7  3 967424 10081364   1664 200636   56    0 91096     0 8624 34942  9 34 40 17  0
12:28:32 8  2 967424 10022828   1788 231756   20    0 40728    36 10431 51118 11 39 33 17  0
12:28:33 8  3 967424 10182900   1696  97704    0    0 58244  1756 10384 56330 10 45 31 14  0
12:28:34 2  4 967424 10162252   1548 117156   20    0 83572 83360 7049 33628  6 37 39 17  0
12:28:35 3  3 967424 10191104   1544  89604  100    0  2944 31372 2563 13785  3 28 48 21  0
12:28:36 11  4 967424 10173104   1600 108220   36    0 33268     0 10110 52401 10 41 34 14  0
12:28:37 4  3 967424 10116640   1648 134780    0    0 40816    40 11156 54719 11 44 32 13  0
12:28:38 5  4 967424 10185980   1640  95592   12    0 116940    24 8661 35493  8 36 38 18  0
12:28:39 6  2 967424 10133704   1520 145244    0    0 38928   232 11766 61009 12 45 27 16  0
12:28:40 8  3 967424 10188060   1544  92580   68    0 24604 76548 8546 41263  9 41 32 19  0
12:28:41 8  3 967424 10126928   1512 155672   12    0 119696     0 8124 36208  8 39 39 15  0
12:28:42 4  3 967424 10183592   1492  97764    0    0 43424    48 12891 52804 12 48 29 10  0
12:28:43 5  3 967424 10160868   1512 118668   20    0 34336 10932 10721 54931 10 46 31 13  0
12:28:44 8  2 967424 9993748   1708 283296   60    0 115504     0 6847 32959  6 36 39 19  0
12:28:45 7  3 967424 9973180   1752 304788    0    0 39256    12 11889 48368 12 43 32 12  0
12:28:46 procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
12:28:46 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
12:28:46 8  2 967424 9871024   1792 342204   44    0 45900    36 12519 51742 12 43 32 13  0
12:28:47 8  0 967268 9869416   1900 407064  136    0 70860     0 4509 25553  8 34 41 16  0

top - 12:29:22 up 10 days, 10:57, 24 users,  load average: 7.40, 10.08, 14.93
Tasks: 353 total,   2 running, 351 sleeping,   0 stopped,   0 zombie
Cpu(s):  8.4%us, 39.8%sy,  1.9%ni, 33.2%id, 15.1%wa,  0.6%hi,  0.9%si,  0.0%st
Mem:  16344352k total,  6264212k used, 10080140k free,     1468k buffers
Swap: 20021240k total,   967256k used, 19053984k free,   170788k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
12786 root      15   0 1495m  31m 3424 S 84.1  0.2   9:43.24 /usr/lib/virtualbox/VirtualBox --comment x_db1 --startvm 1c3b929d-bdbd-40da-8
12413 root      15   0 1196m 5904 3352 S 81.7  0.0  77:33.67 /usr/lib/virtualbox/VirtualBox --comment x_x2 --startvm cc54fb4c-170b-430a
12442 root      15   0 1136m 6028 3324 S 81.1  0.0 172:35.79 /usr/lib/virtualbox/VirtualBox --comment x_x3 --startvm 94756484-d2d5-4bdb
12384 root      15   0 1195m 8712 3360 S 68.9  0.1 172:34.70 /usr/lib/virtualbox/VirtualBox --comment x_x1 --startvm e266cad2-403f-4d98
14504 root      15   0 60440 7376 2540 S 43.8  0.0   0:33.65 /usr/bin/ssh -x -oForwardAgent no -oPermitLocalCommand no -oClearAllForwardings
 3972 root      15   0 60376 4596 1524 R 15.8  0.0 584:54.46 /usr/bin/ssh -x -oForwardAgent no -oPermitLocalCommand no -oClearAllForwardings
 1053 root      15   0 1527m  12m 3500 S 12.2  0.1 387:51.13 /usr/lib/virtualbox/VirtualBox --comment windows7 --startvm 3da776bd-1d5e-4eec-
14503 root      18   0 53884 1904 1452 D  9.2  0.0   0:06.67 scp 1122.tar.bz2 oracle@db1 ~oracle
 3971 root      18   0 54300 1056  864 D  3.6  0.0  49:38.29 scp -rpv 20111015-backup 192.168.0.100 /DataVolume/shares/Public/Backup
12226 root      16   0  251m  75m 2408 S  3.6  0.5 686:16.31 /usr/lib/nspluginwrapper/npviewer.bin --plugin /usr/lib/mozilla/plugins/libflas
  486 root      10  -5     0    0    0 D  1.3  0.0  25:52.02 [kswapd0]
12947 root      15   0 1478m 9692 3372 S  1.3  0.1   7:47.68 /usr/lib/virtualbox/VirtualBox --comment x_db2 --startvm f3e1060d-28f5-4a72-8
 4620 root      15   0 73236  12m 2380 S  1.0  0.1  78:17.59 Xvnc :1 -desktop desktopserver.localdomain:1 (root) -httpd /usr/share/vnc/class
14428 root      18   0  109m  17m 1964 S  0.7  0.1   0:01.79 /usr/bin/perl -w /usr/bin/collectl --all -o T -o D
    8 root      RT  -5     0    0    0 S  0.3  0.0   0:01.33 [migration/2]
   20 root      RT  -5     0    0    0 S  0.3  0.0   0:01.00 [migration/6]
  180 root      10  -5     0    0    0 S  0.3  0.0   0:05.36 [kblockd/0]
 5014 root      15   0  348m 1216  956 S  0.3  0.0   2:08.20 /usr/libexec/mixer_applet2 --oaf-activate-iid=OAFIID:GNOME_MixerApplet_Factory
14559 root      15   0 12892 1320  824 R  0.3  0.0   0:00.03 top -c
    1 root      15   0 10368   88   60 S  0.0  0.0   0:04.08 init [5]
    2 root      RT  -5     0    0    0 S  0.0  0.0   0:00.02 [migration/0]
    3 root      34  19     0    0    0 S  0.0  0.0  11:11.08 [ksoftirqd/0]
    4 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 [watchdog/0]
    5 root      RT  -5     0    0    0 S  0.0  0.0   0:00.44 [migration/1]
    6 root      34  19     0    0    0 S  0.0  0.0   0:00.62 [ksoftirqd/1]
    7 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 [watchdog/1]

[root@desktopserver stage]# scp 1122.tar.bz2 oracle@db1:~oracle
oracle@db1's password:
1122.tar.bz2                                                                                               68% 2116MB  23.4MB/s   00:40 ETA

}}}
! Setup
<<<
1) download the cputoolkit at http://karlarao.wordpress.com/scripts-resources/

2) untar, then modify the orion_3_fts.sh under the aas30 folder

{{{
oracle@desktopserver.local:/home/oracle/dba/benchmark/cputoolkit/aas30:dw
$ ls -ltr
total 16
-rwxr-xr-x 1 oracle dba 315 Sep 27 22:32 saturate
-rwxr-xr-x 1 oracle dba 159 Sep 27 23:10 orion_3_ftsall.sh
-rwxr-xr-x 1 oracle dba 236 Sep 27 23:10 orion_3_ftsallmulti.sh
-rwxr-xr-x 1 oracle dba 976 Nov 26 15:47 orion_3_fts.sh

oracle@desktopserver.local:/home/oracle/dba/benchmark/cputoolkit/aas30:dw
$ cat orion_3_fts.sh
# This is the main script
export DATE=$(date +%Y%m%d%H%M%S%N)

sqlplus -s /NOLOG <<! &
connect / as sysdba

declare
        rcount number;
begin
        -- 600/60=10 minutes of workload
        for j in 1..3 loop

        -- lotslios by Tanel Poder
        select /*+ cputoolkit ordered
                                use_nl(b) use_nl(c) use_nl(d)
                                full(a) full(b) full(c) full(d) */
                            count(*)
                            into rcount
                        from
                            sys.obj$ a,
                            sys.obj$ b,
                            sys.obj$ c,
                            sys.obj$ d
                        where
                            a.owner# = b.owner#
                        and b.owner# = c.owner#
                        and c.owner# = d.owner#
                        and rownum <= 10000000;
        dbms_lock.sleep(60);
        end loop;
        end;
/

exit;
!
}}}


3) run the workload 
{{{
oracle@desktopserver.local:/home/oracle/dba/benchmark/cputoolkit/aas30:dw
$ ./saturate 16 dw

}}}
<<<

! Instrumentation 
<<<
this will show you pretty much 8+ CPUs being used
{{{
spool snapper.txt
@snapper out 1 120 "select sid from v$session where status = 'ACTIVE'"
spool off

less snapper.txt  | grep -B6 "CPU"
}}}


of course before every run do a begin snap, then run the test case, then do an end snap... then compare the output to snapper 
you'll see that snapper is able to catch the fly by CPU load
{{{
exec dbms_workload_repository.create_snapshot;
execute statspack.snap;

@?/rdbms/admin/awrrpt
@?/rdbms/admin/spreport
}}}
<<<









awr_topevents_v2.sql - added "CPU wait" (new in 11g) to include "unaccounted DB Time" on high run queue workloads http://goo.gl/trwKp, http://twitpic.com/89hp4p

this script was pretty useful, because on the usual AWR reports you don't see this CPU wait 

''What could possibly cause cpu wait?''
from my performance work and the workloads that I've seen here are the possible reasons so far


! if you are asking more CPU work than the number of CPUs
{{{
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
12  0 1054352 377816 767340 1990420    0    0   532   260 15924 11174 92  8  0  0  0
13  2 1054352 373904 767400 1990432    0    0   524     0 21159 10178 93  7  0  0  0
12  1 1054352 373284 767544 1990476    0    0   768    78 17628 11605 92  7  0  0  0
12  1 1054352 373904 767552 1990480    0    0   736    80 16470 12939 95  4  0  0  0
14  1 1054352 372532 767756 1990408    0    0   876     0 17323 13067 92  7  0  0  0
12  1 1054352 324776 767768 2017136    0    0 26957   206 24215 12566 95  5  0  0  0
14  0 1054352 320924 767788 2017168    0    0   796   136 21818 12009 94  5  0  0  0
14  1 1054352 324900 767944 2017180    0    0   836    40 17699 12674 95  5  0  0  0
}}}

! from the AAS investigation, it was caused by hundreds of users being forked at the same time doing select * from a table and not having enough CPU to service those surge of processes causing high "b" - blocked on IO on vmstat 
{{{
$ vmstat 1 1000
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 0 277 1729904 467564 603852 5965768    0    0  1165    67    0    0  5 22 71  1  0
 2 275 1729904 465944 603856 5965772    0    0 521776  2676 15712 17116  6  5 15 74  0
 3 274 1729904 495324 603868 5965400    0    0 543848    48 10366 47365 14  5  1 80  0
 2 275 1729904 478732 603880 5966036    0    0 616776   248 10361 40782 13  5  0 82  0
 3 276 1729904 473764 603880 5966296    0    0 538416   816 10809 16695  7  3  0 90  0
 0 276 1729904 473136 603880 5966300    0    0 620120    16 15006 15223 13  3 10 74  0
 1 275 1729904 485808 603880 5966300    0    0 552696     0 8953 16632  5  3 12 80  0
 0 275 1729904 486204 603880 5966308    0    0 536784    52 11397 15096  5  3  1 90  0
 3 274 1729904 492916 603880 5966312    0    0 556352    56 10594 15988  7  5  2 86  0
}}}

! PGA usage maxing out the memory and the kswapd kicks in and the server starts to swap like crazy causing high on CPU WAIT IO
<<<
{{{
top - 12:58:20 up 132 days, 42 min,  2 users,  load average: 13.68, 10.22, 9.07
Tasks: 995 total,  42 running, 919 sleeping,   0 stopped,  34 zombie
Cpu(s): 48.5%us, 28.4%sy,  0.0%ni, 10.5%id, 11.2%wa,  0.0%hi,  1.3%si,  0.0%st
Mem:  98848968k total, 98407164k used,   441804k free,      852k buffers
Swap: 25165816k total,  2455968k used, 22709848k free,   383132k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
13483 oracle    25   0 12.9g 509m  43m R 80.1  0.5 214:25.43 oraclemtaprd111 (LOCAL=NO)
24308 oracle    25   0 13.4g 1.0g  97m R 77.1  1.1  15:58.80 oraclemtaprd111 (LOCAL=NO)
16227 oracle    25   0 13.4g 1.0g  95m R 74.1  1.1   1312:47 oraclemtaprd111 (LOCAL=NO)
1401 root      11  -5     0    0    0 R 67.8  0.0 113:21.15 [kswapd0]
--
top - 12:59:48 up 132 days, 44 min,  2 users,  load average: 116.16, 43.81, 20.96
Tasks: 985 total,  73 running, 879 sleeping,   0 stopped,  33 zombie
Cpu(s):  8.6%us, 90.1%sy,  0.0%ni,  0.6%id,  0.7%wa,  0.0%hi,  0.1%si,  0.0%st
Mem:  98848968k total, 98407396k used,   441572k free,     2248k buffers
Swap: 25165816k total,  2645544k used, 22520272k free,   370780k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
32349 oracle    18   0 9797m 1.1g  33m S 493.3  1.2   0:36.76 oraclebiprd2 (LOCAL=NO)
29495 oracle    15   0  216m  26m  11m S 466.6  0.0   3:01.86 /u01/app/11.2.0/grid/bin/diskmon.bin -d -f
32726 oracle    16   0 8788m 169m  37m R 447.6  0.2   0:24.86 oraclebiprd2 (LOCAL=NO)
32338 oracle    18   0 9525m 905m  42m R 407.0  0.9   0:33.20 oraclebiprd2 (LOCAL=NO)
--
top - 12:59:54 up 132 days, 44 min,  2 users,  load average: 107.27, 44.31, 21.37
Tasks: 991 total,  16 running, 942 sleeping,   0 stopped,  33 zombie
Cpu(s): 30.3%us,  3.6%sy,  0.0%ni, 14.3%id, 51.6%wa,  0.0%hi,  0.1%si,  0.0%st
Mem:  98848968k total, 98167188k used,   681780k free,     5264k buffers
Swap: 25165816k total,  2745440k used, 22420376k free,   369676k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
1401 root      10  -5     0    0    0 S 77.8  0.0 114:36.03 [kswapd0]                     <-- KSWAPD kicked in
19163 oracle    15   0 2152m  72m  16m S 74.9  0.1   9:42.45 /u01/app/11.2.0/grid/bin/oraagent.bin
3394 oracle    15   0  436m  23m  14m S 33.8  0.0  12:23.44 /u01/app/11.2.0/grid/bin/oraagent.bin
2171 root      16   0  349m  28m  12m S 28.6  0.0   1:50.29 /u01/app/11.2.0/grid/bin/orarootagent.bin


> vmstat 1 5000
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 2 69 9893340 442000   9032 346328 1160 2760  1264  2904 2083 13656 10  0 34 56  0
 3 67 9894700 443524   9036 345768 1204 3236  1268  3300 1930 13332  7  0 47 46  0
 1 72 9895936 446228   9052 346484 1052 3156  1220  3648 1819 13674  5  0 47 48  0
 2 74 9897156 448732   9064 346616 1724 3432  2128  3436 1936 14598  7  0 44 49  0
 3 73 9897724 446904   9068 347580 1524 2468  1636  2480 1730 13363  6  0 32 61  0
 7 65 9898208 448312   9080 347472 1328 1944  1660  1952 2496 14019 16  0 32 52  0
 8 61 9898500 444836   9092 347904 2128 2004  2464  2208 3381 16093 29  1 23 47  0
 1 79 9899372 441588   9104 348048 1236 2684  1424  3300 2774 14103 23  0 24 53  0
13 54 9909828 551780   9224 349588 36124 63296 37608 64800 126067 443473 18  0 23 59  0
16 40 9910136 536048   9260 350004 4208  988  5076  2044 5434 17055 51  3 10 36  0

}}}
<<<


''wait io on CPUIDs'' https://www.evernote.com/shard/s48/sh/0da5e22a-6a80-4a82-86a9-581d9203ed9c/8f5b5f4f63b789a9c3d4dc6a618128d0

http://www.ludovicocaldara.net/dba/how-to-collect-oracle-application-server-performance-data-with-dms-and-rrdtool/

http://allthingsmdw.blogspot.com/2012/02/analyzing-thread-dumps-in-middleware.html
Capacity Planning for LAMP
http://www.scribd.com/doc/43281/Slides-from-Capacity-Planning-for-LAMP-talk-at-MySQL-Conf-2007

http://perfwork.wordpress.com/2010/03/20/cpu-utilization-on-ec2/

IO tuning
http://communities.vmware.com/thread/268869
http://vpivot.com/2010/05/04/storage-io-control/
http://communities.vmware.com/docs/DOC-5490
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1008205
http://book.soundonair.ru/hall2/ch06lev1sec1.html                             <-- COOL LVM Striping!!!
http://tldp.org/HOWTO/LVM-HOWTO/recipethreescsistripe.html
http://linux.derkeiler.com/Newsgroups/comp.os.linux.misc/2010-01/msg00325.html

http://www.goodwebpractices.com/other/wordpress-vs-joomla-vs-drupal.html
http://www.pcpro.co.uk/blogs/2011/02/02/joomla-1-6-vs-drupal-7-0/
http://www.pcpro.co.uk/reviews/software/364549/drupal-7
http://www.alledia.com/blog/general-cms-issues/joomla-and-drupal-which-one-is-right-for-you/ <-- nice comparison
Start/Stop CRS
http://www.dbaexpert.com/blog/2007/09/start-and-stop-crs/
https://forums.oracle.com/forums/thread.jspa?messageID=9817219&#9817219 <-- installation!

http://www.crisp.demon.co.uk/blog/2011-06.html  <-- his blog about his dtrace port
http://crtags.blogspot.com/  <-- the download page

{{{
cd /reco/installers/rpms/dtrace-20110718
make all
make load
build/dtrace -n 'syscall:::entry { @[execname] = count(); }'
build/dtrace -n 'syscall:::entry /execname == "VirtualBox"/ { @[probefunc] = count(); }'


[root@desktopserver dtrace-20110718]# build/dtrace -n 'syscall:::entry { @[execname] = count(); }'
dtrace: description 'syscall:::entry ' matched 633 probes
^C

  hpssd.py