tag:blogger.com,1999:blog-38200314715245037312024-02-24T23:29:38.383-08:00Oracle OLAPThe most powerful, open Analytic EngineBrian Macdonaldhttp://www.blogger.com/profile/18408740222558531436noreply@blogger.comBlogger22125tag:blogger.com,1999:blog-3820031471524503731.post-18728120056467217762014-03-04T12:57:00.002-08:002014-03-04T13:00:42.916-08:00The OLAP Extension is now available in SQL Developer 4.0<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJbhVcy8__pd4EUgzWTOw5ZvV00L2SnuEjGEnM7D9uEtu3rIkqTqHgWQhVY8I3X2fFju9_an2pjJ9muc5ZjwwhJNIJ2esbFPHQSfN62-D7MUcq80z8TpHsR0OBKGrmONtEirtIx2S2wUY/s1600/sqldev.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJbhVcy8__pd4EUgzWTOw5ZvV00L2SnuEjGEnM7D9uEtu3rIkqTqHgWQhVY8I3X2fFju9_an2pjJ9muc5ZjwwhJNIJ2esbFPHQSfN62-D7MUcq80z8TpHsR0OBKGrmONtEirtIx2S2wUY/s1600/sqldev.png" height="307" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><br />
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves>false</w:TrackMoves>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:DontVertAlignCellWithSp/>
<w:DontBreakConstrainedForcedTables/>
<w:DontVertAlignInTxbx/>
<w:Word11KerningPairs/>
<w:CachedColBalance/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="267">
<w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" Priority="39" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" Name="toc 9"/>
<w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" Priority="59" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
</w:LatentStyles>
</xml><![endif]--><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin-top:0in;
mso-para-margin-right:0in;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0in;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
</style>
<![endif]-->
<br />
<div class="MsoNormal">
<span style="mso-no-proof: yes;"></span></div>
<div class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;">
</div>
<div class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;">
<span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">T<a href="https://www.blogger.com/null" name="_GoBack"></a>he OLAP
Extension is now in SQL Developer 4.0.<br />
<br />
See </span><a href="http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/sqldev-releasenotes-v4-1925251.html" target="_blank"><span style="color: blue; font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/sqldev-releasenotes-v4-1925251.html</span></a><span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";"> for the details.<br />
<br />
The OLAP functionality is mentioned toward the bottom of the web page.</span></div>
<div class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;">
<span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">You will still need AWM 12.1.0.1.0
to</span></div>
<ul type="disc">
<li class="MsoNormal" style="line-height: normal; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;"><span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Manage and enable cube and dimension MV's.</span></li>
<li class="MsoNormal" style="line-height: normal; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;"><span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Manage data security.</span></li>
<li class="MsoNormal" style="line-height: normal; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;"><span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Create and edit nested measure folders (i.e. measure
folders that are children of other measure folders)</span></li>
<li class="MsoNormal" style="line-height: normal; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;"><span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Create and edit Maintenance Scripts</span></li>
<li class="MsoNormal" style="line-height: normal; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;"><span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Manage multilingual support for OLAP Metadata objects</span></li>
<li class="MsoNormal" style="line-height: normal; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;"><span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Use the OBIEE plugin or the Data Validation plugin </span></li>
</ul>
<div class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;">
<span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">What is new or improved:</span></div>
<ul type="disc">
<li class="MsoNormal" style="line-height: normal; mso-list: l1 level1 lfo2; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;"><span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">New Calculation Expression editor for calculated
measures. This allows the user to nest different types to calculated
measures easily. For instance a user can now create a Moving Total
of a Prior Period as one calculated measure. In AWM, it would have
required a user to create a Prior Period first and then create a Moving
Total calculated measure which referred to the Prior Period measure.
Also the new Calculation Expression editor displays hypertext helper
templates when the user selects the OLAP API syntax in the editor.</span></li>
<li class="MsoNormal" style="line-height: normal; mso-list: l1 level1 lfo2; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;"><span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Support for OLAP DML command execution in the SQL
Worksheet. Simply prefix OLAP DML commands by a '~' and then select
the execute button to execute them on the SQL Worksheet. The output
of the command will appear in the DBMS Output Window if it is opened, or
the Script Output Window if the user has executed 'set serveroutput on'
before executing the DML command.</span></li>
<li class="MsoNormal" style="line-height: normal; mso-list: l1 level1 lfo2; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;"><span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Improved OLAP DML Program Editor integrated within the
SQL Developer framework.</span></li>
<li class="MsoNormal" style="line-height: normal; mso-list: l1 level1 lfo2; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;"><span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">New diagnostic reports in the SQL Developer Report
navigator.</span></li>
<li class="MsoNormal" style="line-height: normal; mso-list: l1 level1 lfo2; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;"><span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Ability to create a fact view with a measure dimension
(i.e. "pivot cube"). This functionality is accessible from
the SQL Developer Tools-OLAP menu option.</span></li>
<li class="MsoNormal" style="line-height: normal; mso-list: l1 level1 lfo2; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;"><span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Cube scripts have been renamed to Build Specifications
and are now accessible within the Create/Edit Cube dialog. The Build
Specifications editor there, is similar to the calculation expression
editor as far as functionality.</span></li>
</ul>
Christopher Kearneyhttp://www.blogger.com/profile/17722642593898599800noreply@blogger.com0tag:blogger.com,1999:blog-3820031471524503731.post-81427333554960337802010-12-02T04:26:00.000-08:002010-12-02T05:28:29.166-08:00Simba previews Cognos8 Analysis Studio accessing Oracle Database OLAP Option cubesHot on the heels of support for BusinessObjects Voyager, and in addition to the native Excel 2003/2007/2010 pivot table access, Simba are previewing the same connectivity for Cognos8 Analysis Studio - the dimensionally aware UI in the Cognos BI suite. <div><br /></div><div>Together with the unique SQL access to the same multidimensional data & calculations in Oracle Database OLAP cubes <i>(meaning that *any* tool or application capable of connecting to Oracle and issuing simple SQL can leverage the power of Database OLAP - like Oracle Application Express <a href="http://oracleolap.blogspot.com/2009/02/new-tutorial-creating-interactive-apex.html">for example</a>)</i>, <b>plus</b> the existing support for Oracle's own BI tools including </div><div><ul><li>Oracle BIEE 10g and 11g (see <a href="http://oracleolap.blogspot.com/2010/07/first-look-at-obiee-11g-with-oracle.html">http://oracleolap.blogspot.com/2010/07/first-look-at-obiee-11g-with-oracle.html</a> ) and </li><li>Oracle BI Discoverer Plus OLAP (see <a href="http://oracleolap.blogspot.com/2010/08/discoverer-olap-is-certified-with-olap.html">http://oracleolap.blogspot.com/2010/08/discoverer-olap-is-certified-with-olap.html</a> ), </li></ul></div><div>together with the big functionality and performance improvements in 11g , there is now every reason to move to Oracle Database 11gR2 and to fully exploit the OLAP Option - whatever your choice of front end tool(s). </div><div><br /></div><div>For Cognos fans: Here is the Video on YouTube:</div><div><br /><iframe width="480" height="295" src="http://www.youtube.com/v/ykMnttc9SNU?fs=1&hl=en_US&rel=0&color1=0x3a3a3a&color2=0x999999">&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;/param&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;param name="allowFullScreen" value="true" frameborder="0"&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;</iframe><br /></div><div>More information, see the Simba website : <a href="http://www.simba.com/MDX-Provider-for-Oracle-OLAP.htm">http://www.simba.com/MDX-Provider-for-Oracle-OLAP.htm</a></div>Kevin Lancasterhttp://www.blogger.com/profile/06742628997065141834noreply@blogger.com0tag:blogger.com,1999:blog-3820031471524503731.post-8703976536440126902010-11-16T13:39:00.000-08:002010-11-16T13:55:28.297-08:00Simba previews Oracle OLAP MDX Provider connectivity to SAP BusinessObjects VoyagerSimba technologies have released a short video to preview 'Using MDX Provider for Oracle OLAP to directly connect SAP BusinessObjects Voyager to Oracle Database OLAP Option'<br /><br />This will be a great capability for users of both Oracle OLAP and BusinessObjects and will futher extend the reach of Oracle database embedded OLAP cubes.<br /><br /><br /><object width="640" height="390"><param name="movie" value="http://www.youtube.com/v/J4Vg655zbbQ&hl=en_US&feature=player_embedded&version=3"><param name="allowFullScreen" value="true"><param name="allowScriptAccess" value="always"><embed src="http://www.youtube.com/v/J4Vg655zbbQ&hl=en_US&feature=player_embedded&version=3" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="640" height="390"></embed></object><br /><br /><br />You can get more details on the <a href="http://www.simba.com/MDX-Provider-for-Oracle-OLAP-FAQ-support-SAP-BusinessObjects-Voyager.htm">Simba website</a>Stuart Bunbyhttp://www.blogger.com/profile/10781347144821555643noreply@blogger.com0tag:blogger.com,1999:blog-3820031471524503731.post-54695066686896930352010-07-20T14:53:00.000-07:002010-08-16T02:05:28.448-07:00A first look at OBIEE 11g with Oracle OLAPFor those who missed it, the global launch for <a href="http://www.oracle.com/oms/businessintelligence11g/index.html">the 11g release of the Oracle Business Intelligence Enterprise Edition suite (OBIEE)</a> took place in London on July 7th.<br /><br />And the fantastic news for Oracle OLAP customers is that OBIEE 11g will work out-of-the-box with Oracle OLAP in almost exactly the same way as OBIEE 10g does - with just one additional configuration step required to enable the new OLAP-style front-end functionality.<br /><br />Of course, there are other features that are relevant such as the WebLogic application server, and the new security model, but these have already been well blogged elsewhere so the focus of this posting will be Oracle OLAP integration.<br /><br />To illustrate how easy it is, I will use a trusted old friend as a starting point - the <a href="http://www.oracle.com/technology/products/bi/olap/11g/samples/schemas/global_11g_schema.zip">11g Global sample schema</a>. I have installed this in an Oracle 11.2 database instance, created an Oracle OLAP Analytic Workspace, and then refreshed this AW so that the dimensions and cubes are built.<br /><br />With an AW in place, the next step is to use <a href="http://www.oracle.com/technology/products/bi/olap/11g/awm_plugin/biee/awm_plugin_biee.html">the OBIEE plug-in for AWM</a> to generate the metadata required for the OBIEE Server. For those who have not used the plug-in before, check out this <a href="http://download.oracle.com/otndocs/products/warehouse/olap/videos/obiee_plug_in_for_awm/OBIEE_Plugin.html">excellent demonstration of how it works</a>. While this particular version of the plug-in was originally released to work with OBIEE 10g, and presumably an updated version will be released in due course, it can be used in exactly the same way in OBIEE 11g to import metadata into the Administration tool.<br /><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgCzM0ehRsIp9K1hzFOKR2F4eVXka31Z5SQRU6GPzuduiK5XJlavLrCawTevO3rx9926hAD_wG-tEjkb429M7FcSFPMofFgrQZ1fg91644hi95nK5FcpnULd0EXfJg5ay20Bbofu0yb3Y/s1600/sshot1.JPG"><img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 208px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgCzM0ehRsIp9K1hzFOKR2F4eVXka31Z5SQRU6GPzuduiK5XJlavLrCawTevO3rx9926hAD_wG-tEjkb429M7FcSFPMofFgrQZ1fg91644hi95nK5FcpnULd0EXfJg5ay20Bbofu0yb3Y/s400/sshot1.JPG" alt="" id="BLOGGER_PHOTO_ID_5496132403917766642" border="0" /></a><br />And at first glance, aside from a few updated icons, this version of the Administration tool looks very similar, but the biggest change related to the administration of OLAP data sources (relational or MOLAP) is the ability to map hierarchy objects right through into the presentation layer.<br /><br />Here is the Metadata generated by the plug-in for the Channel Dimension in both the Business Model and Presentation layers<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFOqNRSLhyykAs3Z2jM4rQ4AdLjClWkHWkrDJqJCE9Dn1qLdjKl5md6odCF6EfDbfRi1iM0JaXRmAheeFuRIOyIp49vaIOZTOogoaGDH5KgKC8B6zj8M2_YMP9qmvCgTy7ceXxz4qKJSU/s1600/sshot2.jpg"><img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 195px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFOqNRSLhyykAs3Z2jM4rQ4AdLjClWkHWkrDJqJCE9Dn1qLdjKl5md6odCF6EfDbfRi1iM0JaXRmAheeFuRIOyIp49vaIOZTOogoaGDH5KgKC8B6zj8M2_YMP9qmvCgTy7ceXxz4qKJSU/s400/sshot2.jpg" alt="" id="BLOGGER_PHOTO_ID_5496405423368794850" border="0" /></a><br />The new 11g OLAP-style front-end functionality is enabled by adding these hierarchies into the Presentation layer too. This can be achieved by a simple click-and-drag for each hierarchy like the following which is again for the Channel Dimension<br /><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilkyfdDAG-NuOMnankB2AyeFTOyRpz-GiqNCo-2AYWABg1-YT-4Qa-HcTj27SL8CPeyiQz5dJTJEaEFBnUZRH0psLdxtSntvU9F2mj7rfa9UYh7J-y8k1Z43o9DWhe1Wln8Ttm3DXDxeU/s1600/sshot3.jpg"><img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 193px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilkyfdDAG-NuOMnankB2AyeFTOyRpz-GiqNCo-2AYWABg1-YT-4Qa-HcTj27SL8CPeyiQz5dJTJEaEFBnUZRH0psLdxtSntvU9F2mj7rfa9UYh7J-y8k1Z43o9DWhe1Wln8Ttm3DXDxeU/s320/sshot3.jpg" alt="" id="BLOGGER_PHOTO_ID_5496406933809428098" border="0" /></a><br />Hopefully, the next release of the plug-in will handle this additional step automatically (and also provide support for value-based hierarchies which were not supported by the front-end in OBIEE 10g) but in the meantime it really is just a simple click-and-drag for each dimension.<br /><br />Once all the hierarchies are mapped through into the Presentation Layer, the cube is ready to query. I can log into the OBIEE 11g home page and create a new analysis based upon my Oracle OLAP subject area. The new hierarchies are available for selection when I construct a query<br /><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeKuKdmeM8gYMlvXYZVBbSjfXqXbTd9WxTgvYuRMzuv0miiqnWlmP9cNFYGT1F1nBymQ0ecznTo4aC-eLaGf0UPZJ1earDEhEzRmhxmzSSTxQM80fzuBPTL-VwXBNYNok3cPbbmgx0_zg/s1600/sshot4.jpg"><img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 319px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeKuKdmeM8gYMlvXYZVBbSjfXqXbTd9WxTgvYuRMzuv0miiqnWlmP9cNFYGT1F1nBymQ0ecznTo4aC-eLaGf0UPZJ1earDEhEzRmhxmzSSTxQM80fzuBPTL-VwXBNYNok3cPbbmgx0_zg/s400/sshot4.jpg" alt="" id="BLOGGER_PHOTO_ID_5496760049859744818" border="0" /></a><br /><br />I can then select all of the 'columns' I need for my query and view the results as a pivot table. Here is a really simple example showing Sales by Time. I have also added some calculated measures which have been created inside the AW and derive really useful analytics from the Sales measure. This is a classic reason for using the OLAP Option in the first place - it facilitates the easy creation of calculations that are difficult (or often impossible) to express in SQL. And by having them embedded in the cube, the only thing that the SQL tool (in this case OBIEE) needs to do is select the calculation as a field in a view. How easy is that?!<br /><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgi5A3rrADfkJwMXaOpuOwJrK1zOukfkN2g7cxRE_AgVi6TQxpyNTxSr9EzteWlIgMlqPP-H9djrMVnPGN4J-l__NeY4mva_LKF2URlfOsHOazfn6wrMo7C2t3NDS3Tkvq95CNDkdbHLCc/s1600/sshot6.jpg"><img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 230px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgi5A3rrADfkJwMXaOpuOwJrK1zOukfkN2g7cxRE_AgVi6TQxpyNTxSr9EzteWlIgMlqPP-H9djrMVnPGN4J-l__NeY4mva_LKF2URlfOsHOazfn6wrMo7C2t3NDS3Tkvq95CNDkdbHLCc/s400/sshot6.jpg" alt="" id="BLOGGER_PHOTO_ID_5497112732735028514" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhD_Ww38nQFJsC-PbL1LVAjQXFqJnx-rNdpmkW8aQR087UsD9Terez67QzrA5-y4mZMP-1fyGxDU7xE_-pDmhjfoJX6_dN5hABEOtmvA3UTwumUTd4niV_kGypwf0i2a6sZSakDsIOzDCs/s1600/sshot5.jpg"><br /></a>Once a pivot table with Hierarchy-based columns has been created, this is where the new front-end features really come into play. Some highlights include Calculated Items (derived Dimension members) and a new Selector (which allows dimension selections to be built up as a series of steps based upon add/keep/remove logic):<br /><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZdjF9NFYEwXGO6OLcQc8VahV8KmMV3ai6fYttgvuwAYC6zYDcN8MnJ4amZfVJEe_UJY7JpOoFhBUfegJZmgVOcWQbeaAiP0JV7hSTJqG0S0EW2-c6IYISQai-mtpu6K2jdiJdhKHM83U/s1600/sshot7.jpg"><img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 278px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZdjF9NFYEwXGO6OLcQc8VahV8KmMV3ai6fYttgvuwAYC6zYDcN8MnJ4amZfVJEe_UJY7JpOoFhBUfegJZmgVOcWQbeaAiP0JV7hSTJqG0S0EW2-c6IYISQai-mtpu6K2jdiJdhKHM83U/s400/sshot7.jpg" alt="" id="BLOGGER_PHOTO_ID_5498621118915984258" border="0" /></a><br />For those familiar with Discoverer OLAP, or Sales Analyzer, Financial Analyzer and Express Objects/Analyzer, these aren't exactly revolutionary features, but combined with all the other great features of the OBIEE suite, this is now a very compelling platform for your Oracle OLAP data.<br /><br />Finally, I would guess that there are probably thousands of old Oracle Express/OLAP systems that have been waiting for a BI platform like this. If you work on one, what are you waiting for?<br /><br />***<a href="http://www.oracle.com/technetwork/middleware/bi-enterprise-edition/downloads/index.html">OBIEE 11g can now be downloaded from OTN</a>***Stuart Bunbyhttp://www.blogger.com/profile/10781347144821555643noreply@blogger.com3tag:blogger.com,1999:blog-3820031471524503731.post-11165492161875763592010-02-23T06:41:00.001-08:002010-02-23T07:08:46.323-08:00Excel and Oracle OLAP - Reporting No-Agg MeasuresI've run into this a few times recently, so here's a quick tip related to using Excel with Oracle OLAP (via the Simba MDX Provider for Oracle OLAP, of course).<br /><br />Here's a situation that's been reported as a bug, but you really just need to know the right Excel Pivot Table option to choose. Consider a cube that has measures that do not aggregate but is dimensioned by a dimension with a hierarchy. In this case, there is a cube with a Store dimension with levels Store > Store Type > All Stores. The stores are located in different countries and sell in local currencies. There is a Local Currency measure, with sales reported in whatever the local currencies might be (Euros, Dollars, Yen, etc.) and a Dollar Sales measure with the U.S. Dollar conversation. As a common currency, Dollars can be aggregated. Local currencies can't be aggregated.<br /><br />Here's a sample report in Excel.<br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNEBoKqCBQ1ejtCCvT20rDLSlNVi2CzUOhEjiB41D2VLhHEgYF8gJ-zEBjVTR_OdsJAXL0jmwLANO-zL4OxaBRXtsuLmyQa0o0vW7gAseIEdj9q2WoeVQuvMQE4bYBEtjbcEwcogrlEu2x/s1600-h/EXCEL_1.JPG"><img style="WIDTH: 316px; HEIGHT: 400px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5441452097737612114" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNEBoKqCBQ1ejtCCvT20rDLSlNVi2CzUOhEjiB41D2VLhHEgYF8gJ-zEBjVTR_OdsJAXL0jmwLANO-zL4OxaBRXtsuLmyQa0o0vW7gAseIEdj9q2WoeVQuvMQE4bYBEtjbcEwcogrlEu2x/s400/EXCEL_1.JPG" /></a><br /><br />Note that Dollar Sales is reported for Direct and Indirect but Local Sales is not. That's correct because Local Sales doesn't aggregate.<br /><br />But what if I happen to select only Local Sales (which is null at the aggregate members Direct and Indirect). By default, Excel will display the report as shown below.<br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6gZ_mVlRy-bGcRBYSY8lvGpvVmtZBrZq26FKlI6BUCsKIm8QSDLf1zanGnsFID7BESv_q8uuj-fefek9gKM21XuXkjZwXAIsZ4eTyEvqkduOxVENhRK_SjbvuxcME9WwsXAix2Cvs3pSz/s1600-h/excel_2.JPG"><img style="WIDTH: 279px; HEIGHT: 308px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5441452954260709586" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6gZ_mVlRy-bGcRBYSY8lvGpvVmtZBrZq26FKlI6BUCsKIm8QSDLf1zanGnsFID7BESv_q8uuj-fefek9gKM21XuXkjZwXAIsZ4eTyEvqkduOxVENhRK_SjbvuxcME9WwsXAix2Cvs3pSz/s400/excel_2.JPG" /></a><br /><br />This isn't very useful because I can't drill down on the Direct member to get at the stores. The solution is simple, but a lot of people seem to miss it. Just choose the Show items with no data in rows PivotTable option.<br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhS5C2SOKHn8UbHQmJaxzwUX6NYYB_xQAT3VYxoirI7vcM840_K5ucDm_yY2QFXXnFgTF1W6YAPEBTgpCvn23TCV-M7ceI5qfsqdfFgF6M00aHIQrVn08jUqnTdKumXZRJRT9ZvRmg0Tw1B/s1600-h/excel_3.JPG"><img style="WIDTH: 385px; HEIGHT: 400px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5441453658651179090" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhS5C2SOKHn8UbHQmJaxzwUX6NYYB_xQAT3VYxoirI7vcM840_K5ucDm_yY2QFXXnFgTF1W6YAPEBTgpCvn23TCV-M7ceI5qfsqdfFgF6M00aHIQrVn08jUqnTdKumXZRJRT9ZvRmg0Tw1B/s400/excel_3.JPG" /></a><br /><br />Now you will be able to see the Direct and Indirect members, allowing you to drill to stores.<br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSEeCMHDzVQc5qvbpSktXnaEZTCQJfB3eH2RXWZGtr-dMe1Rd2QMaqRw9KBMxt9UKojCZNNYWoA5QqaaZ1h76vDUPBvCX-bzkgXWROAiBXngjFEzcjaoWQkGMZRziRUcc52V0hpI5ZOdLs/s1600-h/excel_4.JPG"><img style="WIDTH: 288px; HEIGHT: 337px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5441454242033767410" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSEeCMHDzVQc5qvbpSktXnaEZTCQJfB3eH2RXWZGtr-dMe1Rd2QMaqRw9KBMxt9UKojCZNNYWoA5QqaaZ1h76vDUPBvCX-bzkgXWROAiBXngjFEzcjaoWQkGMZRziRUcc52V0hpI5ZOdLs/s400/excel_4.JPG" /></a><br /><br />Now, after the drill.<br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg25rgKUj2bR6KmCWsEc-NUKlpphtUQsHLRGVpNVIYtCWsDwrDU-55T_Yn3zwFZM-X7v0BUUTadcVpLlzo3jDzv6BEu-HmWws6CchGxRPQea0uH1y7CHQ6_XWOR6qX9pI8LwPhxjPuktGBN/s1600-h/excel_5.JPG"><img style="WIDTH: 279px; HEIGHT: 400px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5441454622166932834" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg25rgKUj2bR6KmCWsEc-NUKlpphtUQsHLRGVpNVIYtCWsDwrDU-55T_Yn3zwFZM-X7v0BUUTadcVpLlzo3jDzv6BEu-HmWws6CchGxRPQea0uH1y7CHQ6_XWOR6qX9pI8LwPhxjPuktGBN/s400/excel_5.JPG" /></a>Bud Endresshttp://www.blogger.com/profile/02590149552658898625noreply@blogger.com0tag:blogger.com,1999:blog-3820031471524503731.post-2429851685503863132008-12-16T09:50:00.000-08:002008-12-23T06:22:44.752-08:00ComputerWeekly.com : E.on transforms financial insight with Oracle OLAP Option<a title="http://www.computerweekly.com/Articles/2008/12/11/233863/e.on+transforms+financial+insights+with+bare-knuckle.htm" href="http://www.computerweekly.com/Articles/2008/12/11/233863/e.on+transforms+financial+insights+with+bare-knuckle.htm" send="true">http://www.computerweekly.com/Articles/2008/12/11/233863/e.on+transforms+financial+insights+with+bare-knuckle.htm</a><br /><br />The article above, published last week in ComputerWeekly, follows an earlier <a href="http://www.oracle.com/customers/snapshots/e-on-uk-snapshot.pdf">customer profile posted on OTN</a>. E.on, one of Europe's leading energy suppliers, has gone live with a financial transformation software project that will give it an accurate view of the profits generated by each customer and provide better forecasting of future demand. E.on has accounts with over eight million customers in the UK. To quote directly from the project leader Lawrence Edwards: "It (accurate forecasting of demand, and, therefore, margin) is a massive problem because of the data volumes and complexity. Others have tried and failed, but we persevered."<br /><br />It provides excellent proof points for the use of Oracle OLAP to solve business problems that require rapid data loading and analysis of large data volumes. The E.on system is currently operating at about 6Tb and is growing rapidly, with 150Gb of new data added every 14 hours. There is a great quote from Lawrence in the <a href="http://www.oracle.com/customers/snapshots/e-on-uk-snapshot.pdf">OTN PDF</a> explaining what they have achieved using Oracle OLAP Option:<br /><br />"The analytical power, centralized administration, and scalability of Oracle OLAP have allowed us to process and present data in a way that was not previously possible. This has provided us with an unprecedented depth of understanding of customers’ energy use and the demand for all our products and offerings"Stuart Bunbyhttp://www.blogger.com/profile/10781347144821555643noreply@blogger.com0tag:blogger.com,1999:blog-3820031471524503731.post-25148580317597388922008-06-02T03:34:00.000-07:002008-12-11T15:25:17.957-08:00Best Practice Tips : SQL Access to Oracle DB Multidimensional AW Cubes (#2)<div>One of the most useful features introduced with Oracle Database OLAP is the ability for the powerful multidimensional calculation engine and the performance benefits of true multidimensional storage in the Analytic Workspace (AW), to be accessed and leveraged by simple SQL queries.<br /><br />This single feature dramatically increases the reach and applicability of multidimensional OLAP – to a vast range of BI query and reporting tools, and SQL-based custom applications that can now benefit from the superior performance, scalability and functionality of a first class multidimensional server, but combined within the Oracle Database with all the other advantages that derive from that. </div><br /><div><br />This post is the <strong>second</strong> in a series that I will use to share some general best practice tips to get the most out of this feature, so that you can deliver even better solutions to your business end-users:<br /><br /><strong>Best Practice Tip #2: </strong><strong>General AW Object Naming Conventions for dimensions, levels, hierarchies and attributes…</strong>(Oracle Database 10g and 11g)<br /><br />The following advice will result in much easier to understand and use relational views over your AW. It makes the implementation much cleaner to visualise, and easier for other users to understand what they are looking at. It also saves a lot of typing for developers that are writing their own SQL queries!<br /><br />The objective is to ensure that the generated column names in your views are easy to read, and also to avoid the possibility that generated column names may get truncated to fit within the limits for a column name in Oracle Database (when that happens your views get really ugly really quickly). Finally, it has the additional desirable side effect of making it easier and therefore quicker to do the mappings in AWM because the screens are less cluttered with long-winded object names!<br /><br /><em><span style="font-size:85%;">Note: this advice follows both for Oracle Database 10g OLAP (eg views created by the AWM10g View Generator Plug-in) and for Oracle Database 11g OLAP, where views are auto-generated (eg when creating your Standard From AW via AWM11g).</span></em><br /><br /><strong>Here is the idea:</strong> </div><ul><li>Keep the names used for dimensions, levels, hierarchies, and attributes as short as possible, while still meaningful of course. </li><li>If possible (simply for readability in the resulting relational view and column names), avoid the use of the "_" char especially for dimension, hierarchy, level and attribute names.</li><li><div align="left">If possible <em>(also recommended if Oracle OLAP API clients such as OracleBI Spreadsheet Add-in , OracleBI Discoverer Plus OLAP and OracleBI Beans will be used on the same AW),</em> create the AW in its own schema.<br /></div></li></ul><p align="left"><img id="BLOGGER_PHOTO_ID_5207301947241906770" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgl_2HfC-sbZD0b-9LMiHRPacOQWAlpR9Sq5CYJEdyImDL2vDy1Es7IceDxVGJ38OYmVb32BUCYdb2zuERb4K-yfwUa_FwmUGQDjH4m8EUg5ZLcUAdV1TenfOdfmfw3fEvexTPvON9sqG5t/s400/ObjectNameLengths.jpg" border="0" /></p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwMK-gQgGq-by-qSf6TbXyMoBS9CwVP3vmU0kz8TggWPH0Wj2Y7gb9qUTIpobodYaopNaeiyxhSLAnLWJmrhCFRvFN5GnTVwmssIZ2h3wx7C9Tk-aBJjqpYDjjQnHB9IeF3IISjkIcxqsO/s1600-h/ObjectNameLengths.jpg"></a>Don't be seduced into thinking it is a good idea to put "DIM" in the name of everything that is a dimension, or "ATT" into the name of all the attributes. You don't need to do this. The AW knows what objects are what, and you can very simply query the AW if you need, for example, to find out the names of all the Dimensions in an AW. <em>(Another topic for another day is to walk thru all the Data Dictionary stuff that helps with this). </em><br /><p align="left">In other words: If you have a Product Dimension, it is self-evidently a dimension, so clogging up its name with "_DIM" or "_DIMENSION" is just extra wear and tear on your keyboard!</p><br /><p><strong>Example:</strong></p><br /><p>To illustrate the impact this advice can have, here are two Product Dimensions, which apart from the fact one follows best practice advice and one does not, are identical (example is from Oracle Database 11g AW) <em><span style="font-size:85%;">(you can click on the picture to see it full size):</span></em><br /><br /><strong>First</strong> – two ways I could have created my Product Dimension:<br /></p><br /><p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2TcRVxzFkhiBnuGh5hRJM8aoHDGT7dWeIeQG_sA9CzrtVbnUwdL0k9vi1yn7E2GGYqLNMsdnY1sEfdeZp1qwiel2n1WfGeaBYke8ejuG3pqA_wGzUseSHoiDyOAHpTpOJqgjczeo-KGql/s1600-h/DimExamples_AWM.jpg"><img id="BLOGGER_PHOTO_ID_5207299048138981906" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2TcRVxzFkhiBnuGh5hRJM8aoHDGT7dWeIeQG_sA9CzrtVbnUwdL0k9vi1yn7E2GGYqLNMsdnY1sEfdeZp1qwiel2n1WfGeaBYke8ejuG3pqA_wGzUseSHoiDyOAHpTpOJqgjczeo-KGql/s400/DimExamples_AWM.jpg" border="0" /></a><br /><br /><strong>Second</strong> – what the resulting dimension views for the Main hierarchy would look like in each case:<br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgynGFRPiL68gBy6jhAgrQkph_OHSmiLFPVQa-9O3kzvuU-SN1kGPmCuiI8V6HIsHIFHhYFaSUXK3MsqofCoq-FZebredp17qV3XPTD_N-PxcaxdmlkMkV2T_iM326xb5f3P_qEyMgK9Du2/s1600-h/DimExamples_Views.jpg"><img id="BLOGGER_PHOTO_ID_5207299202757804578" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgynGFRPiL68gBy6jhAgrQkph_OHSmiLFPVQa-9O3kzvuU-SN1kGPmCuiI8V6HIsHIFHhYFaSUXK3MsqofCoq-FZebredp17qV3XPTD_N-PxcaxdmlkMkV2T_iM326xb5f3P_qEyMgK9Du2/s400/DimExamples_Views.jpg" border="0" /></a><br /><br /><strong>Third</strong> – how much harder it is to read and write the SQL to query the AW’s dimension as a result:<br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjlTOmuYvkFmB54mnj4W4qeOgEePGWVuCtFoaOXTQRsnDu-sXkpylHX9vzHafyZjkK2ghDdlHwexykjJAjMgQmZ2YNPbFENbExRERLQVYZWnzjLaWQdQT3fOdegYBcFQczpJQMrR-eeP_C/s1600-h/DimExamples_SQL.jpg"><img id="BLOGGER_PHOTO_ID_5207299842707931714" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjlTOmuYvkFmB54mnj4W4qeOgEePGWVuCtFoaOXTQRsnDu-sXkpylHX9vzHafyZjkK2ghDdlHwexykjJAjMgQmZ2YNPbFENbExRERLQVYZWnzjLaWQdQT3fOdegYBcFQczpJQMrR-eeP_C/s400/DimExamples_SQL.jpg" border="0" /></a><br />Which of these functionally identical examples is easier to read, easier to understand and easier to query?</p><p><strong>I rest my case</strong>. Giving a bit of thought to the way you build your AW before you build it nearly always pays dividends later. </p>Kevin Lancasterhttp://www.blogger.com/profile/06742628997065141834noreply@blogger.com0tag:blogger.com,1999:blog-3820031471524503731.post-87376031701255277812008-05-31T11:48:00.000-07:002008-12-11T15:25:18.095-08:00Best Practice Tips : SQL Access to Oracle DB Multidimensional AW Cubes (#1)One of the most useful features introduced with Oracle Database OLAP is the ability for the powerful multidimensional calculation engine and the performance benefits of true multidimensional storage in the Analytic Workspace (AW), to be accessed and leveraged by simple SQL queries.<br /><br />This single feature dramatically increases the reach and applicability of multidimensional OLAP – to a vast range of BI query and reporting tools, and SQL-based custom applications – BI and operational – that can now benefit from the superior performance, scalability and functionality of a first class multidimensional server, but combined within the Oracle Database with all the other advantages that derive from that. Bottom line: if you have a tool or application that can (a) connect to an Oracle Database instance, and (b) fire simple SQL at that Database, then you can get benefit from the AWs in that tool or application.<br /><br />This post is the <strong>first of a series</strong> that I will use to share some general best practice tips to get the most out of this feature, so that you can deliver even better solutions to your business end-users.<br /><br />If any of you have tips and advice of your own that we can share, please contact us – we’ll be happy to publish your good ideas and experience with this feature of Oracle Database OLAP.<br /><br />Anyway. Enough pre-amble. Let’s get on with it. Here goes:<br /><br /><strong>Best Practice Tip #1: Creating your views</strong> (Oracle Database 10g and 11g)<br /><br />Basically the first tip in the series boils down to two things:<br /><br />1) Always build your AWs to Oracle Database OLAP ‘Standard Form’. This is what happens if you build them with AWM, OWB (10g-only at the time of this post, but support for 11g target AWs is due in OWB very soon), or the supplied AW API if you need to programmatically build and maintain your AW.<br />2) Use the free-ware “View Generator” plug in for AWM10g to build your 10g views, and leverage the <strong>automatically generated</strong> views in <strong>11g,</strong> unless you have a very good reason not to.<br /><br />Together, if you follow this advice you will save a lot of time on your project, and also increase your ability to support the application going forward. And it will be a lot easier for others (such as Oracle Support, or your local friendly Oracle OLAP Consultant) to help you if you have any problems.<br /><br /><strong>More detail:</strong><br /><br />In <strong>Oracle Database 10g</strong>, there is nothing to stop you coding your own views using the SQL OLAP_TABLE() function. And, if you have an entirely custom built AW this is pretty much your only option. However, if you have developed your AW to Oracle’s OLAP Standard Form specification you can save yourself the time, by using a handy dandy little plug-in for AWM10g. The plug-in is free shareware for AWM10gR2 & can be downloaded from <a href="http://www.oracle.com/technology/products/bi/olap/viewGenerator_1_0_2.zip">here</a>, with the associated ReadMe <a href="http://www.oracle.com/technology/products/bi/olap/ViewGenerator.html">here</a>.<br /><br />The plug in steps you thru a simple wizard within AWM, allowing you to choose which measures etc you need, and then creates the views for you (storing the biggest lump of syntax – the ‘limitmap’ parameter which describes which AW objects show up in what columns in your view – inside the AW itself, in a multi-line text variable/measure).<br /><br />In <strong>Oracle Database 11g</strong>, while <span style="font-family:courier new;">OLAP_TABLE()</span> is still available for you to use if you like (and sometimes it is perfect for your needs as it has lots of very clever hooks by which you can trigger various OLAP actions whenever a user selects from the view), for most cases, the new <span style="font-family:courier new;">CUBE_TABLE()</span> function added in Database 11g is much easier and therefore recommended.<br /><br /><span style="font-family:courier new;">CUBE_TABLE()</span> views are what AWM11g automatically creates for you when defining the objects inside the AW. Assuming you have a valid Standard Form 11g Database AW, such as you might build in AWM11g, <span style="font-family:courier new;">CUBE_TABLE()</span> is much, much easier to use than <span style="font-family:courier new;">OLAP_TABLE().</span><br /><br />For example, the entire syntax required to create a Dimension View, for a specified hierarchy of that Dimension in an AW (not that I even have to type any of this in, as the AWM tool does it automatically for me) is as follows:<br /><br /><span style="font-family:courier new;">CREATE OR REPLACE FORCE VIEW MYDIM_MYHIER_VIEW AS<br />SELECT * </span><br /><span style="font-family:courier new;">FROM TABLE( CUBE_TABLE('MYSCHEMA.MYDIM;MYHIER') );</span><br /><br />How easy is that?!<br /><br />All you need to know about your AW is the name of the Hierarchy (MYHIER), Dimension (MYDIM) and schema that the AW is built in (MYSCHEMA). All the object mappings that you have to tell <span style="font-family:courier new;">OLAP_TABLE</span> about, in the limitmap parameter, are automatically done as a result of improvements in Database 11g’s Data Dictionary (which is now fully aware of the details of the contents of the AW).<br /><br />Here (below) is what an example Product Dimension looks like in AWM11g, and the resulting View:<br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvGRK4rNiVEIu3dvlLDj2X3mleqYJQl7qKQnktUXDRSg7gwlSajbZiZB-92fLHlqShlcxODXHyn-01Rd1Gvemv0GBCL8hKVEkhQWZTVOvAsN0HEGWlUcx6qB9wakemQBOAViLnMzX8WpoP/s1600-h/PROD_and_View.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvGRK4rNiVEIu3dvlLDj2X3mleqYJQl7qKQnktUXDRSg7gwlSajbZiZB-92fLHlqShlcxODXHyn-01Rd1Gvemv0GBCL8hKVEkhQWZTVOvAsN0HEGWlUcx6qB9wakemQBOAViLnMzX8WpoP/s400/PROD_and_View.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5207295788258804210" /></a><br /><br /><p><span style="font-size:85%;"><em>Note that the OLAP Option only allows one Dimension or Cube (and therefore Dimension View, or Cube View) of a given name in each SCHEMA. For this reason, it is our recommendation that each AW be built in its own schema if possible. This will allow you, if you ever need to, to have a PROD dimension or SALES Cube in more that one unrelated AW. This tip will be included again, in an upcoming Post on Best Practice AW Design practices, and naming conventions.</em></span></p>Kevin Lancasterhttp://www.blogger.com/profile/06742628997065141834noreply@blogger.com2tag:blogger.com,1999:blog-3820031471524503731.post-46563947517296167492008-04-21T22:00:00.000-07:002008-12-11T15:25:24.150-08:00Tuning Guidance for OLAP 10gMy assumption with this posting is: you are familiar with all the basic OLAP terms such as, dimensions, levels, hierarchies, attributes, measures, cubes, etc. If this is not the case then go to the Oracle Wiki and checkout these links:<br /><br /><a href="http://wiki.oracle.com/page/Oracle+Olap+Option">http://wiki.oracle.com/page/Oracle+Olap+Option</a><br /><ul><li><a href="http://wiki.oracle.com/page/Oracle+Olap+Terminology">Terminology</a> - Key Concepts and Terms</li><li><a href="http://wiki.oracle.com/page/Oracle+OLAP+How+To">Oracle OLAP How To</a> - Performance Tuning and more ...</li><li><a href="http://wiki.oracle.com/page/OLAP+option+-+DBA+Sample+Scripts">Script Samples</a> - for DBAs managing the OLAP option.</li><li><a href="http://wiki.oracle.com/page/OLAP+option+-+Did+You+Know%3F">Did You Know?</a> - that in the Oracle OLAP option you can.</li><li><a href="http://wiki.oracle.com/page/OLAP+option+-+Diagnostic+Techniques">Diagnostic Techniques</a> - for those using the OLAP option.</li><li><a href="http://wiki.oracle.com/page/OLAP+option+-+RAC+%26+GRID">RAC & GRID</a> - for those using OLAP option with RAC or GRID</li></ul><br />Most people when they approach OLAP for the first time, create a data model that either takes too long to build or too long to query. The “too long to query” is usually the first problem to arise and in trying to solve this issue they create the second problem “too long to build”. There is a balance that needs to be achieved when designing OLAP data models. That balance is between pre-solving every level across all dimensions, which increases build time, and providing users with fast query performance. Most people assume there is a direct relationship between the number of levels that are pre-solved and query performance. As one goes up so does the other: pre-solve more levels and query performance improves. Therefore, the answer to poor query performance is to pre-solve all levels across all dimensions correct? Yes and no. Most systems do not have an infinite window for building cubes. Fortunately, using Oracle OLAP Option it is possible to balance the amount of time taken to build a cube and still ensure excellent query performance. How is this achieved?<br /><br />Oracle OLAP is the most powerful and scalable OLAP server on the market. Because OLAP is inside the database it inherits all the native scalability, security and performance of the Oracle database and it is because the database is so fast and scalable there is a tendency to ignore certain design principles when building an OLAP data model. If the original design and methodology is sound then tuning is very quick and easy to manage. But there is no silver bullet to make OLAP go faster, as one of our OLAP gurus states: there is no ”_OLAP_TURBO_MODE=YES” setting for the init.ora.<br /><br />What follows is a series of recommendations and observations based on my experience on various OLAP projects to help optimize OLAP builds. This is not the authoritative guide to tuning OLAP data models; just my thoughts.<br /><br />When asked to tune an existing OLAP data model I break the work up in to five sections:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQMUG3ygIx5jb7vWL41NNfQhkIQEBV-kpQcLK_QnfCIYnJCa5fa5Ac-FQRykMNA-Y5tk-GCHtbKVsikASUWMq9x1CFnYuHckMGZl2rw4cCHWg1x-_G7AcOcVw6rrtgTIZlpF2HNzKhNX8/s1600-h/Slides+for+Keith.001.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQMUG3ygIx5jb7vWL41NNfQhkIQEBV-kpQcLK_QnfCIYnJCa5fa5Ac-FQRykMNA-Y5tk-GCHtbKVsikASUWMq9x1CFnYuHckMGZl2rw4cCHWg1x-_G7AcOcVw6rrtgTIZlpF2HNzKhNX8/s400/Slides+for+Keith.001.png" alt="" id="BLOGGER_PHOTO_ID_5191650848715385202" border="0" /></a><br /><br />Tuning a data load process needs to be done in a step-by-step process. Trying to rush things and changing too many settings at once can simply create more problems than it solves. It is also important to start at the beginning with the hardware and lastly look at the database instance itself. Most DBAs will be tempted to rip open the init.ora file and start tweaking parameters in the hope of making the build run faster.<br /><br />However, the area that is likely to have the biggest impact is refining (or possibly even changing) the implementation of the logical model. But when making changes that improve the build performance you should also check the impact on query performance to ensure the amount of time taken to return a query is still within acceptable limits.<br /><br />Below are the steps I use when I am asked to analyse the build performance on an OLAP schema. But before you start a tuning exercise, I would recommend reading the <span style="font-weight: bold;font-size:85%;" >2-Day Performance Tuning Guide</span> that is now part of the database documentation suite. It provides a lot of useful information. It is available as an <a href="http://www.oracle.com/pls/db111/to_toc?pathname=server.111/b28275/toc.htm">HTML</a> document and <a href="http://www.oracle.com/pls/db111/to_pdf?pathname=server.111/b28275.pdf">PDF</a> document. The PDF document can be downloaded and stored on your laptop/memory stick etc for easy reference.<br /><br /><br /><span style="font-size:100%;"><span style="font-weight: bold;">Part 1 - Analysis of Hardware</span></span><br />In any situation the first challenge in a tuning exercise is to ensure the foundation for the whole solution is solid. This tends to be the biggest challenge because it can involve a working with a number of hardware and software vendors. Trying to make sure your environment is based on an adequate configuration can be time consuming and risky, and will probably end in a compromise between performance, scalability, manageability, reliability, and naturally price.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3ky3Cg5s8EaARZlx5HcFaTCEi8QVRVnBo0j9nAQJfBsoCicJX5B0KD5HbeQ6odHfj367RFungZvcGc77O-Its6J2HGY6gnfpcPm5sFRrz7O6eu5NRQd_epzOLeSrhnxO8_T8goPNe2ns/s1600-h/Slides+for+Keith.002.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3ky3Cg5s8EaARZlx5HcFaTCEi8QVRVnBo0j9nAQJfBsoCicJX5B0KD5HbeQ6odHfj367RFungZvcGc77O-Its6J2HGY6gnfpcPm5sFRrz7O6eu5NRQd_epzOLeSrhnxO8_T8goPNe2ns/s400/Slides+for+Keith.002.png" alt="" id="BLOGGER_PHOTO_ID_5191651535910152578" border="0" /></a><br /><br />Configurations can be difficult to analyse and most of the time. This analysis typically tends to degenerate into each vendor in the hardware stack blaming the other vendor and/or the database.<br /><br /><span style="font-weight: bold;font-size:85%;" >Step 1 – Check Patches</span><br />When analysing an existing environment make sure all the latest firmware, drivers and O/S patches have been applied. Refer to the Oracle database installation guide, Metalink, and the hardware vendors web sites for more details.<br /><ul><li><a href="http://www.oracle.com/technology/documentation/index.html">Oracle Documentation Portal</a> </li><li><a href="http://metalink.oracle.com/">Oracle Support Portal</a></li></ul><br /><span style="font-weight: bold;font-size:85%;" >Step 2 – Determine Workload</span><br />In a good environment you should be expecting to load about 1 million rows per minute via OLAP. This is the benchmark. Check the XML_LOAD_LOG table from previous builds to determine if this is being achieved. Here is a log from a data load for the Common Schema AW based on a relatively simple view that joins two fact tables together to load three measures. Approximately 900,000 records are loaded in 57 seconds.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivhCryipL__kHD2rgUS8auH0axZ2yPggLGnO8Jb-vplyVZfaEeTc3tRPMie9wOC8uWkkNWm-K7QfaLMoMcejvmPTBkEIRkJv-RM5ZuBGhISSheEEFj9FwFXvWGR8l0Y25baIyXurZTAhQ/s1600-h/image1.PNG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivhCryipL__kHD2rgUS8auH0axZ2yPggLGnO8Jb-vplyVZfaEeTc3tRPMie9wOC8uWkkNWm-K7QfaLMoMcejvmPTBkEIRkJv-RM5ZuBGhISSheEEFj9FwFXvWGR8l0Y25baIyXurZTAhQ/s400/image1.PNG" alt="" id="BLOGGER_PHOTO_ID_5191652472213023122" border="0" /></a><br /><br />In this case, we could conclude this is a reasonable starting point to begin the next phase of the tuning exercise. However, don’t forget the performance initially listed in XML_LOAD_LOG could be influenced by a number of factors, but if the data source is a table or a very simple view, then 1 million rows a minute should be achievable. Anything less tends to indicate some sort of I/O issue, or possibly the use of inefficient SQL to extract data from the source. The ADDM analysis of I/O performance partially depends on a single argument, DBIO_EXPECTED, that describes the expected performance of the I/O subsystem. The value of DBIO_EXPECTED is the average time it takes to read a single database block in microseconds. Oracle uses the default value of 10 milliseconds, which is an appropriate value for most modern hard drives. If your hardware is significantly different, such as very old hardware or very fast RAM disks, consider using a different value. To determine the correct setting for DBIO_EXPECTED parameter, perform the following steps:<br /><ol><li>Measure the average read time of a single database block read for your hardware. Note that this measurement is for random I/O, which includes seek time if you use standard hard drives. Typical values for hard drives are between 5000 and 20000 microseconds.</li><li>Set the value one time for all subsequent ADDM executions. For example, if the measured value if 8000 microseconds, you should execute the following command as SYS user: </li><li>EXECUTE DBMS_ADVISOR.SET_DEFAULT_TASK_PARAMETER( 'ADDM', 'DBIO_EXPECTED', 8000);</li></ol>Also review the Performance Tuning Guide, <a href="http://download.oracle.com/docs/cd/B28359_01/server.111/b28274/iodesign.htm#i20394">Chapter 8 : I/O Configuration and Design</a>. Specifically, review these two sections:<br /><ul><li><a href="http://download.oracle.com/docs/cd/B28359_01/server.111/b28274/#CHDBBADG">Prerequisites for I/O Calibration</a></li><li><a href="http://download.oracle.com/docs/cd/B28359_01/server.111/b28274/#CHDGBECA">Running I/O Calibration</a></li></ul><span style="font-style: italic;">Parallel vs Serial Processing</span><br />As part of this step some consideration needs to given to parallel vs serial processing. I find most people will start by running a build in serial mode and then assume if it takes X amount of time to process in serial mode, running in parallel mode will naturally take X/No of parallel jobs. Of course this is true up to a point. There is a definite tipping point in parallel processing where the law of diminishing returns sets in very quickly. As a starting point if I am going to process a load in parallel I will start by using a job queue = “No. of CPUs-1”. This is usually a good starting point and depending on where the bottlenecks start appearing (CPU waits vs I/O waits) I may increase or decrease this figure during testing.<br /><br />Parallel processing is a very useful tool for improving performance but you need to use partitioned cubes and the data being load must map across multiple partition keys to result in parallel processing. As before, this is not a silver bullet that will simply make everything run faster. It needs to be used carefully.<br /><br /><br /><span style="font-weight: bold;font-size:85%;" >Step 3 – Determine Best Reference Configurations</span><br />What can be useful is to work from a set of known configurations designed to provide a stated level of performance. Oracle has worked with a number of hardware vendors to provide documented configurations for data warehouse solutions. These configurations can be used as benchmarks and/or recommendations for your environment.<br /><ul><li><a href="http://www.oracle.com/solutions/business_intelligence/emc.html">Reference Configurations for Dell and EMC</a></li><li><a href="http://www.oracle.com/solutions/business_intelligence/hp.html">Reference Configurations for HP</a></li><li><a href="http://www.oracle.com/solutions/business_intelligence/ibm.html">Reference Configurations for IBM</a></li><li><a href="http://www.oracle.com/solutions/business_intelligence/sun.html">Reference Configurations for Sun</a></li></ul>Each configuration combines software, hardware, storage, I/O and networking into an optimized environment for different scales of customer data warehouse requirements. Using extensive customer experience and technical knowledge, Oracle and its hardware partners have developed configurations for data warehouses with varying raw data sizes, concurrent user population and workload complexity. By offering customers reference configurations suited for different profiles, customers can select the one that best suits their business and price, performance requirements. And since they're built on scalable, modular components, these reference configurations enable customers to aggressively pursue incremental data warehouse growth.<br /><br />One of the key questions for the performance tuning exercise is: Are you just tuning the model based on today’s data volumes or should the exercise look to maximise performance of future load volumes. This is a very tricky area to manage and difficult to plan and test. Which is why having a referenceable configuration is so important. Why? Because the reference configurations provide a clear upgrade path and levels of performance are certified along that upgrade path.<br /><br /><span style="font-weight: bold;font-size:85%;" >Step 4 – Match/Compare/Contrast with Existing Configurations</span><br />In reality altering your hardware configuration is going to be a given. To change a configuration is likely to be a costly and time-consuming exercise. However, it should not be ignored. If you have followed and tuned your data model based on the following recommendations and the load and aggregation phase is still too long then a full hardware review may in fact be needed and upgrades may need to be purchased. Hopefully, the next result of this whole exercise is to provide some sort of cost/benefit report to outline expected performance improvements based on additional hardware costs.<br /><br /><br /><span style="font-size:100%;"><span style="font-weight: bold;">Part 2 - Analysis of Dimensions</span></span><br />The second stage is to review the logical model for the dimensions. This stage is largely to confirm the dimensions are correctly implemented and the source data is of good quality. Most of this analysis is really just making sure there are no big issues within the various dimensions and possibly making small changes based on experience from various projects. But it is important to ensure the dimensions are of “good quality” before moving on to review the cubes – there is no point building a house on a sand bank and then wondering why it gets washed away (if that makes sense?). Good foundations are needed.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuUMjoDcruso-tYIwz6jz4VxzV2mG8A12qRY1_RZ1hfzV1sDOjaD1tWtybJXcWXsqB7lacjbiCmfzegccDzsJ4UxR1Sb3CCquNAUKaMmgZ7JXF7aS99OtWUGsTmNynJhhSiM8j3lDEo8E/s1600-h/Slides+for+Keith.003.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuUMjoDcruso-tYIwz6jz4VxzV2mG8A12qRY1_RZ1hfzV1sDOjaD1tWtybJXcWXsqB7lacjbiCmfzegccDzsJ4UxR1Sb3CCquNAUKaMmgZ7JXF7aS99OtWUGsTmNynJhhSiM8j3lDEo8E/s400/Slides+for+Keith.003.png" alt="" id="BLOGGER_PHOTO_ID_5191654082825759138" border="0" /></a><br /><br /><span style="font-size:85%;"><span style="font-weight: bold;">Step 1 - Analysis of Attributes</span></span><br />Many customers implement dimensions when they only really need attributes. This usually happens when they are migrating from a legacy OLAP server to Oracle OLAP. We have a customer at the moment that has an existing OLAP data model in a legacy OLAP server based on 60 dimensions. Reviewing the queries the users make against the data model it became clear that many of these dimensions were in fact simple attributes within Oracle OLAP. This can have a significant impact on the design of related cubes and the whole loading process, since fewer dimensions within a cube will improve both load and aggregation times.<br /><br />Can Oracle OLAP support extremely large dimensional models? Yes it can. The engine will support up to 256 dimensions within a single cube and within the AW you can have as many dimensions as you need. The key point here is: each cube can have its own dimensionality. Oracle OLAP does not implement hyper-cubes where every cube has to share the same dimensionality – one of the key benefits of Oracle OLAP over other legacy OLAP engines is that it does support cubes of different dimensionality.<br /><br />There is an excellent customer case study in the December 07 OLAP Newsletter that examines how one customer managed a very large data models based on lots of dimensions. The <a href="http://www.oracle.com/technology/products/bi/olap/olapref/newsletter/oracleolapnewsletter_dec07.html">E.ON</a> data model contains multiple cubes (subject areas) each with between 6 to 12 dimensions. The cubes are updated weekly with many millions of rows loaded and aggregated, with about 1 million rows updated in the cube per minute. For more information, read the complete review by clicking <a href="http://www.oracle.com/technology/products/bi/olap/olapref/newsletter/oracleolapnewsletter_dec07.html">here</a>. There are many other customers with even bigger models.<br /><br />From a UI perspective you need to think very carefully about the number of dimensions within a cube. Many UI studies have shown business users find it increasingly difficult to interpret the results from a dataset where there are more than nine dimensions. Although, as the above case shows, it is possible for some users to interact with larger more complex models providing the information is presented in usable format, it is worth spending some time clarifying the exact dimensionality of each cube.<br /><br />If you think about a typical crosstab layout, a nine dimensional cube results in one row edge dimension, one column edge dimension and seven page edge dimensions plus the measure dimension. That is a huge amount of information to absorb and, in my opinion, makes constructing queries very difficult. Another, issue that frequently occurs, as the number of dimensions increases, is the game of “hunt-the-data”. Even with only nine dimensions in a cube it is likely the data set will be extremely sparse and drilling down only one or two levels across a couple of dimensions can result in crosstabs with little or no data. Some BI tools try to mask this problem by providing an NA and/or Zero row filters. The net result is usually a “no rows returned” message appearing in the body of the report at regular intervals.<br /><br />My main recommendation is: Check the number of dimensions in your model and for the sake of your users and try to keep the number within each cube down to something intelligible. For example approximately nine – this is not a hard and fast rule; just a recommendation but do read the E.ON case study as well. If you are presented with a data model, do not be afraid to challenge the dimensionality of the cubes within the model. Make sure all the dimensions within a cube are really required because I can guarantee some are simply basic attributes.<br /><br /><span style="font-size:85%;"><span style="font-weight: bold;">Step 2 - Analysis of Level Keys</span></span><br />There is not much that needs to be done here except to make sure to use surrogate keys except when you are certain the dimension keys are unique across all levels. This is not always the case and using a surrogate key is a good way to ensure your hierarchies are correctly populated. OLAP creates a surrogate key by prefixing the original source key with the level identifier. Therefore, from a storage perspective it makes sense to make the level key as short as possible. For example, don’t create a level identifier such as “PRODUCT_SUB_CATEGORY_SKU_IDENTIFIER”. There is a limit of 30 characters for level names. In practice I have seen issues with both data loading and aggregation where very large dimension keys (i.e. greater than 400 characters) have been created.<br /><br />In practice I recommend using simple level identifiers such as L1, L2, L3 although this does make writing SQL statements a little more challenging via the SQL Views as the level identifier is used in the column name along with the dimension and it is not exactly obvious what each column contains when they are called PODUCT_L1, PRODUCT_L2 etc.<br /><br /><span style="font-style: italic;">Surrogate vs Natural Keys</span><br />The use of surrogate keys is an interesting area. During some projects it has been found that by not using surrogate keys build performance has increased. This does make sense since the source data for cube will have to be reformatted at load time to ensure the key is valid. In some cases the amount of time required to manipulate the incoming key values may be minimal. In other cases it has had a significant impact on load performance – the “1 million rows a minute” benchmark was not achieved and reverting to natural keys did improve load times. If the data source can be guaranteed to provide unique keys across all levels it is probably worth switching to natural keys. But be warned – you cannot switch between using surrogate and natural keys if the cube already contains data.<br /><br /><span style="font-size:85%;"><span style="font-weight: bold;">Step 3 - Quantitative Analysis of Members</span></span><br />This is an important step as it will allow us to determine which levels to pre-aggregate within the cube. In most cases the default skip level approach to pre-solving levels within a cube is a reasonable starting point. But it is possible to design a much better model by analysing the number of members at each level and the average number of children for each level.<br /><br />Lets look at two real customer examples:<br /><br /><span style="font-style: italic;">Dimension 1</span><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJbt3THB9D_lvNC7m0XxS0Si92RLLvwc89dguRfqg-T9OUR55-YG5f05YZICcpHCET23HPqOPBxFsh0_5wkAxjl_9RN4fNuGfmSrzTqyQdNLObNmtia-wSBAsoE52cPucFvAg8bI4IgDg/s1600-h/image2.PNG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJbt3THB9D_lvNC7m0XxS0Si92RLLvwc89dguRfqg-T9OUR55-YG5f05YZICcpHCET23HPqOPBxFsh0_5wkAxjl_9RN4fNuGfmSrzTqyQdNLObNmtia-wSBAsoE52cPucFvAg8bI4IgDg/s400/image2.PNG" alt="" id="BLOGGER_PHOTO_ID_5191658425037695410" border="0" /></a><br /><br />A change as simple as this could have a huge impact on the amount of time taken to aggregate a cube.<br /><br />However, in some cases the OLAP Compression feature can be useful in terms of allowing you to pre-compute additional lower levels within a hierarchy for little or no additional cost because the sparsity of the data allows higher levels to compressed out of the cube. If you have a situation where there is almost a 1:1 relationship between a level and the next level down in the hierarchy it would make sense to pre-compute that level since the compression feature will compress out the redundant data. For example:<br /><br /><span style="font-style: italic;">Dimension 2</span><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihYZWjokDC5xeImvdgzAWc7_2xPFXwHn3WmwtymukVUIBysGe9PLYtLih6FqJr5D47VijYjIEO_AyutaU8JKcSZY3SEJGoKMsUsvuZwr5nkbAEM4GiSNFDd61fwNFuGgdYySpkQN5kXao/s1600-h/image2b.PNG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihYZWjokDC5xeImvdgzAWc7_2xPFXwHn3WmwtymukVUIBysGe9PLYtLih6FqJr5D47VijYjIEO_AyutaU8JKcSZY3SEJGoKMsUsvuZwr5nkbAEM4GiSNFDd61fwNFuGgdYySpkQN5kXao/s400/image2b.PNG" alt="" id="BLOGGER_PHOTO_ID_5191659052102920658" border="0" /></a><br /><br />In this example the hierarchy is relatively flat and the number of children returned at each level varies quite a lot. But at the lowest levels, there is likely to be a large number of instances where a parent only has a single child and in these situations the compress feature can compress out the repeated values. Therefore, it might make sense to solve levels L5 and L4.<br /><br /><span style="font-style: italic;">Dimension 3</span><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdJnKM8D13b6ZCQDB1zzCjHt8AHSxmvTHhqviethZzmGh-ja_ict8iYGg8SnljaYNBNSKFZpdnlMQA3hzKHGCUVNK4Sl-2Ky4NJZg5toxUR_QkdgqRs7p8lwx1Yb-0y8Cb82C0pVoFfbk/s1600-h/image2c.PNG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdJnKM8D13b6ZCQDB1zzCjHt8AHSxmvTHhqviethZzmGh-ja_ict8iYGg8SnljaYNBNSKFZpdnlMQA3hzKHGCUVNK4Sl-2Ky4NJZg5toxUR_QkdgqRs7p8lwx1Yb-0y8Cb82C0pVoFfbk/s400/image2c.PNG" alt="" id="BLOGGER_PHOTO_ID_5191658983383443906" border="0" /></a><br /><br />In this example the hierarchy here shows the normal pyramid approach and is definitely bottom heavy. But the upper levels contain relatively few members and drilling typically returns very few members. The default skip level approach for this dimension may in fact be pre-solving too many levels. In practice it may take 2 or 3 builds to determine which are the best levels to pre-solve, with a good starting point being:<br /><ul><li>Run 1: L7, L5, L2</li><li>Run 2: L7, L6, L1</li><li>Run 3: L7, L4, L2</li></ul>This dimension shows that it may be necessary to schedule multiple runs to test these various scenarios. Again we need to consider the impact of using compression, which allows OLAP to solve additional levels very cheaply.<br /><br /><span style="font-size:85%;"><span style="font-weight: bold;">Step 4a - Hierarchy Validation</span></span><br />Always, always check your hierarchies are functioning correctly. This involves using the Data Viewer feature within AWM. You should make sure the dimension is drillable and that selecting each level in turn returns the correct result-set.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiIR3U_k_OG8ZsuEMhVicn8bbYQZ2nu6Uj9XU8w8czV-yfX1WF12ninfer0pArpmvKxDJ3wQEGZ0cDc2WBzHErLGoG46kMELn27UR_yrq1-pN9VHVJclYLty8cRSxD7IdR6QkFiCgm-OU/s1600-h/image4.PNG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiIR3U_k_OG8ZsuEMhVicn8bbYQZ2nu6Uj9XU8w8czV-yfX1WF12ninfer0pArpmvKxDJ3wQEGZ0cDc2WBzHErLGoG46kMELn27UR_yrq1-pN9VHVJclYLty8cRSxD7IdR6QkFiCgm-OU/s400/image4.PNG" alt="" id="BLOGGER_PHOTO_ID_5191659717822851570" border="0" /></a><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibdPeq2JuSmuxFi658eXJ9cXPWv_t9Nl8WL6DVun14OGWAWkFsJBJHxeMYBeB9lgl4Ojo1Myb0Lsgd9K0lniy2xUopX_0rOabgPt3VzOAYyGqdKIF4NPJhqci5LFuZpcrWkDCvbuux5QY/s1600-h/image5.PNG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibdPeq2JuSmuxFi658eXJ9cXPWv_t9Nl8WL6DVun14OGWAWkFsJBJHxeMYBeB9lgl4Ojo1Myb0Lsgd9K0lniy2xUopX_0rOabgPt3VzOAYyGqdKIF4NPJhqci5LFuZpcrWkDCvbuux5QY/s400/image5.PNG" alt="" id="BLOGGER_PHOTO_ID_5191659653398342114" border="0" /></a><br /><br />A better approach is actually to make the database do the work, but this requires some additional SQL commands to be executed against the source tables. Ideally, try and create a relational dimension over the source table(s). Normally, the relational dimension object is used within query rewrite, which in this case we are not really concerned with for 10gR2 (in 11g the story is quite different as a cube can be registered as a materialised view and used for query-rewrite). But this does allow us to use the dbms_dimension.validate_dimension procedure verifies that the relationships specified in a dimension are valid. The rowid for any row that is found to be invalid will be stored in the table DIMENSION_EXCEPTIONS in the user's schema. The procedure looks like this:<br /><br /><span style="font-family:courier new;"> DBMS_DIMENSION.VALIDATE_DIMENSION (</span><br /><span style="font-family:courier new;"> dimension IN VARCHAR2,</span><br /><span style="font-family:courier new;"> incremental IN BOOLEAN := TRUE,</span><br /><span style="font-family:courier new;"> check_nulls IN BOOLEAN := FALSE,</span><br /><span style="font-family:courier new;"> statement_id IN VARCHAR2 := NULL );</span><br /><br />Note that before running the VALIDATE_DIMENSION procedure, you need to create a local table, DIMENSION_EXCEPTIONS, by running the provided script utldim.sql. If the VALIDATE_DIMENSION procedure encounters any errors, they are placed in this table. Querying this table will identify the exceptions that were found. To query this table you can use a simple SQL statement such as this:<br /><br /><span style="font-family:courier new;"> SELECT * FROM dimension_exceptions</span><br /><span style="font-family:courier new;"> WHERE statement_id = 'Product Validation';</span><br /><br /><br />However, rather than query this table, it may be better to query the rowid of the invalid row to retrieve the actual row that has generated the errors. In this example, the dimension PRODUCTS is checking a table called DIM_PRODUCTS. To find any rows responsible for the errors simply link back to the source table using the rowid column to extract the row(s) causing the problem, as in the following:<br /><br /><span style="font-family:courier new;"> SELECT * FROM DIM_PRODUCTS</span><br /><span style="font-family:courier new;"> WHERE rowid IN (SELECT bad_rowid</span><br /><span style="font-family:courier new;"> FROM dimension_exceptions</span><br /><span style="font-family:courier new;"> WHERE statement_id = </span><span style="font-family:courier new;"> 'Product Validation');</span><br /><br /><span style="font-size:85%;"><span style="font-weight: bold;">Step 4b - Hierarchy Order</span></span><br />The order of hierarchies within a dimension can have a significant impact on query performance. When solving levels at run-time the OLAP engine will use the last hierarchy in the list as the aggregation path. Consider this example using a time dimension:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgr5QlvQtvQRsENQr19484EhCgzcj6_qNJ4RiJeMrK7uLfWO9NLbrU_7n9CAqA-jzfeqYVQriBzBYErdz8v5-KYjhFy216teR_BtuUPRlw3jLnqg8RYBz9TFXR6U48yddG7iNKq7Igd1PY/s1600-h/image5a.PNG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgr5QlvQtvQRsENQr19484EhCgzcj6_qNJ4RiJeMrK7uLfWO9NLbrU_7n9CAqA-jzfeqYVQriBzBYErdz8v5-KYjhFy216teR_BtuUPRlw3jLnqg8RYBz9TFXR6U48yddG7iNKq7Igd1PY/s400/image5a.PNG" alt="" id="BLOGGER_PHOTO_ID_5191660722845198850" border="0" /></a><br /><br />Let’s assume we pre-compute the levels Month and Quarter. But decide not to pre-compute the Year level because the main hierarchy used during queries is the Julian Year-Quarter-Month-Day and, therefore, the total for each Year will be derived from adding up just 4 values. In fact, the aggregation engine looks at all the hierarchies to find the lowest common level across all hierarchies, which in this case is Day. It then selects the last hierarchy in the list containing the level Day, in this case the Week hierarchy. Therefore, the value for the each dimension member at the Year level will be the result of adding up 365/366 values and not simply 4 Quarter values.<br /><br />The obvious question is why? The answer is to ensure backward compatibility with the Express ROLLUP command from which the AGGREGATE command is derived. When the Aggregate command was introduced one of our requirements was that it produced numbers that matched those of Rollup, thus in cases where an aggregate node was declared in multiple hierarchies we always produced numbers based on the LAST definition of the node because that would be the number that matched the procedural approach taken by rollup. Because of this feature an alternative approach to hierarchy ordering might be as follows:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRXn_30dygSoJclWMdanUsmcCMF9hKgoFi_7Lyog8gFkrfCluvAGUkrEAm9chJ9iVNeJcmqcUTkUUGMZ09y6lCI-6h5Mm1-ky5ISDrdxqDOsEqc11HcKyMo5l7eETprVmpf8VSonksgpE/s1600-h/image5b.PNG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRXn_30dygSoJclWMdanUsmcCMF9hKgoFi_7Lyog8gFkrfCluvAGUkrEAm9chJ9iVNeJcmqcUTkUUGMZ09y6lCI-6h5Mm1-ky5ISDrdxqDOsEqc11HcKyMo5l7eETprVmpf8VSonksgpE/s400/image5b.PNG" alt="" id="BLOGGER_PHOTO_ID_5191660971953302034" border="0" /></a><br />Now the run-time aggregation for Year will be derived from the level Quarter, which has been pre-computed, and the result will be returned much faster.<br /><br /><span style="font-size:85%;"><span style="font-weight: bold;">Step 5 - Check the Data Quality</span></span><br />This last step is probably the most important, especially as OLAP style projects tend to be scheduled once all the ETL has been completed. But you should never take the quality of the source data for granted. Ideally you can use the Data Quality option of Warehouse Builder (which is a costed option for OWB) and analyse the source data for each dimension to make sure the data is of a reasonable quality. Things to check are:<br /><ul><li>Consistent data type</li><li>Number distinct values</li><li>Min and Max values</li><li>Domain members</li><li>Number of members not present in the fact table</li></ul>OLAP stores all members as data type text. Even if there are inconsistent data types within the source data, everything gets converted to text. This can mask some issues where unusual dimension members are included in the source data such as –9999, or XXXX. In many cases the data owners are completely unaware these values exist, or, worse still – they are included to allow the data to balance correctly and used as journal buckets. It may not be possible to remove these values but it is important to know they exist and equally important to clarify if they are in fact needed.<br /><br />The last one is an interesting check especially if you are using that dimension as a partition key. If you are creating lots and lots of empty partitions that will never contain data then should those members even be loaded? In a recent project I identified a dimension that contained over 300,000 leaf node members, but in the main fact table there was only data for 50% of those members. The obvious question is why load 150,000 plus members if you are never going to post data to them.<br /><br /><br /><span style="font-weight: bold;">Part 3 - Analysis of Cubes</span><br />The next stage is to review the data model for each cube in turn. It is in this area the biggest impacts on load time are likely to be achieved.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzS98WhQjbGAtdWIEEjE-5OZjozpl22cNOIj0b3gvxz4ZI4oeujBokOh5uQYeQLReXZi3zBopC_0_7QVSyyGRMBo4JnDTItv6gcSvCLtVHuya2YdT4ZtgOM0OBVh6MHsDqJU8xTHLEB3o/s1600-h/Slides+for+Keith.004.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzS98WhQjbGAtdWIEEjE-5OZjozpl22cNOIj0b3gvxz4ZI4oeujBokOh5uQYeQLReXZi3zBopC_0_7QVSyyGRMBo4JnDTItv6gcSvCLtVHuya2YdT4ZtgOM0OBVh6MHsDqJU8xTHLEB3o/s400/Slides+for+Keith.004.png" alt="" id="BLOGGER_PHOTO_ID_5191661869601466914" border="0" /></a><br /><span style="font-size:85%;"><span style="font-weight: bold;">Step 1 - Analysis of Storage Model</span></span><br />It is important to assign an efficient storage model to a cube, as this will have a significant impact on both the load and aggregation times.<br /><br /><ul><li>Make sure compression is enabled.</li><li>Data type should be either DECIMAL or INTGER</li><ul><li>Warning do not use NUMBER as this uses approximately 3.5 times the storage compared to DECIMAL, but it is the default. Number requires 22 bytes and Decimal requires 8 bytes (See OLAP Application Developers Guider, 10.2.0.3, Chapter 7 Aggregating Data).</li></ul></ul>Try not to use Global Composites. There is little need to use this feature, except in very special cases where you need to optimise the retrieval of rows via SQL access and you want to only report non-NA and/or non-zero rows. Note – if you are using compression it is not possible to use the “Global Composites” feature even though in AWM10gR2 the option box is still enabled even after you select to use compression. (In 11g there are database events you can use to optimise the retrieval of non-NA/zero rows. See the posting by Bud Endress on the OLAP Blog: <a href="http://oracleolap.blogspot.com/2008/04/attribute-reporting-on-cube-using-sql.html">Attribute Reporting on the Cube using SQL</a>)<br /><br /><br /><span style="font-size:85%;"><span style="font-weight: bold;">Step 2 - Analysis of Sparsity Model</span></span><br />Management of sparsity within a cube is critical. Firstly the order of the dimensions is very important. When using compression, which should always be enabled, dimensions should be ordered with the dimension with the least number of members first and the dimension with the most number of members last. The most common question is: Should time be dense or sparse?<br /><br />Answer – it depends. This is where you need to have a deep understanding of the source data and the data quality features in OWB can really help in this type of situation. In some models time works best dense and in other models time works best when it is sparse. This is especially true when time is used as the partition dimension. Therefore, you need to plan for testing these different scenarios.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsA1vT8ovCtrrE6gjNWpJ8Ki3eC_3P2MYUznJHd6uNbGfU90WInFEvJwYazY_b0Ru0f0bikSy7GbGJXSBh9OuHE3yRKmy10saEEpI9V8nmRKa6WX2MpiVfUJmllsn1fHw6tmwx0Ztb1qE/s1600-h/Image6.PNG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsA1vT8ovCtrrE6gjNWpJ8Ki3eC_3P2MYUznJHd6uNbGfU90WInFEvJwYazY_b0Ru0f0bikSy7GbGJXSBh9OuHE3yRKmy10saEEpI9V8nmRKa6WX2MpiVfUJmllsn1fHw6tmwx0Ztb1qE/s400/Image6.PNG" alt="" id="BLOGGER_PHOTO_ID_5191662509551594034" border="0" /></a><br /><br />There is sparsity advisor package in the database, which analyses the source data in relational tables and recommends a storage method. The recommendations may include the definition of a composite and partitioning of the data variable. The Sparsity Advisor consists of these procedures and functions:<br /><ul><li>SPARSITY_ADVICE_TABLE Procedure</li><li>ADD_DIMENSION_SOURCE Procedure</li><li>ADVISE_SPARSITY Procedure</li><li>ADVISE_DIMENSIONALITY Function</li><li>ADVISE_DIMENSIONALITY Procedure</li></ul>The Sparsity Advisor also provides a public table type for storing information about the dimensions of the facts being analyzed. I have to say this is not the friendliest package ever shipped with the database, but it can be useful in some situations. To use the Sparsity Advisor you need to follow these five steps:<br /><ol><li>Call SPARSITY_ADVICE_TABLE to create a table for storing the evaluation of the Sparsity Advisor.</li><li>Call ADD_DIMENSION_SOURCE for each dimension related by one or more columns to the fact table being evaluated. The information that you provide about these dimensions is stored in a DBMS_AW$_DIMENSION_SOURCES_T variable.</li><li>Call ADVISE_SPARSITY to evaluate the fact table. Its recommendations are stored in the table created by SPARSITY_ADVICE_TABLE. You can use these recommendations to make your own judgements about defining variables in your analytic workspace, or you can continue with the following step.</li><li>Call the ADVISE_DIMENSIONALITY procedure to get the OLAP DML object definitions for the recommended composite, partitioning, and variable definitions, or</li><li>Use the ADVISE_DIMENSIONALITY function to get the OLAP DML object definition for the recommended composite and the dimension order for the variable definitions for a specific partition.</li></ol><br /><br />The OLAP Reference manual provides an example script for the GLOBAL demo schema to analyse the relational fact table. The amount of information required does seem a little excessive given that most of it could be extracted from the various metadata layers – may be some bright person will create a wrapper around this to simplify the whole process.<br /><br />On the whole I still find the majority of models work best with everything sparse and to far I have only found a few cases where load and aggregation times improved when time was marked dense. But as with all tuning exercises, it is always worth trying different options, as there is no “fits-all” tuning solution with OLAP.<br /><br /><span style="font-size:85%;"><span style="font-weight: bold;">Step 3 - Analysis of Partition Model</span></span><br />Partitioning is managed at both the logical and physical levels. At the logical level, it is possible to partition a cube using a specific level to split the cube into multiple chunks. At the physical level, it is possible to partition the actual AW$ table and associated indexes that form the AW.<br /><br /><span style="font-size:85%;"><span style="font-weight: bold;">Logical Partitioning</span></span><br />Always start by use partitioning. Why? Because partitioning allows the cube to be broken down into smaller segments – much like relational table partitioning. This can help improve the aggregation phase of a build because the engine is able to load more related data into memory during processing. It also allows you to use the parallel update features of Oracle OLAP during a build. But there are some things to consider when setting up partitioning. When using partitioning you should:<br /><br /><ul><li>Try to select a dimension that has balanced partitions, such as Time</li><li>Try to select a dimension level that is not too volatile, this is one of the reasons for electing to use a dimension such as time.</li><li>Select the Level based on the information collected during Step 3 of the analysis of dimensions. In 10g, the levels above the partition key are solved at run time (this is resolved in 11g) so select the level for the partition key carefully.</li><ul><li>When selecting the partition key consider the impact this will have on the default partition, which contains all the levels above the partition level. For example partitioning on a level such as Day might generate nice small partitions but the default partition will contain all the other members such as Week, Month, Quarter and Year making the default partition very large.</li></ul></ul>It might be necessary to experiment with different partition keys to get the right balance between stored and run time aggregation. For example, if you partition using a Time dimension then Month is usually a good level to select as the key since each year only needs to aggregate 12 members to return a total, but if you have 30 years of data and most reports start at the year level displaying all 30 years the run time performance might not be acceptable. In this case the level Quarter or even Year might be a better option.<br /><br /><span style="font-style: italic;">Parallel vs Serial Processing</span><br />Logical partitioning is required for cubes where you want to enable parallel processing. But be warned, running a job in parallel may not improve processing times. In fact using too many parallel processes can have the opposite affect. But used wisely, parallel processing can drastically improve processing times provided the server is not already CPU bound. As a starting point I always begin testing by setting the value MaxJobQueues to “No. of CPUs-1” in the XML file for the definition of the build. In some cases even this might be too high and reducing this figure can actually improve processing times. Tuning AW parallel processing is exactly the same as tuning relational parallel processing – you need to determine where the point of diminishing returns sets in, which can be a combination:<br /><br />CPU loading<br />I/O bandwidth<br />Cube design<br /><br />Do not assume throwing parallel resources at a performance issue will resolve the whole problem. Managed carefully this can provide a significant improvement in peformance.<br /><br /><br /><span style="font-size:85%;"><span style="font-weight: bold;">Physical Partitioning</span></span><br />The aim of relational (physical) partitioning is to allow you to control the tablespace for each partition thus distributing the load across multiple disks, to spread data across a variety of disk types (see information on ILM on OTN) and to enhance query performance since it is possible to direct specific queries to a smaller subset of data.<br /><br />Some, but not all of this applies to an AW. From a tablespace perspective it is probably easier to use ASM to manage and distribute the storage of an AW across multiple disks as opposed to creating a partitioned AW$ table spread across multiple tablespaces. The reason the AW$ table is partitioned is optimise the lob performance. Each partition has its own lob index, which manages its storage, and a separate slave process can update each partition.<br /><br />The relational table that acts as a container for the AW, AW$xxxxx , can be partitioned to break the AW into more physical chunks which can reduce contention for locks on the relational objects (AW$ table and related indexes) during parallel data loading jobs. By default each AW is created using a range partition key of gen# and 8 subpartitions. The DDL below is from a default AW created via AWM. Note the clauses to manage the partition and sub-partitions:<br /><ul><li>PARTITION BY RANGE ("GEN#") </li><li>SUBPARTITION BY HASH ("PS#","EXTNUM") </li><li>SUBPARTITIONS 8</li></ul><br /><span style="font-size:85%;"><span style="font-family:courier new;"> CREATE TABLE "BI_OLAP"."AW$SH_AW" </span><br /><span style="font-family:courier new;"> ("PS#" NUMBER(10,0), </span><br /><span style="font-family:courier new;"> "GEN#" NUMBER(10,0), </span><br /><span style="font-family:courier new;"> "EXTNUM" NUMBER(8,0), </span><br /><span style="font-family:courier new;"> "AWLOB" BLOB, </span><br /><span style="font-family:courier new;"> "OBJNAME" VARCHAR2(256 BYTE), </span><br /><span style="font-family:courier new;"> "PARTNAME" VARCHAR2(256 BYTE)) </span><br /><span style="font-family:courier new;">PCTFREE 10 PCTUSED 40 INITRANS 4 MAXTRANS 255 </span><br /><span style="font-family:courier new;"> STORAGE(</span><br /><span style="font-family:courier new;"> BUFFER_POOL DEFAULT)</span><br /><span style="font-family:courier new;"> TABLESPACE "BI_OLAP" </span><br /><span style="font-family:courier new;"> LOB ("AWLOB") STORE AS (</span><br /><span style="font-family:courier new;"> DISABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 0</span><br /><span style="font-family:courier new;"> CACHE </span><br /><span style="font-family:courier new;"> STORAGE(</span><br /><span style="font-family:courier new;"> BUFFER_POOL DEFAULT)) </span><br /><span style="font-family:courier new;"> PARTITION BY RANGE ("GEN#") </span><br /><span style="font-family:courier new;"> SUBPARTITION BY HASH ("PS#","EXTNUM") </span><br /><span style="font-family:courier new;"> SUBPARTITIONS 8</span><br /><span style="font-family:courier new;"> (PARTITION "PTN1" VALUES LESS THAN (1) </span><br /><span style="font-family:courier new;">PCTFREE 10 PCTUSED 40 INITRANS 4 MAXTRANS 255 </span><br /><span style="font-family:courier new;"> STORAGE(</span><br /><span style="font-family:courier new;"> BUFFER_POOL DEFAULT)</span><br /><span style="font-family:courier new;"> TABLESPACE "BI_OLAP" </span><br /><span style="font-family:courier new;"> LOB ("AWLOB") STORE AS (</span><br /><span style="font-family:courier new;"> DISABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 0</span><br /><span style="font-family:courier new;"> CACHE READS LOGGING </span><br /><span style="font-family:courier new;"> STORAGE(</span><br /><span style="font-family:courier new;"> BUFFER_POOL DEFAULT)) </span><br /><span style="font-family:courier new;"> ( SUBPARTITION "SYS_SUBP16109" </span><br /><span style="font-family:courier new;"> LOB ("AWLOB") STORE AS (</span><br /><span style="font-family:courier new;"> TABLESPACE "BI_OLAP" ) </span><br /><span style="font-family:courier new;"> TABLESPACE "BI_OLAP", </span><br /><span style="font-family:courier new;"> SUBPARTITION "SYS_SUBP16110" </span><br /><span style="font-family:courier new;"> LOB ("AWLOB") STORE AS (</span><br /><span style="font-family:courier new;"> TABLESPACE "BI_OLAP" ) </span><br /><span style="font-family:courier new;"> TABLESPACE "BI_OLAP", </span><br /><span style="font-family:courier new;"> SUBPARTITION "SYS_SUBP16111" </span><br /><span style="font-family:courier new;"> LOB ("AWLOB") STORE AS (</span><br /><span style="font-family:courier new;"> TABLESPACE "BI_OLAP" ) </span><br /><span style="font-family:courier new;"> TABLESPACE "BI_OLAP", </span><br /><span style="font-family:courier new;"> SUBPARTITION "SYS_SUBP16112" </span><br /><span style="font-family:courier new;"> LOB ("AWLOB") STORE AS (</span><br /><span style="font-family:courier new;"> TABLESPACE "BI_OLAP" ) </span><br /><span style="font-family:courier new;"> TABLESPACE "BI_OLAP", </span><br /><span style="font-family:courier new;"> SUBPARTITION "SYS_SUBP16113" </span><br /><span style="font-family:courier new;"> LOB ("AWLOB") STORE AS (</span><br /><span style="font-family:courier new;"> TABLESPACE "BI_OLAP" ) </span><br /><span style="font-family:courier new;"> TABLESPACE "BI_OLAP", </span><br /><span style="font-family:courier new;"> SUBPARTITION "SYS_SUBP16114" </span><br /><span style="font-family:courier new;"> LOB ("AWLOB") STORE AS (</span><br /><span style="font-family:courier new;"> TABLESPACE "BI_OLAP" ) </span><br /><span style="font-family:courier new;"> TABLESPACE "BI_OLAP", </span><br /><span style="font-family:courier new;"> SUBPARTITION "SYS_SUBP16115" </span><br /><span style="font-family:courier new;"> LOB ("AWLOB") STORE AS (</span><br /><span style="font-family:courier new;"> TABLESPACE "BI_OLAP" ) </span><br /><span style="font-family:courier new;"> TABLESPACE "BI_OLAP", </span><br /><span style="font-family:courier new;"> SUBPARTITION "SYS_SUBP16116" </span><br /><span style="font-family:courier new;"> LOB ("AWLOB") STORE AS (</span><br /><span style="font-family:courier new;"> TABLESPACE "BI_OLAP" ) </span><br /><span style="font-family:courier new;"> TABLESPACE "BI_OLAP") , </span><br /><span style="font-family:courier new;"> PARTITION "PTNN" VALUES LESS THAN (MAXVALUE) </span><br /><span style="font-family:courier new;">PCTFREE 10 PCTUSED 40 INITRANS 4 MAXTRANS 255 </span><br /><span style="font-family:courier new;"> STORAGE(</span><br /><span style="font-family:courier new;"> BUFFER_POOL DEFAULT)</span><br /><span style="font-family:courier new;"> TABLESPACE "BI_OLAP" </span><br /><span style="font-family:courier new;"> LOB ("AWLOB") STORE AS (</span><br /><span style="font-family:courier new;"> DISABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 0</span><br /><span style="font-family:courier new;"> CACHE </span><br /><span style="font-family:courier new;"> STORAGE(</span><br /><span style="font-family:courier new;"> BUFFER_POOL DEFAULT)) </span><br /><span style="font-family:courier new;"> ( SUBPARTITION "SYS_SUBP16117" </span><br /><span style="font-family:courier new;"> LOB ("AWLOB") STORE AS (</span><br /><span style="font-family:courier new;"> TABLESPACE "BI_OLAP" ) </span><br /><span style="font-family:courier new;"> TABLESPACE "BI_OLAP", </span><br /><span style="font-family:courier new;"> SUBPARTITION "SYS_SUBP16118" </span><br /><span style="font-family:courier new;"> LOB ("AWLOB") STORE AS (</span><br /><span style="font-family:courier new;"> TABLESPACE "BI_OLAP" ) </span><br /><span style="font-family:courier new;"> TABLESPACE "BI_OLAP", </span><br /><span style="font-family:courier new;"> SUBPARTITION "SYS_SUBP16119" </span><br /><span style="font-family:courier new;"> LOB ("AWLOB") STORE AS (</span><br /><span style="font-family:courier new;"> TABLESPACE "BI_OLAP" ) </span><br /><span style="font-family:courier new;"> TABLESPACE "BI_OLAP", </span><br /><span style="font-family:courier new;"> SUBPARTITION "SYS_SUBP16120" </span><br /><span style="font-family:courier new;"> LOB ("AWLOB") STORE AS (</span><br /><span style="font-family:courier new;"> TABLESPACE "BI_OLAP" ) </span><br /><span style="font-family:courier new;"> TABLESPACE "BI_OLAP", </span><br /><span style="font-family:courier new;"> SUBPARTITION "SYS_SUBP16121" </span><br /><span style="font-family:courier new;"> LOB ("AWLOB") STORE AS (</span><br /><span style="font-family:courier new;"> TABLESPACE "BI_OLAP" ) </span><br /><span style="font-family:courier new;"> TABLESPACE "BI_OLAP", </span><br /><span style="font-family:courier new;"> SUBPARTITION "SYS_SUBP16122" </span><br /><span style="font-family:courier new;"> LOB ("AWLOB") STORE AS (</span><br /><span style="font-family:courier new;"> TABLESPACE "BI_OLAP" ) </span><br /><span style="font-family:courier new;"> TABLESPACE "BI_OLAP", </span><br /><span style="font-family:courier new;"> SUBPARTITION "SYS_SUBP16123" </span><br /><span style="font-family:courier new;"> LOB ("AWLOB") STORE AS (</span><br /><span style="font-family:courier new;"> TABLESPACE "BI_OLAP" ) </span><br /><span style="font-family:courier new;"> TABLESPACE "BI_OLAP", </span><br /><span style="font-family:courier new;"> SUBPARTITION "SYS_SUBP16124" </span><br /><span style="font-family:courier new;"> LOB ("AWLOB") STORE AS (</span><br /><span style="font-family:courier new;"> TABLESPACE "BI_OLAP" ) </span><br /><span style="font-family:courier new;"> TABLESPACE "BI_OLAP") ) ;</span><br /></span><br />The best overall approach here is to ensure you have the correct number of sub-partitions to reduce contention during updates. For example, if you have a cube with three years of data partitioned using the level month, it would be sensible to add and additional 36 subpartitions to the AW$ table to spread the load and reduce contention during parallel updates. You can add more sub-partitions quickly and easily as follows.<br /><br /><span style="font-size:85%;"><span style="font-family:courier new;">alter table aw$test modify partition ptnn add subpartition ptnn_009 update indexes;</span><br /><span style="font-family:courier new;">alter table aw$test modify partition ptnn add subpartition ptnn_010 update indexes;</span><br /></span><br />Therefore, I recommend adding additional subpartitions at the physical level to match the number of logical partitions within the cube.<br /><br />It is possible to go to the next level (if you really feel it is necessary) and directly manage the DDL used to create the AW and there are a number of commands that allow you to control the default tablespace and the number of partitions. You can increase the number of sub-partitions within each gen# partition using either the ‘aw create command’ as shown here:<br /><br /><span style="font-size:85%;"><span style="font-family:courier new;">exec dbms_aw.execute('aw create <span style="font-style: italic;">owner</span></span></span><owner><span style="font-style: italic;font-size:85%;" ><span style="font-family:courier new;">.aw_name</span></span><aw><span style="font-size:85%;"><span style="font-family:courier new;"> partitions <span style="font-style: italic;">N</span> </span></span><n><span style="font-size:85%;"><span style="font-family:courier new;">segmentsize </span></span></n></aw></owner><span style="font-size:85%;"><span style="font-family:courier new;"><span style="font-style: italic;">N</span></span></span><span style="font-size:85%;"><span style="font-family:courier new;"> K|M|G');</span><br /></span><br />Note the key word “partitions” actually refers to the number of subpartitions.<br />It is in fact possible to define a target tablespace for the AW via the DBMS_AW.ATTACH procedure:<br /><br /><span style="font-size:85%;"><span style="font-family:courier new;"> DBMS_AW.AW_ATTACH ( </span><br /><span style="font-family:courier new;"> awname IN VARCHAR2,</span><br /><span style="font-family:courier new;"> forwrite IN BOOLEAN DEFAULT FALSE,</span><br /><span style="font-family:courier new;"> createaw IN BOOLEAN DEFAULT FALSE,</span><br /><span style="font-family:courier new;"> attargs IN VARCHAR2 DEFAULT NULL,</span><br /><span style="font-family:courier new;"> tablespace IN VARCHAR2 DEFAULT NULL);</span><br /></span><br />For example, the following SQL statement creates the AW GLOBAL_PROGRAMS as the last user-owned analytic workspace in tablespace USERS:<br /><br /><span style="font-size:85%;">SQL>EXECUTE DBMS_AW.AW_ATTACH('global_programs', true, true, 'last', ‘USERS’);<br /></span><br />AWM 10gR2 (10.2.0.03A) also allows you to define the tablespace when you create the AW, but the tablespace name is not included in the XML definition of the AW.<br />If you think you need to get right down to the base DDL level to control the allocation of tablespaces used by the AW then you will need to manually define the AW$ table. The easiest method is to create another AW$ table using the DDL from the original AW$ table and modifying it to create your own placement statements for the tablespaces. To get the DDL for an AW (table and index) you can either use SQLDeveloper or use the DBMS_METDATA package as follows:<br /><br /><span style="font-size:85%;"> set heading off;<br />set echo off;<br />set pages 999;<br />set long 90000;<br />spool aw_ddl.sql<br />select dbms_metadata.get_ddl('TABLE','AW$SH_AW','SH_OLAP') from dual;<br />select dbms_metadata.get_ddl('INDEX','SH_AW_I$','SH_OLAP') from dual;<br />spool off;<br /></span><br />These statements show the exact DDL used to generate the AW$ table and its associated index. Once you have the DDL you can then modify the tablespace statements for each sub-partition to spread the loading across different tablespaces and hence data files. But it is much easier to use ASM to manage all this for you.<br /><br />There is one major issue with manually creating an AW – the standard form metadata is not automatically added to the AW and there is no documented process for achieving this. The only reliable solution I have found is to first create the AW via AWM and then export the empty AW to an EIF file. This EIF file will then contain the standard form metadata objects. Once you have deleted and re-created the AW with the based on your specific tablespace and subpartition requirements the standard form metadata can be added by importing the EIF file. Not the prettiest of solutions but it works – at least with 10gR2.<br /><br /><br /><span style="font-size:85%;"><span style="font-weight: bold;">Step 4 - Analysis of Aggregation Model</span></span><br /><span style="font-style: italic;">The Summarize To Tab</span><br />This is where the biggest improvements to build time are likely to be uncovered. The “Summarize To” tab allows you to select the levels to pre-solve. Based on the analysis of the number of members and children at each level it should be possible to tune the levels to pre-solve only the most important levels.<br /><br />This step will require lots of testing and many builds to finally arrive at the best mix of levels.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRF39N6yag0G6qFx3Xn1K0Z7P2Z8INcZ0eodhQitirfiXgkj0TwJ7zC17kxsz7gFQY1gtUf69OHgnj7q-ho0x8TsWTtjJbSx0MkDYhkvXBgXt5KC61vIUzUerm1op3Pr6XRJ7J3ovd1MA/s1600-h/Image13.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRF39N6yag0G6qFx3Xn1K0Z7P2Z8INcZ0eodhQitirfiXgkj0TwJ7zC17kxsz7gFQY1gtUf69OHgnj7q-ho0x8TsWTtjJbSx0MkDYhkvXBgXt5KC61vIUzUerm1op3Pr6XRJ7J3ovd1MA/s400/Image13.JPG" alt="" id="BLOGGER_PHOTO_ID_5191987490420546434" border="0" /></a><br /><br /><span style="font-style: italic;">The Rules Tab</span><br />If you are using the same aggregation method across all dimensions, such as SUM, the aggregation engine will optimise the processing order for the dimensions by solving them in the reverse order from highest cardinality to lowest cardinality. Despite this I always manually order the dimensions myself anyway on the Rules Tab.<br /><br />Where you are using different aggregation methods across the various dimensions it is important to ensure the dimensions are in the correct order to return the desired result. If you change the order to improve aggregation performance where different aggregation methods are used, check the results returned are still correct. Getting the wrong answer very quickly is not a good result.<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvBKNlXvTQPD5f6hHL9EVnYMjcErWJmgyev58x6F42f6hWkOeA_Rg0zZIu3c-NYMjXeERprq_2-XzMzZTomd7GVDF3BGFwpfhxGVySYCCSzRoWbYs3PO4YZK8JnRNhKq_FMbvZFxPkF4k/s1600-h/Image14.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvBKNlXvTQPD5f6hHL9EVnYMjcErWJmgyev58x6F42f6hWkOeA_Rg0zZIu3c-NYMjXeERprq_2-XzMzZTomd7GVDF3BGFwpfhxGVySYCCSzRoWbYs3PO4YZK8JnRNhKq_FMbvZFxPkF4k/s400/Image14.JPG" alt="" id="BLOGGER_PHOTO_ID_5191988074536098706" border="0" /></a><br /><br /><span style="font-size:85%;"><span style="font-weight: bold;">Step 5 - Analysis of Data Quality</span></span><br />This is another area that can have a huge impact of load times. There are three key things to consider:<br /><ul><li>Number of NA cells</li><li>Number of Zero cells</li><li>Sparsity patterns</li></ul>Quite often I see situations where hundreds of thousands of either NA or zero values are loaded into a cube and then aggregated. In a recent customer situation, over 40% of the data being loaded was either NA or zero. Removing just those records from the data load saved a huge amount of time both in loading and aggregating that data set. Now in some cases it may in fact be necessary to load a zero balance because the value “0” does actually mean something and having a cell appear as NULL in a report does not infer the same meaning. If this is the case, there are much better ways of managing zero balances than loading and aggregating those balances up across all the various hierarchies to return a value of 0. My recommendation is to remove all zero and NA/null rows from the source fact table.<br /><br />Where there is a need to show a zero balance, create a separate cube load only the zero balances into that cube but do not aggregate the data. Use a formula to glue the non-zero balance data to the zero balance data, such as:<br /><br /><span style="font-size:85%;"><span style="font-family:courier new;">Nafill(CUBE1_NON_NA_DATA, CUBE2_ZERO_BALANCE_DATA)</span></span><br /><br />This will significantly improve the performance of the main cube since the aggregation engine only has to deal with real balances.<br /><br />Sparsity patterns are important when you have a cube that contains a large number of measures all sourced from the same fact table. In another situation, a customer had designed two cubes with about 30 measures in one cube and two measures in the other cube. The source fact table contained 75 million rows. The data load was taking about ten hours for just three years of data. Looking at the data and executing various SQL counts to determine the number of NULL cells and Zero cells for each measure, it was clear there were five different sparsity patterns within the fact table.<br /><br />By breaking the single cube into five different cubes, creating views over the base fact table to only return the relevant columns for each cube and removing all NA and zero values the amount of data being loaded each month declined to the values shown below:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEOu8nkKGx3I6Su9vEZMFDJHsI8-7WFztHUi0l2Ji7GRB3uLLzFKSm2wAjPCIsbAGtSgUYZCCBOCAjeLoKHWbs4lRyFBohn1sfN9ON8As8B9ZKZEZYSwYVambQn9AEanNxx07o0Mi8n1Q/s1600-h/Image15.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEOu8nkKGx3I6Su9vEZMFDJHsI8-7WFztHUi0l2Ji7GRB3uLLzFKSm2wAjPCIsbAGtSgUYZCCBOCAjeLoKHWbs4lRyFBohn1sfN9ON8As8B9ZKZEZYSwYVambQn9AEanNxx07o0Mi8n1Q/s400/Image15.JPG" alt="" id="BLOGGER_PHOTO_ID_5191988791795637154" border="0" /></a><br /><br />This change combined with changes to the selection of levels pre-aggregated reduced the build and aggregation time by over 50% with little impact on query performance.<br /><br />It is critical to fully understand the source data and how it is stored. As the number of measures within a cube increases it is likely that the number of times an NA or Zero value appears will also increase. Breaking a large cube up into smaller more focused chunks in this type of scenario can provide significant benefits.<br /><br /><span style="font-size:100%;"><span style="font-weight: bold;">Part 4 - Analysis of Source Schema Queries</span></span><br />When loading data into a cube from a relational source schema you should be able to achieve about 1 million rows updated in the cube per minute. If you are not seeing that level of throughput from the source table/view, you need to look at:<br /><ul><li>Hardware issues</li><li>Cube design issues</li><li>Query design issues</li></ul>The first two issues have already been covered. This area aims to review the tuning of the query fetching the data from the relational source table/view into the cube.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY_P0y2yWTA9ilBRUkbt1W30xU4usOnvSPiXU3drBIehyphenhyphenQaxabBVGBH4MnfoITN_iqBQNfw2fQg-74-dvSMxvuqn8nba7oPN9YFE-s6V63O5jKLaATSx-cpeSeS5Q9XwXkQMt-yUYseuI/s1600-h/Slides+for+Keith.005.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY_P0y2yWTA9ilBRUkbt1W30xU4usOnvSPiXU3drBIehyphenhyphenQaxabBVGBH4MnfoITN_iqBQNfw2fQg-74-dvSMxvuqn8nba7oPN9YFE-s6V63O5jKLaATSx-cpeSeS5Q9XwXkQMt-yUYseuI/s400/Slides+for+Keith.005.png" alt="" id="BLOGGER_PHOTO_ID_5191989049493674930" border="0" /></a><br /><br />Tuning the queries used to load dimension members and data into cubes can be very important. When either a data load or dimension load is executed a program is created containing the SQL to fetch the data from the relational table. It is important to make sure the SQL being executed is as efficient as possible. By using views as the source for your mappings it is relatively easy to add additional hints to ensure the correct execution path is used. Note - with 11g this can cause problems if the cube is to be exposed as a materialised view. For query re-writes to function the cube must use the underlying fact table that is part of the end-user query.<br /><br /><span style="font-size:85%;"><span style="font-weight: bold;">Step 1 - Analysing SQL Statements</span></span><br />To optimise the SQL executed during a load you have use either, or both, of the approaches:<br /><ul><li>Enterprise Manager – via Tuning Packs</li><li>Manual analysis</li></ul>If you are comfortable using PL/SQL and understand a little about OLAP DML you can follow the manual approach. However, I expect most people will revert to using Enterprise Manage as it makes the whole process so simple. However, note the Tuning Pack is a costed option for EM so check your license agreement before you start using the Enterprise Manager approach.<br /><br /><span style="font-style: italic;">Enterprise Manager</span><br />Enterprise Manager can be used to monitor the results from a SQL statement. The Performance Tab provides the environment for tuning SQL statements as well as monitoring the operation of the whole instance. The easiest way to find the SQL statement used by the data load process is to search for a SELECT statement against the view/table used in the mapping. The SQL can quite often be found in the “Duplicate SQL” report at the bottom of the Top Activity page:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvT-izIkYHB3bRW7nlu4Otfy3_cCX638VYHUD_f0LUXL7TAnKnCL7FDRpmgYdhz4DAA4jYyj143sRE3oQ7Di_XqTMfHRQQGZuYCpZNdi3SR6UH9xCmA3_pO-xtmrouUGAK9ZFqK3Lrqhk/s1600-h/Image9b.PNG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvT-izIkYHB3bRW7nlu4Otfy3_cCX638VYHUD_f0LUXL7TAnKnCL7FDRpmgYdhz4DAA4jYyj143sRE3oQ7Di_XqTMfHRQQGZuYCpZNdi3SR6UH9xCmA3_pO-xtmrouUGAK9ZFqK3Lrqhk/s400/Image9b.PNG" alt="" id="BLOGGER_PHOTO_ID_5191989560594783170" border="0" /></a><br /><br />Once you have found the SQL statement, clicking on the SQL statement listed in the table will present a complete analysis of that statement and allow you to schedule the SQL Tuning Advisor. The output from the Advisor includes recommendations for improving the efficiency of that statement. Below is the analysis of the resources used to execute the product dimension SQL statement:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiz-kW8QQvt7b49F348uBZoKmKzPxKf-79csMq6_fMY6qKniqr4dwWjf-L13v-UYI_3MWJ6wd6YHovGgIMDpVQO5k0V7LINFx7DOl6s6xWKlQxRx7XgEr1QgR5npnA1KhzPDZymP_AEsIo/s1600-h/Image9a.PNG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiz-kW8QQvt7b49F348uBZoKmKzPxKf-79csMq6_fMY6qKniqr4dwWjf-L13v-UYI_3MWJ6wd6YHovGgIMDpVQO5k0V7LINFx7DOl6s6xWKlQxRx7XgEr1QgR5npnA1KhzPDZymP_AEsIo/s400/Image9a.PNG" alt="" id="BLOGGER_PHOTO_ID_5191989771048180690" border="0" /></a><br /><br /><span style="font-style: italic;">Scheduling the Advisor</span><br />Scheduling the advisor to analyse your SQL statement is very simple. Click on the button in the top right corner of the SQL Details screen. This will launch the SQL Advisor where you need to provide:<br /><ul><li>A description for the job</li><li>Set the scope to either limited or comprehensive (there are on screen notes to help you make this decision)</li><li>Time and date to run the Advisor, since it might not be possible to run the advisor immediately.</li></ul>Once the Advisor has completed its review, it is possible to look at the recommendations that have been generated. After you have implemented the recommendations it is then possible to view the explain plan for your query:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQbcQw62axdNo4f7SX18HxACdjGa7EaE-qSqgvhzz9LPOATKF4fvVMOH16YQtYjymvXrXBX10q6YZaEVqhm93InEp1QhdeMNpXPJ3V6hSW9AEQEMO74JMDniPWuSUuGdqBArFgkmBsdoM/s1600-h/Image9d.PNG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQbcQw62axdNo4f7SX18HxACdjGa7EaE-qSqgvhzz9LPOATKF4fvVMOH16YQtYjymvXrXBX10q6YZaEVqhm93InEp1QhdeMNpXPJ3V6hSW9AEQEMO74JMDniPWuSUuGdqBArFgkmBsdoM/s400/Image9d.PNG" alt="" id="BLOGGER_PHOTO_ID_5191990063105956834" border="0" /></a><br /><span style="font-size:85%;"><span style="font-weight: bold;">Note: These features are costed extensions to the Enterprise Manager console and cannot be used on a production system unless your customer has bought these extensions.</span><br /></span><br /><span style="font-style: italic;">Manual Tuning</span><br />So how do you capture the SQL being executed during a data load? In 10g, during a load process an OLAP DML program is created called '___XML_LOAD_TEMPPRG'.<br />This program contains the code used during the build process and it is relatively easy to capture this code either via Enterprise Manager or manually at the end of the build.<br />(For a data load in 11g, look at the CUBE_BUILD_LOG’s “output” column. The table is in the AW’s schema).<br /><br />To manually capture the program code (in 10g), create your own job to manually execute a data load. For example below is a job to refresh the members in the dimension Products. Note the first three lines and last four lines that control the dumping of the program code so we can capture the SQL.<br /><br /><br /><span style="font-size:85%;"><span style="font-family:courier new;">set serveroutput on</span><br /><span style="font-family:courier new;">exec dbms_aw.execute('aw attach SH_AW rw first');</span><br /><span style="font-family:courier new;">exec dbms_aw.execute('cda BI_DIR');</span><br /></span><br /><span style="font-style: italic;">call SQL file to refresh cube<br /><br /></span><span style="font-size:85%;"><span style="font-family:courier new;">exec dbms_aw.execute('outfile loader.txt');</span><br /><span style="font-family:courier new;">exec dbms_aw.execute('DSC ___XML_LOAD_TEMPPRG')</span><br /><span style="font-family:courier new;">exec dbms_aw.execute('outfile eof');</span><br /><span style="font-family:courier new;">exec dbms_aw.execute('aw detach SH_AW');</span><br /></span><br />The resulting program looks like this, with the SQL code highlighted in bold:<br /><span style="font-size:85%;"><br /><span style="font-family:courier new;">DEFINE ___XML_LOAD_TEMPPRG PROGRAM INTEGER</span><br /><span style="font-family:courier new;">PROGRAM</span><br /><span style="font-family:courier new;">variable _errortext text</span><br /><span style="font-family:courier new;">trap on HADERROR noprint</span><br /><span style="font-family:courier new;">sql declare c1 cursor for -</span><br /><span style="font-family:courier new;">select SH.VW_PRODUCTS_DIM.PROD_ID, -</span><br /><span style="font-family:courier new;">SH.VW_PRODUCTS_DIM.PROD_DESC, -</span><br /><span style="font-family:courier new;">SH.VW_PRODUCTS_DIM.PROD_DESC, -</span><br /><span style="font-family:courier new;">SH.VW_PRODUCTS_DIM.PROD_PACK_SIZE, -</span><br /><span style="font-family:courier new;">SH.VW_PRODUCTS_DIM.PROD_WEIGHT_CLASS, -</span><br /><span style="font-family:courier new;">SH.VW_PRODUCTS_DIM.PROD_UNIT_OF_MEASURE, -</span><br /><span style="font-family:courier new;">SH.VW_PRODUCTS_DIM.SUPPLIER_ID -</span><br /><span style="font-family:courier new;">from SH.VW_PRODUCTS_DIM -</span><br /><span style="font-family:courier new;">where -</span><br /><span style="font-family:courier new;">(SH.VW_PRODUCTS_DIM.PROD_ID IS NOT NULL)</span><br /><span style="font-family:courier new;">sql open c1</span><br /><span style="font-family:courier new;">if sqlcode ne 0</span><br /><span style="font-family:courier new;">then do</span><br /><span style="font-family:courier new;"> _errortext = SQLERRM</span><br /><span style="font-family:courier new;"> goto HADERROR</span><br /><span style="font-family:courier new;"> doend</span><br /><span style="font-family:courier new;">sql import c1 into :MATCHSKIPERR SH_OLAP.SH_AW!PRODUCTS_PRODUCT_SURR -</span><br /><span style="font-family:courier new;">:SH_OLAP.SH_AW!PRODUCTS_LONG_DESCRIPTION(SH_OLAP.SH_AW!ALL_LANGUAGES 'AMERICAN') -</span><br /><span style="font-family:courier new;">:SH_OLAP.SH_AW!PRODUCTS_SHORT_DESCRIPTION(SH_OLAP.SH_AW!ALL_LANGUAGES 'AMERICAN') -</span><br /><span style="font-family:courier new;">:SH_OLAP.SH_AW!PRODUCTS_PACK_SIZE -</span><br /><span style="font-family:courier new;">:SH_OLAP.SH_AW!PRODUCTS_WEIGHT_CLASS -</span><br /><span style="font-family:courier new;">:SH_OLAP.SH_AW!PRODUCTS_UNIT_OF_MEASURE -</span><br /><span style="font-family:courier new;">:SH_OLAP.SH_AW!PRODUCTS_SUPPLIER_ID</span><br /><span style="font-family:courier new;">if sqlcode lt 0</span><br /><span style="font-family:courier new;">then do</span><br /><span style="font-family:courier new;"> _errortext = SQLERRM</span><br /><span style="font-family:courier new;"> goto HADERROR</span><br /><span style="font-family:courier new;"> doend</span><br /><span style="font-family:courier new;">sql close c1</span><br /><span style="font-family:courier new;">sql cleanup</span><br /><span style="font-family:courier new;">return 0</span><br /><span style="font-family:courier new;">HADERROR:</span><br /><span style="font-family:courier new;">trap on NOERR1 noprint</span><br /><span style="font-family:courier new;">sql close c1</span><br /><span style="font-family:courier new;">NOERR1:</span><br /><span style="font-family:courier new;">trap off</span><br /><span style="font-family:courier new;">sql cleanup</span><br /><span style="font-family:courier new;">call __xml_handle_error(_errortext)</span><br /><span style="font-family:courier new;">END</span><br /></span><br />Once you have the statement you can use SQLDeveloper’s explain plan feature to determine the execution plan. When dealing with cubes, it is likely the source fact table will be partitioned; therefore, you need to ensure partition elimination is occurring correctly.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQ3zqq-ZGOiw1bOmhcMjhlDOAnCf8_pSbUN_Gqx1NO0OLUnR9zcy9GpKDLu9FO3cbT_ehxA9QbjE9K-BZvxYR7OX-FivT6MSimIJX-hnADJmC6mVfY1z6-0x8ez84aV3RETlucWgEs23A/s1600-h/Image10.PNG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQ3zqq-ZGOiw1bOmhcMjhlDOAnCf8_pSbUN_Gqx1NO0OLUnR9zcy9GpKDLu9FO3cbT_ehxA9QbjE9K-BZvxYR7OX-FivT6MSimIJX-hnADJmC6mVfY1z6-0x8ez84aV3RETlucWgEs23A/s400/Image10.PNG" alt="" id="BLOGGER_PHOTO_ID_5191991166912551922" border="0" /></a><br /><br />If additional hints need to be added to make the query more efficient, these can be added to the view definition. This approach does not automatically generate recommendations so you will need to have a solid grasp of SQL tuning to ensure your query is based on the most optimal execution plan.<br /><br /><span style="font-size:85%;"><span style="font-weight: bold;">Step 2 – Managing Sort Resources</span></span><br />Sorting the source data is quite important for both dimensions and facts. By default, OLAP sorts dimensions alphabetically in ascending order based on the long description. Therefore, it makes sense for the relational source to provide the data in the required order, especially for the dimension loads.<br /><br />Optimising cube loads requires making sure the sorting is based on the same order as the dimensions are listed within the partitioned composites. This will be the same order as shown on the implementation details tab.<br /><br />OLAP load operations are sort intensive. You may need to increase the sort_area_size setting within the database to try and ensure the various sorting operations during a load are performed in memory and not disk. The default setting is 262,144. As part of a load process you can increase the amount of sort memory available as follows:<br /><br /><span style="font-size:85%;"><span style="font-family:courier new;">exec DBMS_AW.EXECUTE('SortBufferSize=10485760');</span></span><br /><br />Executing this command before starting a data load will increase the amount of resources allocated to memory sorts, in this case providing approximately 10Mb of memory. To permanently set the SortBufferSize to 10Mb, issue the following commands:<br /><br /><span style="font-size:85%;">exec DBMS_AW.EXECUTE('aw attach my_aw_name rwx');<br />exec DBMS_AW.EXECUTE('SortBufferSize=10485760');<br />exec DBMS_AW.EXECUTE('update');<br />exec DBMS_AW.EXECUTE('commit');<br />exec DBMS_AW.EXECUTE('aw detach my_aw_name');<br /></span><br />Or you can simply set the option before executing the XML job definition:<br /><br /><span style="font-size:85%;"><span style="font-family:courier new;">set serveroutput on</span><br /><span style="font-family:courier new;">exec dbms_aw.shutdown;</span><br /><span style="font-family:courier new;">exec dbms_aw.startup;</span><br /><span style="font-family:courier new;">exec dbms_aw.execute('aw attach SH_AW rw first');</span><br /><span style="font-family:courier new;">exec DBMS_AW.EXECUTE('SortBufferSize=10485760');</span><br /><br /></span><span style="font-style: italic;font-family:courier new;font-size:85%;" >call SQL file to refresh cube</span><span style="font-size:85%;"><br /><br /><span style="font-family:courier new;">exec DBMS_AW.EXECUTE('SortBufferSize=262144');</span><br /><span style="font-family:courier new;">exec dbms_aw.execute('update;commit');</span><br /><span style="font-family:courier new;">exec dbms_aw.execute('aw detach SH_AW');</span><br /><span style="font-family:courier new;">exec dbms_aw.shutdown;</span><br /><span style="font-family:courier new;">exec dbms_session.free_unused_user_memory;</span><br /></span><br />For more information on this subject area refer to the next session on monitoring system resources.<br /><br /><br /><span style="font-weight: bold;">Part 5 - Analyis of the Database</span><br />There are a number of areas that are important when tuning a data load process and the areas outlined in this section are really just going to tweak the performance and may or may need result in significant performance improvements. But this area can provide the “icing on the cake” in terms of extracting every last ounce of performance.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEin33JRugaP6L9ZoLgljx7mCfEyg4qfLsydnwZHs8uwU0aMAnx6jPUfM8Lu71QT_EYBtBMG30PQfEvEx0c36v4XktxoKRSVrkinChj9vtg7vSv61mW_WmlUbzF1-YxJ7j0mp0xwn06JOGg/s1600-h/Slides+for+Keith.006.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEin33JRugaP6L9ZoLgljx7mCfEyg4qfLsydnwZHs8uwU0aMAnx6jPUfM8Lu71QT_EYBtBMG30PQfEvEx0c36v4XktxoKRSVrkinChj9vtg7vSv61mW_WmlUbzF1-YxJ7j0mp0xwn06JOGg/s400/Slides+for+Keith.006.png" alt="" id="BLOGGER_PHOTO_ID_5191991686603594754" border="0" /></a><br /><br /><span style="font-size:85%;"><span style="font-weight: bold;">Step 1a – Relational Storage Settings</span></span><br />Make sure logging is switched off on the tablespace used to store the AW. Since the AW does not support redo there is not point in generating it. Make sure you have enough space within the tablespace before you start a build. A lot of time can be consumed extending the tablespace if you are not careful.<br /><br />If you are using Data Guard, it will not be possible to switch of redo. The alternative is to increase REDO Log Size to between 100M and 500M, and also modify LOG_BUFFER parameter to 10M (for example) to allow for more efficient index lob creation, and also try to move TEMP, UNDO and REDO logs to fastest disk.<br /><br /><span style="font-size:85%;"><span style="font-weight: bold;">Step 1b –AW Storage Settings</span></span><br />If the cubes within an AW contain a large number of partitions, then performance can be improved by adding additional physical partitions to AWs. The AW should be logically partitioned and modelled well and then should also be physically partitioned as it improves update performance by reducing index lob contention. For example, if the main data cube contains 36 months of data and is logically partitioned by month in the AW, then the physical partitioning of the AW should match the number of logical partitions. To override the default of eight partitions it is necessary to manually define the AW and set the required number of partitions as show here:<br /><br /><span style="font-size:85%;"><span style="font-family:courier new;">SQL> exec dbms_aw.execute('aw create scott.product_AW partitions 36');</span></span><br /><br />However, this approach does create some additional complications regarding the creation of standard form metadata. This metadata is required to make the AW visible to AWM and other OLAP aware tools. In the vast majority of cases it will be necessary to create a standard form metadata compliant AW. See the Part 3 Analyis of Cube Model, Step 3 – Partitioning for more information.<br /><br /><br /><span style="font-size:85%;"><span style="font-weight: bold;">Step 2 - Temp Storage Settings</span></span><br />Pre-allocating space within the temp tablespace prior to running a build can make some performance improvements. When pre-allocating space make sure the temp tablespace is not set to auto-extend and the correct (most efficient) uniform extend size is used. The procedure below will pre-allocate TEMP Tablespace. Alter the for i in 1..1000000 are required. This example will pre-allocate approximately 1.5GB of TEMP tablespace. Make sure your default temporary tablespace/group is not set to auto-extend unlimited. It should be fixed to the required size.<br /><br /><span style="font-size:85%;"><span style="font-family:courier new;">create or replace procedure preallocate_temp as</span><br /><span style="font-family:courier new;">amount integer := 26;</span><br /><span style="font-family:courier new;">buffer varchar2(26) := 'XXXXXXXXXXXXXXXXXXXXXXXXXX';</span><br /><span style="font-family:courier new;">done boolean := false;</span><br /><span style="font-family:courier new;">out_of_temp exception;</span><br /><span style="font-family:courier new;">position integer := 10240;</span><br /><span style="font-family:courier new;">pragma exception_init(out_of_temp,-01652);</span><br /><span style="font-family:courier new;">tmppre clob;</span><br /><span style="font-family:courier new;">begin</span><br /><span style="font-family:courier new;">dbms_lob.createtemporary(tmppre, true,d bms_lob.session);</span><br /><span style="font-family:courier new;">dbms_lob.open(tmppre, dbms_lob.lob_readwrite);</span><br /><span style="font-family:courier new;">for i in 1..130400</span><br /><span style="font-family:courier new;">loop</span><br /><span style="font-family:courier new;">if (done = true) then</span><br /><span style="font-family:courier new;">dbms_lob.close(tmppre);</span><br /><span style="font-family:courier new;">dbms_lob.freetemporary(tmppre);</span><br /><span style="font-family:courier new;">end if;</span><br /><span style="font-family:courier new;">begin</span><br /><span style="font-family:courier new;">dbms_lob.write(tmppre, amount, position, buffer);</span><br /><span style="font-family:courier new;">exception when out_of_temp then done := true;</span><br /><span style="font-family:courier new;">end;</span><br /><span style="font-family:courier new;">position := position + amount + 10240;</span><br /><span style="font-family:courier new;">end loop;</span><br /><span style="font-family:courier new;">dbms_lob.close(tmppre);</span><br /><span style="font-family:courier new;">dbms_lob.freetemporary(tmppre);</span><br /><span style="font-family:courier new;">end;</span><br /><span style="font-family:courier new;">/</span><br /><br /><span style="font-family:courier new;">conn prealltemp/oracle</span><br /><span style="font-family:courier new;">exec preallocate_temp;</span><br /><span style="font-family:courier new;">disc;</span><br /></span><br /><br /><span style="font-size:85%;"><span style="font-weight: bold;">Step 3 - ADDM Report</span></span><br />ADDM (Automatic Database Diagnostic Monitor) is a self-diagnostic engine built into the Oracle Database kernel, which automatically detects and diagnoses common performance problems, including:<br /><ul><li>Hardware issues related to excessive I/O</li><li>CPU bottlenecks</li><li>Connection management issues</li><li>Excessive parsing</li><li>Concurrency issues, such as contention for locks</li><li>PGA, buffer-cache, and log-buffer-sizing issues</li><li>Issues specific to Oracle Real Application Clusters (RAC) deployments, such as global cache hot blocks and objects and interconnect latency issues</li></ul>An ADDM analysis is performed after each AWR snapshot (every hour by default). The results are saved in the database, which can then be viewed using either Oracle<br />Enterprise Manager or SQLPlus. For tuning OLAP data loads, ADDM is always a good place to start. In addition to diagnosing performance problems, ADDM recommends possible solutions. When appropriate, ADDM recommends multiple solutions, which can include:<br /><br /><ul><li>Hardware changes</li><ul><li>Adding CPUs or changing the I/O subsystem configuration</li></ul><li>Database configuration</li><ul><li>Changing initialization parameter settings</li></ul><li>Schema changes</li><ul><li>Hash partitioning a table or index, or using automatic segment-space management (ASSM)</li></ul><li>Application changes</li><ul><li>Using the cache option for sequences or using bind variables</li></ul><li>Using other advisors</li><ul><li>Running the SQL Tuning Advisor on high-load SQL statements or running the Segment Advisor on hot objects</li></ul></ul><br />ADDM benefits apply beyond production systems; even on development and test<br />Systems. ADDM can provide an early warning of potential performance problems. Typically the results from an ADDM snapshot are viewed via various interactive pages within Enterprise Manager, as shown below:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioQfdcDWUI9LnJKhv5wP4MBZ_9y1AyEIShF1OHeHAMsIp_Ma7LE2bqwAFqUm5W-6PoS8ElLhLVdSe_kXIhjKjYSxyPXh2dF6hsBFHM3JXLC9NWMB7zwmN1h7kel3pBBN2_Np6cI9X2bfw/s1600-h/Image7.PNG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioQfdcDWUI9LnJKhv5wP4MBZ_9y1AyEIShF1OHeHAMsIp_Ma7LE2bqwAFqUm5W-6PoS8ElLhLVdSe_kXIhjKjYSxyPXh2dF6hsBFHM3JXLC9NWMB7zwmN1h7kel3pBBN2_Np6cI9X2bfw/s400/Image7.PNG" alt="" id="BLOGGER_PHOTO_ID_5191992128985226258" border="0" /></a><br /><br />Alternatively you can access ADDM reports using the SQL*Plus command line by calling the new DBMS_ADVISOR built-in package. For example, here's how to use the command line to create an ADDM report quickly (based on the most recent snapshot):<br /><br /><span style="font-size:85%;"><span style="font-family:courier new;">set long 1000000</span><br /><span style="font-family:courier new;">set pagesize 50000</span><br /><span style="font-family:courier new;">column get_clob format a80</span><br /><span style="font-family:courier new;">select dbms_advisor.get_task_report(</span><br /><span style="font-family:courier new;">task_name, 'TEXT', 'ALL') </span><br /><span style="font-family:courier new;">as ADDM_report</span><br /><span style="font-family:courier new;">from dba_advisor_tasks</span><br /><span style="font-family:courier new;"> where task_id=(</span><br /><span style="font-family:courier new;"> select max(t.task_id)</span><br /><span style="font-family:courier new;"> from dba_advisor_tasks t, dba_advisor_log l</span><br /><span style="font-family:courier new;"> where t.task_id = l.task_id</span><br /><span style="font-family:courier new;"> and t.advisor_name='ADDM'</span><br /><span style="font-family:courier new;"> and l.status= 'COMPLETED');</span><br /></span><br />The ‘ALL’ parameter generates additional information about the meaning of some of the elements in the report. The most interesting section of the report relates to the "Findings" for each issue. This outlines the impact of the identified problem as a percentage of DB time, which correlates with the expected benefit, based on the assumption the problem described by the finding will be solved if the recommended action is taken.<br /><br />In the example below the recommendation is to adjust the sga_target value in the parameter file:<br /><br /><span style="font-size:78%;"><span style="font-family:courier new;">FINDING 3: 5.2% impact (147 seconds)</span><br /><span style="font-family:courier new;">---------------------------------------</span><br /><span style="font-family:courier new;">The buffer cache was undersized causing significant additional read I/O.</span><br /><span style="font-family:courier new;">RECOMMENDATION 1: DB Configuration, 5.2% benefit (147 seconds)</span><br /><span style="font-family:courier new;">ACTION: Increase SGA target size by increasing the value of parameter "sga_target" by 24 M.</span><br /><span style="font-family:courier new;">SYMPTOMS THAT LED TO THE FINDING:</span><br /><span style="font-family:courier new;">Wait class "User I/O" was consuming significant database time. (5.3% impact [150 seconds])</span><br /><span style="font-family:courier new;">...</span></span><br /><br />To get more information this feature refer to the Oracle® Database 2 Day + Performance Tuning Guide 10g Release 2 (10.2).<br /><br />For the HTML version, click <a href="http://www.oracle.com/pls/db102/to_toc?pathname=server.102%2Fb14211%2Ftoc.htm&remark=portal+%28Getting+Started%29">here</a> for 10gR2 and <a href="http://www.oracle.com/pls/db111/to_toc?pathname=server.111/b28274/toc.htm">here </a>for 11g.<br />For the PDF version, click <a href="http://www.oracle.com/pls/db102/to_pdf?pathname=server.102%2Fb14211.pdf&remark=portal+%28Getting+Started%29">here</a> for 10gR2 and <a href="http://www.oracle.com/pls/db111/to_pdf?pathname=server.111/b28274.pdf">here </a>for 11g<br /><br /><br /><span style="font-size:85%;"><span style="font-weight: bold;">Step 4 - Dynamic Performance Views</span></span><br />Each Oracle database instance maintains a set of virtual tables that record current database activity and store data about the instance. These tables are called the V$ tables. They are also referred to as the dynamic performance tables, because they store information relating to the operation of the instance. Views of the V$ tables are sometimes called fixed views because they cannot be altered or removed by the database administrator. The V$ tables collect data on internal disk structures and memory structures. They are continuously updated while the database is in use. The SYS user owns the V$ tables. In addition, any user with the SELECT CATALOG role can access the tables. The system creates views from these tables and creates public synonyms for the views. The views are also owned by SYS, but the DBA can grant access to them to a wider range of users.<br /><br />Among these are tables that collect data on OLAP operations. The names of the OLAP V$ views begin with V$AW:<br /><ul><li>V$AW_AGGREGATE_OP</li><ul><li>Lists the aggregation operators available in the OLAP DML.</li></ul><li>V$AW_ALLOCATE_OP</li><ul><li>Lists the allocation operators available in the OLAP DML.</li></ul><li>V$AW_CALC</li><ul><li>Collects information about the use of cache space and the status of dynamic aggregation.</li></ul><li>V$AW_LONGOPS</li><ul><li>Collects status information about SQL fetches.</li></ul><li>V$AW_OLAP</li><ul><li>Collects information about the status of active analytic workspaces.</li></ul><li>V$AW_SESSION_INFO</li><ul><li>Collects information about each active session.</li></ul></ul>For tuning the two most important views from this list are:<br /><br /><span style="font-style: italic;">V$AW_CALC</span><br />This reports on the effectiveness of various caches used by Oracle OLAP and the status of processing by the AGGREGATE function. Oracle OLAP uses the following caches:<br /><br /><ul><li>Aggregate cache: An internal cache used by the aggregation subsystem during querying. It stores the children of a given dimension member, such as Q1-04, Q2-04, Q3-04, and Q4-04 as the children of 2004.</li><li>Session cache: Oracle OLAP maintains a cache for each session for storing the results of calculations. When the session ends, the contents of the cache are discarded.</li><li>Page pool: A cache allocated from the User Global Area (UGA), which Oracle OLAP maintains for the session. The page pool is associated with a particular session and caches records from all the analytic workspaces attached in that session. If the page pool becomes too full, then Oracle OLAP writes some of the pages to the database cache. When an UPDATE command is issued in the OLAP DML, the changed pages associated with that analytic workspace are written to the permanent LOB, using temporary segments as the staging area for streaming the data to disk. The size of the page pool is controlled by the OLAP_PAGE_POOL initialization parameter.</li><li>Database cache: The larger cache maintained by the Oracle RDBMS for the database instance.</li></ul><br />Because OLAP queries tend to be iterative, the same data is typically queried repeatedly during a session. The caches provide much faster access to data that has already been calculated during a session than would be possible if the data had to be recalculated for each query.<br /><br />The more effective the caches are, the better the response time experienced by users. An ineffective cache (that is, one with few hits and many misses) probably indicates that the data is not being stored optimally for the way it is being viewed. To improve runtime performance, you may need to reorder the dimensions of the variables (that is, change the order of fastest to slowest varying dimensions).<br /><br /><br />V$AW_LONGOPS<br />This view will identify the OLAP DML command (SQL IMPORT, SQL FETCH, or SQL EXECUTE) that is actively fetching data from relational tables. The view will state the current operation based on one of the following values:<br /><ul><li>EXECUTING. The command has begun executing.</li><li>FETCHING. Data is being fetched into the analytic workspace.</li><li>FINISHED. The command has finished executing. This status appears very briefly before the record disappears from the table.</li></ul>Other information returned includes: the number of rows already inserted, updated, or deleted and the time the command started executing.<br />For more information refer to the Oracle OLAP Option Users Guide, Section 7 Administering Oracle OLAP – <a href="http://download.oracle.com/docs/cd/B28359_01/olap.111/b28124/admin.htm#sthref479">Dynamic Performance Views</a>.<br /><br /><br /><span style="font-size:85%;"><span style="font-weight: bold;">Step 5 - Init.Ora Parameters</span><br /></span>Checking the RDBMS parameters are appropriately tuned for your OLAP environment is relatively easy. Fortunately in 10g the majority of init.ora parameters are managed dynamically, however a few parameters that may need to be changed are:<br /><br /><span style="font-style: italic;">SORTBUFFERSIZE</span><br />This should be increased since OLAP AWs use this parameter instead of SORT_AREA_SIZE. So, for every AW, to increase it do the following:<br /><br /><span style="font-size:85%;"><span style="font-family:courier new;">exec DBMS_AW.EXECUTE('aw attach SCOTT.MYAW rwx');</span><br /><span style="font-family:courier new;">exec DBMS_AW.EXECUTE('shw sortbuffersize');</span><br /><span style="font-family:courier new;">262,411</span><br /><span style="font-family:courier new;">exec DBMS_AW.EXECUTE('SortBufferSize=10485760');</span><br /><span style="font-family:courier new;">exec DBMS_AW.EXECUTE('shw sortbuffersize');</span><br /><span style="font-family:courier new;">10,485,760</span><br /><span style="font-family:courier new;">exec DBMS_AW.EXECUTE('aw detach SCOTT.MYAW');</span><br /></span><br /><span style="font-style: italic;">OLAP_PAGE_POOL_SIZE</span><br />This should be set to 0 or unset so that auto dynamic page pool is on and is managed by the database (will be set to 50% of PGA size). However, if you have over 8Gb of memory available then you should set the parameter manually and a good value for data loading is to set to 256MB and for multiple users querying concurrently, 64MB.Keith Lakerhttp://www.blogger.com/profile/01039869313455611230noreply@blogger.com5tag:blogger.com,1999:blog-3820031471524503731.post-50481054385243027352008-03-20T20:32:00.000-07:002008-03-20T08:58:55.652-07:00OLAP Option Wiki UpdateThe OLAP Blog team has been adding lots of new content to the Oracle OLAP Option Wiki site. To link to the Wiki click <a href="http://wiki.oracle.com/page/Oracle+OLAP+Option">here</a>. We have added both general and techie/DBA focused information. Don't forget the Wiki is open to contributions from everyone within the Oracle community: customers, partners and oracle employees. To join the Oracle Wiki community simply click <a href="http://wiki.oracle.com/accountnew">here</a>, or go to <a href="http://wiki.oracle.com/accountnew">http://wiki.oracle.com/accountnew</a>. Registration is free.<br /><br />This is what we currently have on the Wiki for the OLAP Option:<br /><br /><span style="font-weight: bold;">General Information</span><br /><a href="http://wiki.oracle.com/page/Oracle+OLAP+Option+Background">Background and History </a>- of the OLAP Option. This covers the key milestones in the development of Express and its evolution into the the OLAP Option.<br /><br /><a href="http://wiki.oracle.com/page/Getting+Started+With+Oracle+OLAP+Option">Getting Started with Oracle OLAP</a> - This is a series of shortcuts to get you up and running with the OLAP Option as quickly as possible. We have included additional reading material and links to all the relevant documentation.<br /><br /><a href="http://wiki.oracle.com/page/Oracle+Olap+Terminology">Terminology</a> - Covers the key concepts and terms used when working with multidimensional data and more specifically the OLAP Option. There are still some blank pages but we are slowly making progress.<br /><br /><a href="http://wiki.oracle.com/page/Oracle+OLAP+Versions">Versions</a> - This page provides the key features for each version, from the latest version of the OLAP Option (11g Release 1) all the way back to Express Server 4.8. The Express server product line does go back much further (I started with PCX2.5, I think) but there is no documentation to consult to extract a list of features. If anyone can fill in the missing products please feel free to add the content.<br /><br /><a href="http://wiki.oracle.com/page/OLAP+Newsletter">Oracle OLAP Newsletter</a> - Links to the current newsletter and archive copies. We have extracted the main headlines from each newsletter to make searching for a specific article a little easier.<br /><br /><span style="font-weight: bold;">For DBAs and Techies</span><br /><a href="http://wiki.oracle.com/page/OLAP+option+-+DBA+Sample+Scripts">Script Samples </a>- A complete library of 29 scripts to help DBAs and developers manage the OLAP option.<br /><br /><a href="http://wiki.oracle.com/page/Oracle+OLAP+How+To">Oracle OLAP How To</a> - The purpose of this page is to cover basic principles and recommendations around generic tuning of a database running the Oracle OLAP option. This page makes the assumption that tuning the OLAP option takes precedence over any other application or option on the server.<br /><br /><a href="http://wiki.oracle.com/page/OLAP+option+-+Did+You+Know%3F">Did You Know?</a> - this covers how to use the OLAP Option with other key database features such as :<br /><ul><li>Flashback</li><li>Recylce Bin</li><li>Resumable operations</li><li>Virtual Private Databases</li><li>Job Scheduler</li><li>ADDM/AWR</li><li>Real Application Custers<br /></li></ul><a href="http://wiki.oracle.com/page/OLAP+option+-+Diagnostic+Techniques">Diagnostic Techniques</a> - for those using the OLAP option. At the moment we have two entries but we are planning to add a lot more over time, and feel free to upload your own scripts as well.<br /><ul><li>Diagnose OLAP API Client Sessions with SYS.OLAP$ALTER_SESSION (i.e., BI Beans, Discoverer for OLAP, Spreadsheet Add-in) (Link)</li><li>Relevant Diagnostic Parameters for the Oracle OLAP option (Link)</li></ul>Keith Lakerhttp://www.blogger.com/profile/01039869313455611230noreply@blogger.com0tag:blogger.com,1999:blog-3820031471524503731.post-20778631645952167902008-03-18T07:30:00.000-07:002008-12-11T15:25:31.819-08:00Monitoring OLAP BuildsRecently I was working on a project where the customer’s server was in out South Africa office and I was running various build configurations testing data loading performance. In the past when I have been monitoring build times I always used SQLDeveloper’s excellent auto refresh facility. Firstly, it is worth downloading the “Scripts for OLAP DBAs” created by Jameson White (who also contributes to this blog and is very active on the Oracle OLAP Wiki).<br /><br /><a href="http://www.oracle.com/technology/products/bi/olap/OLAP_DBA_scripts.ZIP">http://www.oracle.com/technology/products/bi/olap/OLAP_DBA_scripts.ZIP</a><br /><br />These scripts are extremely valuable during tuning exercises. Jameson also provided me with two additional scripts for monitoring the XML_LOAD_LOG table, which holds all the build messages generated during a data load process. In the SQLDeveloper tree below you can see all these scripts<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgq6WsAtDM3S-onRBD6MDZHmOG-pvv4zLQrvEJNs89GWZNo0yejetvUQvP-LXGJiTXPoEjmpPW0pDOIvJIgNhm6tjuD2Sf96sV1p6DguH_HHc1bfeqx-AbHjvcVkoGccmlRu9afL256Wmg/s1600-h/Image1.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgq6WsAtDM3S-onRBD6MDZHmOG-pvv4zLQrvEJNs89GWZNo0yejetvUQvP-LXGJiTXPoEjmpPW0pDOIvJIgNhm6tjuD2Sf96sV1p6DguH_HHc1bfeqx-AbHjvcVkoGccmlRu9afL256Wmg/s400/Image1.JPG" alt="" id="BLOGGER_PHOTO_ID_5178749389882231250" border="0" /></a><br /><br />(Note, the OWB team has also provided a set of predefined scripts/reports as well). Here is the main report for the XML_LOAD_LOG table that generates a report based on the whole table:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj30M6Z17T-fbeERAbLcdVHOQQO1kb0FM0isPsKKk18dtW2YCofHUQx9dO_oK3ovJiLQXtx4lL3fnSwUj0nzqjmQccpo6lkwT02z17CsnmKRsu0HjYKDcpwaGeV8SQ46lTUscf5uqAsNz4/s1600-h/Image2.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj30M6Z17T-fbeERAbLcdVHOQQO1kb0FM0isPsKKk18dtW2YCofHUQx9dO_oK3ovJiLQXtx4lL3fnSwUj0nzqjmQccpo6lkwT02z17CsnmKRsu0HjYKDcpwaGeV8SQ46lTUscf5uqAsNz4/s400/Image2.JPG" alt="" id="BLOGGER_PHOTO_ID_5178751361272220194" border="0" /></a><br /><br />The code for this report is here:<br /><br /><span style="font-family:courier new;">select XML_LOADID as "Load ID"</span><br /><span style="font-family:courier new;">, XML_RECORDID as "Record ID"</span><br /><span style="font-family:courier new;">, XML_AW as "AW"</span><br /><span style="font-family:courier new;">, XML_DATE as "Date"</span><br /><span style="font-family:courier new;">, TO_CHAR(XML_DATE, 'HH24:MM:SS') as "Actual Time"</span><br /><span style="font-family:courier new;">, substr(XML_MESSAGE, 1, 9) as "Message Time"</span><br /><span style="font-family:courier new;">, substr(XML_MESSAGE, 9) as "Message"</span><br /><span style="font-family:courier new;">from olapsys.xml_load_log order by 1 desc, 2 desc</span><br /><br />The other report allows you to focus on a single job, which is passed to the report as a parameter:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_GpspX9hyphenhyphen_cKt91lB5h3k0RtSzEiRYlsohAqtYJUyiqcfAhZ2rqabbniFXJmJIQPrj6l4P1uCAdYCOulVWuqpd4SBrGa1QwG0b7dpp83qe61mWWuz8MjLb3NO54u0IoElvvadmmor00E/s1600-h/Image3.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_GpspX9hyphenhyphen_cKt91lB5h3k0RtSzEiRYlsohAqtYJUyiqcfAhZ2rqabbniFXJmJIQPrj6l4P1uCAdYCOulVWuqpd4SBrGa1QwG0b7dpp83qe61mWWuz8MjLb3NO54u0IoElvvadmmor00E/s400/Image3.JPG" alt="" id="BLOGGER_PHOTO_ID_5178751623265225266" border="0" /></a><br /><br />and the code for this report is here:<br /><br /><span style="font-family:courier new;">select XML_LOADID as "Load ID"</span><br /><span style="font-family:courier new;">, XML_RECORDID as "Record ID"</span><br /><span style="font-family:courier new;">, XML_AW as "AW"</span><br /><span style="font-family:courier new;">, XML_DATE as "Date"</span><br /><span style="font-family:courier new;">, TO_CHAR(XML_DATE, 'HH24:MM:SS') as "Actual Time"</span><br /><span style="font-family:courier new;">, substr(XML_MESSAGE, 1, 9) as "Message Time"</span><br /><span style="font-family:courier new;">, substr(XML_MESSAGE, 9) as "Message"</span><br /><span style="font-family:courier new;">from olapsys.xml_load_log </span><br /><span style="font-family:courier new;">where XML_LOADID = :i_LoadId </span><br /><span style="font-family:courier new;">order by 1 desc, 2 desc</span><br /><br />Once you have installed the reports into SQLDeveloper you can then use the auto refresh feature to keep each report up to date. SQLDeveloper lets you set the refresh rate for 5, 10, 15, 20, 25, 30, 60, or120 seconds<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsaRcjQJWJVDG2JfsigW0-PMwjRxoQBT_QaiwtqMU-rfVTxqf8ulfjLRpXYAjxwF329R4JLF8AIOYIVGt20tUxbbBr6prXuEqtIVyfbO76n3GpABqTQuyMGdGJr6iqbuZi4e7ma0cDsy0/s1600-h/Image4.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsaRcjQJWJVDG2JfsigW0-PMwjRxoQBT_QaiwtqMU-rfVTxqf8ulfjLRpXYAjxwF329R4JLF8AIOYIVGt20tUxbbBr6prXuEqtIVyfbO76n3GpABqTQuyMGdGJr6iqbuZi4e7ma0cDsy0/s400/Image4.JPG" alt="" id="BLOGGER_PHOTO_ID_5178751756409211458" border="0" /></a><br /><br />This works well if you have a good connection to your remote server and most importantly you can stay connected during the build process. Unfortunately, my connection to South Africa was very slow and sometimes it was necessary to run a job in background mode and just disconnect and walk away. Which causes a problem of know when the build has actually completed?<br /><br />To help resolve this I created some utilities to help resolve this particular issue. Using the utl_smtp package that is part of the database I created a routine that would scan the XML_LOAD_LOG table and once a build was complete it would send me an email.<br /><br />For ease of use I created three procedures to monitor:<br /><ul><li>Dimension builds</li><li>Cube builds</li><li>AW builds</li></ul>Depending on what is being monitored the title and body of the email changes accordingly. For example when monitoring a dimension build:<br /><br />The email that is sent has the title:<br /><br /><span style="font-family:courier new;">Data Load for PRODUCTS finished at 15:43:41</span><br /><br />And the message body can contain either just three simple lines:<br /><br /><span style="font-size:78%;"><span style="font-family:courier new;">07-MAR-08 14:03:20 Started Loading Dimension Members for PRODUCTS.DIMENSION (1 out of 1 Dimensions).</span><br /><span style="font-family:courier new;">07-MAR-08 14:03:20 Started Loading Dimension Members for PRODUCTS.DIMENSION (1 out of 1 Dimensions).</span><br /><span style="font-family:courier new;">Total Time 00:00:00</span><br /></span><br /><br />Or the body of the message can contain the complete XML_LOAD_LOG for that job, for example:<br /><br /><span style="font-size:78%;"><span style="font-family:courier new;">07-MAR-08 14:03:33 Completed Build(Refresh) of SH_OLAP.SH_AW Analytic Workspace.</span><br /><span style="font-family:courier new;">07-MAR-08 14:03:22 Finished Updating Partitions.</span><br /><span style="font-family:courier new;">07-MAR-08 14:03:21 Started Updating Partitions.</span><br /><span style="font-family:courier new;">07-MAR-08 14:03:21 Finished Loading Dimensions.</span><br /><span style="font-family:courier new;">07-MAR-08 14:03:21 Finished Loading Attributes.</span><br /><span style="font-family:courier new;">07-MAR-08 14:03:21 Finished Loading Attributes for PRODUCTS.DIMENSION. 6 attribute(s) LONG_DESCRIPTION, PACK_SIZE, SHORT_DESCRIPTION, SUPPLIER_ID, UNIT_OF_MEASURE, WEIGHT_CLASS Processed.</span><br /><span style="font-family:courier new;">07-MAR-08 14:03:21 Started Loading Attributes for PRODUCTS.DIMENSION (1 out of 1 Dimensions).</span><br /><span style="font-family:courier new;">07-MAR-08 14:03:21 Started Loading Attributes.</span><br /><span style="font-family:courier new;">07-MAR-08 14:03:21 Finished Loading Hierarchies.</span><br /><span style="font-family:courier new;">07-MAR-08 14:03:21 Finished Loading Hierarchies for PRODUCTS.DIMENSION. 1 hierarchy(s) STANDARD Processed.</span><br /><span style="font-family:courier new;">07-MAR-08 14:03:20 Started Loading Hierarchies for PRODUCTS.DIMENSION (1 out of 1 Dimensions).</span><br /><span style="font-family:courier new;">07-MAR-08 14:03:20 Started Loading Hierarchies.</span><br /><span style="font-family:courier new;">07-MAR-08 14:03:20 Finished Loading Dimension Members.</span><br /><span style="font-family:courier new;">07-MAR-08 14:03:20 Finished Loading Members for PRODUCTS.DIMENSION. Added: 0. No Longer Present: 0.</span><br /><span style="font-family:courier new;">07-MAR-08 14:03:20 Started Loading Dimension Members for PRODUCTS.DIMENSION (1 out of 1 Dimensions).</span><br /><span style="font-family:courier new;">07-MAR-08 14:03:20 Started Loading Dimension Members.</span><br /><span style="font-family:courier new;">07-MAR-08 14:03:19 Started Loading Dimensions.</span><br /><span style="font-family:courier new;">07-MAR-08 14:03:19 Attached AW SH_OLAP.SH_AW in RW Mode.</span><br /><span style="font-family:courier new;">07-MAR-08 14:03:19 Started Build(Refresh) of SH_OLAP.SH_AW Analytic Workspace.</span><br /><span style="font-family:courier new;">Total Time 00:00:14</span><br /></span><br />The code will monitor both foreground and background jobs but for the background jobs access to the scheduler is required. For both types of job access to DBMS_LOCK.SLEEP function to allow the code to continuously loop while the job continues to process. During each loop of checking to see if the specified load has completed the DBMS_LOCK.SLEEP forces the monitoring process to sleep for 60 seconds (if anyone knows of a better way to do this please let me know).<br /><br />Overview of the Code<br />The monitoring code is split into two packages with associated procedures:<br /><ul><li>AW_Monitor</li><ul><li>Dim_Build</li></ul><ul><li>Cube_Build.</li></ul><ul><li>Aw_Build </li></ul><ul><li>Send_Complete_Log </li></ul><ul><li>Send_Mail</li></ul><li>Monitor_Sched_Process</li><ul><li>Create_Job</li></ul><ul><li>Drop_Job</li></ul></ul><span style="font-weight: bold;">Dim_Build</span><br />This procedure monitors the build process for a dimension, looking for the string 'Finished Loading Members for ' to determine if the build has completed.<br /><span style="font-weight: bold;"><br />Cube_Build</span><br />This procedure monitors the build process for a dimension, looking for the string 'Finished Auto Solve for Measure' to determine if the build has completed.<br /><span style="font-weight: bold;"><br />Aw_Build </span><br />This procedure monitors the build process for a dimension, looking for the string 'Completed Build(Refresh) of ' to determine if the build has completed.<br /><span style="font-weight: bold;"><br />Send_Complete_Log</span><br />Emails the complete log file for a build<br /><span style="font-weight: bold;"><br />Send_Mail</span><br />This procedure sends an email containing just the Start and End messages from the build being monitored<br /><span style="font-weight: bold;"><br />Create_Job</span><br />This procedure creates a new job within DBMS_SCHEDULER but does not enable the job<br /><span style="font-weight: bold;"><br />Drop_Job</span><br />This removes the job from DBMS_SCHEDULER<br /><br /><br /><span style="font-weight: bold;">What to Monitor?</span><br />There are three monitoring options:<br /><ul><li>Dimension</li><li>Cube</li><li>AW</li></ul>All this really does is determine the definition of the string used in the search criteria within the XML_MESSAGE column. If you want to know when a specific dimension has completed its refresh then use DIM_BUILD procedure. If you want to know when a specific cube has completed its refresh then use CUBE_BUILD procedure. The final procedure, AW_BUILD, monitors the refresh of the AW, which can be useful if you are refreshing lots of cubes and/or dimensions within a single job.<br /><br /><span style="font-weight: bold;">How to Monitor a Foreground Job</span><br />Monitoring a foreground job is relatively easy. If you want to run a job that maintains a dimension called product and then have an email sent once the refresh of the dimension has completed then you would use the DIM_BUILD procedure. The parameters for each procedure are much the same. You need to provide:<br /><ul><li>Schema name</li><li>AW Name</li><li>Object name (dimension name or cube name)</li><li>Report Type (Summary or Full)</li><li>Job Name (if the monitor process is being scheduled)</li></ul>So the command would be as follows:<br /><span style="font-size:85%;"><span style="font-family:courier new;"><br />EXEC AW_MONITOR.DIM_BUILD('SH_OLAP', 'SH_AW', 'PRODUCTS', 'SUMMARY', null);</span></span><br /><br /><span style="font-weight: bold;">How Monitor a Background Job</span> It is important to schedule the monitoring of XML_LOAD_LOG to start after the AW job has started. Therefore, you need to set the time passed to CREATE_JOB procedure to a point in time after the BuildDate details in the AW XML script.<br /><ul><li>Job Name</li><li>Script to run</li><li>Date and Time to run</li><li>Job Description</li></ul>So the command would be as follows:<br /><br /><span style="font-size:85%;"><span style="font-family:courier new;">exec monitor_sched_process.create_job('MONITOR_PROD_1','aw_monitor.dim_build(''SH_OLAP'',''SH_AW'', ''PRODUCTS'', ''SUMMARY'', ''MONITOR_PROD_1'')', '07-MAR-2008 15:46:00', 'Starts the monitor of PRODUCTS dimension build');</span></span><br /><br />It is important to schedule the monitoring of XML_LOAD_LOG to start after the AW job has started. Therefore, you need to set the time passed to CREATE_JOB procedure to a point in time after the BuildDate details in the AW XML script.<br /><br />You can review the job details via the Scheduler Jobs page in Enterprise Manager. Here you can see an AW build process is scheduled to run at 3:45 and the monitoring job, ‘MONITOR_PROD_1’, is scheduled to run at 3:46.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjML1ZwQ0LZcXpVSACe-KGuYSiRRfvVZmFLHKFxL4VwCqT1YpAmZUHLziy2WTGx-ex3n9JIdACmKjYI0BSQcWFEKns2a0-yi_eyO23MQ8klR8OuTqJVmKwdMr_i_bo5pKwYqreCxjn_q4/s1600-h/Image5.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjML1ZwQ0LZcXpVSACe-KGuYSiRRfvVZmFLHKFxL4VwCqT1YpAmZUHLziy2WTGx-ex3n9JIdACmKjYI0BSQcWFEKns2a0-yi_eyO23MQ8klR8OuTqJVmKwdMr_i_bo5pKwYqreCxjn_q4/s400/Image5.JPG" alt="" id="BLOGGER_PHOTO_ID_5178754599677561426" border="0" /></a><br /><br />You can use the features in Enterprise Manager to halt the job at any point in time via the delete button. Once the job itself has completed, i.e. the email is sent, the job is stopped and removed from the job queue.<br /><br /><span style="font-weight: bold;">Possible Code Changes</span><br />Before running the code you may need to change the recipient, from, and mail server details in the AW_MONITOR package. Each of the monitoring procedures has a call to SEND_MAIL procedure that includes the name of the “To” part of the email. This would need to be changed unless you want to send all your emails to me.<br /><br /><span style="font-size:85%;"><span style="font-family:courier new;">send_mail('keith.laker@oracle.com', v_title, v_body);</span></span><br /><br />The procedure SEND_MAIL has the following lines that need to changed<br /><br /><span style="font-size:85%;"><span style="font-family:courier new;"> msg_from VARCHAR2(50) := 'keith.laker@oracle.com';</span><br /><span style="font-family:courier new;"> mailhost VARCHAR2(30) := 'mail.oracle.com';</span><br /></span><br /><span style="font-weight: bold;"><br />The Code</span><br />A note of caution - I am not a brilliant PL/SQL coder, therefore, I am sure most of the code I have created can be improved. I am not going to post all the code here, as I suspect it will cause problems. At the moment I cannot find a convenient location to host the Zip file containing the two PL/SQL packages, therefore, if you want the code send me an email (<a href="mailto:keith.laker@oracle.com">keith.laker@oracle.com</a>) and then I will send you the zip file.<br /><br />There are two basic packages:<br /><ul><li>AW_MONITOR</li><li>MONITOR_SCHED_PROCESS</li></ul>The AW_MONITOR package contains the following procedures:<br /><ul><li>Dim_Build - This procedure monitors the build process for a dimension, looking for the string 'Finished Loading Members for ' to determine if the build has completed.</li><li>Cube_Build - This procedure monitors the build process for a dimension, looking for the string 'Finished Auto Solve for Measure' to determine if the build has completed.</li><li>Aw_Build - This procedure monitors the build process for a dimension, looking for the string 'Completed Build(Refresh) of ' to determine if the build has completed.</li><li>Send_Complete_Log - Emails the complete log file for a build</li><li>Send_Mail - This procedure sends an email containing just the Start and End messages from the build being monitored</li></ul>Example code:<br />monitoring a build for a specific dimension. The parameters are schema, AW Name, Dimension Name, email type:<br /><span style="font-size:85%;"><span style="font-family: courier new;">exec aw_monitor.dim_build('SH_OLAP', 'SH_AW', 'PRODUCTS', 'SUMMARY');</span><br /></span><br />monitoring a build for a specific cube. The parameters are schema, AW Name, Cube Name, email type:<br /><span style="font-size:85%;"><span style="font-family: courier new;">exec aw_monitor.cube_build('SH_OLAP', 'SH_AW', 'SALES', 'SUMMARY');</span><br /></span><br />monitoring a build for a specific AW. The parameters are schema, AW Name, Cube, email type<br /><span style="font-size:85%;"><span style="font-family: courier new;">exec aw_monitor.aw_build('SH_OLAP', 'SH_AW', 'SUMMARY');</span><br /></span><br />The above procedures all finish by sending an email to the specified recipients, where the body of the email can either be a summary of the build (just the start and end times) or the complete build log for the dimension, cube or AW.<br /><br /><span style="font-size:85%;"><span style="font-family: courier new;">exec send_mail('keith.laker@oracle.com', 'Data Load for PRODUCT finished at 12:00pm', 'Start at...., Finished at.....);</span><br /></span><br /><span style="font-size:85%;"><span style="font-family: courier new;">exec send_complete_log(795, 'keith.laker@oracle.com', 'Data Load for PRODUCT finished at 12:00pm');</span><br /></span><br />The result is an email delivered to your Inbox:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuO-2I0uu3gsKimjVDXguocwik5P-FHHUHIXnymcxMfqxzgDyHHTOM-3uzbP1qFHhMlDB91PiaGc4S6tRIa5fZt_pglsCotf2T0NoI9ZFMzvhSKdYrt7wthAKjT1UagWyOgLgiTzexCcA/s1600-h/Image6.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuO-2I0uu3gsKimjVDXguocwik5P-FHHUHIXnymcxMfqxzgDyHHTOM-3uzbP1qFHhMlDB91PiaGc4S6tRIa5fZt_pglsCotf2T0NoI9ZFMzvhSKdYrt7wthAKjT1UagWyOgLgiTzexCcA/s400/Image6.JPG" alt="" id="BLOGGER_PHOTO_ID_5179013594795444834" border="0" /></a>Then depending on the parameter that controls the body of the email, the body will contain either the complete log from XML_LOAD_LOG table:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-LF2Tzn4yJPpRsp8o9z6Gw9JvuU3WfSB6xGSHzhxjzN4-q0-ufl8kktOoAx7jp3KlvE2j5UB61PkW5r8aEPSgIwu0dGVoiEL0yz5yWTZMr_k17sVAUiWazZY3ESnD_oNrmYVlen7xBds/s1600-h/Image7.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-LF2Tzn4yJPpRsp8o9z6Gw9JvuU3WfSB6xGSHzhxjzN4-q0-ufl8kktOoAx7jp3KlvE2j5UB61PkW5r8aEPSgIwu0dGVoiEL0yz5yWTZMr_k17sVAUiWazZY3ESnD_oNrmYVlen7xBds/s400/Image7.JPG" alt="" id="BLOGGER_PHOTO_ID_5179013676399823474" border="0" /></a>or simply a summary containing the start and end times for the build process:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9UMOtMLDlMAnFqHMVuGpn1E6V7COBlHjXUNVoIq-IQhLpPfmck4y70Kv6vFEWRaxByS75Jv9EEfx0M8sNG1HJo89wRJVQGJE2uzn7-9QIRNP0Pwrutc7T9RdbX19AMZUbElZYTRO7l3Q/s1600-h/Image8.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9UMOtMLDlMAnFqHMVuGpn1E6V7COBlHjXUNVoIq-IQhLpPfmck4y70Kv6vFEWRaxByS75Jv9EEfx0M8sNG1HJo89wRJVQGJE2uzn7-9QIRNP0Pwrutc7T9RdbX19AMZUbElZYTRO7l3Q/s400/Image8.JPG" alt="" id="BLOGGER_PHOTO_ID_5179014574047988370" border="0" /></a><br />The MONITOR_SCHED_PROCESS package contains the following procedures:<br /><ul><li>create_job - This procedure creates a new job within DBMS_SCHEDULER but does not enable the job</li><li>drop_job - This removes the job from DBMS_SCHEDULER</li></ul><br />Example code:<br /><br /><span style="font-size:78%;"><span style="font-family: courier new;">exec monitor_sched_process.create_job('AW_DIM_MONITOR',aw_monitor.dim_build('SH_OLAP','AH_AW', 'PRODUCTS', 'AW_DIM_MONITOR', 'SUMMARY'), '23-JAN-2008 12:15:00', 'Starts the monitor of the PRODUCTS dimension build');</span><br /><br /><span style="font-family: courier new;">exec monitor_sched_process.drop_job('AW_DIM_MONITOR');</span><br /><br /></span>Keith Lakerhttp://www.blogger.com/profile/01039869313455611230noreply@blogger.com0tag:blogger.com,1999:blog-3820031471524503731.post-62581964030934022122008-01-25T05:19:00.000-08:002008-01-25T05:29:36.474-08:00Oracle OLAP option - Did You Know?Jameson White added "<a href=http://wiki.oracle.com/page/OLAP+option+-+Did+You+Know%3F.>Did You Know?</a>" to the DBA Zone on the <a href=http://wiki.oracle.com/page/Oracle+OLAP+Option>Oracle OLAP option</a> Wiki. Please make your comments in a thread on this Wiki page.Jameson Whitehttp://www.blogger.com/profile/04697460456284466583noreply@blogger.com0tag:blogger.com,1999:blog-3820031471524503731.post-85292902404008954232008-01-24T05:42:00.000-08:002008-12-11T15:25:39.651-08:00OLAP Workshop 6 : Advanced Cube DesignIn the previous workshop we looked at creating a cube making use of AWM’s ability to manage the other features. In most cases these default settings will provide good load and query performance. Certainly when looking at the data model that supports the 10g common schema the default settings do a great job and make life much easier. Consequently, you can design and build the analytic workspace from using the data sourced from the SH schema in about 15 minutes.<br /><br />In some cases you may need to move beyond the default settings and in the next few sections we will look at the other tabs that are part of the Cube wizard. These tabs control sparsity, compression and partitioning features, aggregation rules, and summarization strategies. The tabs and the features they control will be explained in the following order:<br /><ul><li>Implementation Details</li><li>Rules</li><li>Summarize To</li><li>Cache</li></ul><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8i76rrA1eChxDE4AQRlWRChc-SMyk6Dpnh0_iIRplc1tCDauhpMcQ26rVxrnd4KQZKXqUH6_D2a_G0Hu9T1OekuOqlUqQ11tvBrQRZSyL0uNVj_Vdzo1q0AND3D9apbwi1sUNl5hWEPg/s1600-h/Image1.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8i76rrA1eChxDE4AQRlWRChc-SMyk6Dpnh0_iIRplc1tCDauhpMcQ26rVxrnd4KQZKXqUH6_D2a_G0Hu9T1OekuOqlUqQ11tvBrQRZSyL0uNVj_Vdzo1q0AND3D9apbwi1sUNl5hWEPg/s400/Image1.JPG" alt="" id="BLOGGER_PHOTO_ID_5159043973661869346" border="0" /></a><br /><br />But before proceeding there is one important thing you should always do before starting to load data into a cube (of a dimension) – review the data in as much detail as possible. Data quality is a subject that most companies often don’t even consider when building cubes, and most consultants just take the data given to them a load it without question.<br /><br />In any project I would allocate 10-30% of the time looking at the data. The information gained at this stage will provide huge benefits later when you need to determine sparsity patterns (explained later). On a recent customer project I was asked to tune a cube to improve load and aggregation times. When we started to review the data we noticed some very very large numbers in one of the measures, which were simply amazing. After a lot of analysis we determine the ETL that was computing the figure in to the fact table had a mistake. Unfortunately both the developers and business users failed to identify this error. To compound the problem, the data formed a key business metric.<br /><br />Therefore, NEVER EVER start loading data until you have checked the quality. Ideally you should use the data quality features of Warehouse Builder, which can significantly speed up this process. There are a number of presentations relating to data quality on the Warehouse Builder OTN home page.<br /><br /><span style="font-size:130%;"><span style="font-weight: bold;">Implementation Details Tab</span><br /></span>Most of the advanced options for tuning your multidimensional model are found on the Implementation Details tabbed page of the Create Cube wizard. As shown below the Implementation Details tabbed page contains four important tuning features of Oracle OLAP. The correct use of these features ensures that your analytic workspace is very efficient and is implemented in an optimal way.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJllmTTl7R2IuvND7SbVnpYaI8xpdtwqICjhWRh4ss7f5L9UjCYFIfPXc_R-oAAJ68Y5rngrWtZdG5Z7wgdLvJZUFs33CWQ3KHBTqr7BgkDvwrr1bDkQPv9L4ubZRMChsI3Kn8O8AXe5s/s1600-h/Image2.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJllmTTl7R2IuvND7SbVnpYaI8xpdtwqICjhWRh4ss7f5L9UjCYFIfPXc_R-oAAJ68Y5rngrWtZdG5Z7wgdLvJZUFs33CWQ3KHBTqr7BgkDvwrr1bDkQPv9L4ubZRMChsI3Kn8O8AXe5s/s400/Image2.JPG" alt="" id="BLOGGER_PHOTO_ID_5159044162640430386" border="0" /></a><br /><br />1.<span style="font-weight: bold;">Sparsity</span>: AWM 10g, by default, applies the common best practice in deciding which of your dimensions should be marked as “sparse” when you create a cube. Sparsity refers to the natural phenomenon evident in all multidimensional data to some degree: Not all the cells in the logical cube (the total possible combinations of all the dimension members for each dimension of the cube) will ever contain data. It is very common for a relatively small percentage of the possible combinations to actually store data. By understanding the sparsity of the data you expect to load into your AW, you can tune how it handles that sparsity and improve the performance of data loading and aggregation and reduce the disk-storage requirements for the populated AW.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8AM3CSv9NCsEZPgmIXQANcs715sspqDHzzpSxWP6rTk0tZ3Tfiros22z9cI3-tN67P9oIBiqG_RaVuF9mSiGx0ZqLRgIPw_DdDcctW8b5c8xX2Lax0U8dLYbnIBIs3TCEeYnJWSefKZo/s1600-h/Image3.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8AM3CSv9NCsEZPgmIXQANcs715sspqDHzzpSxWP6rTk0tZ3Tfiros22z9cI3-tN67P9oIBiqG_RaVuF9mSiGx0ZqLRgIPw_DdDcctW8b5c8xX2Lax0U8dLYbnIBIs3TCEeYnJWSefKZo/s400/Image3.JPG" alt="" id="BLOGGER_PHOTO_ID_5159046580707018114" border="0" /></a><br /><br />After you understand which dimensions are sparse and which are not, their order can be important. When there are a large number of empty cells in a cube, the cube is said to be “sparse.” For example, if you are a manufacturer of consumer-packaged goods, you do not sell one or more of every single product you make to every customer, every day, through every sales channel. Different customers buy different products, at different time intervals, and each customer probably has a preferred channel. Different products may display different sparsity patterns: Ice creams and cold drinks tend to sell faster in the summer, whereas warm arctic coats are more popular in the winter (particularly in cold locations).<br /><br />When using multidimensional technology, pay attention to sparsity so that you can design cubes efficiently. The effect of sparsity in data (and a badly designed cube) can result in tremendous growth in disk usage and a corresponding increase in the time taken to update and recalculate data in the cube. Inefficient sparsity control in any multidimensional data store can result in many empty cells actually being physically stored on the disk. This is something that is less of a concern with relational technology, because it is rare to store a completely null row in a table.<br />Oracle OLAP automatically deals with sparsity up to a point. But you, as a cube builder, can provide Oracle OLAP with the information that you know about your data (and information that Oracle OLAP needs to know) to deal with that data extremely efficiently.<br /><br />Cube designers express sparsity in percentage terms. Data is said to be 5% dense (or 95% sparse) if only 5% of the possible combinations of the cells in a multidimensional measure or cube actually contain data. In many cases, data is very sparse, especially sales and marketing data. Only very aggregated data with a fairly small number of dimensions is typically dense enough for you to not consider sparsity.<br /><br />Sparsity tends to increase with the number of dimensions and with the number of levels and hierarchies in each dimension. As you add dimensions to the definition of a cube, the number of possible cell combinations can increase exponentially. Also, the granularity of data affects sparsity. Low-level, detailed data is much more sparse than aggregate data. Very aggregate data is typically dense. Particular combinations of dimensions typically have different sparsity from others. For example, Time dimensions and Line dimensions are often more dense than dimensions such as Product, Customer, and Channel. This is because combinations of customers and products are sparser than combinations of customers and time or sparser than combinations of products and time. For this reason, AWM 10g asks you to confirm which of the dimensions for your data are sparse dimensions and which ones are dense.<br /><br />In most cases I would recommend making all dimensions sparse. However, there are some additional considerations. The most important is the use of partitioning and we will look at this in one of the following sections. Sometimes, you may need to build a cube with different sparsity settings to determine the most efficient settings. In some cases making Time dense will generate a highly efficient cube and in other situations it will cause the massively extend the time take to load and aggregate data. The best method is to use an iterative development approach, but as with tuning be careful not to change too many settings at once as it becomes difficult to interpret the results.<br /><br />A very common mistake I see with many customers is they insist on loading a zero balance into a measure. This is quite pointless, since a zero balance does not impact the overall total. Now it can be important to differentiate between an NA row and zero-row but for 99.9% of analysis it is possible to infer one from the other. Therefore, when loading data into a cube add an additional filter to remove zero and NA rows since this will provide huge savings in load and aggregation times. I was working on a project recently where a fact table contained 75 million rows of data and 65% of those rows contained 0 or NA.<br /><br />2.<span style="font-weight: bold;">Dimension order</span>: It is possible to improve the build and aggregation performance of your AW by tuning the order in which the dimensions are specified in your cube.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2CDP94uDf5d-BYBj0cuaie69Z5HUTdl6tNeErxItgjcSOdRCvgScv6cOA7j4kZK43vIdmNv0Xd9Rb2eZZxGO1YM8ePVYf6cX9wE60upbFKJrSfc_3PZopPu-Iz30OREBA5c2wbXcDb6g/s1600-h/Image4.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2CDP94uDf5d-BYBj0cuaie69Z5HUTdl6tNeErxItgjcSOdRCvgScv6cOA7j4kZK43vIdmNv0Xd9Rb2eZZxGO1YM8ePVYf6cX9wE60upbFKJrSfc_3PZopPu-Iz30OREBA5c2wbXcDb6g/s400/Image4.JPG" alt="" id="BLOGGER_PHOTO_ID_5159044867015066962" border="0" /></a><br /><br />When using the compression feature (discussed below), it is usually best to have a relatively small, dense dimension (such as Time) first in the list, followed by a group of all the sparse dimensions. Furthermore, it is generally the best practice to list the sparse dimensions in order of their size: from the one with the least members to the one with the most..<br /><br /><span style="font-size:85%;"><span style="font-weight: bold;">Note 1</span>: Sparsity and dimension order are generally considered at the same time, which is why these choices are grouped together in the AWM 10g user interface:<br /></span><br />My recommendation is to try building your cube with Time marked sparse and then try with Time marked dense. The effect on load times varies according to nature of the source data. I recently worked on a project where we marked all the dimensions as sparse and loaded a trial data set in 4 hours. By making Time dense, the same dataset loaded in 1 hour. Therefore, it pays to understand your data. But, most importantly, don’t assume you will get the data model right first time.<br /><br /><br />3.<span style="font-weight: bold;">Compressed cubes and Global Composites</span>: Version 10g of Oracle OLAP provides a new, internationally patented technology for the AW, which is exposed via a simple check box in AWM.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNWLwInQPNMbHWUw_Wdv8eWxSdBxQKAMxXe0MvAP8x2iHqWX-PThszLMo-ZdzNNIJgK-h4o3GZObHGtXROOsXwlmq-3OWEUSQXNTMGkZvuPhCuyJe_jrT-Cnph0nWyaQopd9uBLudlKIw/s1600-h/Image5.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNWLwInQPNMbHWUw_Wdv8eWxSdBxQKAMxXe0MvAP8x2iHqWX-PThszLMo-ZdzNNIJgK-h4o3GZObHGtXROOsXwlmq-3OWEUSQXNTMGkZvuPhCuyJe_jrT-Cnph0nWyaQopd9uBLudlKIw/s400/Image5.JPG" alt="" id="BLOGGER_PHOTO_ID_5159045167662777698" border="0" /></a><br /><br />This is an extremely powerful data storage and aggregation algorithm optimized for sparse data. It is a new technology that is often dramatically faster than any previous OLAP server technology when aggregating sparse multidimensional data. The use of this feature can improve aggregation performance by a factor of 5 to 50. At the same time, query performance can improve, and disk storage is often also dramatically reduced. This feature is ideal for large volumes of sparse data but not suitable for all cubes (especially dense cubes).<br /><br />If the “Use Compression” option is selected, then additional efficiency can often (but not always) be achieved by marking all dimensions (including Time) as sparse, especially for sparse data where there is known seasonality in the data, and especially if your AW is also partitioned on Time. But see my previous notes regarding this subject.<br /><br />As we use this feature on more and more projects it is becoming clear that just about every cube will benefit from compression. Now there are some exceptions, such as cubes where you plan to use and application to write-back data directly into the cube, but such situations are easily managed by posting the updated data to a relational table and using the normal data load procedures to import and aggregate the data.<br /><br />Note: Dimension order is unimportant when using compression. The multidimensional engine automatically determines how best to physically order the data after it is loaded.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg09-ZVyN1RtYDJbFv1fv0BmzTszrM69iYrnw8D05taWpuXPm3HmWWj9IZ2Fu8lRxEMT5p9o4Ujk3E3mqUNXYnVrd6yJDh0SZwSyMjHgEStXaZE85bJcffchojSOpsWGPK6_LXpLbzU9Cw/s1600-h/Image6.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg09-ZVyN1RtYDJbFv1fv0BmzTszrM69iYrnw8D05taWpuXPm3HmWWj9IZ2Fu8lRxEMT5p9o4Ujk3E3mqUNXYnVrd6yJDh0SZwSyMjHgEStXaZE85bJcffchojSOpsWGPK6_LXpLbzU9Cw/s400/Image6.JPG" alt="" id="BLOGGER_PHOTO_ID_5159046791160415634" border="0" /></a><br /><br />A composite is an analytic workspace object used to manage sparsity. It maintains a list of all the sparse dimension-value combinations for, which there is data. By ignoring the sparse “empty” combinations in the underlying physical storage, the composite reduces the disk space required for sparse data. When data is added to a measure dimensioned by a composite, the AW automatically maintains the composite with any new values.<br /><br />A “global” composite is simply a single composite for all data in a cube. Depending on the Compression and Partitioning choices you make, the behaviour of AWM will vary.<br /><br />When would you opt to create Global Composites? The answer is very rarely. It can be beneficial to select this option in the case of a non-compressed cube that is partitioned. But as stated above, it is probably best to use compression on just about every cube you create, so you should probably leave the option unselected.<br /><br /><br />4.<span style="font-weight: bold;">Partitioned cubes</span>: You can partition your cube along any level in any hierarchy for a dimension. This is another way of improving the build and aggregation performance of your AW, especially if your computer has multiple CPUs. Oracle Database 10g (and thus the OLAP option) can run on single-CPU computers, large multi-CPU computers, and (with Real Application Clusters and Grid technology) clusters of computers that can be harnessed together and used as if they are one large computer. Oracle OLAP is, therefore, perhaps the most scalable OLAP server available.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzRpp9bJfFdTUQfkQbugTGkPAw9pFBLtb3RYrINA7-VEfjNgtE0g0nMkqcEkw3GXyDqP4ouQi1DGnhq3bx4VTymsSmwLERJ3WHtFbYI9uB1M5zDf2btkDcu7tcanpmSwSiHMOO0yncrRk/s1600-h/Image7.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzRpp9bJfFdTUQfkQbugTGkPAw9pFBLtb3RYrINA7-VEfjNgtE0g0nMkqcEkw3GXyDqP4ouQi1DGnhq3bx4VTymsSmwLERJ3WHtFbYI9uB1M5zDf2btkDcu7tcanpmSwSiHMOO0yncrRk/s400/Image7.JPG" alt="" id="BLOGGER_PHOTO_ID_5159047035973551522" border="0" /></a><br /><br />Using partitioning does have certain knock-on consequences in 10g, but these are resolved in11g. In 10g, when you look at the “Summarize To” tab (this will be explained later) the levels above the partition key cannot be pre-aggregated and have to be solved at query time. Therefore, it is critical to select an appropriate level as the partition key so that query performance is maintained. Let us consider the example of time dimension:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPcm5XnO8R49kXp4BC36j8BSC8V4qzBygtgnplqNyy0J-T1jJxgrkS44uLi6r0GfhFDbOjiclsGeQoGzkOxzEsEB__7WWXszLube8TLFk5ZFwwl5-A420SuUWWTEGrqPi7qMkriuPmNDM/s1600-h/Image8.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPcm5XnO8R49kXp4BC36j8BSC8V4qzBygtgnplqNyy0J-T1jJxgrkS44uLi6r0GfhFDbOjiclsGeQoGzkOxzEsEB__7WWXszLube8TLFk5ZFwwl5-A420SuUWWTEGrqPi7qMkriuPmNDM/s400/Image8.JPG" alt="" id="BLOGGER_PHOTO_ID_5159047216362177970" border="0" /></a><br /><br />If we use Day as the partition key, each individual partition will be small which should improve load times and aggregation times. But when a user creates a query based on yearly data 365 values have to be aggregated at run time for each cell being referenced within the query. Depending on the hardware this might or might not provide acceptable query performance.<br /><br />If we use month as the partition key, each individual partition will still be relatively small and load times and aggregation times should still be acceptable. Each partition will hold between 28-31 days worth of data and in this case it would be prudent to make Time sparse within the model. However, when a user creates a query based on yearly data only 12 values have to be aggregated at run time for each cell being referenced within the query.<br /><br />Partitioning has a big impact on two key areas:<br /><ul><li>Partial Aggregation</li><li>Parallel Processing</li></ul>Partial Aggregation – the Oracle OLAP option supports incremental updates to a cube (as we will see in a later workshop). This allows the engine to only aggregate date for just those members where data has been loaded. Which means the aggregation process can work with a substantially reduced set of data. For example, if we are loading data for Dec 2008, then for the time dimension only the members Q4 2008 and 2008 are impacted by any data loaded.<br /><br />Parallel Processing – By partitioning a cube, it is possible to solve it in parallel assuming data is being loaded into more than one partition. Which brings us to an important point. Most customers will typically partition their cubes by time. Of course if you only load data for one month at a time and use month as the partition key then parallel processing is not going to occur. Which may or may not be a good thing.<br /><br /><span style="font-weight: bold;font-size:130%;">Rules Tab</span><br />On the Rules tabbed page, you identify aggregation rules for the cube (this is also available within each individual measure). You have many different kinds of aggregations available. This is one of the most powerful features of Oracle OLAP, enabling different dimensions to be independently calculated using different aggregation methods (or not using aggregation at all). In effect, a different aggregation method can be applied each dimension within a cube. The engine itself is also capable of supporting dimension member level aggregation plans through the use of MODELS. However, at this point in time Analytic Workspace Manager 10g does not support this feature. But AWM11g will support the ability to create dimension member aggregation plans in the form of custom aggregates.<br /><br />In this image below, the aggregation method of SUM is used across all dimensions.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPWBBd1gS2b_a_UjX5TqvvN-LAo75mJrQOuCkK39tKTvuy6IRr2hqGX0EkcAx4NO9Tve-Kfc4im9SYmcDV7ItocSeuoP3WYKQbT5m-2XvxBgcTZ8IsmMzBBO4Suf4ZYiTJuS-OoKP1UlM/s1600-h/Image9.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPWBBd1gS2b_a_UjX5TqvvN-LAo75mJrQOuCkK39tKTvuy6IRr2hqGX0EkcAx4NO9Tve-Kfc4im9SYmcDV7ItocSeuoP3WYKQbT5m-2XvxBgcTZ8IsmMzBBO4Suf4ZYiTJuS-OoKP1UlM/s400/Image9.JPG" alt="" id="BLOGGER_PHOTO_ID_5159047443995444674" border="0" /></a><br /><br />However, as we will see later different aggregation methods are available. For example, if you have costs and price data, you may want to see this data averaged over time, answering such business questions as “What is the average cost over 12 months?” or “What is the average price over 2 years?”<br /><br /><span style="font-weight: bold;font-size:85%;">Aggregation Methods</span><br />It is common to set the aggregation rules only once for all measures contained in a cube. When you define a cube, you identify an aggregation method and any measures that you create that belong to the cube automatically receive the aggregation methods for that cube. This is the default behaviour, and it is one of the benefits of using a cube: By setting up aggregation rules and sparsity handling for all the measures once at the “cube” level, you save time and reduce the scope for errors or inconsistencies.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkBSXnCJD8E-wJC8QKZFVMNlLlXrfFbfDtB1cZCfgsuvoWCzvn7y391ewxb50dZ8v1mLdKnsaYtiB7Jfid4xIwuMrsBoSi-TrLTcAu-J_6133ZC28ASOjFZg-FedVcSwldxGxMnweiLUk/s1600-h/Image11.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkBSXnCJD8E-wJC8QKZFVMNlLlXrfFbfDtB1cZCfgsuvoWCzvn7y391ewxb50dZ8v1mLdKnsaYtiB7Jfid4xIwuMrsBoSi-TrLTcAu-J_6133ZC28ASOjFZg-FedVcSwldxGxMnweiLUk/s400/Image11.JPG" alt="" id="BLOGGER_PHOTO_ID_5159048028110996962" border="0" /></a><br /><br />The default for aggregation used by AWM is the SUM method (simple additive aggregation) for each dimension. However, you do not have to aggregate data. Some measures have no meaning at aggregate levels of certain dimensions. In such cases, you can specify that the data is non-additive and should not be aggregated over those dimensions at all. Choosing the non-additive aggregation method means that when you view the data in the analytic workspace, you find data only at the leaf levels of the dimensions for which you selected that method.<br />Understanding Aggregation<br /><br />AWM allows you to set aggregation rules for each dimension independently for your cubes and measures. That is, each dimension, if required, can use a different mathematical method of generating data for the parent and ancestors.<br /><br />Here are some examples of different aggregation methods:<br /><ul><li>SUM simply adds up the values of the measure for each child value to compute the value for the parent. This is the default (and most common) behaviour.</li><li>AVERAGE calculates the average of the values of the measure for each child value to provide the value for the parent.</li><li>LAST takes the last non-NA (Null) value of the child members and uses that as the value for the parent.</li></ul><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLTLw-bx6GJ8xp_iWIaDOu7lHocYv7z-R16T4aVktyrnGMCg5ym6_8hzlQqkrj3JwSYGZ4U8xS5DwQ5muNPsSeMIbgAgzgehaCzspAvSsPoYsdhqOaschNkXNFpA3RK4u5q0KRMUe5Kds/s1600-h/Image10.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLTLw-bx6GJ8xp_iWIaDOu7lHocYv7z-R16T4aVktyrnGMCg5ym6_8hzlQqkrj3JwSYGZ4U8xS5DwQ5muNPsSeMIbgAgzgehaCzspAvSsPoYsdhqOaschNkXNFpA3RK4u5q0KRMUe5Kds/s400/Image10.JPG" alt="" id="BLOGGER_PHOTO_ID_5159050042450658898" border="0" /></a><br /><br />Sales quantities and revenues are usually aggregated over all dimensions using the SUM method, whereas inventory or headcount measures commonly require a different method (such as LAST) on the Time dimension and SUM for the other dimensions. More advanced aggregation methods, such as weighted average, are useful when aggregating measures such as Prices (weighted by Sales revenue).<br /><br /><span style="font-weight: bold;font-size:85%;">Different Aggregation for Individual Measures</span><br />However, you are not limited to specifying that all measures of a cube have the same aggregation method. When adding measures to the cube, you can specify a different aggregation method, and accept the defaults of all the other measure settings.<br /><br />For example, it is not uncommon for a single cube to contain measures such as Sales Revenue, Sales Quantity, Order Quantity, and Stock/Inventory Quantity. All these measures will aggregate using the SUM method over all dimensions, except for the Stock/Inventory measure. This requires a LAST method on the Time dimension (and SUM on all the others). Using the Rules tab for the Stock measure you can override the default aggregation method for Time and set the method to LAST, while retaining all the all other default settings from the cube.<br /><br /><span style="font-size:85%;">Note: The ability to override cube settings for individual measures is not supported in compressed-cubes. If you use compression, and one of your measures requires a different aggregation method, you need to create it in a separate cube.</span><br /><br /><span style="font-weight: bold;font-size:85%;">Aggregation Operators</span><br />There are a number of different aggregation operators available to you for summarizing data in your AW. The following is a brief description of each of the operators.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5fjBRgQGrbB0srYDM_wjVwJuGOS16GIyIuve1n6TG7UoSSd_MMVuQ89JAFHJX6YJCIfQOxh2Gn_7qKaYkVc2bJMfo66Vt_DC1HBBjV7009JMxPbf-46XaJLoeJma5jqTarS0bu_DybVI/s1600-h/Image12.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5fjBRgQGrbB0srYDM_wjVwJuGOS16GIyIuve1n6TG7UoSSd_MMVuQ89JAFHJX6YJCIfQOxh2Gn_7qKaYkVc2bJMfo66Vt_DC1HBBjV7009JMxPbf-46XaJLoeJma5jqTarS0bu_DybVI/s400/Image12.JPG" alt="" id="BLOGGER_PHOTO_ID_5159048363118446066" border="0" /></a><br /><br /><ul><li><span style="font-weight: bold;">Average</span>: Adds data values, and then divides the sum by the number of data values that are added together</li><li><span style="font-size:85%;"><span style="font-weight: bold;">Hierarchical Average</span></span>: Adds data values, and then divides the sum by the number of children in the dimension hierarchy. Unlike Average, which counts only non-NA children, Hierarchical Average counts all the logical children of a parent, regardless of whether each child does or does not have a value.</li><li><span style="font-size:85%;"><span style="font-weight: bold;">Hierarchical Weighted Average</span></span>: Multiplies non-NA child data values by their corresponding weight values, and then divides the result by the sum of the weight values. Unlike Weighted Average, Hierarchical Weighted Average includes weight values in the denominator sum even when the corresponding child values are NA. You identify the weight object in the Based On field.</li><li><span style="font-size:85%;"><span style="font-weight: bold;">Weighted Average</span></span>: Multiplies each data value by a weight factor, adds the data values, and then divides that result by the sum of the weight factors. You identify the weight object in the Based On field.</li><li><span style="font-size:85%;"><span style="font-weight: bold;">F</span></span><span style="font-size:85%;"><span style="font-weight: bold;">irst Non-NA Data Value</span></span>: The first real data value</li><li><span style="font-size:85%;"><span style="font-weight: bold;">Hierarchical First Member</span></span>: The first data value in the hierarchy, even when that value is NA</li><li><span style="font-size:85%;"><span style="font-weight: bold;">Hierarchical Weighted First</span></span>: The first data value in the hierarchy multiplied by its corresponding weight value, even when that value is NA. You identify the weight object in the Based On field.</li><li><span style="font-size:85%;"><span style="font-weight: bold;">Weighted First</span></span>: The first non-NA data value multiplied by its corresponding weight value. You identify the weight object in the Based On field.</li><li><span style="font-weight: bold;font-size:85%;">Last Non-NA Data Value</span>: The last real data value</li><li><span style="font-size:85%;"><span style="font-weight: bold;">Hierarchical Last Membe</span></span>r: The last data value in the hierarchy, even when that value is NA</li><li><span style="font-size:85%;"><span style="font-weight: bold;">Hierarchical Weighted Last</span></span>: The last data value in the hierarchy multiplied by its corresponding weight value, even when that value is NA. You identify the weight object in the Based On field.</li><li><span style="font-size:85%;"><span style="font-weight: bold;">Weighted Last</span></span>: The last non-NA data value multiplied by its corresponding weight value. You identify the weight object in the Based On field.</li><li><span style="font-size:85%;"><span style="font-weight: bold;">Maximum</span></span>: The largest data value among the children of each parent</li><li><span style="font-size:85%;"><span style="font-weight: bold;">Minimum</span></span>: The smallest data value among the children of each parent</li><li><span style="font-size:85%;"><span style="font-weight: bold;">Non-additive (Do Not Summarize)</span></span>: Do not aggregate any data for this dimension. Use this keyword only in an operator variable. It has no effect otherwise.</li><li><span style="font-size:85%;"><span style="font-weight: bold;">Sum</span></span>: Adds data values (default)</li><li><span style="font-weight: bold;font-size:85%;">Scaled Sum</span>: Adds the value of a weight object to each data value, and then adds the data values. You identify the weight object in the Based On field.</li><li><span style="font-size:85%;"><span style="font-weight: bold;">Weighted Sum</span></span>: Multiplies each data value by a weight factor, and then adds the data values. You identify the weight object in the Based On field.</li></ul><span style="font-size:85%;"><span style="font-weight: bold;">Aggregating Across Multiple Hierarchies</span></span><br />Most dimensions within real world models will have multiple hierarchies. In the image below, there are two separate hierarchies on the Time dimension.<br /><br />On the Aggregation Rules tabbed page, when creating a cube, you can specify which hierarchy or hierarchies should be used for aggregation for that cube’s measures. You should select one or more hierarchies for each dimension being aggregated. If you omit a hierarchy, then no aggregate values are stored in it; they are always calculated in response to a query.<br /><br />Because this may reduce query performance, generally you should omit a hierarchy only if it is seldom used. The default behaviour of AWM 10g is to select all hierarchies.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlgJl2FIUy2wCnpLpNsegui9hhmKOsrgDT59QtLxxxqyxwIG0x-tiEaRmIUkvO3sp5YlHRmffFj-eKMD3dV7qQbWBfJf4Pb8H-pbl7Tlw6SOuVJnefLrx9fKGpRxHTVhRmrsn9rf2Pgp8/s1600-h/Image14.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlgJl2FIUy2wCnpLpNsegui9hhmKOsrgDT59QtLxxxqyxwIG0x-tiEaRmIUkvO3sp5YlHRmffFj-eKMD3dV7qQbWBfJf4Pb8H-pbl7Tlw6SOuVJnefLrx9fKGpRxHTVhRmrsn9rf2Pgp8/s400/Image14.JPG" alt="" id="BLOGGER_PHOTO_ID_5159048646586287618" border="0" /></a><br /><br /><span style="font-size:85%;"><span style="font-weight: bold;">Aggregating Measures with Data Coming in at Different Levels</span></span><br />There are other occasions where careful selection of the hierarchies to use in aggregation is important, especially for measure data that arrives into the AW at different levels of aggregation.<br /><br />Suppose you have an AW that contains Budget and Actuals cubes for the purposes of variance analysis. The leaf level for Actuals is the Day level, but Budgets are set at the Monthly level. Initially, you created a single Time hierarchy in which Year is the highest level and Day is the lowest level:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXkisHatRw1lRUK46KSU2JASSxXYG8ijy50t7WR5gasuEmDM3cNz3A6zjAlgudmEqQ3M-fgyU0z_S9o-Qmg8pscCeX-ZuSyqCS2SJFFlCA4Pj8LUIqJLkPpgLugJuX0FZQppGL-kaFWww/s1600-h/Image8.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXkisHatRw1lRUK46KSU2JASSxXYG8ijy50t7WR5gasuEmDM3cNz3A6zjAlgudmEqQ3M-fgyU0z_S9o-Qmg8pscCeX-ZuSyqCS2SJFFlCA4Pj8LUIqJLkPpgLugJuX0FZQppGL-kaFWww/s400/Image8.JPG" alt="" id="BLOGGER_PHOTO_ID_5159048955823932962" border="0" /></a><br /><br />This is perfect for the aggregation hierarchy for the Actuals measures. However, there is an issue with the Budgets measure. If data is loaded at the Month level, but this hierarchy is used for the aggregation of Budgets, then aggregation may begin at the Day level. All the empty cells for Budget at the Day level would be interpreted as zeros for the purposes of aggregating the data, resulting in new monthly totals being calculated as zero.<br /><br />To handle this situation, a recommended approach is to create a second hierarchy that stops at the Month level specifically for the purposes of aggregating Budgets:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsjwEe9IwKpBhUmaxuAsrnQF409yAG8_E4ch87Lt541cJcewkpqXM4LTs5kFw41Hj0X3kQiCrW9sb9Uo4_q8a7NTA0YUIrdmNNQCLhyphenhyphenD-G1mUPz6ux1sokQUfOEhn8lxIfwI7PHUzGhQ4/s1600-h/Image15.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsjwEe9IwKpBhUmaxuAsrnQF409yAG8_E4ch87Lt541cJcewkpqXM4LTs5kFw41Hj0X3kQiCrW9sb9Uo4_q8a7NTA0YUIrdmNNQCLhyphenhyphenD-G1mUPz6ux1sokQUfOEhn8lxIfwI7PHUzGhQ4/s400/Image15.JPG" alt="" id="BLOGGER_PHOTO_ID_5159048878514521618" border="0" /></a><br /><br />You must deselect the hierarchy containing the Day level on the Aggregation Rules tab for the cube or measure in question. Use the Day-level hierarchy for the Actuals measures only. The Day-level hierarchy is the primary or default hierarchy for end users because it enables drilling down to the Day level, and Budgets are available at Month, Quarter, and Year, exactly as required.<br /><br /><br /><br /><span style="font-size:130%;"><span style="font-weight: bold;">Summarize To Tab</span><br /></span>Within all OLAP models you will need to balance the desire to aggregate absolutely everything and the time taken to load into a cube and then aggregate that data. In general, the less you choose to pre-summarize when loading data into the AW, the higher the load placed on run-time queries. In this scenario, queries are likely to be a bit slower and the load on the server at query time is likely to be greater (for example, each user query is likely to be asking the server to do more calculations at a given point in time). Pre-calculated summaries are instantly available for retrieval and are generally faster to query.<br /><br />However, it does not necessarily follow that full aggregation across all levels of all dimensions yields the best query performance. In many cases, partial summarization strategies can provide optimal build and aggregation performance with little noticeable impact on query performance.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiF4e5nXzMKTKCb9V_Gg_Orjc0Tyauierek9d4wvDYY1XmdXU6EVWxgok_lEn7qkFZrtPtzZ-OXnm6nv_mRhZduQHbj99uwHwEbYCMzWoRRRt9Gwlg3AbS9LH1ljmo-M7wyKnMmWPJmr_w/s1600-h/Image13.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiF4e5nXzMKTKCb9V_Gg_Orjc0Tyauierek9d4wvDYY1XmdXU6EVWxgok_lEn7qkFZrtPtzZ-OXnm6nv_mRhZduQHbj99uwHwEbYCMzWoRRRt9Gwlg3AbS9LH1ljmo-M7wyKnMmWPJmr_w/s400/Image13.JPG" alt="" id="BLOGGER_PHOTO_ID_5159049265061578290" border="0" /></a><br /><br />Many experienced OLAP cube builders make the following recommendations regarding summarization strategies:<lu><br /></lu><ul><li><lu></lu><br /></li><li>Large dimensions, and those with many deep levels and/or hierarchies, are typically the most “expensive” to aggregate over. They are also likely to be one of the sparse dimensions in the cube definition. For such dimensions, a common guideline is to decide to summarize using a “skip-level” approach—that is, to precalculate every other level in the hierarchy. This generally gives reasonably good results and a solid basis for further tuning (if required)</li><li>If there is a small, dense dimension (such as Time) as the first dimension on the list of dimensions for a cube, then it is often a good strategy to leave that dimension to completely summarize on the fly at run time, especially if a large number of sparse data-level combinations have been computed</li></ul>AWM generally defaults to settings that reflect this advice, but you can tune the settings if you need to. But at least the defaults provide a good starting point for tuning a build if required. But be warned, adding more levels to be pre-summarized will require additional storage space.<br /><br />When you build and test your AWs, it is a good idea to include time in your project plan to experiment with different summarization strategies. Estimating in advance the exact storage requirements and aggregation times of a multidimensional cube (especially a highly dimensional, sparse one) is extremely difficult. So, it is often the case that some tuning after data is properly understood improves the performance of builds and aggregations.<br /><br />You can use a database package to help you plan your summarisation strategy. There are two procedures, part of the DBMS_AW package that can provide help and guidance:<br /><ul><li>The SPARSITY_ADVICE_TABLE procedure creates a table for storing the advice generated by the ADVISE_SPARSITY procedure</li><li>The ADVISE_SPARSITY procedure runs a series of queries against your data and make recommendations about what data to pre-summarize and what to leave for dynamic aggregation. The 11g release of Analytic Workspace Manager leverages this database feature and make recommendations directly inside the tool<br /></li></ul><lu><br /></lu><br /><br /><br /><br /><span style="font-size:130%;"><span style="font-weight: bold;">Cache Tab</span></span><br />Caching improves run-time performance in sessions that repeatedly access the same data, which is typical in data analysis. Caching temporarily saves calculated values in a session so that you can access them repeatedly without recalculating them each time. You have two options:<br /><ul><li>Cache run-time aggregations using session cache: This is the default behaviour. This option ensures that any run-time aggregations that are completed during a session are cached for the remainder of the session, improving query performance as the session progresses. This setting is ideal for a larger number of OLAP applications, namely those that allow read-only analysis where the underlying data is not changing during a session. </li><li>Do not cache run-time aggregations: Select this option if the cube would be subject to what-if analysis and, therefore, it would be important that previously calculated summarizations are not reused.</li></ul><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOtFebwR9Rn-fllxILhr5PI5yWeYkkd0UkEaF3FxCAUZo_HA39CZ_SGYKQKKnZx-F276nbqMxBTPW1zo8SNZnqXdBAGVbpuWFzqa3r6R8m0KxCaCzSPA-_OzbaJGf25Xi0YrluY6aMjXw/s1600-h/Image16.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOtFebwR9Rn-fllxILhr5PI5yWeYkkd0UkEaF3FxCAUZo_HA39CZ_SGYKQKKnZx-F276nbqMxBTPW1zo8SNZnqXdBAGVbpuWFzqa3r6R8m0KxCaCzSPA-_OzbaJGf25Xi0YrluY6aMjXw/s400/Image16.JPG" alt="" id="BLOGGER_PHOTO_ID_5159049522759616066" border="0" /></a><br />In the next workshop we will review how to quickly and easily load data into a cube and then review some best practices for loading data within a production environment.Keith Lakerhttp://www.blogger.com/profile/01039869313455611230noreply@blogger.com0tag:blogger.com,1999:blog-3820031471524503731.post-77310489395376042342008-01-21T03:19:00.000-08:002008-12-11T15:25:43.549-08:00OLAP Workshop 5 : Building CubesIn the last series of Workshops, we started to look at building the dimensions to support our data model. Each dimension contained levels and a hierarchy. The purpose of a hierarchy is to provide the relationships for summarization of measures in the cube and to make navigating multiple levels of data easy and intuitive for the end user. The next stage is to start building cubes.<br /><br /><span style="font-size:130%;">Creating Cubes<br /></span><span style="font-weight: bold;"><br />What Are Cubes?</span><br />Cubes are containers of measures (facts). They simply provide a convenient way of collecting up measures with the same dimensions. Therefore, all measures in a cube are candidates for being processed together at all stages: data loading, aggregation, and storage. Cubes are only visible to the cube builder (end users only see the measures they contain) and simplify the setup and maintenance of measures in AWM.<br /><br /><span style="font-weight: bold;">Creating Cubes</span><br />To create a cube, right-click the Cubes node in the navigator, and then select the Create Cube option.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMupeE18xa2OxsNDvI3uge3fxEZaOhzfr5NI33vHVYK0Pg6VClrt1PA7a1emkBr5CclQtDUkI3yqu-_UnEogwFlmAC0Q15Dsvo35RYXUMl04RsPj44SB2nh4c7GCTOt0zrpS8xfZqN17M/s1600-h/image2.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMupeE18xa2OxsNDvI3uge3fxEZaOhzfr5NI33vHVYK0Pg6VClrt1PA7a1emkBr5CclQtDUkI3yqu-_UnEogwFlmAC0Q15Dsvo35RYXUMl04RsPj44SB2nh4c7GCTOt0zrpS8xfZqN17M/s400/image2.JPG" alt="" id="BLOGGER_PHOTO_ID_5157888807543877298" border="0" /></a><br /><br /><span style="font-weight: bold;">Note:</span> You can also create a cube from a cube template if you have a template available.<br /><br />The Create Cube window appears, as shown below:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKtuP6qyHLsVcZHDbt8arfIWCj6HTMrAIQkLRT-KFUQQU5Uml1ijWrn-X3uYV4irl5mOQFPc10QUCh0vbQgClS7487TAoIC1IBwAf_H6Olb5m4H2rBTwL7x8vHjnq-FE3I_FJi_F-7RBM/s1600-h/image3.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKtuP6qyHLsVcZHDbt8arfIWCj6HTMrAIQkLRT-KFUQQU5Uml1ijWrn-X3uYV4irl5mOQFPc10QUCh0vbQgClS7487TAoIC1IBwAf_H6Olb5m4H2rBTwL7x8vHjnq-FE3I_FJi_F-7RBM/s400/image3.JPG" alt="" id="BLOGGER_PHOTO_ID_5157890160458575554" border="0" /></a><br /><br />The Create Cube wizard provides a tabbed page interface that enables you to specify the logical model and processing options for a cube. The best way to use this wizard is to always work from left to right across the various tabs.<br /><br /><span style="font-style: italic;">General Tabbed Page</span><br />On the General tabbed page, enter the basic information about the cube:<br /><ul><li>Provide the cube with a distinct name and provide the short and long label descriptions. Note – the name of the cube cannot be changed once the cube has been created.</li><li>Identify the dimensionality of the cube by using the arrow keys to move dimensions from the Available Dimension list to the Selected Dimension list. After you define the dimensionality, all measures that you create based on this cube will have the same dimensionality. Note – the dimensionality of the cube cannot be changed once the cube has been created.</li></ul>Remember that Oracle OLAP supports cubes of different dimensionality. Therefore, you do not need to select all the dimensions listed in the panel marked ‘Available Dimension’.<br /><br />The tick box “Use Default Aggregation Plan for Cube Aggregation” allows you to shortcut the process of creating of measures by applying the settings defined at the cube level to all measures within the cube. As we will see later, defining measures is an almost identical process as defining cube.<br /><br /><span style="font-style: italic;">Translations Tabbed Page </span><br />Enables you to provide long and short descriptions for the cube in each language that the AW supports. Although there are other tabs within the cube wizard, at this point it is possible to ignore all the other tabs and allow the AWM to default all the other features.<br /><br /><span style="font-weight: bold;">Adding Measures to a Cube</span><br />Base measures store the facts collected about your business. Dimensions logically organize the edges of a measure, and the body of the measure contains data values. Each measure belongs to a particular cube, and by default all the settings for a measure (such as dimensions) are inherited from the cube.<br /><br />Right clicking on the Measures node in the navigator can create a measure. Next select the Create Measure option.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4zwPALm_V4osfxDftPAiHTWCj20iYcCABow9EcRZ8L_AGVAjOzHo8MwIOowepL8u_OsQUNRoGav9yqKlANuErjSBO9tQvwJTYeBfbJj-hr5fFMaiaOQUiiYJJJs6E5cOc83vEtUrz-Zo/s1600-h/image4.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4zwPALm_V4osfxDftPAiHTWCj20iYcCABow9EcRZ8L_AGVAjOzHo8MwIOowepL8u_OsQUNRoGav9yqKlANuErjSBO9tQvwJTYeBfbJj-hr5fFMaiaOQUiiYJJJs6E5cOc83vEtUrz-Zo/s400/image4.JPG" alt="" id="BLOGGER_PHOTO_ID_5157890448221384402" border="0" /></a><br /><br />This will then launch the wizard to create the measure:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpxilGhdeqpST2pAZukxSMbmy2QZLKNA-ZuoG8fUJ4CbgWpyWsXpFn5-FToaa4Y9obBqxw7vZ-udO63ATsFZkUm58cWaRhOGY9O_ZxDDn-Dg4divcvW49ZSQQCvrppe6k_YOzB-m2joJI/s1600-h/image5.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpxilGhdeqpST2pAZukxSMbmy2QZLKNA-ZuoG8fUJ4CbgWpyWsXpFn5-FToaa4Y9obBqxw7vZ-udO63ATsFZkUm58cWaRhOGY9O_ZxDDn-Dg4divcvW49ZSQQCvrppe6k_YOzB-m2joJI/s400/image5.JPG" alt="" id="BLOGGER_PHOTO_ID_5157890585660337890" border="0" /></a><br /><br /><br /><span style="font-style: italic;">General Tabbed Page</span><br />On the General tabbed page, you create a name and add label information. Long labels are used by most OLAP clients for display. If you do not specify a value for the long label, then it defaults to the measure’s name. Once the measure is defined you cannot change the name of the measure. If you delete a measure all the data associated with that measure is lost.<br /><br /><span style="font-style: italic;">Other Tabbed Pages</span><br />The Translations tabbed page enables you to provide long and short descriptions for the measure in each language that the AW supports. The other tabbed pages (Implementation Details, Rules, and so on) enable the selection of certain measure-specific processing options other than the settings that are applied by the definition of the cube. These tabbed pages are examined in the following workshop.<br /><br />At this point it possible to simply create the measure and allow AWM to default all the other settings.<br /><br /><span style="font-weight: bold;">Loading Data into a Cube.</span><br />After creating logical objects, you can map them to relational data sources in the Oracle database. Afterward, you can load data into your analytic workspace by using the Maintain Analytic Workspace Wizard.<br /><br /><span style="font-style: italic;">Step 1 – Mapping Data Sources</span><br />To map your measures to a data source, perform these steps:<br /><br />1. In the navigator, choose Mappings for the cube that contains the measure that you want to map. A list of schemas appears. Find the schema to which you want to map your measure, and then click the + button.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEie3zaylmIt16giC-E-CA0r4VsLxCAlEXXXC_ihiZsLu9o3hTgDcY44KpEG7-FTVCEEIJEBXww7eGrTNtGAILV6Y_kBApa_cg86dxluAx-TSQLzKy6hMWClCSoyhqUk-SdWU_bgIAspkE0/s1600-h/image6.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEie3zaylmIt16giC-E-CA0r4VsLxCAlEXXXC_ihiZsLu9o3hTgDcY44KpEG7-FTVCEEIJEBXww7eGrTNtGAILV6Y_kBApa_cg86dxluAx-TSQLzKy6hMWClCSoyhqUk-SdWU_bgIAspkE0/s400/image6.JPG" alt="" id="BLOGGER_PHOTO_ID_5157890796113735410" border="0" /></a><br /><br />2. Select either Tables or Views, depending on what you are mapping to.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlGyVrRr6l-PqEGWsAi3jSxcJtcr_VEXZW0hZuPitFTdVr5g2sGBIzwDVsk9O1YIlQJmjX5KKJEf8fDf5B1Vb6bQ6rSkzg3yRdqFEPR_Qti30h8RXCiOayha4J_iAmVJ6yjqWWHOTSws0/s1600-h/image7.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlGyVrRr6l-PqEGWsAi3jSxcJtcr_VEXZW0hZuPitFTdVr5g2sGBIzwDVsk9O1YIlQJmjX5KKJEf8fDf5B1Vb6bQ6rSkzg3yRdqFEPR_Qti30h8RXCiOayha4J_iAmVJ6yjqWWHOTSws0/s400/image7.JPG" alt="" id="BLOGGER_PHOTO_ID_5157891332984647458" border="0" /></a><br /><br />3. Find the table or view name and double-click, or drag it to the mapping canvas. When on the canvas, the structure of the table is visible.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3_xfF7PJh_GlPwB-0ye26hurSRCmKUhwWzZ3BWRPmOgxS3hATNNwGsZW972yP4XrJXlYgk9bbfQl1FE-Na5-cGLNg3ayz_6XHQsOxqRxbBunv7d1ZOsQuQtawYAITdJ24qi_X6_j3xGM/s1600-h/image8.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3_xfF7PJh_GlPwB-0ye26hurSRCmKUhwWzZ3BWRPmOgxS3hATNNwGsZW972yP4XrJXlYgk9bbfQl1FE-Na5-cGLNg3ayz_6XHQsOxqRxbBunv7d1ZOsQuQtawYAITdJ24qi_X6_j3xGM/s400/image8.JPG" alt="" id="BLOGGER_PHOTO_ID_5157891152596021010" border="0" /></a><br /><br /><br /><span style="font-weight: bold;">Note:</span> If you want to see the data in the table or view, right-click the name of the table or view, and then select the View Data option.<br /><br />My recommendation is never to map directly to a fact table. Always use a view as this allows to you to fine tune the load process. For example by using a view you can select to load a single time period, which can be useful when you are trying to manage some of the more advanced settings and you are using an iterative development approach. As you will see later, using a view can make the data take stage (i.e. the initial build of the cube) easier to plan and manage.<br /><br /><br />4. Drag the cursor from the column name in the relational source to the destination object name in the measure. The image below shows a completed mapping.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_hqEzzw1KdcN9XOvupDSlSRqFy1NQ1dm-Vnh_Z4NqppTWeJTF3fH1pgdEib65n-vmC4-UYb2N8FAt2iM7yMDZNMukWyRSGETVzCVPkQNH_3oFpdAyyJG1yv4v8OphsDW93YOSmlcBGC0/s1600-h/image9.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_hqEzzw1KdcN9XOvupDSlSRqFy1NQ1dm-Vnh_Z4NqppTWeJTF3fH1pgdEib65n-vmC4-UYb2N8FAt2iM7yMDZNMukWyRSGETVzCVPkQNH_3oFpdAyyJG1yv4v8OphsDW93YOSmlcBGC0/s400/image9.JPG" alt="" id="BLOGGER_PHOTO_ID_5157891040926871298" border="0" /></a><br /><br /><br />Note: The mapping canvas enables you to map the contents of the source data to any level of dimensions. Here, because Budgets are set by product, and by channel for each month, map them to the Month, Product and Channel levels. In the next lesson there is advice techniques for managing situations where source data for different cubes and measures is loaded at different leaf levels of detail.<br /><br /><span style="font-style: italic;">Step 2 - Loading Data into the Cube</span><br />AWM contains a data maintenance wizard to help you create a job to load data into your cubes. The job both loads and aggregates the data within the cube as a single job. You can load:<br /><ul><li>All mapped objects in the analytic workspace</li><li>All mapped measures in a cube including the dimensions</li><li>All mapped measures in a cube excluding the dimensions</li><li>Individually mapped measures</li></ul>To load data, right-click the desired object name into which you are loading data, and then select the Maintain option.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEga7bMS6ks0Ztwuh3nyssMwV-51UUle7z3fdN7TPvbqfYeEv0ND34_OvWvFWekk78ipk36xnO7wePtElSYtoCe4OSrYyeAxIDtx7k32yAEytAZXqkH1q2iFW4MfPKZyfmG6jbOnVRS6V9M/s1600-h/image10.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEga7bMS6ks0Ztwuh3nyssMwV-51UUle7z3fdN7TPvbqfYeEv0ND34_OvWvFWekk78ipk36xnO7wePtElSYtoCe4OSrYyeAxIDtx7k32yAEytAZXqkH1q2iFW4MfPKZyfmG6jbOnVRS6V9M/s400/image10.JPG" alt="" id="BLOGGER_PHOTO_ID_5157891655107194674" border="0" /></a><br />In this screenshot, the Budgets cube is maintained. This results in the loading of data for all the dimensions that organize the cube and all the mapped measures associated with the cube.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgccwd3qe4ttjrO6qAyVhrUAJZ0LXlG1He03Gomtq8l9MXgXvpprl5prNeK1vS2iRVqUkgrfm5zl2m9QXsEkQO_b6zodnw5bckte7UJcNrXAf4e3-btqHRtyQTzDbHKJ6rsc9ktsmNGQSs/s1600-h/image11.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgccwd3qe4ttjrO6qAyVhrUAJZ0LXlG1He03Gomtq8l9MXgXvpprl5prNeK1vS2iRVqUkgrfm5zl2m9QXsEkQO_b6zodnw5bckte7UJcNrXAf4e3-btqHRtyQTzDbHKJ6rsc9ktsmNGQSs/s400/image11.JPG" alt="" id="BLOGGER_PHOTO_ID_5157891908510265154" border="0" /></a><br /><br /><br />The Maintenance Wizard takes you through a set of steps to load data from the mapped relational objects to the multidimensional objects in the AW.<br /><br />Step 1 of the wizard, you identify the objects for which data is to be loaded. If you choose cubes, all the measures for the cube are selected. Alternatively, you can choose a specific measure of a cube. After a measure or cube is selected, the associated dimensions are automatically selected as well. AWM, by default, selects the related dimensions for the cube. This is because AWM is dimensionally aware, and knows that the dimensions must exist and be populated in order for measures to be loaded (the dimensions organize the measures physically not just logically in an AW, so they must be maintained before the measure data can be loaded).<br /><br /><span style="font-weight: bold;">Note</span> – My personal preference is not to maintain dimensions at the same time as processing the cube. This goes back to the old days of Express Server when it was best practice to load dimensions first and then load data as a separate job. The reason for this two-step process was to ensure efficient storage of a measure. With the OLAP Option I am not sure if this should still be considered best practice but old habits die-hard.<br /><br />From this screen it possible to simply click on the “Finish” button and the job will run immediately. Alternatively you can step through the two other screens to set some additional processing options:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrV_S73tODY72aWZg5HcFXcEslqUQ0FcOoLYWo7YXhRwORViJcscvflDrum5cDoexiDiq4VNdaA6T_k0MvhfmuwFhlO-bOFrFekc9nn4R9L2z_eiAqmTaXMQOP9FxoCyne6oRY81e18j4/s1600-h/image11.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrV_S73tODY72aWZg5HcFXcEslqUQ0FcOoLYWo7YXhRwORViJcscvflDrum5cDoexiDiq4VNdaA6T_k0MvhfmuwFhlO-bOFrFekc9nn4R9L2z_eiAqmTaXMQOP9FxoCyne6oRY81e18j4/s400/image11.JPG" alt="" id="BLOGGER_PHOTO_ID_5157892161913335634" border="0" /></a><br /><br />Step 2 allows you to determine how previously load data should be managed as well as new data. For the moment, simply ignore this screen, all will be explained in the next workshop.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpg6dMNcVyRMIC4Ix8KPMhLpIy0cnJLK8g4jlYsVDTUqkP3Bv15iU1znUnKq5RQdWJvV74VBcNbeqWT1QXmcOru630_DeP8VEMOTada0caXy6fdYfN-lz8qNSnCRgplr7JnpauigBd9_w/s1600-h/image13.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpg6dMNcVyRMIC4Ix8KPMhLpIy0cnJLK8g4jlYsVDTUqkP3Bv15iU1znUnKq5RQdWJvV74VBcNbeqWT1QXmcOru630_DeP8VEMOTada0caXy6fdYfN-lz8qNSnCRgplr7JnpauigBd9_w/s400/image13.JPG" alt="" id="BLOGGER_PHOTO_ID_5157892462561046370" border="0" /></a><br /><br /><br />Step 3 allows you to determine when to run the job. For the moment simply use the default option to run the job immediately. Again, the other options will be explained in the next workshop.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzkcb91l1AmlouQvVchhengG8EH8K4YmhTXW5g-LUYyH-aLtCWUiTqiFrU9amvYH3XIHHrRiStmcnIuIguZK6qB6E6CY6FMJBrgwXAdy-L-JtTJuUneAFBg9zxOkvNY4V1byHW6NVNib0/s1600-h/image12.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzkcb91l1AmlouQvVchhengG8EH8K4YmhTXW5g-LUYyH-aLtCWUiTqiFrU9amvYH3XIHHrRiStmcnIuIguZK6qB6E6CY6FMJBrgwXAdy-L-JtTJuUneAFBg9zxOkvNY4V1byHW6NVNib0/s400/image12.JPG" alt="" id="BLOGGER_PHOTO_ID_5157892754618822514" border="0" /></a><br /><br />After the loading of data is completed, you can view the report which is shown below (this is the 10g report, the 11g report provides a lot more detail):<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh53tYl7Te8tjTtK4gUCvsCx3pNiEe0Aozb82zG08KZURfc4pdxpVU77HJtFSYTWwGj9D61sUotv4HRWvP8jkdaBTIPg4RHkaiLhjy_cWfau-GbyuqZpqVe3LpgDxN5EDE0mtpk-Fx8FSM/s1600-h/image14.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh53tYl7Te8tjTtK4gUCvsCx3pNiEe0Aozb82zG08KZURfc4pdxpVU77HJtFSYTWwGj9D61sUotv4HRWvP8jkdaBTIPg4RHkaiLhjy_cWfau-GbyuqZpqVe3LpgDxN5EDE0mtpk-Fx8FSM/s400/image14.JPG" alt="" id="BLOGGER_PHOTO_ID_5157892939302416258" border="0" /></a><br /><br />After successful completion, the data in your AW is ready to be analyzed.<br /><br /><span style="font-weight: bold;">Note</span> - All the maintenance logging goes into the XML_LOAD_LOG table (for 10g, with 11g there have been some changes which will be explained in a later post), which belongs to the OLAPSYS user. This table can be reviewed later, if required. There is a lot of information in this log, but some of it can be hidden. Always make sure ALL your records were correctly loaded. The log file will tell you if any were rejected, but unfortunately it will not tell you why or which records. The usual reasons are:<br /><ul><li>missing dimension members</li><li>invalid data due to data type errors</li></ul><br /><span style="font-size:130%;">Viewing the Results<br /></span>After data is loaded, you can preview it by using the Data Viewer. To see the data, right-click the name of the measure or cube that you want to view, and then select View Data from the submenu.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpy9yviPgHkxKjQp42rs9kGsmS0R-xWjeSiAk3-uYHh2Pox1TwG-ECbd0euTF56v-o9hebYU01W9Rf254zzrfsCCl4S-Sp9ytU1u0XRAiJq4smSdR77CFHL127IHvdGT1gz7tX7e0mbpg/s1600-h/image15.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpy9yviPgHkxKjQp42rs9kGsmS0R-xWjeSiAk3-uYHh2Pox1TwG-ECbd0euTF56v-o9hebYU01W9Rf254zzrfsCCl4S-Sp9ytU1u0XRAiJq4smSdR77CFHL127IHvdGT1gz7tX7e0mbpg/s400/image15.JPG" alt="" id="BLOGGER_PHOTO_ID_5157893351619276690" border="0" /></a><br />A tabular report appears. If you view a cube, all measures in the cube are displayed. In the Data Viewer, you can:<br /><ul><li>Drill up or down on the dimension values</li><li>Pivot or rotate the view of the data by dragging the edges (rows, columns, and pages) to new positions</li><li>Use the query builder to slice and dice the data<br /></li></ul>This basic crosstab control is used extensively in Oracle Business Intelligence tools, including OracleBI Beans, Discoverer Plus OLAP, and administrative tools such as AWM and Oracle Warehouse Builder. Also, third-party tools and applications sold by Oracle partners that use the OracleBI Beans technology use this same user interface.<br /><br /><span style="font-weight: bold;">Note</span> - When you are developing an analytic workspace always check your data after it has loaded. Do not just assume the data is correct. It always good practice to go back to the fact table and make sure the totals from the source data match the totals in the OLAP cube.<br /><br />In end-user tools and applications, more functionality (such as formatting, colour coding, and cell actions) is enabled in Discoverer Plus OLAP, as you see in the lesson titled “Building Analytical Reports with OracleBI Discoverer Plus OLAP.”<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicURJY1Svrg16JwcycHApRGzy9GH785u3PqeYc5dwA_CBSCpqYHKWmu4eqDpdj16MZYtCNNAbfrQsMGLXgEvkwcfwY3wB6k0_U-l6D5L-YMf-in2uu2Q1CibTcnwLEnI-a1mPJxfGrkUE/s1600-h/image16.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicURJY1Svrg16JwcycHApRGzy9GH785u3PqeYc5dwA_CBSCpqYHKWmu4eqDpdj16MZYtCNNAbfrQsMGLXgEvkwcfwY3wB6k0_U-l6D5L-YMf-in2uu2Q1CibTcnwLEnI-a1mPJxfGrkUE/s400/image16.JPG" alt="" id="BLOGGER_PHOTO_ID_5157893592137445298" border="0" /></a><br /><br /><span style="font-weight: bold;">Note: </span>From the File menu within the Data Viewer, or from the Query Builder tool, <br />you can access the Oracle OLAP Query Builder. This query wizard is used throughout Oracle Business Intelligence tools.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjX9Hvdvbt7BA7cTZhC2jR7CInrO-vzcQyenZVQGlTpHdupgjreoJ-gIoTNJpg8Y_GGwReiJItoA02PVKffP3hVcLIeu58iOcAtZzu_IdZXiY5AMpO7hmdVjTGne8SFn-rEwyAS8QD3Eog/s1600-h/image17.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjX9Hvdvbt7BA7cTZhC2jR7CInrO-vzcQyenZVQGlTpHdupgjreoJ-gIoTNJpg8Y_GGwReiJItoA02PVKffP3hVcLIeu58iOcAtZzu_IdZXiY5AMpO7hmdVjTGne8SFn-rEwyAS8QD3Eog/s400/image17.JPG" alt="" id="BLOGGER_PHOTO_ID_5157893506238099362" border="0" /></a><br /><br />As shown in the image above, you drill down on data to the lowest levels of detail by clicking the arrow icon to the left of the dimension value. Notice that the measure appears to the user as fully aggregated at all level combinations of all dimensions. This is an important feature of the Oracle OLAP dimensional model. All data is presented to the end user as if it is already aggregated and calculated, even if some or all of the data being displayed is being calculated on the fly.<br /><br />For example, some of the budget data has been pre-aggregated during the maintenance task, and some of it is being calculated dynamically. The end user cannot tell the difference, and does not need to know. The AW contains the data and the calculation logic and presents the results that the user needs. From the technical perspective, not even the query behind this crosstab needs to know whether the measure cells being requested are pre-computed or not. The query simply requests these cells from the database, and the AW engine performs any calculations required at query time.<br /><br />In some cases you may need to move beyond the default settings described in this workshop. Therefore, in the next workshop we will look at the other tabs that are part of the Cube wizard. These tabs control sparsity, compression and partitioning features, aggregation rules, and summarization strategies.Keith Lakerhttp://www.blogger.com/profile/01039869313455611230noreply@blogger.com0tag:blogger.com,1999:blog-3820031471524503731.post-35178320659411350562008-01-18T06:34:00.000-08:002008-01-25T05:26:06.775-08:00Oracle OLAP option Diagnostic TechniquesJameson White added "<a href="http://wiki.oracle.com/page/OLAP+option+-+Diagnostic+Techniques">Diagnostic Techniques</a>" to the DBA Zone on the <a href=http://wiki.oracle.com/page/Oracle+OLAP+Option>Oracle OLAP option</a> Wiki. Please make your comments in the thread on the Wiki page.Jameson Whitehttp://www.blogger.com/profile/04697460456284466583noreply@blogger.comtag:blogger.com,1999:blog-3820031471524503731.post-28338055607156841052008-01-14T13:24:00.000-08:002008-01-14T05:46:07.905-08:00New Wiki for Oracle OLAP OptionDid you know Oracle has a public wiki? And on that wiki there is a page for the Oracle OLAP Option? Well there is and it can be accessed from here:<br /><br /> <a href="http://wiki.oracle.com/page/Oracle+OLAP+Option">http://wiki.oracle.com/page/Oracle+OLAP+Option</a><br /><br />We (Brian, Jameson and myself) are slowly building pages and adding content. Although we have are making good progress, the beauty of a wiki is it's open to everyone so you can all contribute content.<br /><br />Jameson has made an excellent start by uploading a large number of scripts to help DBAs manage and interrogate their OLAP environments. He has posted approximately 18 scripts and each script is located on its own page. The format for each page is the same: You get a description, the SQL statement itself, and sample output. You can access these scripts from the main page, listed above, or you can jump straight to them by going here:<br /><br /> <a href="http://wiki.oracle.com/page/OLAP+option+-+DBA+Sample+Scripts">http://wiki.oracle.com/page/OLAP+option+-+DBA+Sample+Scripts</a><br /><br />Other pages on the wiki include:<br /><ul><li>Background and history</li><li>Terminology</li><li>Key features by version (coming soon)</li><li>Link to and Oracle OLAP Google Custom Search engine<br /></li></ul><br />The wiki is open to everyone (Oracle employees, Oracle Partners, and customers) , all you need to do is register with the site, at <a href="http://wiki.oracle.com/">http://wiki.oracle.com</a>, and you can start to contribute content straight away.Keith Lakerhttp://www.blogger.com/profile/01039869313455611230noreply@blogger.com0tag:blogger.com,1999:blog-3820031471524503731.post-68480039371941281562008-01-14T08:43:00.000-08:002008-12-11T15:25:49.708-08:00OLAP Workshop 4 : Managing Different Types of HierarchiesIn the previous posting we started to look at building our first analytic workspace using Analytic Workspace Manager. At this stage don’t forget that we can also use Warehouse Builder to perform the same tasks and in many cases, especially on large-scale projects, this will be the product of choice for designing, building and maintaining your analytic workspaces.<br /><br />At the end of the last workshop we had defined a simple time dimension and examined the various components that make up a dimension:<br /><ul><li>Levels</li><li>Hierarchies</li><li>Attributes</li></ul>In this workshop we are going to look in more detail at the types of hierarchies that you might need to design and map within your environments.<br /><br />Most dimensions will have at least one hierarchy, but Oracle OLAP does also support completely flat dimensions where no hierarchy exists. Although this is rare it does occur in some cases, but it is always wise to have an “All Members” level for these types of dimensions as this will allow business users to pivot these types of dimensions out of their query by selecting that top level. Otherwise their queries will always be pinned to a single dimension member within the page dimension.<br /><br />A hierarchy defines a set of parentage relationships between all or some of a dimension's members:<br /><ul><li>Used for rollups of data.</li><li>Used for end-user navigation; e.g., drill-down.</li></ul>While multiple hierarchies are supported each member can have only one parent within each hierarchy. Lets look at some basic examples:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUdAjrJcwXUEzxgP6AMy9_4FRKMzNr2TdL2xrMwKWzSKBOJAozCGEJLE4XWqQ-4mklc80PpP23LbvxjdyRoe2Sz9742pzfBsfBfMsn057zkq1tXme7SzRI5RV-bQHPUiHTE8sopYTWexY/s1600-h/Image1.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUdAjrJcwXUEzxgP6AMy9_4FRKMzNr2TdL2xrMwKWzSKBOJAozCGEJLE4XWqQ-4mklc80PpP23LbvxjdyRoe2Sz9742pzfBsfBfMsn057zkq1tXme7SzRI5RV-bQHPUiHTE8sopYTWexY/s400/Image1.JPG" alt="" id="BLOGGER_PHOTO_ID_5151293661922569474" border="0" /></a><br />In the first image we have a traditional level based hierarchy where each child has a parent at the next level up in the hierarchy. Although the number of children at each node may, and usually does, differ between nodes. The second image shows another type of level based hierarchy that is some times referred to as a “Skip Level” hierarchy. This is where a leaf node links to a higher-level parent above its next most obvious level. Oracle database can support skip-level relationships within relational hierarchies, however, this is limited to skipping to only one specific level. Oracle OLAP is able to support skip-levels across multiple levels, as seen here:<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCyMAhzjZeW5rmQZS_2UDhyphenhyphen82gnMhM4CCwXMvnTZoe4fnUKh7jERTMceUxq2N0-73AsF6npXEmmUJrUsbO0A6HD5Ri4ncnqk_iSAjvYOG5mHXm1N60aCpOwMrXcLysfRXcylJCvnsVOx4/s1600-h/Image1b.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCyMAhzjZeW5rmQZS_2UDhyphenhyphen82gnMhM4CCwXMvnTZoe4fnUKh7jERTMceUxq2N0-73AsF6npXEmmUJrUsbO0A6HD5Ri4ncnqk_iSAjvYOG5mHXm1N60aCpOwMrXcLysfRXcylJCvnsVOx4/s400/Image1b.JPG" alt="" id="BLOGGER_PHOTO_ID_5151293966865247506" border="0" /></a><br />Oracle OLAP is able to manage these types of relationships quickly and easily because all types of hierarchies are effectively stored as parent-child relationships. A derivation of the skip-level hierarchy is the “Ragged” hierarchy. This is where leaf-nodes are located at different levels within the hierarchy. Obviously this can have an impact on the data loading and aggregation plans, however, Oracle OLAP is more than capable of handling this type of scenario in just the same way as any other level based hierarchy.<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEis5fYmJcbpfq_ruMeev9gcQWdALwxn18-d5JyU4XKbk4Lv3_zQWr5uVD4qCK97AjUmYfdrFevzEGSqWhlPrAmGtlb8owqu2LQZ1wM0URRFFEPEe1fguW50hhEHX4xIe29Lc6XJUnhKlhI/s1600-h/Image1a.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEis5fYmJcbpfq_ruMeev9gcQWdALwxn18-d5JyU4XKbk4Lv3_zQWr5uVD4qCK97AjUmYfdrFevzEGSqWhlPrAmGtlb8owqu2LQZ1wM0URRFFEPEe1fguW50hhEHX4xIe29Lc6XJUnhKlhI/s400/Image1a.JPG" alt="" id="BLOGGER_PHOTO_ID_5151294263217990946" border="0" /></a><br />Of course you can combine some of these structures to create more complicated relationships such as a “Ragged-Skip” level hierarchy. These more complex structures are also supported.<br /><br />The last type of hierarchy shown above is a simple flat hierarchy, which as explained earlier may or may not be an ideal type of dimension to model depending on how your business users plan to build queries. In all these cases, the hierarchy is defined based on levels.<br /><br />One type of hierarchy not shown, but which is supported Oracle OLAP, is “Value” based hierarchies, of which the typical Employee/HR table is the most common example. This type of hierarchy contains no levels and is dealt with as a pure parent-child relationship. In this case the level names are converted into attributes to help business users define the queries.<br /><br />Across all these types of hierarchies there are some simple rules that need to be followed. It is recommended you create at least one top level on each of your hierarchies. Although some types of dimensions, such as time, will require multiple top levels such as Years.<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyzFDubpCR81kWNVOV7XmPY4egzIVVF5MYYbCrDwQdqrLy9vSd7NtZnig7D9TPgTAju5weEolXl8MrK_s-nYevBVfIPi_sXodrAGQgS1SUoLJJSWVWR3-WTNYFaYIzCg_Fitzr3RdVhsA/s1600-h/Image2.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyzFDubpCR81kWNVOV7XmPY4egzIVVF5MYYbCrDwQdqrLy9vSd7NtZnig7D9TPgTAju5weEolXl8MrK_s-nYevBVfIPi_sXodrAGQgS1SUoLJJSWVWR3-WTNYFaYIzCg_Fitzr3RdVhsA/s400/Image2.JPG" alt="" id="BLOGGER_PHOTO_ID_5151294589635505458" border="0" /></a><br />What you cannot do is have a child owned by multiple parents within the same hierarchy as shown below. In this case, you would need to create two separate hierarchies to manage the relationships separately.<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDppDVbxSzD6d8cM8XdGCiaFEM2t_kQXsxAuE6lNpgmWukkm-vuPOKpHuuEKT2aL4AyLmw1v9Oz5lLfF8ByrK71xk9avgtCgNN_8vBfOdbyUbYY-kYqS3eliVWi8Y9OjRZ1Dj9NxoPWXQ/s1600-h/Image3.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDppDVbxSzD6d8cM8XdGCiaFEM2t_kQXsxAuE6lNpgmWukkm-vuPOKpHuuEKT2aL4AyLmw1v9Oz5lLfF8ByrK71xk9avgtCgNN_8vBfOdbyUbYY-kYqS3eliVWi8Y9OjRZ1Dj9NxoPWXQ/s400/Image3.JPG" alt="" id="BLOGGER_PHOTO_ID_5151294761434197314" border="0" /></a><br />The interesting part here, is the basic design of the dimension and its related levels, hierarchies and attributes is largely consistent across all these different types of structures. The only real different is between level and value-based relationships where value-based dimensions do not contain levels. Fortunately, the dimension loading routines manage these types of dimension structures transparently.<br /><br />The next step, having defined our dimensions and their associated hierarchies, is to map the source data to the actual dimension itself. To help with this process, and to accommodate some of these more complex relationships, the AWM Mapping Editor allows for three types of source data:<br /><ul><li>Star format source table</li><li>Snowflake collection of source tables</li><li>Other</li></ul>Which just allows you to use just about any type of relational schema design as a source in the mapping editor.<br /><br /><span style="font-weight: bold;font-size:180%;" ><span style="font-size:130%;">The Mapping Editor</span><br /></span><br />The mapping editor is laid is comprised of four main areas:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPnHCy_sQJGzU7AEQ8r3s0Fe7K1dQB20rU5IsOciq4wYfeKJq2BTGQ549EPL6RP8Z6cfzU3U0C30QMP_hyphenhyphen7xjmz0rZYxvCwtQfVxAbCw401sU6PAOBTcviVOpNQJ4wCPwznnn2QZK_hyphenhyphenc/s1600-h/image11.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPnHCy_sQJGzU7AEQ8r3s0Fe7K1dQB20rU5IsOciq4wYfeKJq2BTGQ549EPL6RP8Z6cfzU3U0C30QMP_hyphenhyphen7xjmz0rZYxvCwtQfVxAbCw401sU6PAOBTcviVOpNQJ4wCPwznnn2QZK_hyphenhyphenc/s400/image11.JPG" alt="" id="BLOGGER_PHOTO_ID_5155257023383580130" border="0" /></a><br /><br /><ul><li><span style="color: rgb(255, 0, 0); font-weight: bold;">1</span> – The mapping editor is launched from the main navigator. There is a mapping editor for each dimension and each cube.</li><li><span style="font-weight: bold; color: rgb(255, 0, 0);">2</span> – Schema List: lists the available tables, views and synonyms where the owner of the AW has been granted SELECT privilege.</li><li><span style="font-weight: bold; color: rgb(255, 0, 0);">3 </span>– The mapping Canvas: dragging tables views and.or synonym on to the mapping canvas makes it available for use within a mapping.</li><li><span style="color: rgb(255, 0, 0); font-weight: bold;">4</span> – Mapping Control: Controls the type of layout, which includes:</li><ul><li>Star schema</li></ul><ul><li>Snowflake schema</li></ul><ul><li>Other</li></ul></ul><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgJKWEjCnE6bW9B95BIfbyBE2Xq5TbEpTjJ1fULROKfz0mS9TyEnfgToNrPBS4hG97duZHw24AJyIIBkA8TepzT0O2niA0GmpsmyTjgveqW8SeiMh51yeW000MRpEpeJpsdijEe47zcck/s1600-h/image10.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgJKWEjCnE6bW9B95BIfbyBE2Xq5TbEpTjJ1fULROKfz0mS9TyEnfgToNrPBS4hG97duZHw24AJyIIBkA8TepzT0O2niA0GmpsmyTjgveqW8SeiMh51yeW000MRpEpeJpsdijEe47zcck/s400/image10.JPG" alt="" id="BLOGGER_PHOTO_ID_5155256933189266898" border="0" /></a><br /><br /><br /><br />In the following sections we will look at how to use the mapping editor to manage different schema layouts to model different types of dimensions and hierarchies.<br /><br /><span style="font-size:130%;"><span style="font-weight: bold;">Types of Dimension Source Tables/Views</span><br /></span>Firstly, a quick best practice tip. Personally, I always find it useful to map to views rather than directly to tables. This provides more control over the data passed into the data loader (which can be useful for testing), especially when trying to perform incremental updates from a fact table. But we will look at this in more detail when reviewing processes for designing and building cubes.<br /><br /><span style="font-weight: bold;">Star</span><br />A star schema provides one table or view with columns containing member id's representing all levels of a hierarchy for each dimension. Each row in the table specifies a branch in the hierarchy. Additional columns identify additional attributes for each level, such as long and short descriptions. In the case of a time dimension, additional attributes will be required to provide information on end date and time span for each level.<br /><br />Where a hierarchy is unbalanced and contains skip-levels, or is ragged, or is a combination of both, some rows may contain blank entries in specific columns.<br /><br />OLAP dimension member ids must be unique within a level, which is normal in relational models, but they may also need to be unique across levels as well. In fact most people forget or try to ignore this requirement and often hit problems later when loading data into their cubes. OLAP stores dimension members as a single continuous list of ids. If your source keys are not unique across levels then you must take the option of generating surrogate keys as stated in the previous workshop.<br /><br />Enabling the surrogate key option appends the level name to the member id, which should then guarantee uniqueness. However, this is only possible with value-based hierarchies. If your dimension requires a value based hierarchy you must use natural keys.<br /><br />In summary:<br /><ul><li>Natural keys:</li><ul><li>Created in the AW as is from the source table or view (except numeric, dates become text).</li></ul><ul><li>If source table had months 1, 2, 3 then the AW dimension values would be '1', '2', '3'.</li></ul><li>Surrogate keys:</li><ul><li>The level name is prefixed to the source table or view id value.</li><li>If source table had months 1, 2, 3 then the AW dimension values would be 'MONTH_1', 'MONTH_2', 'MONTH_3'</li></ul></ul><span style="font-weight: bold;">Mapping a Star Based Schema</span><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWsbejMpQbORLUEUX1bUwtsD8OpUaHa-DrKniumbX2_KrwZaoA3zqWMFj6BNUWaI_QEL3OJRB1ZxKJnJFnAIUJdjgMWUjGDvNVvUdZa9tUp8lTAfO6n0bXt4OS_EvFc6gVvLp9FD6HQzM/s1600-h/Image4.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWsbejMpQbORLUEUX1bUwtsD8OpUaHa-DrKniumbX2_KrwZaoA3zqWMFj6BNUWaI_QEL3OJRB1ZxKJnJFnAIUJdjgMWUjGDvNVvUdZa9tUp8lTAfO6n0bXt4OS_EvFc6gVvLp9FD6HQzM/s400/Image4.JPG" alt="" id="BLOGGER_PHOTO_ID_5151295616132689234" border="0" /></a><br />The steps for using a star schema are:<br /><ul><li>Use natural or surrogate keys allowed</li><ul><li>Must use surrogate keys if dimension values are not unique across levels.</li></ul><li>Define levels and a level-based hierarchy.</li><li>In the mapping editor choose Star Schema as the Type of Dimension Table(s).</li></ul><span style="font-weight: bold;">Dimension Objects used in the Mapping</span><br />The Mapping Editor allows mapping from the source table to the member and attributes at each level. Each attribute is shown as a separate entry in the dimension object in the editor. The editor will not allow mappings from more than one column to each element, although AWM 11g removes the restriction by allowing simple transformations to be performed during the data loading process.<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZaFWYRV0OctbTTTzyo_yB0dUup3EBYzZ7Qnc6tIkrjl8Dg9dixUaswIa7CmRcTYfI210CRTWsBUWPUl-c2J5OuMJn-XbM0ofuLFGHSgxemPKOL4-WY69-BK4YaJWIZLtQEkwHBqlK9eo/s1600-h/Image6.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZaFWYRV0OctbTTTzyo_yB0dUup3EBYzZ7Qnc6tIkrjl8Dg9dixUaswIa7CmRcTYfI210CRTWsBUWPUl-c2J5OuMJn-XbM0ofuLFGHSgxemPKOL4-WY69-BK4YaJWIZLtQEkwHBqlK9eo/s400/Image6.JPG" alt="" id="BLOGGER_PHOTO_ID_5151296002679745890" border="0" /></a>Here is an example of a completed mapping for the Product dimension. Note the long and short description attributes share the same source (so it is possible to map a source column to multiple target attributes).<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkBODXQef2Ej6pI9a1ozT5A82PKy4LXVtVPizIqyqTnsgTw-ZOKmBnYJBkhZF8GZWuor3GkEjmIZRsrM1hiROybhZL2B3MDciVpuzDvmjVPLw4-pc2tzLRWMl63jJdrq24HN_DcUg7BkY/s1600-h/Image5.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkBODXQef2Ej6pI9a1ozT5A82PKy4LXVtVPizIqyqTnsgTw-ZOKmBnYJBkhZF8GZWuor3GkEjmIZRsrM1hiROybhZL2B3MDciVpuzDvmjVPLw4-pc2tzLRWMl63jJdrq24HN_DcUg7BkY/s400/Image5.JPG" alt="" id="BLOGGER_PHOTO_ID_5151296097169026418" border="0" /></a><br />Some query tools will differentiate between long and short descriptions. For example both Discoverer and the OLAP Spreadsheet Addin for Excel will use short descriptions for dimensions used as column headers and long descriptions when the dimension is used in the page or row edge.<br /><br />If you do not provide a long and./or short description the data loader will default to using the dimension key to populate these attributes.<br /><br /><span class="Apple-style-span" style="font-weight: bold;">Snowflake</span><br />A snowflake schema provides separate tables or views for each levels of a hierarchy. Each row in the table specifies a level in the hierarchy with an additional column to link to each parent across the various hierarchies. The same basic requirements apply as for star schemas in terms of uniqueness.<div><br /><span style="font-weight: bold;">Mapping a Snowflake Based Schema<br /><br /></span><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhepSxp_jDCqWWZj1aT40G1fqvmAZmYNEwGYEPf6xXaMCPCifs6biXJ1ojcLQYxgTn6FCiVr1rGee3byHQ1lqn9VAje8qYVHfFC8AFVyGuQQy0K-2da4z7dsq5vGDaLIIukV-pmd-d2u94/s1600-h/Image7.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhepSxp_jDCqWWZj1aT40G1fqvmAZmYNEwGYEPf6xXaMCPCifs6biXJ1ojcLQYxgTn6FCiVr1rGee3byHQ1lqn9VAje8qYVHfFC8AFVyGuQQy0K-2da4z7dsq5vGDaLIIukV-pmd-d2u94/s400/Image7.JPG" alt="" id="BLOGGER_PHOTO_ID_5151296810133597570" border="0" /></a><br />The steps for using a snowflake schema are:<br /><ul><li>Natural or surrogate keys allowed</li><ul><li>Must use surrogate keys if dim values are not unique across levels.</li></ul><li>Define levels and a level-based hierarchy.</li><li>Choose Snowflake schema as the Type of Dimension Table(s).</li></ul><br /><span style="font-weight: bold;">Dimension Objects used in the Mapping</span><br />The mapping editor has to be switched to “Snowflake” mode using the pulldown selection dialog at the top of the editor. The mapping canvas will then change to allow you to map each member, its parent and associated attributes at each level.</div><div><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXHBiu3mNQocNTzLoJi0cMYRszYdFE7VzW0T-y0IyTBpTDwJjlAVt3ZyAJXjYpqwEsbI4JqalgCRj3IECsb4TBV-WlJLZnoSj06cGSpGALFEmNcc755CDccRw3sK8fSV8OydLzVXzKW18/s1600-h/Image9.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXHBiu3mNQocNTzLoJi0cMYRszYdFE7VzW0T-y0IyTBpTDwJjlAVt3ZyAJXjYpqwEsbI4JqalgCRj3IECsb4TBV-WlJLZnoSj06cGSpGALFEmNcc755CDccRw3sK8fSV8OydLzVXzKW18/s400/Image9.JPG" alt="" id="BLOGGER_PHOTO_ID_5151297308349803922" border="0" /></a><br />As with the Star schema mapping process, the snowflake mapping editor will not allow mappings from more than one column to each element i.e., map from a single source table or view per level. Here is a completed snowflake mapping:<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhm6MM61L2ZEbWE2Vj-dwTnEXx0rpoWRBPgoJeJ8FE_n-mQIQ5zRLiVrb1gNyJZ3eXlnNLtzC-j10ZMkzekqXspfxS4QnsqCGn9DQ3amy8S5dPAF20BD9k2s8a_Ks9yR0HlWgDnL4u2nnQ/s1600-h/Image8.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhm6MM61L2ZEbWE2Vj-dwTnEXx0rpoWRBPgoJeJ8FE_n-mQIQ5zRLiVrb1gNyJZ3eXlnNLtzC-j10ZMkzekqXspfxS4QnsqCGn9DQ3amy8S5dPAF20BD9k2s8a_Ks9yR0HlWgDnL4u2nnQ/s400/Image8.JPG" alt="" id="BLOGGER_PHOTO_ID_5151297493033397666" border="0" /></a><br /><br /><span class="Apple-style-span" style="font-weight: bold;">Collection of Tables</span><br />The basic snowflake schema can be taken a stage further by moving the various attributes, such as descriptions etc, to separate tables. This follows a more 3NF approach to data storage and although it looks more complicated it can easily be managed within AWM's mapping editor.<br /><br /><br /><span style="font-weight: bold;">Mapping a Collection Based Schema</span><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMYUVoMzKa5GaU_lpe_tzCVMRti0ia3QN2aP3_KG7ldL2lQzJ_3aodEPSQqF8Wlu3bcMuX0HOFcnIiZjqCyFUtEdaGqPCaoYtnk5rdzJHFu1IR-lyKgFi7CNMjnwZjceJIrbc58CJHuas/s1600-h/image12.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMYUVoMzKa5GaU_lpe_tzCVMRti0ia3QN2aP3_KG7ldL2lQzJ_3aodEPSQqF8Wlu3bcMuX0HOFcnIiZjqCyFUtEdaGqPCaoYtnk5rdzJHFu1IR-lyKgFi7CNMjnwZjceJIrbc58CJHuas/s400/image12.JPG" alt="" id="BLOGGER_PHOTO_ID_5155280319286193650" border="0" /></a><br /><br />In this format natural or surrogate keys can still be used within the dimension. To map a collection of tables as described above the mapping editor needs to be switched to “Other” mode.<br /><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgs65aiKIBLF509V4LfYQQdsLT8JzHSmW01qmbdAQekYrTm4CyVWnfx1Rtm0pzrOS5Ej-iK-91KhS9VPzrSbxIZuSRWjIS9qmnqRIeT-cPIv2NY3bTGvdaZU7r-Afa_Ar8BTVebAR7rzIg/s1600-h/image13.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgs65aiKIBLF509V4LfYQQdsLT8JzHSmW01qmbdAQekYrTm4CyVWnfx1Rtm0pzrOS5Ej-iK-91KhS9VPzrSbxIZuSRWjIS9qmnqRIeT-cPIv2NY3bTGvdaZU7r-Afa_Ar8BTVebAR7rzIg/s400/image13.JPG" alt="" id="BLOGGER_PHOTO_ID_5155280409480506882" border="0" /></a><br /><br /><br />When mapping the tables to the dimension, the normal rules still apply. The Mapping Editor only allows mapping to member, parent for dim values and member, value for attributes at each level. It will not allow mappings from more than one column to each element, but you can map from an arbitrary set of source tables and/or views, which have member and value columns.<br /><br /><br /><br /><br /><span style="font-weight: bold;">Value Based (Parent Child)</span><br />This is probably the most simple type of relationship to manage from a mapping perspective. Likely sources for this type of mapping are other AWs, where the source data is from an OLAP enabled SQL view, or another multi-dimensional engine.<br /><br />The source for this type of relationship is normally a two-column table that provides the key and the parent for each child. Other columns are used to provide additional attributes.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgk4LV3emDvLcv9qQww1o2qydik9j-QMh3RhJneIdIGH2bDCsEC308LWeDI84ZI8RGq0v-pPMzd4d1sXN9ajhRZnCWubG8roF_AMbOZ5k0cEJzy4X2qkw9u-DeTs5-nDe_cg_1l9qGI4_U/s1600-h/image14.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgk4LV3emDvLcv9qQww1o2qydik9j-QMh3RhJneIdIGH2bDCsEC308LWeDI84ZI8RGq0v-pPMzd4d1sXN9ajhRZnCWubG8roF_AMbOZ5k0cEJzy4X2qkw9u-DeTs5-nDe_cg_1l9qGI4_U/s400/image14.JPG" alt="" id="BLOGGER_PHOTO_ID_5155280491084885522" border="0" /></a><br /><br />In this case, natural keys must be used to define the dimension, since there are no level identifiers that can be used to construct the surrogate key. In this scenario it is possible to use any of the mapping editor options (star, snowflake, or other) to construct the mapping.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPSedTicDKYT1Aws3_goOyt5obblIvJulDaVWTk-rGb3Y6oIQhWQYXogIsCjNdooi1ox90oizGVZ4jPs02iLrLyFSZaehJJn5yTy8K7IS21Eca7wwOdJJ9hg_DnJt2BRXhN4GMJS0lHR4/s1600-h/image15.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPSedTicDKYT1Aws3_goOyt5obblIvJulDaVWTk-rGb3Y6oIQhWQYXogIsCjNdooi1ox90oizGVZ4jPs02iLrLyFSZaehJJn5yTy8K7IS21Eca7wwOdJJ9hg_DnJt2BRXhN4GMJS0lHR4/s400/image15.JPG" alt="" id="BLOGGER_PHOTO_ID_5155280551214427682" border="0" /></a><br /><br />Things to remember when designing a parent-child/value based hierarchy. Firstly, there are no levels, therefore, certain calculations, such as share, are not possible. A parent-child hierarchy cannot be used in the partition statement of a cube because there is no level identifier to act as the partition key.<br /><br />However, it is possible to provide a pseudo level identified by creating a level attribute. This allows users to create selections using the attribute in the normal way. In some cases, a value based hierarchy may be the only way to manage an unbalanced hierarchy, where not all branches have the same number of dimension members).<br /><br /><span style="font-weight: bold;">Flat List</span><br />Another version of the parent-child/value based hierarchy is the flat-list dimension. In this scenario, the dimension has no hierarchies and is simply a flat list of dimension members. Personally, I would not recommend building this type of dimension simply because there is no top level. This makes it difficult for business users to pivot the dimension out of the query since they have to pin the dimension to a specific member when it is hidden. This can make the query process more complicated for business users to understand.<br /><br />In most cases I would suggest that a flat list hierarchy where no top level is possible is a likely candidate for migration to a series of measures within a cube. This is something you should seriously consider before creating a flat list dimension.<br /><br />The dimension itself can have a hierarchy based on a single level. This provides the flexibility to use either surrogate or natural keys. If the dimension is designed with no levels and no hierarchy then only natural keys are available.<br /><br /><br /><span style="font-weight: bold;">Skip, Ragged and Ragged-Skip Level Hiearchies</span><br />Ragged is a special form of skip. The diagram below shows the various scenarios that can be found in many dimensions. It is highly likely that at least one dimension in a data model will have one or all of these scenarios.<br /><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmaYlM6XIjABRpviX_79JvJV7eKg0oSVCcsUE-ztKPOakVB60lDHc7KUIfBFC_QSt7cbC_EzUCCPBKzABlSZGj5nZy8gvIIUt7H-9fWurgIJ9ydsc8o05tN8CPcU7iwyR2BuujhTON8cA/s1600-h/image16.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmaYlM6XIjABRpviX_79JvJV7eKg0oSVCcsUE-ztKPOakVB60lDHc7KUIfBFC_QSt7cbC_EzUCCPBKzABlSZGj5nZy8gvIIUt7H-9fWurgIJ9ydsc8o05tN8CPcU7iwyR2BuujhTON8cA/s400/image16.JPG" alt="" id="BLOGGER_PHOTO_ID_5155284347965517362" border="0" /></a><br />The question is how can such a structure be represented within a relational table?<br /><br />Skip<br />Using an across format structure, where a skip level occurs one or more columns are left blank within a specific row. However, within a skip level there is a common leaf node that denotes the lowest level of the hierarchy. From the leaf node to the top level, certain columns that relate to parents of the leaf node are left blank. As shown below (in this case the ID columns are not shown but follow the same pattern)<br /><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjexuEwFzUvGms9l10wKeAoLcwOH8mC3WN_VbFcnwO3IqWdLA8D4aZsQ0xzn58mwjMA6jG3b1CZG2DnxYZ9jEBdUh5KVIptti53DSAQ-lObemB-m3NADcbTcK38Qwa5Kvp7RnOepIL-i28/s1600-h/image17.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjexuEwFzUvGms9l10wKeAoLcwOH8mC3WN_VbFcnwO3IqWdLA8D4aZsQ0xzn58mwjMA6jG3b1CZG2DnxYZ9jEBdUh5KVIptti53DSAQ-lObemB-m3NADcbTcK38Qwa5Kvp7RnOepIL-i28/s400/image17.JPG" alt="" id="BLOGGER_PHOTO_ID_5155284648613228098" border="0" /></a><br />This type of layout is difficult, if not possible, for most SQL based query tools to manage. However, recent additions to the SQL language has allowed skip-level hierarchies to be partially managed using normal query methods. However, it is only possible to skip one level within a single hierarchy. Fortunately, OLAP does not enforce this constraint.<br /><br />To map this type of hierarchy use a normal star schema approach. The OLAP engine will manage the complexity of the relationships for you.<br /><br />Ragged<br />For a ragged hierarchy, the leaf node will occur at any or all-intervening levels within a hierarchy. Again null values will appear in certain columns within each row.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzJ5eTP_DZnbd9IMP0KYyy8I4Ms25RkUMMfcjpCbof2w91ezwLMfqNc0UK1lAXyNSIxw65rY7kkWiPcw0Obgkl0iBTff4wz3PxAjc6TK4g12ImyrJj1UR16DMpT7D-K1gypedVmHWLnWQ/s1600-h/image18.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzJ5eTP_DZnbd9IMP0KYyy8I4Ms25RkUMMfcjpCbof2w91ezwLMfqNc0UK1lAXyNSIxw65rY7kkWiPcw0Obgkl0iBTff4wz3PxAjc6TK4g12ImyrJj1UR16DMpT7D-K1gypedVmHWLnWQ/s400/image18.JPG" alt="" id="BLOGGER_PHOTO_ID_5155284863361592914" border="0" /></a><br /><br />When defining a ragged hierarchy within a dimension wse natural keys and create a level-based hierarchy(ies). Within the dimension-mapping editor map the source table as a star. But for the cube mapping the fact table requires a little more work. It is necessary to map the key for the ragged dimension to all levels in the dimension, which have leaf values (or, to be safe, map to all levels). This is shown below<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuhLTFCwjeCeRlF2c6jS1ziuSTa1khXR6B8WhGugJf0LlexUGssmej545FAb0qt7WdBBDPpAmxlj7xLtRjL4XIeX3IXHj2jTGcP3gEfV2w6HkN5Q0FgA5JsS6koyZL518cmVOG_Scakm0/s1600-h/image19.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuhLTFCwjeCeRlF2c6jS1ziuSTa1khXR6B8WhGugJf0LlexUGssmej545FAb0qt7WdBBDPpAmxlj7xLtRjL4XIeX3IXHj2jTGcP3gEfV2w6HkN5Q0FgA5JsS6koyZL518cmVOG_Scakm0/s400/image19.JPG" alt="" id="BLOGGER_PHOTO_ID_5155289347307449970" border="0" /></a><br /><br /><br />Ragged Skip Level<br />In this scenario, looking at the image at the start of this sectio, we can see the leaves are not always at lowest level; there are some intervening nulls However, this simply a combination of the two types of hierarchies we have already reviewed. The source table would look something like this:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi422m8dlHFBfA7C3SUwq_oaBOgUgwBnndVVt9ormFYrCHbKHYXbKZ7ReA0NoNZVClXzB8uzDcOuRt7Ua1x7br35XPC5pFm4ivw_vOH9LXVbMNEbyd3BoMzNa3p0F1DJvjaAMoD-_xP12c/s1600-h/image20.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi422m8dlHFBfA7C3SUwq_oaBOgUgwBnndVVt9ormFYrCHbKHYXbKZ7ReA0NoNZVClXzB8uzDcOuRt7Ua1x7br35XPC5pFm4ivw_vOH9LXVbMNEbyd3BoMzNa3p0F1DJvjaAMoD-_xP12c/s400/image20.JPG" alt="" id="BLOGGER_PHOTO_ID_5155289828343787154" border="0" /></a><br /><br />In this scenario the same rules apply as before:<br /><ul><li>Use natural keys, level-based hierarchy(ies).</li><li>Map as a star.</li><li>When map the fact table, map its key to all levels in the dimension which have leaf values. </li></ul><br />In the next posting in this series we will consider how to design and create cubes.<br /><a href="javascript:void(0)" tabindex="10" onclick="return false;"><span></span></a><br /><br /><br /></div>Keith Lakerhttp://www.blogger.com/profile/01039869313455611230noreply@blogger.com1tag:blogger.com,1999:blog-3820031471524503731.post-85949100199357763542007-12-31T08:35:00.000-08:002008-12-11T15:25:54.382-08:00OLAP Workshop 3 : Building an Analytic WorkspaceIn this lesson, we look at how to use the Analytic Workspace Manager 10g (AWM 10g) tool in conjunction with 10g OLAP to build multidimensional database objects. We will use AWM to perform the following tasks:<br /><ul><li>Create an analytic workspace</li><li>Define dimensions</li><li>Define cubes</li><li>Load data from source relational tables</li><li>View data</li></ul>Throughout this post I have tried to add observations and best practices I have picked up while working with various customers across the US and EMEA. As a result I am going to split this posting into possibly three postings:<br /><ul><li>Create an analytic workspace and defining dimensions</li><li>Modelling and mapping different types of dimensions</li><li>Define cubes and load data from source relational tables</li></ul>So what is the difference between AWM and OWB? AWM should be considered an “EL” tool, it does not contain transformation tools (in AWM 11g simple transformations are possible), for building analytic workspaces. .The target audience for AWM is business users and also developers already using another ETL tools that does not provide support for OLAP data modelling.<br /><br />For this workshop we are going to focus on using AWM. For more information on using OWB to build OLAP data models see the links posted in Workshop 2.<br /><br /><span style="font-size:130%;"><span style="font-weight: bold;">Building Blocks of the Multi-dimensional Model<br /></span></span><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcedAjVZTYtqhacGps231gWcWbwuaHz82dZhVs8QE09aK6Z8sCNPzosH_PLUSYHcKTvPU6kP72Gi2K351eXY3I5o7O9lzXohKWYPLqNY-xfUwYaEdhG1_0iV-YWrAxmvKvoqDP1cESuac/s1600-h/image1.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcedAjVZTYtqhacGps231gWcWbwuaHz82dZhVs8QE09aK6Z8sCNPzosH_PLUSYHcKTvPU6kP72Gi2K351eXY3I5o7O9lzXohKWYPLqNY-xfUwYaEdhG1_0iV-YWrAxmvKvoqDP1cESuac/s400/image1.JPG" alt="" id="BLOGGER_PHOTO_ID_5151283779202821138" border="0" /></a><br /><br />The first step is design the logical data model, including the dimensions and measures that are needed in the AW. Obviously Warehouse Builder provides the perfect environment for creating a logical data model, and there are some presentations that cover this on the OWB OTN Home.<br /><br />However, if you prefer a more to use a pure data modelling tool then I would recommend looking at CWD4ALL from one of our partners, <a href="http://www.cwd4all.com/">IKAN</a>. To quote directly from their website:<br /><br /><span style="font-style: italic;">"CWD4ALL is a database & OLAP modeling and design tool, fully conformant to the OMG CWM™ specifications. Its advanced modeling and design capabilities provide the means to align your modeling activities with this new worldwide standard. CWD4ALL provides both forward and reverse engineering functionalities. Reverse engineering constructs a graphical model from your existing DB/2, UDB, Oracle and SQL Server 2000/2005 database or schema, which on their part can be forward engineered to an Oracle relational model and the corresponding DDL or Oracle Analytical Workspaces.</span><br /><br /><span style="font-style: italic;">Multi-dimensional modelling and OLAP</span><br /><span style="font-style: italic;">The multi-dimensional model is integrated with the CWD4ALL data models, which stay on top them and use metadata from the logical model and therefore can be mapped to different implementations of relational models. Thus schema and naming independence for used tables and columns is provided, allowing a high flexibility during deployment of the model. Detailed and compact multi-dimensional diagrams provide an easy way to define dependencies in the multi-dimensional model even going beyond possibilities of traditional Star and Snowflake schemas. The multi-dimensional model provides support for OLAP & Oracle Analytical Workspaces. For relational data warehousing you will be able to deploy definitions of levels, dimensions and hierarchies to the Oracle dictionary, thus building a basis for the query rewrite option of the Oracle database. Moreover it will assist in building materialized view definition and defining bitmap join indexes. For Oracle OLAP data warehouse, CWD4ALL will deploy the multi-dimensional model to Oracle 10g Analytical Workspaces and assist in defining the SQL path to calculations in Oracle Analytical Workspaces through view definitions based on OLAP-TABLE functionality. In addition to designing and maintaining correct database relational model behaviour, CWD4ALL allows the designer to examine and specify actual application behaviour so that space management, undo datasets and the full range of implementation-specific parameters can be modeled and defined appropriately.</span><br /><br />For more information on CWD4ALL click <a href="http://www.cwd4all.com/index.asp?pageID=63&parMen=56&siteID=3">here</a> to go to the website.<br /><br />Obviously AWM can also help you design your logical data model but there is one important difference between AWM and OWB/CWD4ALL. AWM is best described as “design time at run time” which means as you create dimensions, cubes etc using AWM the object is created immediately in the analytic workspace, i.e. there is no deployment phase. Which from a business user perspective makes this an ideal product as it simplifies the whole process.<br /><br />In this workshop we will create the following model based on the sales history schema (SH)<br /><br />Dimensions<br /><ul><li>Time: Shows how data varies over time </li><li>Product: Shows how data varies by product</li><li>Geography: Shows how data varies by geography</li><li>Channel: Shows how data varies according to each distribution channel</li></ul><br />Stored Measures<br /><ul><li>Sales </li><li>Costs</li><li>Quantity</li></ul><span style="font-weight: bold;">Examining the Logical Model: </span><br />Dimensions<br />After you have identified dimensions, you can identify the levels of summarization within each dimension. Analysis requirements reveal that:<br /><ul><li>Channel dimension has three levels: Total, Class, and Channel</li><li>Geography dimension has four levels: Total, Region, Subregion, and Country</li><li>Product dimension has four levels: Total, Category, Subcategory, and Product.</li><li>Time dimension has three levels: Year, Quarter, and Month.</li></ul>Note with OLAP dimensions and additional top level is always added to allow business users to fully analyse. In Excel terms this provides the “All” level, or in relational terms allows the dimension to be pivoted out of the query.<br /><br />Cubes<br />Cubes provide a convenient way of collecting similar measures of the same dimensionality. It is not uncommon for many measures to have the same shape, and so by defining their shape (and other shared characteristics) for a cube, you can save time when building your AW. Multidimensional cubes are stored in AWs. A particular AW may contain more than one cube, and each cube may describe a different dimensional shape.<br /><br />Dimensions defined the edges of a cube. Although there is no limit to the number of edges of a cube, BI tools typically organize the display along three edges: row edge, column edge, and page edge. A single dimension or multiple dimensions can be placed on each edge.<br /><br />A cube is simply a logical object that helps an administrator to build and maintain an AW. It also aids in the definition of measures with common characteristics, such as sparsity patterns and aggregation rules. Measures in the same cube have the same relationships to other logical objects and can easily be analyzed and displayed together.<br /><br />In this lesson, we will create our first cube, Sales, containing three measures. These are base measures, which store the facts collected about the business.<br />Each measure that belongs to a particular cube shares particular characteristics with other measures in the cube, such as the same dimensions. The Sales cube includes:<br /><ul><li>Dimensions: Time, Geography, Product, and Channel</li><li>Measures: sales, costs, quantity</li></ul>The data for these measures, and the dimensions that organize the measures, will be sourced from tables in the SH schema, as discussed in the next slide.<br /><br /><span style="font-size:130%;"><span style="font-weight: bold;">Getting Started</span><br /></span><span style="font-weight: bold;">Configuring your database:</span><br />This is an area that seems to cause the most problems. This is always surprising to me considering that OLAP 10g is completely integrated into the database engine. The key here is making sure you have the correct patches applied to your database kernel and database instance. You can validate your existing configuration against the OLAP certification matrix, which can be viewed from here:<br /><br /><a href="http://www.oracle.com/technology/products/bi/olap/collateral/olap_certification.html">http://www.oracle.com/technology/products/bi/olap/collateral/olap_certification.html<br /></a><br />When applying database patches please note that the majority of patches are composed of two parts. Firstly you need to use the Universal Installer to apply the kernel updates. Secondly your database instance needs to be upgraded via a series of SQL scripts. This is all documented but many people get caught out.<br /><br />In this case I am using 10.2.0.3 version of the database (Note that OLAP is available only in the Enterprise Edition of the database and is a costed option) with an additional OLAP patched described as the “OLAP A Patch” in Metalink. All this is explained in the certification matrix as stated above.<br /><br />You can quickly and easily check the status of your schema by connecting to your database instance using SQLPlus (or use SQLDeveloper) and run the following commands:<br /><span style="font-size:85%;"><br /><span style="font-family:courier new;">col comp_name format a25 heading 'Component'</span><br /><span style="font-family:courier new;">col version format a12 heading 'Version'</span><br /><span style="font-family:courier new;">col status format a10 heading 'Status'</span><br /><span style="font-family:courier new;">col modified heading 'Modified'</span><br /><br /><span style="font-family:courier new;">SELECT comp_name, version, status, modified </span><br /><span style="font-family:courier new;">FROM dba_registry </span><br /><span style="font-family:courier new;">WHERE comp_name like '%OLAP%';</span><br /><br /><span style="font-family:courier new;">Component Version Status Modified</span><br /><span style="font-family:courier new;">------------------------- ------------ ---------- --------------------</span><br /><span style="font-family:courier new;">OLAP Analytic Workspace 10.2.0.3.0 VALID 19-NOV-2006 08:13:33</span><br /><span style="font-family:courier new;">Oracle OLAP API 10.2.0.3.0 VALID 19-NOV-2006 08:13:35</span><br /><span style="font-family:courier new;">OLAP Catalog 10.2.0.3.0 VALID 19-NOV-2006 08:13:38</span><br /></span><br /><br />Setting up AWM<br />The first step is to download AWM from the OTN OLAP home page:<br /><br /><a href="http://www.oracle.com/technology/software/htdocs/devlic.html?url=http://download.oracle.com/otn/java/olap/AWM_102030A_Win32.zip">http://www.oracle.com/technology/software/htdocs/devlic.html?url=http://download.oracle.com/otn/java/olap/AWM_102030A_Win32.zip<br /></a><br />and the associated readme file that explains installation requirements is here:<br /><br /><a href="http://www.oracle.com/technology/products/bi/olap/awm102030A_readme.html">http://www.oracle.com/technology/products/bi/olap/awm102030A_readme.html<br /></a><br />After installing AWM you can run the awm.exe file located in the ..awm/bin directory or click on the desktop icon.<br /><span style="" lang="EN-GB"></span><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZHife1c-vGt3cco8QLDIvxMDz_CD0Zi96nRht45ngWkQU52aDVLmllQJh2UZX0K3zvnN9EuDUavh3tCLXy2wAAAS9TxokioRjFbWakP9xZ0Om9s8LVymEpATVpSiyLtrTF9fS0Xzzf3A/s1600-h/image2.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZHife1c-vGt3cco8QLDIvxMDz_CD0Zi96nRht45ngWkQU52aDVLmllQJh2UZX0K3zvnN9EuDUavh3tCLXy2wAAAS9TxokioRjFbWakP9xZ0Om9s8LVymEpATVpSiyLtrTF9fS0Xzzf3A/s400/image2.JPG" alt="" id="BLOGGER_PHOTO_ID_5151285806427384866" border="0" /></a><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVaqG9fx5L_Zl5vEspLZw2CPjJKPsPxvBM4A-yBo2fcPV5IoUI3fj0SX9ICFGPNnYgUi51jX1_mhyphenhyphenm_8RjTIuFLS-LF7mVmLrn_lPcObB4vdDGW-opX90U3-wjs0cxRNhQwEB38pNiCeQ/s1600-h/image3.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVaqG9fx5L_Zl5vEspLZw2CPjJKPsPxvBM4A-yBo2fcPV5IoUI3fj0SX9ICFGPNnYgUi51jX1_mhyphenhyphenm_8RjTIuFLS-LF7mVmLrn_lPcObB4vdDGW-opX90U3-wjs0cxRNhQwEB38pNiCeQ/s400/image3.JPG" alt="" id="BLOGGER_PHOTO_ID_5151285930981436466" border="0" /></a><br /><br /><span style="font-weight: bold;">Making a connection to your database instance</span><br />The first step is to create a new user to own our analytic workspace. For this example we will create a user called SH_OLAP and this user will need to have a special role assigned to it to allow the user to create and manage analytic workspaces. This role is OLAP_USER. Some people are often tempted to use a different role, OLAP_DBA. This is similar to providing a normal user with the DBA privileges. Do not be tempted to use this role as provides a lot of additional privileges that can in some cases cause lots of problems during use. This role should only be assigned to the user OLAPSYS.<br /><br /><span style="font-size:85%;"><span style="font-family:courier new;">CREATE USER "SH_OLAP" PROFILE "DEFAULT" </span><br /><span style="font-family:courier new;"> IDENTIFIED BY "SH_OLAP" DEFAULT TABLESPACE "SH_OLAP" </span><br /><span style="font-family:courier new;"> TEMPORARY TABLESPACE "SH_OLAP_TEMP" </span><br /><span style="font-family:courier new;"> ACCOUNT UNLOCK;</span><br /><span style="font-family:courier new;">GRANT "CONNECT" TO "SH_OLAP";</span><br /><span style="font-family:courier new;">GRANT "OLAP_USER" TO "SH_OLAP";</span><br /></span><br />This user will need SELECT privileges on the source tables that will be used to populate the dimensions and the cubes.<br /><br />As a best practice I will normally assign my OLAP user to its own tablespace and create a temp tablespace specifically for that user as well. The reasons for this will become evident later when we look at what happens during the loading of data into a dimension and/or a cube. Make sure this new user has sufficient quota on both these tablespaces.<br /><br />When you start AWM for the first time you will need to define a new connection to your database instance.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJl373b9pL1-vypvgXuxzWZaCei1R6Z_dBAiQorm7IjTjWHYs-5KGpBcSAl_WsE7Mxn-2P4URS0_jNy4_Q4hroIHNx9wd6mW3HGK5SnylmQwbtKZcocXoLbdMGxl16rcX2LoL0gN1kxMk/s1600-h/image5.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJl373b9pL1-vypvgXuxzWZaCei1R6Z_dBAiQorm7IjTjWHYs-5KGpBcSAl_WsE7Mxn-2P4URS0_jNy4_Q4hroIHNx9wd6mW3HGK5SnylmQwbtKZcocXoLbdMGxl16rcX2LoL0gN1kxMk/s400/image5.JPG" alt="" id="BLOGGER_PHOTO_ID_5151286519391956034" border="0" /></a><br />This step can cause problems and a number of people have posted questions on the OLAP forum regarding connecting to a database instance. Using a TNSNames alias as the connection string causes the majority of problems. You can only use a TNS alias if you also install the SQL net layer from the database client CD. This is not provided as part of the AWM installation so needs to be added as part of a separate process.<br /><br />Personally I always a JDBC connection as this does require any additional software to be installed. The syntax for a jdbc connection is :<br /><br /><span style="font-size:85%;"><span style="font-family:courier new;">Hostname:port:sid</span><br /></span><br />An example would be something like this:<br /><br /><span style="font-size:85%;"><span style="font-family:courier new;">klaker-uk.uk.oracle.com:1521:beans</span></span><br /><br />Alternatively you can use localhost or 127.0.0.1 to identify the host:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwtwCIKzt6PiOCcxvj8YPgJzzsiDI8v8wIEWvWHpa2Q9H1JsG5nlPhhzJuoVCRa8pKqFCk3b0bqYuI4GQMZmImf1S8COkbifO7jSCA-EvsDCA3L3F-C7tI0zpU-VKDhh5DjqTy2vIPbK0/s1600-h/image4.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwtwCIKzt6PiOCcxvj8YPgJzzsiDI8v8wIEWvWHpa2Q9H1JsG5nlPhhzJuoVCRa8pKqFCk3b0bqYuI4GQMZmImf1S8COkbifO7jSCA-EvsDCA3L3F-C7tI0zpU-VKDhh5DjqTy2vIPbK0/s400/image4.JPG" alt="" id="BLOGGER_PHOTO_ID_5151286613881236562" border="0" /></a><br />To now connect to our database instance simply click on “+” sign next to the database name. You will notice from the picture below you can define as many connections within AWM as you need. Once the connection dialog is shown enter the username and password in the dialog box. And then click OK to start the connection process.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoaYTE8Qp2nvQJ_oDirAUBN0ljqZddpS4M-8m1dO4ro0B25Pn1DH1VrUYFJq7SgviOir56QTFbReMwfZUrForc7Dc-7O03UQju1YYUEYIkIvoo7CuadHDqD_TTuH9WwzRNVZB2X6E8xGI/s1600-h/image6.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoaYTE8Qp2nvQJ_oDirAUBN0ljqZddpS4M-8m1dO4ro0B25Pn1DH1VrUYFJq7SgviOir56QTFbReMwfZUrForc7Dc-7O03UQju1YYUEYIkIvoo7CuadHDqD_TTuH9WwzRNVZB2X6E8xGI/s400/image6.JPG" alt="" id="BLOGGER_PHOTO_ID_5151286751320190050" border="0" /></a><br /><span style="font-weight: bold;">Creating an Analytic Workspace</span><br />To create an analytic workspace, we need to perform the following steps:<br /><ol><li>Find the schema name under which you want the AW to reside, in this case our user is SH_OLAP. Expand that schema name to display the Analytic Workspaces node. </li><li>Next right-click the “Analytic Workspaces” node. This will show the “Create New Analytic Workspace” dialog box appears. </li><li>Lastly we can enter a name for our AW which in this case is SH_AW.</li></ol><br />Optionally, we can choose a tablespace where this AW is stored. By default, the default tablespace is used for the schema. This is set up by the database administrator (DBA) when the schema is created. In this case the default tablespace is SH_OLAP.<br /><br />Now we have created the AW, it appears in the navigator under the node where it is created. It is attached in read/write mode, which means that you can make changes to it.<br /><br />At this point we have two options:<br /><ul><li>Manually define our dimensions and cubes</li><li>Load a predefined model from a template</li></ul>You can create a workspace directly from a template. A template holds the definition of objects. You can use templates to create analytic workspaces, cubes, and dimensions. In this case we are going to manually define the objects within our AW.<br /><br /><a style="font-weight: bold;" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixyN0HgjScGOfu1GEP4SyhfGKpMHqHUfeWN8GXyaXIO6TagCdnEHzQxxqtqJE2Ctx2YwtxNrtWFjkQpN2qrX8PdXzLPKE0IYWTPSKPy2kYtcD959aeEiWVmjZL6yBQOXpulGjp-vNilAs/s1600-h/image7.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixyN0HgjScGOfu1GEP4SyhfGKpMHqHUfeWN8GXyaXIO6TagCdnEHzQxxqtqJE2Ctx2YwtxNrtWFjkQpN2qrX8PdXzLPKE0IYWTPSKPy2kYtcD959aeEiWVmjZL6yBQOXpulGjp-vNilAs/s400/image7.JPG" alt="" id="BLOGGER_PHOTO_ID_5151287726277766258" border="0" /></a><br /><br /><span style="font-weight: bold;">Note:</span> Once we have created the AW, a table named AW$SH_OLAP is created at the database level. (The format for the naming convention is AW$aw_name, WHERE aw_name is the name that you have chosen for your AW.) This table stores all of the multidimensional objects in your AW.<br /><br /><span style="font-weight: bold;">Does Oracle OLAP Support Multiple Languages?</span><br />Yes, an AW can support multiple languages. This enables the users of your OLAP applications and tools to view the metadata and descriptive attributes in their native languages. The number and choice of languages is restricted only by the database character set and your ability to provide translated text.<br /><br />To add support for multiple languages, perform the following steps:<br /><ul><li>In the Model View navigation tree, expand the folder for the AW. </li><li>Click the Languages folder, and select the languages for the AW on</li><li>the General tabbed page.</li><li>As you create your objects, such as dimensions, levels, hierarchies, attributes, cubes, measures, calculated measures, and measure folders, open the Translations tabbed page of the property sheet. Enter the object labels and descriptions in each language. </li><li>When you map the dimensions, map the attributes to columns for each language.</li></ul><span style="font-weight: bold;">Note</span>: In this class, a single language is used, which is American, although the image shown below has multiple languages selected.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiy73lid3rboSclpx4Uw4y_RtKxU45vFEKQmMiAbkRtgUuQsZPe0yB-4sGktBgJxHicrhEgk2QpXeapanAsDLyl1fg9IylmmlnKU74hweqoxbeUGVcEjFW5NlaVFzQMBipdhsTnlXyRrEI/s1600-h/image8.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiy73lid3rboSclpx4Uw4y_RtKxU45vFEKQmMiAbkRtgUuQsZPe0yB-4sGktBgJxHicrhEgk2QpXeapanAsDLyl1fg9IylmmlnKU74hweqoxbeUGVcEjFW5NlaVFzQMBipdhsTnlXyRrEI/s400/image8.JPG" alt="" id="BLOGGER_PHOTO_ID_5151288426357435522" border="0" /></a><br /><span style="font-weight: bold;">Creating Dimensions</span><br />Dimensions are lists of unique values that identify and categorize data. They form the edges of measures (facts). Dimensions have structure that helps in the navigation of data and the definition of calculations. This structure includes levels, hierarchies, and attributes in the logical model. You define these supporting objects, in addition to the dimension itself, in order to have a fully functional dimension.<br /><br />Dimension Type<br />AWM provides two types of dimensions:<br /><ul><li>User Dimensions</li><li>Time Dimensions</li></ul>Most dimensions that we will create during this workshop are of the type default “User Dimension”. In the example shown below, a Time dimension is created. If you explicitly set the dimension type to “Time Dimension,” AWM automatically prepares some additional time attributes. When populated, these attributes facilitate time series calculations on the measures that share this dimension. It is recommended that all your time dimensions be created with this setting.<br /><br />Again this seems to regularly come up on the forums – you will only see the time series calculations in the Calculation Builder (See the workshop on building cubes). These calculations require two additional time based attributes to be populated – Timespan and End Date. Most customers do not have these attributes in their existing relational schemas so they need to be added. Fortunately OWB will generate an OLAP compliant time dimension. If you are not using OWB then you will need to find a different way of creating these additional attributes (there was a posting on the OLAP forum where someone actually posted all the code required to create an OLAP compliant time dimension but unfortunately I cannot find the thread now, may be someone else can locate it).<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNXH6lpuaGF3bXFCqJm4tXaI_Bt_sh9OfIKm1qE6zLs_Gvt0DHF3FoKF7l5LhPWQwXf-nSbEkN6s3Nw-1u90azHIMVOi-yqi1oA3IDooJJTpuzu_dqxqWukQ0FZVHzAUT6hfbncqWUXf8/s1600-h/image9.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNXH6lpuaGF3bXFCqJm4tXaI_Bt_sh9OfIKm1qE6zLs_Gvt0DHF3FoKF7l5LhPWQwXf-nSbEkN6s3Nw-1u90azHIMVOi-yqi1oA3IDooJJTpuzu_dqxqWukQ0FZVHzAUT6hfbncqWUXf8/s400/image9.JPG" alt="" id="BLOGGER_PHOTO_ID_5151288873034034322" border="0" /></a><br />Other Tabs<br />The Translations tabbed page enables you to provide labels in languages that your AW uses.<br /><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkr-Bdwi3JHfkrGCSNRqP-mwSFByCq5RYlbljmbd0FDXHJwup-nBNvkQ64Uamjyo1vz2G6MS68nfjV0ixL-KPciQ4THzW-Gv4YrYbr1VrWcFH8uRrf-sLa3qb4EteP09izK3jb1IhLwbw/s1600-h/image10.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkr-Bdwi3JHfkrGCSNRqP-mwSFByCq5RYlbljmbd0FDXHJwup-nBNvkQ64Uamjyo1vz2G6MS68nfjV0ixL-KPciQ4THzW-Gv4YrYbr1VrWcFH8uRrf-sLa3qb4EteP09izK3jb1IhLwbw/s400/image10.JPG" alt="" id="BLOGGER_PHOTO_ID_5151288993293118626" border="0" /></a><br />The “Implementation Details” tabbed page enables you to identify certain dimension characteristics. By default I always recommend using the Surrogate Key option as this ensures unique members are created across all the levels within a dimension.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpCZFinjUOX1M6L5ZoOEvZC4qfgSH3l1-c-YPs8oBNr1Y7TA9bI8BYCDcm2_YfDJekYTKGFlMWwe-67Xl22W1EKuBxuFY9SqzLW03DO7RzR_hTQbrJrwwrR6fSMq5A5BhfDkD_85_-z8g/s1600-h/image11.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpCZFinjUOX1M6L5ZoOEvZC4qfgSH3l1-c-YPs8oBNr1Y7TA9bI8BYCDcm2_YfDJekYTKGFlMWwe-67Xl22W1EKuBxuFY9SqzLW03DO7RzR_hTQbrJrwwrR6fSMq5A5BhfDkD_85_-z8g/s400/image11.JPG" alt="" id="BLOGGER_PHOTO_ID_5151289126437104818" border="0" /></a><br /><br />For people used to relational data models this can be quite confusing. What happens during when loading data into a dimension is all the source columns are collapsed into a single column within the AW. Therefore, across all the source columns the keys must be unique. Let’s consider an example with time:<br /><br /><span style="font-size:85%;"><span style="font-family:courier new;">YEAR_ID YEAR_DESC QUARTER_ID QUARTER_DESC MONTH_ID MONTH_DESC</span><br /><span style="font-family:courier new;">31-12-2007 Yr 2007 31-12-2007 Q4 2007 31-12-2007 December 2007</span><br /></span><br />Using this as a source table to populate our time dimension we have three keys (YEAR_ID, QUARTER_ID, MONTH_ID) that will be collapsed into a single column. It is obvious in this case the same key is used to identify three different levels within our dimension. In this case the last key that is read will win and the end result will be a single dimension member will be added to our time dimension and that member will be either a month or quarter or year (most likely a year). If we switch to using surrogate keys then three members will be added because the data load program will concatenate the level name with the source key to ensure uniqueness:<br /><ul><li>YEAR_31-12-2007</li><li>QUARTER_31-12-2007</li><li>MONTH_31-12-12007</li></ul>Simple really! But does this have any impact on the AW? In some cases ‘Yes’. I have found that it is prudent to keep your level names as short as possible. When building levels I normally assign simple level names such as L1, L2, L3 etc etc. This keeps the surrogate keys small and compact. What I found working with one customer was that the OLAP engine had certain issues when using very large (75 characters) text strings as the source key and by adding the level to start of each key as well caused data loading problems. Probably an edge case but since then I have always preferred using simple level ids.<br /><br /><span style="font-weight: bold;">Creating Levels</span><br />For business analysis, data is typically summarized at various levels. For example, our database schema, SH, contains daily snapshots from a transactional schema (OE, HR, etc). Days are thus the base level. However, in this case the decision has been take to summarize this data up to the monthly level and then add quarterly, and yearly levels.<br /><br />Levels have parent-child or one-to-many relationships, which form a hierarchy. For example, each month summarizes days, each quarter summarizes months, and each year summarizes quarters. This hierarchical structure enables analysts to detect trends at the higher levels and then drill down to the lower levels to identify factors that contributed to a trend.<br /><br />To create a level for any dimension, right-click the Level icon beneath the dimension, and then select Create Level. Fill in the name, labels, and a description. The labels can be used in reports; the description enables you to comment on the object. Repeat the process for each level in the dimension.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuDT949WjpzU94BVD83NSH8zmYWs0WM2tDvaCyNoC4leDaUCqmZy_RnPHpQTqN5icZkz99m87XG4EdXIEhcgiXuiutNA55c7ROqmLpCyO6ljDAs6X8YIXYYPRdhO4ZcFt_I9L-KwRe5vU/s1600-h/image14.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuDT949WjpzU94BVD83NSH8zmYWs0WM2tDvaCyNoC4leDaUCqmZy_RnPHpQTqN5icZkz99m87XG4EdXIEhcgiXuiutNA55c7ROqmLpCyO6ljDAs6X8YIXYYPRdhO4ZcFt_I9L-KwRe5vU/s400/image14.JPG" alt="" id="BLOGGER_PHOTO_ID_5151290870193827058" border="0" /></a><br /><br /><span style="font-weight: bold;">Creating Hierarchies</span><br />Most dimensions will have at least one hierarchy, but Oracle OLAP does also support completely flat dimensions where no hierarchy exists. Although this is rare it does occur in some cases, but it is always wise to have an “All Members” level for these types of dimensions as this will allow business users to pivot these types of dimensions out of their query by selecting that top level. Otherwise their queries will always be pinned to a single dimension member within the page dimension.<br /><br />A hierarchy defines a set of parentage relationships between all or some of a dimension's members:<br /><ul><li>Used for rollups of data.</li><li>Used for end-user navigation; e.g., drill-down.</li></ul>While multiple hierarchies are supported each member can have only one parent within each hierarchy.<br /><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVBqosfa_KYTbF7qyqCk-w2Gch-aWb0KFWqumfDqDHuAAvlPOx3hmL1xbB6aZQLORmECGP2tPz06kXqEPnXW98Du-3VzkZi3-8dOmcRivPOVajxlgeZeEUu4TzGH6KrB6zUdBnEKaDcrg/s1600-h/image15.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVBqosfa_KYTbF7qyqCk-w2Gch-aWb0KFWqumfDqDHuAAvlPOx3hmL1xbB6aZQLORmECGP2tPz06kXqEPnXW98Du-3VzkZi3-8dOmcRivPOVajxlgeZeEUu4TzGH6KrB6zUdBnEKaDcrg/s400/image15.JPG" alt="" id="BLOGGER_PHOTO_ID_5151290775704546530" border="0" /></a>Name the hierarchy. We can provide descriptive labels that can be used in reports. Select the “Set as Default Hierarchy” option if this is the only hierarchy for the dimension or if it is the hierarchy that will be used most frequently for analysis. In this case we can choose the Level Based Hierarchy option.<br /><br />Finally we can select the levels for our hierarchy. The levels are organized from the highest level of aggregation to the lowest.<br /><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoogFFsUxICZPex2-LfdJGSERs7ZHTYx05KYR_fPmgY5xjIWtRAtZogGago5LT4phhOY9Yu8BTHtIBl1mq0wlGBcoK26q0E9BsNvLYa9te6L8ZUK00y8kPf52-yyOqoN9LzHPvMI_GknE/s1600-h/image16.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoogFFsUxICZPex2-LfdJGSERs7ZHTYx05KYR_fPmgY5xjIWtRAtZogGago5LT4phhOY9Yu8BTHtIBl1mq0wlGBcoK26q0E9BsNvLYa9te6L8ZUK00y8kPf52-yyOqoN9LzHPvMI_GknE/s400/image16.JPG" alt="" id="BLOGGER_PHOTO_ID_5151290698395135186" border="0" /></a><span style="font-weight: bold;"><br />Creating Attributes</span> Attributes contain descriptive information about dimension members that are used for data selection and identification. They are used for labelling cross-tabular and graphical data displays, selecting data, organizing dimension members, and so on.<br />AWM 10g defines basic attributes automatically. For each dimension, it creates long and short description attributes. For a Time dimension, it also creates time-span and end-date attributes.<br /><br />We can easily add additional attributes, such as month number or quarter number. These additional attributes further enrich the AW. The Implementation Details tabbed page identifies the data type for the attribute. This data type should match the source data.<br /><br />For most attributes it is useful to consider creating an Index if the attribute has a reasonably low cardinality. This will improve query performance if the attribute is used as a filter within a business query. What happens under the covers is an additional dimension is created containing the members of the attribute and a relation is created to map the attribute dimension members to the base dimension members. Oracle OLAP is very efficient at using relations during queries as a way of filtering members.<br /><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbb2kfXGR7YVXHZFsUj-gUCTMoFQ4TGl5gLBz_IHYyYZxWx8hioeNAHEn_2V6iGS4r7A0JiCiYMvr4gcWxu8FNZF7Qs4DrTwf2YgcZGYF098MxeSjgcXPlmY03kZRQjwo7bBTnGvvAMgM/s1600-h/image17.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbb2kfXGR7YVXHZFsUj-gUCTMoFQ4TGl5gLBz_IHYyYZxWx8hioeNAHEn_2V6iGS4r7A0JiCiYMvr4gcWxu8FNZF7Qs4DrTwf2YgcZGYF098MxeSjgcXPlmY03kZRQjwo7bBTnGvvAMgM/s400/image17.JPG" alt="" id="BLOGGER_PHOTO_ID_5151290621085723842" border="0" /></a><br /><br />In the next posting in this series of workshops we will review how to map dimensions to source data and how to manage different types of dimensions (value based, skip level, ragged, star source table and snowflake source tables).Keith Lakerhttp://www.blogger.com/profile/01039869313455611230noreply@blogger.com5tag:blogger.com,1999:blog-3820031471524503731.post-90120867548283451392007-12-31T08:34:00.000-08:002008-12-11T15:25:56.302-08:00OLAP Workshop 2 : Understanding OLAP TechnologyIn the last posting I hopefully explained some of the basic concepts behind OLAP. In this posting I want to explore how those basic concepts are exposed by the various OLAP aware ETL and reporting tools provided by Oracle and other BI vendors.<br /><br /><span style="font-size:130%;"> <span style="font-weight: bold;">Architecture of Oracle OLAP</span></span><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3JogODEwInrL8E_vzcZq8X6eIvLdaEMEGwWpifKO_i_E6El_67nTnWEpbVyCnVI46bjW91lc9CLzq7yYnVYMoHslKYcSUpRdw2xSordg79GssHnv1ypp_kt_WPH7bQNkdfe7NfXs_LPQ/s1600-h/Image1.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3JogODEwInrL8E_vzcZq8X6eIvLdaEMEGwWpifKO_i_E6El_67nTnWEpbVyCnVI46bjW91lc9CLzq7yYnVYMoHslKYcSUpRdw2xSordg79GssHnv1ypp_kt_WPH7bQNkdfe7NfXs_LPQ/s400/Image1.JPG" alt="" id="BLOGGER_PHOTO_ID_5151277628809653122" border="0" /></a><br /><br /><br />For a long time now Oracle has been unique in the marketplace. With Oracle Database 9i, 10g and 11g, all data (relational and multidimensional) is stored in one Oracle database. Only Oracle OLAP provides native multidimensional data types within the database.<br /><br />A high-level architectural view of the Oracle OLAP option contains three parts:<br /><ul><li>Oracle Database 10g OLAP option, which comprises:</li><ul><li>Multidimensional data types</li></ul><ul><li>OLAP calculation engine</li></ul><ul><li>Open-access interfaces</li></ul><li>End-user tools, which provide access to OLAP data for a wide spectrum of analytic needs </li><li>Administrative tools used to create and manage multidimensional data types. Oracle provides two administrative tools that can be used to create multidimensional data types in Oracle Database 10g:</li><ul><li>Oracle Warehouse Builder</li></ul><ul><li>Analytic Workspace Manager</li></ul></ul>The following sections examine these three layers in more detail.<br /><br /><span style="font-size:130%;"><span style="font-weight: bold;">Components of Oracle OLAP</span> </span>With the Oracle OLAP option, you get two powerful arenas of functionality:<br /><ul><li>OLAP API and the analytic workspace (AW).</li><li>OLAP API Functionality</li></ul><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_tzpyQbnzPllw1_y2j5ISHP3MbGpb8j7lRPCcNQmHg0stHAe27DgQIbRCXgZmDtWa_VwOduN_dbHqyWTy81qwbRdX6lMeZgF3WS_dodnyJP4Xhlcf5DkoLfajjClnq9wCStH3oRo6DDk/s1600-h/Image1a.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_tzpyQbnzPllw1_y2j5ISHP3MbGpb8j7lRPCcNQmHg0stHAe27DgQIbRCXgZmDtWa_VwOduN_dbHqyWTy81qwbRdX6lMeZgF3WS_dodnyJP4Xhlcf5DkoLfajjClnq9wCStH3oRo6DDk/s400/Image1a.JPG" alt="" id="BLOGGER_PHOTO_ID_5151278346069191570" border="0" /></a><br /><br /><span style="font-weight: bold;">Analytic Workspace</span><br />The Analytic Workspace is the container for the multidimensional data types and leverages the multidimensional calculation engine of the OLAP Option. The AW also provides a standard SQL interface to the multi-dimensional model. This provides an industry standard access layer that can be used by any BI reporting tool that generates SQL commands, from SQL Developer, to Application Express on to more sophisticated tools such as BI EE.<br /><br />The AW also provides an XML API for administration, and a programming language (OLAP DML).<br /><br /><span style="font-weight: bold;">Multidimensional Data Store </span><br />The OLAP option provides true array-based multidimensional data types within the Oracle database. These multidimensional data types are contained in special tables in Oracle called analytic workspaces. Some data types are used to store data, whereas others are calculated instantaneously using the multidimensional engine.<br /><br /><span style="font-weight: bold;">Multidimensional Calculation Engine</span><br />The OLAP Option’s multidimensional engine includes an impressive library of multidimensional-aware calculation functions and support for planning functionalities such as statistical forecasts, models, allocations, projections, and “what-if” scenarios, in the context of Analytic Workspaces. The multidimensional engine interacts with the multidimensional data types in the analytic workspace in the Oracle database.<br /><br />The Oracle OLAP option provides a specialized Java API that developers can use to exploit the full power of the Oracle OLAP option by using advanced dimensionally aware tools and applications. This API is used by Oracle Business Intelligence tools such as OracleBI Beans, OracleBI Discoverer, OracleBI Spreadsheet Add-In, and Oracle Reports OLAP Plug-in to provide a true multi-dimensional query and calculation environment.<br /><br /><span style="font-weight: bold;">OLAP DML</span><br />The OLAP DML is an extremely powerful and analytically rich feature of the AW. It is a dimensionally aware, high-level procedural language that runs in the database and exploits the multidimensional engine and multidimensional data types.<br /><br />With the Oracle OLAP option developers can exploit the OLAP DML to add more sophisticated calculations and analysis to AWs and to extend the functionality of applications that access them. The OLAP DML is briefly introduced in the lesson titled “Previewing Advanced Oracle OLAP Features.”<br /><br /><span style="font-weight: bold;">AW API</span><br />The AW API is a Java API that is used to define and physically build multidimensional analytic workspaces inside Oracle Database 10g. The AW API is used by administrative tools such as Analytic Workspace Manager and may be used by developers, if required, to enhance and extend analytic workspaces as necessary for a specific application.<br /><br /><span style="font-weight: bold;">Query Access to Oracle OLAP</span><br />Different users with different end-user tool requirements can all access the same data, taking advantage of the same calculations, and benefit from the same security, scalability, performance, and availability of the Oracle database.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjp7CYBTjMIZ-Gqy3Mo_H-OSQ0LykLxlB_MKI-wp2ICyEGrOYgNYTMDB2LzCnZDvhSgqHUy48t371m2yUsLlegI_CxFnMJTRZidgotLkO5SMFhro-GRRDX9F8GqOMf7q-UIXBMSK5TdWK8/s1600-h/Image2.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjp7CYBTjMIZ-Gqy3Mo_H-OSQ0LykLxlB_MKI-wp2ICyEGrOYgNYTMDB2LzCnZDvhSgqHUy48t371m2yUsLlegI_CxFnMJTRZidgotLkO5SMFhro-GRRDX9F8GqOMf7q-UIXBMSK5TdWK8/s400/Image2.JPG" alt="" id="BLOGGER_PHOTO_ID_5151278882940103586" border="0" /></a><br /><span style="font-weight: bold;">OLAP API</span><br />The OLAP API is designed to work with both multidimensional data types and relational data types in the Oracle database.<br /><ul><li>The API enables you to directly access multidimensional data types in the AW.</li><li>To access relational data types, you can register a relational physical dimensional model (such as a star or snowflake schema) to the Oracle Database OLAP Catalog.</li></ul>Therefore, tools that use the OLAP API can be deployed against multidimensional analytic workspaces or suitable relational schemas that are registered to the Oracle OLAP option’s metadata layer.<br /><br />Many Oracle source business intelligence tools take full advantage of the multidimensional query data model provided by the Oracle OLAP option through the OLAP API. These include OracleBI Spreadsheet Add-In, OracleBI Discoverer, OracleBI Beans, and OracleBI Reports.<br /><br /><span style="font-weight: bold;">SQL Interface</span><br />Unlike other multidimensional OLAP server products, Oracle OLAP provides not only a specialized API but also industry-standard SQL to access multidimensional data types.<br /><br />You can use a simple SQL query with relationally oriented tools and applications to gain access to the multidimensional data types in the Oracle database. As a result, your SQL-based applications (such as report generators and ad hoc query tools) can access multidimensional data and calculations managed by the Oracle OLAP option.<br />SQL and PL/SQL are also used to manage and maintain multidimensional analytic workspaces and to move data between relational and multidimensional data types within the Oracle database.<br /><br />For example, Oracle Application Express is an easy-to-use tool that is supplied with Oracle Database 10g for Web access to the Oracle database. Oracle Application Express is an example of a SQL-based application with no built-in OLAP knowledge that can nevertheless leverage the power of Oracle OLAP.<br /><br />Many third-party tools from independent software vendors and Oracle partners, such as Arcplan, Business Objects, Cognos, and a large and growing number of business intelligence vendors throughout the world, access OLAP data through the Oracle OLAP option. Some of these vendors’ tools leverage the OLAP API, whereas others exploit the SQL query interface.<br /><br /><br /><span style="font-size:130%;"><span style="font-weight: bold;">Dimensionally Aware Products</span><br /></span><br /><span style="font-weight: bold;">Oracle BI Spreadsheet Addin</span><br />OracleBI Spreadsheet Add-In makes it easy to access OLAP data through the familiar spreadsheet environment of Microsoft Excel. After installation of OracleBI Spreadsheet Add-In, “OracleBI” appears as a new menu item in Excel. By using OracleBI Spreadsheet Add-In, you can establish a secure connection to the OLAP data source and use Excel as the front-end access tool to the data in the database.<br /><br />Here are some of the features of OracleBI Spreadsheet Add-In:<br /><ul><li>It combines the flexibility and familiarity of Excel and the power, scalability, and security of the Oracle OLAP option.</li><li>OracleBI Query and Calculation Builders: After the connection is established, you can use the wizard-driven interface to drill, pivot, page through large cubes, and create reports.</li><li>Access to Excel features</li><li>Powerful data-formatting features of Excel, </li><li>Combine Oracle OLAP data with other Excel data</li><li>Write Excel macros that leverage all your data. </li><li>Create formulas and graphs in Excel,<br /></li></ul>Excel users can quickly and easily combine the powerful analytic capabilities of Oracle OLAP with standard Excel functions that you know and use each day.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6_56PZZDBBlkCaDVq4FvVUhEI9bHXNxUijJ-h5L7akExY5hTnncjVaLPWfzOS_j09ykpQn3lGr_jDHRGHX0LCxsuJ7ZNYAHNAn1tnWMozBmKzX5YzCead8AJQ3V6EN__ww2kRLsLWAx4/s1600-h/Image3.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6_56PZZDBBlkCaDVq4FvVUhEI9bHXNxUijJ-h5L7akExY5hTnncjVaLPWfzOS_j09ykpQn3lGr_jDHRGHX0LCxsuJ7ZNYAHNAn1tnWMozBmKzX5YzCead8AJQ3V6EN__ww2kRLsLWAx4/s400/Image3.JPG" alt="" id="BLOGGER_PHOTO_ID_5151279733343628210" border="0" /></a><br /><br />When using Excel OLAP calculations are performed directly in the database: The benefit of using OracleBI Spreadsheet Add-In is that you no longer need to download massive amounts of data to your spreadsheet. Oracle Database 10g OLAP performs all the OLAP calculations quickly and efficiently in the database. The calculations and business logic are defined only once in the database and then shared across the user community.<br /><br />For more information go to the Spreadsheet Addin home page on OTN:<br /><br />Spreadsheet Addin OTN Home Page<br /><a href="http://www.oracle.com/technology/products/bi/spreadsheet_addin/index.html">http://www.oracle.com/technology/products/bi/spreadsheet_addin/index.html<br /></a><br />OracleBI Spreadsheet Add-In Feature Overview<br /><a href="http://www.oracle.com/technology/products/bi/spreadsheet_addin/htdocs/feature_overview/oraclebi_spreadsheet_addin_fov.htm">http://www.oracle.com/technology/products/bi/spreadsheet_addin/htdocs/feature_overview/oraclebi_spreadsheet_addin_fov.htm<br /></a><br />Introduction to OracleBI Spreadsheet Add-In<br /><a href="http://www.oracle.com/technology/products/bi/spreadsheet_addin/viewlets/olapsa_welcome_viewlet_swf.html">http://www.oracle.com/technology/products/bi/spreadsheet_addin/viewlets/olapsa_welcome_viewlet_swf.html<br /></a><br /><br /><span style="font-weight: bold;">OracleBI Discoverer </span><br />This is another Oracle Business Intelligence tool that can directly access Oracle OLAP data. Discoverer Plus OLAP is an ad hoc query, reporting, analysis, and Web-publishing tool. It enables you to:<br /><ul><li>Perform OLAP query, reporting, and analysis on both multidimensional data models (analytic workspaces) and relational OLAP data models (star or snowflake schemas).</li><li>Access and analyze multidimensional data from your company’s database without having to understand complex database concepts. The wizards and menus of Discoverer Plus OLAP guide you through the steps to retrieve and analyze multidimensional data.</li></ul>Because Discoverer Plus OLAP understands the dimensional data model, you formulate your queries in the language of business—you use dimensions, hierarchies, levels, and measures through a simple interface. You can also exploit the rich features of OLAP through dimensionally aware query and calculation builders, thereby simplifying the tasks of defining queries and calculations. Worksheets that are authored in Discoverer Plus OLAP are published to the Web, where Discoverer Viewer and Oracle Portal users can access them.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4kd6uJNSm_bvRu7eJq55WY9O8_cyzAtbiBPwFcJwu99TYjcpkdM4R_LbOHF2AE4GQz0TD9aobWR3roDmeGr8voQhQtTtsEDQ2nexyFCuC0JLwJW_heUnLD70wiezP_Ho-x2IVGB1grXM/s1600-h/Image4.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4kd6uJNSm_bvRu7eJq55WY9O8_cyzAtbiBPwFcJwu99TYjcpkdM4R_LbOHF2AE4GQz0TD9aobWR3roDmeGr8voQhQtTtsEDQ2nexyFCuC0JLwJW_heUnLD70wiezP_Ho-x2IVGB1grXM/s400/Image4.JPG" alt="" id="BLOGGER_PHOTO_ID_5151280364703820738" border="0" /></a><br />For more information go to the Discoverer home page on OTN:<br /><br />Discoverer OTN Home Page<br /><a href="http://www.oracle.com/technology/products/discoverer/index.html">http://www.oracle.com/technology/products/discoverer/index.html<br /></a><br />Creating OLAP worksheets<br /><a href="http://www.oracle.com/technology/products/discoverer/files/viewlets/1012_plus_olap_creating.html">http://www.oracle.com/technology/products/discoverer/files/viewlets/1012_plus_olap_creating.html<br /></a><br />Modifying OLAP worksheet properties<br /><a href="http://www.oracle.com/technology/products/discoverer/files/viewlets/1012_Plus_OLAP_Modifying.html">http://www.oracle.com/technology/products/discoverer/files/viewlets/1012_Plus_OLAP_Modifying.html</a><br /><br /><span style="font-weight: bold;">OracleBI Beans</span><br />OracleBI Beans is used by business intelligence and OLAP developers. OracleBI Beans is used for developing applications such as Oracle Enterprise Planning and Budgeting and tools such as OracleBI Discoverer and OracleBI Spreadsheet Add-In. BI Beans is also available to third-party software developers to accelerate development of custom OLAP applications.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkZsS5ar1_jAjQZ9wPuAwtxQW_0GLXLVShuxVkltuDmyK1wbCTDcRhJ7pIOOFxNdMniCBxYMuaSOgcTFmxinqblQ6mp_PwBB-Y9BKOHHshXYeJN1XJPC3y5QWimxo1dWWimpDYKRz_WfM/s1600-h/Image5.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkZsS5ar1_jAjQZ9wPuAwtxQW_0GLXLVShuxVkltuDmyK1wbCTDcRhJ7pIOOFxNdMniCBxYMuaSOgcTFmxinqblQ6mp_PwBB-Y9BKOHHshXYeJN1XJPC3y5QWimxo1dWWimpDYKRz_WfM/s400/Image5.JPG" alt="" id="BLOGGER_PHOTO_ID_5151280931639503826" border="0" /></a><br /><br />BI Beans is a set of standards-based Java beans that is integrated into Oracle JDeveloper. It provides analysis-aware application building blocks designed for the Oracle OLAP option of the Oracle database. Using BI Beans, you can create customized business intelligence applications that take advantage of the robust analytic capabilities of Oracle OLAP.<br /><br />Applications can include advanced features such as interactive user interfaces, drill-to-detail reports, forecasting, and what-if analysis. BI Beans includes Java beans for acquiring data from the Oracle database, presenting data in a variety of crosstab and graph formats, and saving report definitions, custom measures, and data selections.<br />Using BI Beans, you can develop business intelligence applications from Oracle JDeveloper, or any Java application development environment, and deploy them through any application server as a thin or thick client.<br /><br />For more information go to the BI Beans home page on OTN:<br /><br />BI Beans OTN Home Page<br /><a href="http://www.oracle.com/technology/products/bib/index.html">http://www.oracle.com/technology/products/bib/index.html<br /></a><br />Oracle BI Beans Feature Overview<br /><a href="http://www.oracle.com/technology/products/bib/1012/htdocs/feature_overview/BI_Beans_Feat_Oview.htm">http://www.oracle.com/technology/products/bib/1012/htdocs/feature_overview/BI_Beans_Feat_Oview.htm<br /></a><br />Developing a Dashboard Application with Oracle BI Beans<br /><a href="http://www.oracle.com/technology/products/bib/1012/viewlets/MS%20Developing%20Executive%20Insight.html">http://www.oracle.com/technology/products/bib/1012/viewlets/MS Developing Executive Insight.html<br /></a><br /><br /><span style="font-weight: bold;font-size:130%;" >SQL Access Products<br /></span><span style="font-weight: bold;">Oracle Business Intelligence EE</span><br />Oracle Business Intelligence Suite Enterprise Edition 10g, Release 3 (BI EE 10g) delivers significant new product enhancements to further enable enterprise-wide BI, including integration with Oracle OLAP. In this release, Oracle's native multidimensional data model -- the analytic workspace (AW) -- is made accessible to BI EE 10g by creating the required metadata in Oracle BI Administration Tool. The AW data is exposed to the BI EE 10g product stack, and the OLAP engine is leveraged for analysis of that data.<br /><br />Creating access to Oracle OLAP data is a simple 3-step process. Each these steps are covered in detail as part of a training document provided as an Oracle by Example. This explains how to: prepare an AW for access by BI EE 10g; create the required metadata using Oracle BI Administration Tool; and create analytic reports of AW data using Oracle BI Answers<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdBx912W10Wc45fYW1WA0tOIK7WAgnC7m-IABwxX7ZbK3gwufAdMo0bvxk8ryUnjtzHmAhYTpiP_EOtriq2VO-OO14eJO3c-HCRJxeNaMiL9ceX8JZSNH5mX2wfq0bpKGZ3AcnktCauSM/s1600-h/Image8.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdBx912W10Wc45fYW1WA0tOIK7WAgnC7m-IABwxX7ZbK3gwufAdMo0bvxk8ryUnjtzHmAhYTpiP_EOtriq2VO-OO14eJO3c-HCRJxeNaMiL9ceX8JZSNH5mX2wfq0bpKGZ3AcnktCauSM/s400/Image8.JPG" alt="" id="BLOGGER_PHOTO_ID_5151281404085906402" border="0" /></a><br /><br />For more information go to the BI EE home page on OTN:<br /><br />BI EE OTN Home Page<br />http://www.oracle.com/technology/products/bi/enterprise-edition.html<br /><br />Ad-hoc query and reporting<br /><a href="http://www.oracle.com/technology/products/bi/enterprise-edition-platform-components.html">http://www.oracle.com/technology/products/bi/enterprise-edition-platform-components.html<br /></a><br />Oracle By Example:<br />These lessons are designed for completion in the order that is shown below. Each subsequent lesson depends on the completion of the previous lesson. Click on any of the links below to begin.<br /><br />Lesson 1: Preparing an Analytic Workspace for Access by Oracle BI EE 10g<br /><a href="http://www.oracle.com/technology/obe/obe_bi/bi_ee_1013/olap/PrepareAW.htm">http://www.oracle.com/technology/obe/obe_bi/bi_ee_1013/olap/PrepareAW.htm<br /></a><br />Lesson 2: Creating BI EE 10g Metadata for the Analytic Workspace<br /><a href="http://www.oracle.com/technology/obe/obe_bi/bi_ee_1013/olap/CreateMetadata.htm">http://www.oracle.com/technology/obe/obe_bi/bi_ee_1013/olap/CreateMetadata.htm<br /></a><br />Lesson 3: Querying OLAP Data Using Oracle BI Answers<br /><a href="http://www.oracle.com/technology/obe/obe_bi/bi_ee_1013/olap/QueryData.htm">http://www.oracle.com/technology/obe/obe_bi/bi_ee_1013/olap/QueryData.htm<br /></a><br /><br /><br /><span style="font-weight: bold;">Oracle Application Express</span><br />The Oracle OLAP option provides a SQL interface to access multidimensional data types, thus enabling any SQL-aware tool to access data in the analytic workspace.<br />Oracle Application Express is an easy-to-use report builder that is provided with Oracle Database 10g to simplify the creation of database-centric interactive Web pages.<br /><br />Thus, with the Oracle OLAP option, you can use Oracle Application Express to provide Web-based access to key performance indicators such as profitability, sales, units shipped, trends, and period-to-period comparisons and forecasts.<br />It provides support for some interactive reporting (for example, you can use hypertext links to call more SQL queries), but it is not a fully interactive analysis system like OracleBI Discoverer or like other specialized business intelligence tools.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOZRXDlEez42yosMJVAq9U1PG4O3FVvexAef1oktPTCNc1J-_GwSxp5VuM3vm-sH-AFcXzv_CT3xP4yLc7GHnitpQedMAOOmev6uQ9PlbEn2xf7NBV7mVmRdn0-fm6wl4aJzss51GDasE/s1600-h/Image6.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOZRXDlEez42yosMJVAq9U1PG4O3FVvexAef1oktPTCNc1J-_GwSxp5VuM3vm-sH-AFcXzv_CT3xP4yLc7GHnitpQedMAOOmev6uQ9PlbEn2xf7NBV7mVmRdn0-fm6wl4aJzss51GDasE/s400/Image6.JPG" alt="" id="BLOGGER_PHOTO_ID_5151281872237341682" border="0" /></a>The Web report in the slide is generated with the following SQL code:<br /><br /><span style="font-family:courier new;">SELECT region_desc, sales, units, cost, profit, </span><br /><span style="font-family:courier new;">ROUND(pct_margin ,3), fcast_sales</span><br /><span style="font-family:courier new;">FROM mysalesaw_view</span><br /><span style="font-family:courier new;">WHERE time_desc = TO_CHAR(ADD_MONTHS(SYSDATE,-3), 'Mon-YY')</span><br /><span style="font-family:courier new;"> AND product_level = ‘ALL'</span><br /><span style="font-family:courier new;"> AND channel_level = ‘ALL'</span><br /><span style="font-family:courier new;"> AND customer_level= 'REGION'</span><br /><span style="font-family:courier new;"> ORDER BY sales DESC;</span><br /><br />Because the multidimensional data model presents data to the query layer as if it were precalculated, prejoined, and preaggregated, your query does not need to perform any calculations, joins, or aggregations. SQL code is thus very simple to write and fully leverages the power of the AW. The multidimensional engine returns the requested data from the AW extremely efficiently and quickly, even if the AW is calculating much of the data instantaneously.<br /><br />For more information go to the Application Express home page on OTN:<br /><br />Application Express OTN Home Page<br /><a href="http://www.oracle.com/technology/products/database/application_express/index.html">http://www.oracle.com/technology/products/database/application_express/index.html<br /></a><br />What is Oracle APEX?<br /><a href="http://www.oracle.com/technology/products/database/application_express/html/what_is_apex.html">http://www.oracle.com/technology/products/database/application_express/html/what_is_apex.html<br /></a><br />3.0 New Features<br /><a href="http://www.oracle.com/technology/products/database/application_express/html/3.0_new_features.html">http://www.oracle.com/technology/products/database/application_express/html/3.0_new_features.html<br /></a><br /><br /><span style="font-weight: bold;font-size:130%;" >Tools to Build an Analytic Workspace</span><br />Two tools are available for IT and power users to easily build analytic workspaces (AWs) and load them with data (for analysis with tools such as OracleBI Beans, OracleBI Discoverer, and OracleBI Spreadsheet Add-In):<br /><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMawT6CkncUX8UIm58ku22KwmeecDbS1n7OkRzzu7kf7fQGDt9OW5T-8nzYbvIVlXeE-J1auHEDClck0F5CCx4lLEbNlztILE0xlnS-K5R7oOOGETyuFSNehIbxJ_flUvooiY5N3ZPAak/s1600-h/Image7.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMawT6CkncUX8UIm58ku22KwmeecDbS1n7OkRzzu7kf7fQGDt9OW5T-8nzYbvIVlXeE-J1auHEDClck0F5CCx4lLEbNlztILE0xlnS-K5R7oOOGETyuFSNehIbxJ_flUvooiY5N3ZPAak/s400/Image7.JPG" alt="" id="BLOGGER_PHOTO_ID_5151282430583090178" border="0" /></a><br /><span style="font-weight: bold;">Shared API for AW Creation</span> Both OWB and AWM use the AW XML API to build and maintain AWs. Therefore, an AW model that is created by AWM can be incorporated back into the OWB repository to provide version control, lineage, and impact analysis if changes to the original source systems are required.<br /><br />Note: Both OWB and AWM generate scripts that may be called and scheduled from PL/SQL scripts or other scheduling processing tools, if required.<br /><br /><span style="font-weight: bold;">Analytic Workspace Manager (AWM)</span> AWM is a tool that makes it easy to build and maintain AWs from a suitable (clean) data source. AWM is used on source data that has been cleaned by the ETL process.<br /><br />The clean data may have been created by Oracle Warehouse Builder or by another ETL process; your IT department would have a preferred method of preparing data.<br />AWM is focused on the simple task of building AWs. It has an intuitive wizard-based user interface and is therefore suitable for both IT and power users.<br /><br />AWM supports the complete process of creating an AW from beginning to end in a single, dimensionally aware design environment.<br /><br />The creation process includes three easy steps:<br /><ol><li>Design the dimensional model.</li><li>Map the dimensional object to the source data.</li><li>Load the data into the AW. </li></ol>After you have performed these steps, the AW is immediately available for your tools to query.<br /><br />For more information go to the OLAP home page on OTN:<br /><br />OLAP OTN Home Page<br /><a href="http://www.oracle.com/technology/products/bi/olap/olap.html">http://www.oracle.com/technology/products/bi/olap/olap.html<br /></a><br />Analytic Workspace Manager 10.2.0.3.0A<br /><a href="http://www.oracle.com/technology/software/htdocs/devlic.html?url=http://download.oracle.com/otn/java/olap/AWM_102030A_Win32.zip">http://www.oracle.com/technology/software/htdocs/devlic.html?url=http://download.oracle.com/otn/java/olap/AWM_102030A_Win32.zip<br /></a><br />Analytic Workspace Manager 10g<br /><a href="http://www.oracle.com/technology/products/bi/olap/1451_AWM10g.pdf">http://www.oracle.com/technology/products/bi/olap/1451_AWM10g.pdf<br /></a><br />Improve SQL Based Business Intelligence Tools with Oracle OLAP 11g<br /><a href="http://www.oracle.com/technology/products/bi/olap/Oracle_OLAP_11g_TWP.pdf">http://www.oracle.com/technology/products/bi/olap/Oracle_OLAP_11g_TWP.pdf<br /></a><br />Leveraging Business Intelligence Tools<br /><a href="http://www.oracle.com/technology/products/bi/olap/40261_leveragingtools.pdf">http://www.oracle.com/technology/products/bi/olap/40261_leveragingtools.pdf<br /></a><br />Analytic Workspace Manager 10.2.0.3.0<br /><a href="http://www.oracle.com/technology/products/bi/olap/viewlet/AWM102_viewlet_swf.html">http://www.oracle.com/technology/products/bi/olap/viewlet/AWM102_viewlet_swf.html<br /></a><br /><br /><span style="font-weight: bold;">OracleBI Warehouse Builder 10g R2 (OWB)</span><br />OWB is an advanced management and ETL tool, used by developers and database administrators to build and manage data warehouses in the Oracle database. OWB manages the entire process of collecting and cleaning data.<br /><ul><li>Collecting data: OWB collects data from the various operational systems that feed the data warehouse.</li><li>Cleaning data: OWB performs various required transformations and data-cleansing activities (for example, dealing with inconsistencies between different source systems, matching and merging data from them, and processing missing or erroneous data). </li></ul>The result is a set of clean tables in the Oracle database.<br /><ul><li>OWB includes advanced data-profiling features.</li><li>OWB enables data warehouse developers to optionally populate relational star or snowflake schemas or multidimensional AWs for access by the Oracle OLAP option.</li><li>OWB is, therefore, a professional IT tool.</li></ul>Warehouse Builder is free to database customers and this free functionality includes deploying OLAP schemas. Some Warehouse Builder features are costed options and these include:<br /><ul><li>Enterprise ETL</li><li>Data Quality</li><li>CRM/ERP Connectors</li></ul>For more information go to the Warehouse Builder home page on OTN:<br /><br />OTN Home Page<br /><a href="http://www.oracle.com/technology/products/warehouse/index.html">http://www.oracle.com/technology/products/warehouse/index.html<br /></a><br />Oracle Warehouse Builder 10gR2 and Oracle OLAP<br /><a href="http://www.oracle.com/technology/products/warehouse/pdf/OWB10gR2%20and%20Oracle%20OLAP.pdf">http://www.oracle.com/technology/products/warehouse/pdf/OWB10gR2 and Oracle OLAP.pdf<br /></a><br />Benefits of a Multi-dimensional Model<br /><a href="http://www.oracle.com/technology/products/warehouse/pdf/Benefits%20of%20a%20multi-dimensional%20model.pdf">http://www.oracle.com/technology/products/warehouse/pdf/Benefits of a multi-dimensional model.pdf</a><br /><br />In the next workshop we will start to look at the process of building a new analytic workspace using Analytic Workspace Manager 10g (AWM) to perform the following tasks:<br /><ul><li>Create an analytic workspace</li><li>Define dimensions</li><li>Define cubes</li><li>Load data from source relational tables</li><li>View data</li></ul>Keith Lakerhttp://www.blogger.com/profile/01039869313455611230noreply@blogger.com0tag:blogger.com,1999:blog-3820031471524503731.post-40331260036143702242007-12-31T08:01:00.000-08:002008-12-11T15:25:59.603-08:00OLAP Workshop 1 : Basic OLAP ConceptsThis is the start of a series of postings that will aim to provide on understanding basic OLAP principles and, most importantly, how to use and get the the most from Oracle's world class OLAP option. This series of workshops will cover a lot of topics, including:<br /><ul><li>Basic OLAP concepts</li><li>Understanding the technology behind Oracle OLAP</li><li>Building an Analytic Workspace</li><li>Introduction to dimensions and cubes<br /></li><li>Advanced dimension and cube techniques<br /></li><li>How to use Custom Formulas</li><li>SQL Access to Cubes</li><li>Managing Oracle OLAP<br /></li></ul>A lot fo the content has been generated by our own consultants and from questions posted on the OTN OLAP forum. Hopefully you will find this series useful.<br /><br />Let’s start with the most obvious question<br /><br /><span style="font-size:130%;"><span style="font-weight: bold;">What Is OLAP?</span></span><br />Online analytical processing (OLAP) is in my opinion a highly abused term that has lost much of its original meaning. In its original guise, dating from the early 1990’s, the term was used to describe a class of computer systems that were designed and optimized for analysis. This is still true of Oracle OLAP but not for many of the other proprietary solutions currently available in the marketplace.<br /><br />From my perspective OLAP is about working with data in business terms without having to understand the underlying storage mechanism and having the ability to intelligently and transparently support the many different types of business rules that always exist within an organisation. For example, a very simple and obvious example is Stock. Most query tools do not understand how to correctly analyse stock over time, it is left to the user to select the correct aggregation method.<br /><br />By using this term, it is possible to differentiate the more analytical requirements of the business analyst and senior management community from the requirements of the more general basic requirements that are easily and quickly answerd by most directly query a transaction processing (OLTP) system. OLAP has now evolved into a more generic environment that is centred around use of the term “business intelligence”. Here the emphasis is more on “online” or active access as well as being far more “analytical” in terms of the reports that are generated.<br /><br /><span style="font-weight: bold;">What do these terms, online and analytical, mean?</span><br /><span style="font-weight: bold;"><br />Online</span>: Although most OLAP tools and applications enable development of reports that can be saved and printed when not connected to live data, OLAP emphasizes live access to data rather than static reporting. Analytic queries are submitted against the database in real time, and the results are returned in real time.<br /><br /><span style="font-weight: bold;">Analytical processing</span>: This is the key concept with OLAP. End users can:<br /><ul><li>Easily navigate multidimensional data to perform unpredictable ad hoc queries and to display the results in a variety of interesting layouts</li><li>Transparently manage business rules across dimensions and cubes</li><li>Drill through levels of detail to uncover significant aspects of data</li><li>Rapidly and efficiently obtain the results of sophisticated data calculation and selection across multiple dimensions of data </li></ul><br />A standard transactional report or query might ask, “When did order 84305 ship?” This query reflects the basic mechanics of doing business. It involves simple data selection and little or no calculation processing. It can be answered directly from the transactional system, probably without impacting other operations. Every organisation needs this basic level of information.<br /><br />In contrast, OLAP systems are typically deployed to extend and enhance an organization’s ability to answer a much broader range of business questions about the data they are collecting in their transactional systems:<br /><ul><li>How do sales for our top 10 most profitable products across Europe for this quarter compare with sales a year ago?</li><li>What are the differences in the product-sales mix between the regions, relative to the global sales mix?</li><li>What are our forecast units, unit price per service, unit cost per product, sales, cost trends, and profit for the next 12 months?</li><li>In what ways does the mix vary by salesperson, and what is the relative performance of our salespeople?</li><li>What are the products making up 40% of our profit for each region over time?</li></ul>These questions are more analytical and complex, and the answer to one question often leads immediately to another question as the user follows a train of thought in researching a business problem or opportunity.<br /><br />OLAP is designed to make it easy for end users to ask these types of analytical questions without requiring:<br /><ul><li>Assistance from the IT department</li><li>Programming skills</li><li>Technical knowledge about the organization of the database</li></ul>The results of queries also need to be rapid so that the analyst’s train of thought is not interrupted and the value of the analysis is not diminished.<br /><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEpo0tBcRvgq_4c61jTFISclxteGMnsDO6k8DhmyKwpTX7YXOs3tC-EfZ14t3q6o8NJ6VWm0OJfwQEsxEpuEmS6SE2NCwbVZu3VUspUzjs_hyvPeXdaUbr2dI0kzpeLny_gTl7ea-O_JI/s1600-h/Picture+1.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEpo0tBcRvgq_4c61jTFISclxteGMnsDO6k8DhmyKwpTX7YXOs3tC-EfZ14t3q6o8NJ6VWm0OJfwQEsxEpuEmS6SE2NCwbVZu3VUspUzjs_hyvPeXdaUbr2dI0kzpeLny_gTl7ea-O_JI/s400/Picture+1.JPG" alt="" id="BLOGGER_PHOTO_ID_5150169540132186818" border="0" /></a><br /><br />A typical multidimensional business query, would be something like the following:<br /><br /><span style="font-style: italic;">For each region of the world, what was the percentage change in revenue for our top 20% products, over a rolling three-month period this year compared to the same period last year?</span><br /><br />This simple business question describes both the data that the user wants to examine and the structural form of that data. Business users typically want to answer questions that include terms such as what, where, who, and when. For example, you find the following essential questions embedded in the sample question:<br /><ul><li>What products are selling best? (“…top 20%…”)</li><li>Where are they selling? (“…each region of the world…”)</li><li>When have they performed the best? (“…percentage change in revenue…”)</li></ul>If you examine the query in detail it appears to be translate into a very complex query. When I have discussed this type of query during presentations at conferences and with customers you can always spot the DBAs because they immediately try to translate this question into a SQL statement. Of course it is possible to create a SQL query to answer this question. But lets start by breaking this query down and examining it in more detail:<br /><ul><li>There are two calculations (percentage change in revenue and rolling three-month total).</li><li>There is a ranking element (the top 20% of products).</li><li>There are aggregations (region level of the geography dimension).</li><li>There are multidimensional selections (specific products, specific time periods, and specific regions).</li><li>The result of the query is a multidimensional view of the data (perhaps as a tabular display on the screen, perhaps as a graph, or both).</li></ul>Now I think many people would agree this does in fact look like a complex query. To try and frame this within a traditional query and reporting tool would require considerable skill. And don’t forget this is the starting point for the analysis not the final result. The data returned by this query will drive other even more interesting and complex queries.<br /><br />But the complexity of this query is a technical issue rather than a business issue.<br />Therefore, a key goal of OLAP technology is to make it very easy for end users to ask such questions about their data without placing a burden on the IT department.<br /><br /><br /><span style="font-weight: bold;">How Does OLAP Make This Easy?</span><br />Business users think dimensionally. By design, OLAP technology stores, processes, and presents data in a dimensional way. The data model of OLAP systems reflects the users’ picture of their business data, making it easy to formulate queries in business terms.<br /><br />OLAP systems are optimised for fast retrieval of data for dimensional analysis.<br />We will now examine the multidimensional logical model, which serves as the basis for OLAP systems.<br /><br /><br /><span style="font-size:130%;"><span style="font-weight: bold;">The key Objects within the OLAP Model</span></span><br />Most OLAP data models are built around two key concepts: measures and dimensions.<br /><br /><span style="font-weight: bold;">Measures</span><br />Measures represent factual data; they are sometimes called “facts.” Typical examples of measures are sales, cost, profit, and margin. Measures are organized by one or more dimensions. Many people visualize measures as being a simple cube type shape, in which the edges of the shape are the dimensions and the contents of the shape are the measure values. The image below shows a generic simple three-dimensional measure<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNHKHvcgCIYZ4Y9Nwr_TMiSsOWkXISOWXKbnUUg4bw3PMMoSp-LDozSLJ_jLlAErvhc9s58ccYY9xi20xuzO3i2o4t9-EpORvQ13wJuQqqKHd1UOMNwFcqAkbL9zr-qyxlYNLDbS1y_Co/s1600-h/picture+2.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNHKHvcgCIYZ4Y9Nwr_TMiSsOWkXISOWXKbnUUg4bw3PMMoSp-LDozSLJ_jLlAErvhc9s58ccYY9xi20xuzO3i2o4t9-EpORvQ13wJuQqqKHd1UOMNwFcqAkbL9zr-qyxlYNLDbS1y_Co/s400/picture+2.JPG" alt="" id="BLOGGER_PHOTO_ID_5150170884456950482" border="0" /></a><br /><br />Of course measures are not restricted to just three-dimensional definitions. A measure can have as many or as few dimensions as required to accurately manage the data associated with the measure. In additional Oracle’s OLAP option allows you to design and manage multiple cubes each with different dimensionality. In addition Oracle OLAP supports a number of different data types for measure such as: numeric (Oracle SQL data type), decimal, integer, text, date and boolean.<br /><br />Measures can be divided into two categories:<br /><ul><li>Stored Measures</li><li>Calculated (or derived) Measures</li></ul>Stored measures are loaded, aggregated and stored directly within the database. Alternatively, they can be derived from the results of calculations that are stored. For example a forecast could be derived from another stored measure such as revenue and the results of the forecast calculation stored in the database.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimshck4m2An7gePP3iYe5p8QenWxt4k6l8WgFnESjpOarBk8EYdjKnY6pXUP5M0llXV2cwJXpmAzHRglLQoi2W_sjeVHnoOWOAbsTWEWAPFaAO_xOSY1dcBqT41Q1GjZ2GySAuaxuFaVg/s1600-h/picture+3.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimshck4m2An7gePP3iYe5p8QenWxt4k6l8WgFnESjpOarBk8EYdjKnY6pXUP5M0llXV2cwJXpmAzHRglLQoi2W_sjeVHnoOWOAbsTWEWAPFaAO_xOSY1dcBqT41Q1GjZ2GySAuaxuFaVg/s400/picture+3.JPG" alt="" id="BLOGGER_PHOTO_ID_5150171245234203362" border="0" /></a><br />Calculated measures are measures whose values are calculated dynamically at query time. Only the calculation rule(s) is stored in the database. Common calculations include measures such as ratios, differences, moving totals, and averages. Calculations do not require disk storage space, and they do not extend the processing time required for data maintenance.<br /><br />Note: Oracle OLAP has a library of several hundred multidimensional calculation functions that can be used in calculated measures. It is even possible for expert users of Oracle OLAP to define their own functions to perform virtually any calculation.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8J97UvuXhHO1EhUAdIyB9y24sarL6s2RDUYAxlLmhsp-Nx3knaovHCImLXV-hnsNyAzIYRnbCTk32B0bqdGpSEMmvNu0wfvrGv9_H2QygisE4BnmoG-FkUU0UwSgy5z8_NevxVnDW-eI/s1600-h/picture+4.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8J97UvuXhHO1EhUAdIyB9y24sarL6s2RDUYAxlLmhsp-Nx3knaovHCImLXV-hnsNyAzIYRnbCTk32B0bqdGpSEMmvNu0wfvrGv9_H2QygisE4BnmoG-FkUU0UwSgy5z8_NevxVnDW-eI/s400/picture+4.JPG" alt="" id="BLOGGER_PHOTO_ID_5150171369788254962" border="0" /></a><br />From a business user perspective both measures appear and are used in exactly the same way and have equally as fast query access. All measures are equivalent as far as the end-user interface is concerned. However, it can be useful to at least provide them with the access to the definition of a calculated measure via a tooltip for example, just to avoid confusion.<br /><br />Below is an example of a typical report contained both stored and calculated measures. The two calculated columns are “Profit” and “Margin”. Because both types of measures are treated the same, business users can use them in queries, conditions, to drive colour coding, exception reporting etc.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgD3ZXodULQ_TlIwDSZWsD_V2ix_b1wOG2VZ1YYKGBkXaDcaeoc80TWNbuZ_oFF-aRALizGKboPk027Co_tIa-EpFzXHu7PxbxBJ-LMemMinTQBu00vueR37GKSGn5_3EObp1rzP-XpwGM/s1600-h/picture+5.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgD3ZXodULQ_TlIwDSZWsD_V2ix_b1wOG2VZ1YYKGBkXaDcaeoc80TWNbuZ_oFF-aRALizGKboPk027Co_tIa-EpFzXHu7PxbxBJ-LMemMinTQBu00vueR37GKSGn5_3EObp1rzP-XpwGM/s400/picture+5.JPG" alt="" id="BLOGGER_PHOTO_ID_5150171717680605954" border="0" /></a><br /><br />So what is the difference between a cube and a measure? If you have used Analytic Workspace Manager you will be familiar with the concept of a cube. This is a high level container, which is invisible to business users querying the OLAP data, for grouping together measures that share the same dimensionality. Cubes do make your life much easier in terms of being able to manage a whole group of measures collectively, store them all to an XML template, load data into a group of measures via single reference and so on.<br /><br /><br /><span style="font-weight: bold;">Dimensions</span><br />Dimensions identify and categorize the data within your measures by forming the edges of the measures. Examples of dimensions include product, geography, time, and distribution channel.<br /><br />Dimensions have three key components:<br /><ul><li>Hierarchies</li><li>Levels</li><li>Attributes</li></ul><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1k0g3PHEHp6JmuUfeBO8Ua5d-5XGB5iCg4fhqh-ViSQkPNIvY3WMS_pdoye0-mWouQS63yyfhiby6SKc5FCiFfYmhqDBtUSA3M2RS20PbtBlaqGWXfupK6Wvmq-mhKiMg6y5-OdzUbBg/s1600-h/picture+6.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1k0g3PHEHp6JmuUfeBO8Ua5d-5XGB5iCg4fhqh-ViSQkPNIvY3WMS_pdoye0-mWouQS63yyfhiby6SKc5FCiFfYmhqDBtUSA3M2RS20PbtBlaqGWXfupK6Wvmq-mhKiMg6y5-OdzUbBg/s400/picture+6.JPG" alt="" id="BLOGGER_PHOTO_ID_5150172082752826130" border="0" /></a><br />With the Oracle OLAP data model, dimensions are stored once and are used repeatedly. This allows dimensions, and their members, to be shared across measures. While dimensions form the edge of a measure, the members point to individual cells inside the multi-dimensional measure, as can be seen above.<br /><br />In the example below, there is just one Time dimension even though it appears three times. The three measures in the picture have different shapes, or dimensionality. Sales and Units are both dimensioned by the Customer, Product, and Time. Price is only dimensioned by Product and Time; it does not use the Customer dimension because the price does not vary by customer.<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEholfj9bmn_ep4Wpw1nVyKzp0waVAsjvXcDwRpaqEtC1HwXjReIDiPsu6qHN-odhS24gvC8wAZT6TBUK3lTTt-uVKza-DrRFMIvW0qDy5hvKQl93FhlR-jUTOeA3oAT-Q8MWYi-VkxAP9I/s1600-h/picture+7.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEholfj9bmn_ep4Wpw1nVyKzp0waVAsjvXcDwRpaqEtC1HwXjReIDiPsu6qHN-odhS24gvC8wAZT6TBUK3lTTt-uVKza-DrRFMIvW0qDy5hvKQl93FhlR-jUTOeA3oAT-Q8MWYi-VkxAP9I/s400/picture+7.JPG" alt="" id="BLOGGER_PHOTO_ID_5150172250256550690" border="0" /></a><br /><span style="font-weight: bold;">Hierarchies</span><br />Dimension hierarchies are optional but are common in OLAP systems. A hierarchy is a logical structure that groups like members of a dimension together for the purpose of analysis. For example:<br /><ul><li>A Time dimension might have a hierarchy that describes how months are grouped together to represent a quarter and how quarters are grouped together to represent a full year.</li><li>An Organization dimension might have a hierarchy that makes it easy for you to identify the direct reports of a specific manager.</li></ul>Each dimension can have multiple hierarchies if required. For example, the time dimension can have a hierarchy that represents the Julian calendar and another hierarchy that represents a fiscal calendar.<br /><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuXfpw-OGjqr-ipLmQVwo7ewuwlaOHoimlmUEhQPYcWfpbEHtskPSIJUcheM6t9TlBLDA2ssEWW6s7Bz_vpVg32lQFaEED7yQ08Ot_5N169_JEEarhODh423df1pPZewXVhtm7AyXZUR0/s1600-h/picture+8.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuXfpw-OGjqr-ipLmQVwo7ewuwlaOHoimlmUEhQPYcWfpbEHtskPSIJUcheM6t9TlBLDA2ssEWW6s7Bz_vpVg32lQFaEED7yQ08Ot_5N169_JEEarhODh423df1pPZewXVhtm7AyXZUR0/s400/picture+8.JPG" alt="" id="BLOGGER_PHOTO_ID_5150172705523084082" border="0" /></a><br /><br /><br />A dimension’s structure is organized hierarchically based on parent-child relationships. These relationships enable:<br /><br /><ul><li>Navigation between levels: Hierarchies on dimensions enable drilling down to lower levels or navigating (rolling up) to higher levels. Drilling down on the Time dimension member “2005” will likely navigate you to the quarters Q1 2005 through Q4 2005. In a calendar year hierarchy, drilling down on Q1 2005 would navigate you to the months January 05 through March 05. These kinds of relationships make it easy for users to navigate large volumes of multidimensional data</li><li>Aggregation from child values to parent values: The parent represents the aggregation of its children. Data values at lower levels aggregate into data values at higher levels. Dimensions are structured hierarchically so that data at different levels of aggregation can be manipulated together efficiently for analysis and display. You learn about the aggregation capabilities of Oracle OLAP in the lesson titled “Applying Advanced Dimensional Design and Cube Processing Techniques.”</li><li>Allocation from parent values to child values: The reverse of aggregation is allocation and is heavily used by planning, budgeting, and similar applications. Here, the role of the hierarchy is to identify the children and descendants of particular dimension members for “top-down” allocation of budgets (among other uses)</li><li>Grouping of members for calculations: Share and index calculations take advantage of hierarchical relationships (for example, the percentage of total profit contributed by each product, or the percentage share of product revenue for a certain category, or costs as a percentage of the geographical region for a retail location)</li></ul><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlix1baTh52Yh7_pjhJ-oS4EIoEB2m0P_8B9SWnb06v4hvR2wIYGG-W_VbgR_IKJ6qBWmcOS8v6Oz5RES6HfXeSuVUxzjNN5qEXxpjtT-PruSwJ9tXsScHeXNPB7038_HaTCxGrCDrU4k/s1600-h/picture+9.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlix1baTh52Yh7_pjhJ-oS4EIoEB2m0P_8B9SWnb06v4hvR2wIYGG-W_VbgR_IKJ6qBWmcOS8v6Oz5RES6HfXeSuVUxzjNN5qEXxpjtT-PruSwJ9tXsScHeXNPB7038_HaTCxGrCDrU4k/s400/picture+9.JPG" alt="" id="BLOGGER_PHOTO_ID_5150173177969486658" border="0" /></a><br />In this example, you can do the following in the Product hierarchy:<br /><ul><li>Navigate up through each level in the hierarchy from the lowest level to the highest level</li><li>Navigate down the hierarchy from the highest level to the lowest level</li><li>Aggregate data from the lowest level (individual products) up through the hierarchy to the highest level (total product)</li></ul><br /><span style="font-weight: bold;">Levels</span><br />Each level represents a position in the hierarchy. The level above the base level contains aggregate values for the levels below it. The members at different levels have a one-to-many parent-child relationship. A hierarchy typically contains several levels, and a single level can be included in more than one hierarchy.<br /><br />If data for the Sales measure is stored at the Product level, then the higher levels of the product dimension enable the sales data to be aggregated correctly into Subcategory, Category, and All Products levels.<br /><br />If there are multiple hierarchies built over a dimension, it may be that a level would appear in more than one hierarchy or may exist in only one hierarchy.<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiy9-yeZk_ReuvbpX3YMmdEiyigkp57hWYt5PqjoXDClvxH_ScXIOFQ_Mk66IE4lpJd7fM53EzO2zm2_LeUvmxaa_GQgbbJAM1FjvwgiORhnMiAiBVFtTVjDFi5E9w0tYANcljuJEpQ-fg/s1600-h/picture+10.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiy9-yeZk_ReuvbpX3YMmdEiyigkp57hWYt5PqjoXDClvxH_ScXIOFQ_Mk66IE4lpJd7fM53EzO2zm2_LeUvmxaa_GQgbbJAM1FjvwgiORhnMiAiBVFtTVjDFi5E9w0tYANcljuJEpQ-fg/s400/picture+10.JPG" alt="" id="BLOGGER_PHOTO_ID_5150173250983930706" border="0" /></a><br /><span style="font-weight: bold;">Types of Hierarchies</span><br />Within a multi-dimensional model there are two basic types of hierarchies:<br /><ul><li>Level Based</li><li>Value Based <br /></li></ul>Most of the hierarchies are level based, including the Product dimension hierarchy shown in the previous slide and the Time dimension hierarchy shown in this slide. In the time hierarchy example, there are Day, Month, Quarter, and Year levels in the hierarchy.<br /><br />Sales forces also generally have a level-based structure, as in the following example:<br />Representative > Area > Region > Country > Continent > World<br /><br />Other dimensions may have hierarchies that are not strictly level based. For example,<br />there is clearly a hierarchy in an organization chart, but all the direct reports of the President may not be at the same level. In the example, the two VPs (vice presidents) and the President’s Admin (administrative assistant) are all direct reports of the President but are not at the same level. The VPs are not at the Admin level, and the Admin is not at the VP level.<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg92iTtnTjRhJmBrj4eqAk106tgJO-JcH6qWGoT0Gzj5tlEcnRtpGYa4ayrk5J3i4h-dsda7KhLW-ohEOZ2Z4WloMW-4p0cdQxjYrNmi41Sp0_K1ERVbHUMYeLMoaZKHUsv_Q-5GofKc98/s1600-h/picture+11.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg92iTtnTjRhJmBrj4eqAk106tgJO-JcH6qWGoT0Gzj5tlEcnRtpGYa4ayrk5J3i4h-dsda7KhLW-ohEOZ2Z4WloMW-4p0cdQxjYrNmi41Sp0_K1ERVbHUMYeLMoaZKHUsv_Q-5GofKc98/s400/picture+11.JPG" alt="" id="BLOGGER_PHOTO_ID_5150173869459221346" border="0" /></a><span style="font-weight: bold;">Attributes</span><br />Attributes provide descriptive information about the dimension members and are also useful when you are selecting dimension members for analysis:<br /><ul><li>Select the products whose colour (attribute) is “Blue.”</li><li>Select the customers who have two children. </li><li>Select the promotions that are of type “Multipack.”</li><li>Select all time periods whose description contains “January.”</li></ul>Most types of attributes are entirely optional. Oracle OLAP permits a large number of attributes to be created if required. Some attributes are valid for all the members of the dimension, regardless of level. For example, all products at all levels have a description. Others attributes are valid for certain levels or certain hierarchies only. For example, only individual product items have a colour.<br /><br /><br /><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJGi-GsWrUdjCPJX2M0AY66nOvYDSW9QnpUSjgxpyl9K_BNKQddwSWKs6jHKchJw_b21YWAd4kuERLqxowwNYHwlI_WYMCuMTg4IiRHted4E86Wr6ydMPEFhuoBzlmkm8Qs28IvlVjfb0/s1600-h/picture+12.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJGi-GsWrUdjCPJX2M0AY66nOvYDSW9QnpUSjgxpyl9K_BNKQddwSWKs6jHKchJw_b21YWAd4kuERLqxowwNYHwlI_WYMCuMTg4IiRHted4E86Wr6ydMPEFhuoBzlmkm8Qs28IvlVjfb0/s400/picture+12.JPG" alt="" id="BLOGGER_PHOTO_ID_5150173963948501874" border="0" /></a>In the above picture certain products are displayed together with their parent levels in the hierarchy (subcategories and categories) on the Product dimension. In addition, two sample attributes (Colour and Product Manager) are displayed for these products.<br />Other examples of typical attributes might include:<br /><ul><li>For Product dimensions: Colour, Flavour, Pack Size, Brand Manager Name, and so on</li><li>For Customer dimensions: Gender, Marital Status, Date of Birth, and other types of demographic information</li></ul><span style="font-style: italic;">Note</span>: Sometimes, attributes may also be modelled as levels in an alternate hierarchy. Consider the above example: If the business requirement was that measures should be aggregated by Product Manager (total for Bruce, John, Karl, Mary, and so on.) or by Colour (total for Blue, Green, Red, White, Yellow, and so on) and by the ability to drill down, aggregate, allocate, or calculate data based on these values, then many designers would consider creating additional hierarchies on the Product dimension for this purpose. However, many attributes have little business use as aggregates and are used simply in filtering.<br /><br />In the next workshop we will start to review some of the Oracle OLAP related technology, from design and maintenance right through to end user reporting.Keith Lakerhttp://www.blogger.com/profile/01039869313455611230noreply@blogger.com0tag:blogger.com,1999:blog-3820031471524503731.post-63473982498000988512007-12-31T02:46:00.000-08:002008-12-11T15:26:00.519-08:00AWM Connection MethodsConnecting to a database using Analytic Workspace Manager (AWM) seems to cause some interesting postings on OTN. Why? Mainly because AWM provides two different connection methods and each method has its own requirements:<br /><ul><li>JDBC - this uses the normal host:port:sid connection format and this is I suspect how most people connect since this is the way AWM is typically demonstrated<br /></li></ul><ul><li>TNS - this uses either the full TNS protocol string or references a TNS entry in the TNSNAMES.ORA file.</li></ul>so let's look at these methods in a bit more detail:<br /><br /><span style="font-size:130%;">Creating a JDBC Connection</span><br />This is the easiest method to use since AWM is configured out of the box to use JDBC connections. Connecting to a database using JDBC is very straightforward. After launching AWM, right-mouse click on the node "Database" and select "Add Database to tree", as shown here:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcbksvvx4-hA76xGDrjyLrCiljybF3ELWU0IlxsmZTIPoYsaMRBRDg2x0-xdYrHHQJYI5YGnXFnDTLfsl-lmsp9BAFz7tU-eLUT7R1sj41kqW7tH6d7mF_gfhT5XW9XZRS8pOsBCaMoXE/s1600-h/image5.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcbksvvx4-hA76xGDrjyLrCiljybF3ELWU0IlxsmZTIPoYsaMRBRDg2x0-xdYrHHQJYI5YGnXFnDTLfsl-lmsp9BAFz7tU-eLUT7R1sj41kqW7tH6d7mF_gfhT5XW9XZRS8pOsBCaMoXE/s400/image5.JPG" alt="" id="BLOGGER_PHOTO_ID_5150096736141552274" border="0" /></a><br />The connection dialog provides prompts to enter a descriptive label and the connection information. For a JDBC connection this is simply the hostname, the port for the database listener and the database SID. This is the information shown here:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt6UvRgW9zv5giuIi9Eyrg2CvWv5a0DHsajRYfrsqSfAA27zzjTpsXofcURBjmgtlcxKKn_8C_MdJzk7Ol_9RpiUR7KVp_TnjRuA1jBlS9R7iUQkUu-2ZkeWA1Jzsuh_3pR8coJE3NY8k/s1600-h/image4.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt6UvRgW9zv5giuIi9Eyrg2CvWv5a0DHsajRYfrsqSfAA27zzjTpsXofcURBjmgtlcxKKn_8C_MdJzk7Ol_9RpiUR7KVp_TnjRuA1jBlS9R7iUQkUu-2ZkeWA1Jzsuh_3pR8coJE3NY8k/s400/image4.JPG" alt="" id="BLOGGER_PHOTO_ID_5150096920825146018" border="0" /></a><br /><br />Once you have supplied this information the database will be added to the tree and then you can connect to your chose database instance and provide a user name and password, as shown here:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh26Cqyf28jggdS_C98v7h6BzDzXu7pVPbJVVFdwPxsyi1AbwhMHLiYrVyIadcrUAR62cVTzkB0u4BP4wEJ8NIr2wh0VhZCGPO05JkSifmfOhnTRUi_VUtOhwYoSKfVU_NgP_n1NWpk6ss/s1600-h/image6.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh26Cqyf28jggdS_C98v7h6BzDzXu7pVPbJVVFdwPxsyi1AbwhMHLiYrVyIadcrUAR62cVTzkB0u4BP4wEJ8NIr2wh0VhZCGPO05JkSifmfOhnTRUi_VUtOhwYoSKfVU_NgP_n1NWpk6ss/s400/image6.JPG" alt="" id="BLOGGER_PHOTO_ID_5150098793430887090" border="0" /></a><br />The alternative method is to use a TNS entry and this method always seems to cause errors. Typical errors are:<br /><ul><li>AWM simply aborts with no error message or warning</li><li>OLAPI exception error stating : Unable to resolve type "SYS.SQLOLAPIEXCEPTION"</li><li>An unexpected exception has been detected in native code outside the VM....... Library=D:\Oracle\product\10.2.0\db_1\BIN\ocijdbc10.dll</li></ul><span style="font-size:130%;">Creating a TNS connection</span><br /><br />Firstly, we need to change the way AWM is typically launched.<br /><br /><span style="font-weight: bold;font-size:100%;" >Trapping errors with AWM</span><br />To get diagnostic information, to trap any errors not shown in the AWM GUI, I always recommend using the AWMC.EXE file. This launches a DOS command window that can be used to track error messages. With the 10.2.0.3A version of AWM there are some instances where the GUI will just simply crash or hang with no visible error messages. In this case if you try to use a TNS connection method, when AWM connects to the database instance and tries to retrieve the list of available AWs it simply aborts with no warning and the DOS command window disappears. To resolve this I created a batch file called AWM.BAT which launches AWM by calling awmc.exe. Running this from a command line window allows me to see all the relevant error messages.<br /><br /><span style="font-weight: bold;">Using a TNS connection</span><br />To connecting via the TNS method requires some additional steps in terms of configuration that might not be totally clear. The main problem appears to be the lack of any error messages if you make a mistake. If you get the basic connection string wrong, AWM will give you a reasonable error message that points you in the right direction (" TNS:could not resolve the connect identifier specified...."). However, as we all probably have lots of different Oracle products installed on our desktops/laptops, AWM is able to find, without any prompting, some of the files it needs to make a TNS connection and this is what causes the problem.<br /><br />So which files does AWM need to make a TNS connection? <br /><br />It needs a database client installation to be run to install the SQLNet layer. This will then provide the necessary DLLs etc to support a SQLNet connection. At this point, this is where AWM can go wrong and just simply crash without warning.<br /><br />To make a TNS connection you can either reference one of the entries in the TNSNAMES.ORA file or you can paste in the full TNS connection string, such as:<br /><br />(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=klaker-uk.uk.oracle.com)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=beans)))<br /><br />into the connection dialog box instead of the JDBC connection string. If you want to reference an entry in the TNSNAMES, then assuming you have multiple Oracle homes, I would recommend setting the TNS_ADMIN environment variable so you know which TNSNAMES.ORA is being used. If you do not specify this environment variable the ORACLE_HOME environment variable will be used to source the TNSNAMES.ORA file. Therefore, you need to make sure you have the ORACLE_HOME environment variable set as a minimum before you start AWM.<br /><br />Using the above batch file to run AWM, I added some additional environment variable statements as follows:<br /><br /><span style="font-family:courier new;">set TNS_ADMIN=D:\oracle\product\10.2.0.1\db_1\NETWORK\ADMIN</span><br /><span style="font-family:courier new;">set PATH=D:\oracle\awm\awm\jre\bin;D:\oracle\</span><span style="font-family:courier new;">product\10.2.0.1\db_1</span><span style="font-family:courier new;">\bin;</span><br /><span style="font-family:courier new;">set CLASSPATH=D:\oracle\awm\awm\jre\bin</span><br /><span style="font-family:courier new;">set ORACLE_HOME=D:\oracle\</span><span style="font-family:courier new;">product\10.2.0.1\db_1</span><br /><span style="font-family:courier new;">call awmc.exe</span><br /><br />In this case I have referenced my 10gR2 database installation. This, however, does cause an error when AWM tries to return a list of available AWs for my TNS connection. An error log is now created that contains the following information:<br /><span style=";font-family:courier new;font-size:85%;" ><br />An unexpected exception has been detected in native code outside the VM.<br />Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x61D35968<br />Function=xaolog+0x6338<br />Library=D:\oracle\product\10.2.0\db_1\bin\OraClient10.Dll<br /><br />Current Java thread:<br /> at oracle.jdbc.driver.T2CStatement.t2cParseExecuteDescribe(Native Method)<br /> at oracle.jdbc.driver.T2CPreparedStatement.executeForDescribe(T2CPreparedStatement.java:518)<br /> at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1030)<br /> at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1123)<br /> at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3284)<br /> at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3328)<br /> - locked <0x1002eaf8> (a oracle.jdbc.driver.T2CPreparedStatement)<br /> - locked <0x102312c8> (a oracle.jdbc.driver.T2CConnection)<br /> at oracle.olap.awm.util.jdbc.SQLWrapper.execute(SQLWrapper.java:184)<br /> at oracle.olap.awm.util.jdbc.SQLWrapper.execute(SQLWrapper.java:62)<br /> at oracle.olap.awm.businessobject.aw.WorkspaceBO.getWorkspacesOwnedBySchemaInStandardForm(WorkspaceBO.java:200)<br /> at oracle.olap.awm.navigator.node.WorkspaceFolderNode.getChildren(WorkspaceFolderNode.java:111)<br /> at oracle.olap.awm.navigator.node.BaseNodeModel.refreshData(BaseNodeModel.java:74)<br /> at oracle.olap.awm.navigator.node.BaseNodeModel.dTreeItemExpanding(BaseNodeModel.java:221)<br /> at oracle.bali.ewt.dTree.DTreeDeferredParent.__fireExpansionChanging(Unknown Source)<br /> at oracle.bali.ewt.dTree.DTreeDeferredParent.setExpanded(Unknown Source)<br /> at oracle.olap.awm.navigator.node.BaseNode.expandHelper(BaseNode.java:2185)<br /> - locked <0x100159f8> (a java.lang.Object)<br /> at oracle.olap.awm.navigator.node.BaseNode.access$400(BaseNode.java:109)<br /> at oracle.olap.awm.navigator.node.BaseNode$ExpansionThread.run(BaseNode.java:2135)<br /><br />Dynamic libraries:<br />0x00400000 - 0x0041B000 D:\oracle\awm\awm\bin\awmc.exe<br />0x7C900000 - 0x7C9B0000 C:\WINDOWS\system32\ntdll.dll<br />0x7C800000 - 0x7C8F5000 C:\WINDOWS\system32\kernel32.dll<br />0x7E410000 - 0x7E4A0000 C:\WINDOWS\system32\USER32.dll<br />0x77F10000 - 0x77F57000 C:\WINDOWS\system32\GDI32.dll<br />0x76390000 - 0x763AD000 C:\WINDOWS\system32\IMM32.DLL<br />0x77DD0000 - 0x77E6B000 C:\WINDOWS\system32\ADVAPI32.dll<br />0x77E70000 - 0x77F01000 C:\WINDOWS\system32\RPCRT4.dll<br />0x629C0000 - 0x629C9000 C:\WINDOWS\system32\LPK.DLL<br />0x74D90000 - 0x74DFB000 C:\WINDOWS\system32\USP10.dll<br />0x77C10000 - 0x77C68000 C:\WINDOWS\system32\msvcrt.dll<br />0x08000000 - 0x08138000 D:\oracle\awm\awm\jre\bin\client\jvm.dll<br />0x76B40000 - 0x76B6D000 C:\WINDOWS\system32\WINMM.dll<br />0x10000000 - 0x10007000 D:\oracle\awm\awm\jre\bin\hpi.dll<br />0x00A20000 - 0x00A2E000 D:\oracle\awm\awm\jre\bin\verify.dll<br />0x00A30000 - 0x00A49000 D:\oracle\awm\awm\jre\bin\java.dll<br />0x00A50000 - 0x00A5D000 D:\oracle\awm\awm\jre\bin\zip.dll<br />0x03D70000 - 0x03E7F000 D:\oracle\awm\awm\jre\bin\awt.dll<br />0x73000000 - 0x73026000 C:\WINDOWS\system32\WINSPOOL.DRV<br />0x774E0000 - 0x7761D000 C:\WINDOWS\system32\ole32.dll<br />0x5AD70000 - 0x5ADA8000 C:\WINDOWS\system32\uxtheme.dll<br />0x03E80000 - 0x03ED0000 D:\oracle\awm\awm\jre\bin\fontmanager.dll<br />0x755C0000 - 0x755EE000 C:\WINDOWS\system32\msctfime.ime<br />0x038C0000 - 0x038DE000 D:\oracle\awm\awm\jre\bin\jpeg.dll<br />0x62F00000 - 0x62F13000 D:\oracle\product\10.2.0\db_1\BIN\ocijdbc10.dll<br />0x045D0000 - 0x04629000 D:\oracle\product\10.2.0\db_1\BIN\OCI.dll<br />0x7C340000 - 0x7C396000 C:\WINDOWS\system32\MSVCR71.dll<br />0x76BF0000 - 0x76BFB000 C:\WINDOWS\system32\PSAPI.DLL<br />0x61C20000 - 0x61E76000 D:\oracle\product\10.2.0\db_1\bin\OraClient10.Dll<br />0x60870000 - 0x60957000 D:\oracle\product\10.2.0\db_1\bin\oracore10.dll<br />0x60A80000 - 0x60B4B000 D:\oracle\product\10.2.0\db_1\bin\oranls10.dll<br />0x63690000 - 0x636A8000 D:\oracle\product\10.2.0\db_1\bin\oraunls10.dll<br />0x60EB0000 - 0x60EB7000 D:\oracle\product\10.2.0\db_1\bin\orauts.dll<br />0x71AB0000 - 0x71AC7000 C:\WINDOWS\system32\WS2_32.dll<br />0x71AA0000 - 0x71AA8000 C:\WINDOWS\system32\WS2HELP.dll<br />0x636B0000 - 0x636B6000 D:\oracle\product\10.2.0\db_1\bin\oravsn10.dll<br />0x60FA0000 - 0x61093000 D:\oracle\product\10.2.0\db_1\bin\oracommon10.dll<br />0x60300000 - 0x6086C000 D:\oracle\product\10.2.0\db_1\bin\orageneric10.dll<br />0x63430000 - 0x63457000 D:\oracle\product\10.2.0\db_1\bin\orasnls10.dll<br />0x63750000 - 0x638C6000 D:\oracle\product\10.2.0\db_1\bin\oraxml10.dll<br />0x04640000 - 0x04651000 C:\WINDOWS\system32\MSVCIRT.dll<br />0x60960000 - 0x60A73000 D:\oracle\product\10.2.0\db_1\bin\oran10.dll<br />0x62740000 - 0x6277E000 D:\oracle\product\10.2.0\db_1\bin\oranl10.dll<br />0x62790000 - 0x627A7000 D:\oracle\product\10.2.0\db_1\bin\oranldap10.dll<br />0x627F0000 - 0x628FC000 D:\oracle\product\10.2.0\db_1\bin\orannzsbb10.dll<br />0x62530000 - 0x62583000 D:\oracle\product\10.2.0\db_1\bin\oraldapclnt10.dll<br />0x62670000 - 0x6268B000 D:\oracle\product\10.2.0\db_1\bin\orancrypt10.dll<br />0x71AD0000 - 0x71AD9000 C:\WINDOWS\system32\WSOCK32.dll<br />0x77120000 - 0x771AB000 C:\WINDOWS\system32\OLEAUT32.dll<br />0x62920000 - 0x6296D000 D:\oracle\product\10.2.0\db_1\bin\oranro10.dll<br />0x626B0000 - 0x626B7000 D:\oracle\product\10.2.0\db_1\bin\oranhost10.dll<br />0x62660000 - 0x62666000 D:\oracle\product\10.2.0\db_1\bin\orancds10.dll<br />0x04660000 - 0x04668000 D:\oracle\product\10.2.0\db_1\bin\orantns10.dll<br />0x04670000 - 0x049D6000 D:\oracle\product\10.2.0\db_1\bin\orapls10.dll<br />0x049E0000 - 0x049E9000 D:\oracle\product\10.2.0\db_1\bin\oraslax10.dll<br />0x63080000 - 0x63284000 D:\oracle\product\10.2.0\db_1\bin\oraplp10.dll<br />0x61ED0000 - 0x61F6A000 D:\oracle\product\10.2.0\db_1\bin\orahasgen10.dll<br />0x62AB0000 - 0x62B1F000 D:\oracle\product\10.2.0\db_1\bin\oraocr10.dll<br />0x62B20000 - 0x62B66000 D:\oracle\product\10.2.0\db_1\bin\oraocrb10.dll<br />0x5B860000 - 0x5B8B4000 C:\WINDOWS\system32\NETAPI32.dll<br />0x62980000 - 0x62990000 D:\oracle\product\10.2.0\db_1\bin\orantcp10.dll<br />0x63520000 - 0x635BA000 D:\oracle\product\10.2.0\db_1\bin\orasql10.dll<br />0x77FE0000 - 0x77FF1000 C:\WINDOWS\system32\Secur32.dll<br />0x71A50000 - 0x71A8F000 C:\WINDOWS\System32\mswsock.dll<br />0x76F20000 - 0x76F47000 C:\WINDOWS\system32\DNSAPI.dll<br />0x76FB0000 - 0x76FB8000 C:\WINDOWS\System32\winrnr.dll<br />0x76F60000 - 0x76F8C000 C:\WINDOWS\system32\WLDAP32.dll<br />0x751D0000 - 0x751EE000 C:\WINDOWS\system32\wshbth.dll<br />0x77920000 - 0x77A13000 C:\WINDOWS\system32\SETUPAPI.dll<br />0x04CF0000 - 0x04D15000 C:\Program Files\Bonjour\mdnsNSP.dll<br />0x76D60000 - 0x76D79000 C:\WINDOWS\system32\Iphlpapi.dll<br />0x76FC0000 - 0x76FC6000 C:\WINDOWS\system32\rasadhlp.dll<br />0x662B0000 - 0x66308000 C:\WINDOWS\system32\hnetcfg.dll<br />0x71A90000 - 0x71A98000 C:\WINDOWS\System32\wshtcpip.dll<br />0x71F80000 - 0x71F84000 C:\WINDOWS\system32\security.dll<br />0x77C70000 - 0x77C93000 C:\WINDOWS\system32\msv1_0.dll<br />0x76C90000 - 0x76CB8000 C:\WINDOWS\system32\imagehlp.dll<br />0x59A60000 - 0x59B01000 C:\WINDOWS\system32\DBGHELP.dll<br />0x77C00000 - 0x77C08000 C:\WINDOWS\system32\VERSION.dll<br /><br />Heap at VM Abort:<br />Heap<br />def new generation total 2176K, used 226K [0x10010000, 0x10260000, 0x12770000)<br />eden space 1984K, 6% used [0x10010000, 0x100313e0, 0x10200000)<br />from space 192K, 48% used [0x10230000, 0x102475c0, 0x10260000)<br />to space 192K, 0% used [0x10200000, 0x10200000, 0x10230000)<br />tenured generation total 27488K, used 21294K [0x12770000, 0x14248000, 0x30010000)<br />the space 27488K, 77% used [0x12770000, 0x13c3b850, 0x13c3ba00, 0x14248000)<br />compacting perm gen total 15616K, used 15595K [0x30010000, 0x30f50000, 0x34010000)<br />the space 15616K, 99% used [0x30010000, 0x30f4ad60, 0x30f4ae00, 0x30f50000)<br /><br />Local Time = Mon Dec 31 09:52:15 2007<br />Elapsed Time = 17<br />#<br /># The exception above was detected in native code outside the VM<br />#<br /># Java VM: Java HotSpot(TM) Client VM (1.4.2_03-b02 mixed mode)<br />#<br /></span><br />Notice the error is with the <span style="font-weight: bold;">OraClient10.dll</span> file. Doing a search across all my Oracle software installations I found multiple copies of this file, with different file sizes. The file in the database home/bin directory was 2348Kb. The file in my OWB10gR2 directory was 1877Kb. Switching the batch file to point to my OWB home directory to use that OraClient10.dll file resolved the connection problem:<br /><br /><span style="font-family:courier new;">set TNS_ADMIN=D:\oracle\OWB10gHome\NETWORK\ADMIN</span><br /><span style="font-family:courier new;">set PATH=D:\oracle\awm\awm\jre\bin;D:\oracle\OWB10gHome\bin;</span><br /><span style="font-family:courier new;">set CLASSPATH=D:\oracle\awm\awm\jre\bin</span><br /><span style="font-family:courier new;">set ORACLE_HOME=D:\oracle\OWB10gHome</span><br /><span style="font-family:courier new;">call awmc.exe</span><br /><br />Therefore, it would appear that the latest database version (10.2.0.3) of the OraClient10.dll file is somehow incompatible with the latest version of AWM10.2.0.3A. Not sure why, but I have logged a bug to try and resolve this.<br /><br />To summarize, if you want to define a database connection in AWM based on a TNS connection name or TNS string do the following:<br /><br />1) Make sure you have a database Client installation (or equivalent, such as OWB) that provides 2) SQLNet<br />Create a batch file to run AWM<br />3) Add the following environment variables to your batch file:<br /><ul><li> TNS_ADMIN to point to your TNSNAMES.ORA file</li><ul><li>or enter the TNS connect string in full ((DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=............................)))</li></ul><li>ORACLE_HOME to point to your database client installation or equivalent.</li></ul>in addition, to avoid other possible conflicts I also set the following:<br /><ul><li>CLASSPATH - limited to just AWM</li><li>PATH - limited to just the ORACLE_HOME and AWM</li></ul>With all this in place, everything should work as normal. and if you do get an error it should be recorded in the DOS command window, which will not be closed if you call it directly from a command prompt.Keith Lakerhttp://www.blogger.com/profile/01039869313455611230noreply@blogger.com0tag:blogger.com,1999:blog-3820031471524503731.post-39483720395147809142007-12-27T03:30:00.000-08:002007-12-27T03:44:37.112-08:00Welcome One and AllWelcome to the new Oracle OLAP blog. Here we will try to feature anything and everything related to Oracle's database OLAP Option. Our aim is to provide information for both novice and advanced OLAP users.<br /><br />Some of you may recognise my profile from the BI Blog that I have co-hosted with Abhinav (BI Product Management) for the last three years. For 2008 I am switching my posts to this new blog where we can concentrate on the key features and benefits of the OLAP option. On this blog I am teaming up with Brian Macdonald who is one of our top OLAP experts and he is based in North America.<br /><br />If you have any questions regarding OLAP please remember to use the OLAP technical forum on OTN:<br /><br /><span style="font-size:100%;"><a href="http://forums.oracle.com/forums/forum.jspa?forumID=16"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: pre; widows: 2; word-spacing: 0px;font-family:'Lucida Grande';font-size:12;" >http://forums.oracle.com/forums/forum.jspa?forumID=16</span></a></span><br /><br />and for more general OLAP technical information don't forget the OLAP OTN Home page<br /><br /><a href="http://www.oracle.com/technology/products/bi/olap/index.html"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: pre; widows: 2; word-spacing: 0px;font-family:'Lucida Grande';font-size:12;" >http://www.oracle.com/technology/products/bi/olap/index.html</span></a>Keith Lakerhttp://www.blogger.com/profile/01039869313455611230noreply@blogger.com0