<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-245514474549983999</id><updated>2011-12-13T08:27:52.611-06:00</updated><category term='install'/><category term='metalink'/><category term='MOS'/><category term='sr creation'/><category term='FLASH'/><category term='strange antics'/><category term='alert.log'/><category term='query tuning'/><category term='tools'/><category term='ckpt'/><category term='cbo'/><category term='documentation'/><category term='assessment'/><category term='schema objects'/><category term='raw disk'/><category term='bugs'/><category term='books'/><category term='stragg'/><category term='sqlplus'/><category term='rdbms'/><category term='upgrade'/><category term='10g'/><category term='carlos sierra'/><category term='dell'/><category term='10053'/><category term='we8mswin1252'/><category term='clustering_factor'/><category term='buffer busy waits'/><category term='release 5.3'/><category term='spam'/><category term='11g'/><category term='task flow'/><category term='service names'/><category term='dynamic sampling'/><category term='al32utf8'/><category term='datafiles'/><category term='SGA'/><category term='&quot;concepts guide journey&quot;'/><category term='x$ table'/><category term='tom kyte'/><category term='grid control'/><category term='brolem'/><category term='review'/><category term='mumbo-jumbo'/><category term='capcha'/><category term='database control'/><category term='unbreakable'/><category term='banner'/><category term='backup'/><category term='notes'/><category term='patch'/><category term='metalink 3'/><category term='vpd'/><category term='competence'/><category term='workshop'/><category term='histograms'/><category term='srvctl'/><category term='bug dbms_system.ksdwrt'/><category term='filter operation'/><category term='lgwr'/><category term='character conversion'/><category term='streams'/><category term='ioug'/><category term='datapump'/><category term='memory'/><category term='Adrian Billington'/><category term='redesign'/><category term='dbcontrol'/><category term='the bridge'/><category term='oracle'/><category term='rls'/><category term='what are you crazy'/><category term='problems'/><category term='internals'/><category term='ocm'/><category term='nothing-to-be-scared-of'/><category term='concepts'/><category term='bug 11858963'/><category term='marketing'/><category term='partitioned indexes'/><category term='RAC Attack'/><category term='parameter'/><category term='object dependencies'/><category term='corruption'/><category term='anydata'/><category term='emca'/><category term='file header block'/><category term='enhancements'/><category term='treedump'/><category term='skills'/><category term='support'/><category term='lessons'/><category term='emgc'/><category term='cache'/><category term='sr'/><category term='rac'/><category term='PGA'/><category term='ocp'/><category term='sql plan'/><category term='beliefs'/><category term='codes'/><category term='health recommendations'/><category term='hwm'/><category term='transactions'/><category term='feedback'/><category term='enterprise manager'/><category term='guided resolutions'/><category term='best practice'/><category term='start'/><category term='first_rows_k'/><category term='configuration manager'/><category term='class'/><category term='tuning'/><category term='we8iso8859P1'/><category term='parallel'/><category term='selectivities'/><category term='logical standby'/><category term='smon'/><category term='assm'/><category term='clusterware'/><category term='application architecture'/><category term='pmon'/><category term='SQLTXPLAIN'/><category term='debug'/><category term='miscellaneous'/><category term='dbms_pclxutil.build_part_index'/><category term='BDE'/><category term='support analyst'/><category term='pr'/><category term='collaborate'/><category term='jonathan lewis'/><category term='standby'/><category term='knowledge base'/><category term='Dan Morgan'/><category term='certfication'/><category term='asktom'/><category term='diagnostic_dest'/><category term='scm'/><category term='experience'/><category term='goals'/><category term='autofill'/><category term='data dictionary'/><category term='oui'/><category term='asm'/><category term='eve-online'/><category term='good for a laugh'/><category term='bs'/><category term='bad application design'/><category term='tablespaces'/><category term='kernel'/><category term='10046'/><category term='crs'/><category term='dbwr'/><category term='search'/><category term='features'/><category term='index'/><category term='career'/><category term='rman'/><category term='cardinality feedback'/><category term='global campus'/><category term='redo log'/><category term='Richard Foote'/><category term='morale'/><category term='gjbcolr'/><category term='utilities'/><title type='text'>OraJourn</title><subtitle type='html'>Tales of a Sojourner in the land of Oracle</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>100</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-7772771303314319923</id><published>2011-07-27T08:06:00.000-05:00</published><updated>2011-07-27T08:06:08.406-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MOS'/><category scheme='http://www.blogger.com/atom/ns#' term='debug'/><category scheme='http://www.blogger.com/atom/ns#' term='FLASH'/><title type='text'>Debug mode for MOS</title><content type='html'>Had an SR in which I learned about a debug mode for FLASH MOS (tried it in HTML, no go *grin*). Hold down the Control key and click on the Oracle My Oracle Support Logo in the upper left-hand corner:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://3.bp.blogspot.com/-CONTrLsEsGY/TjAMxpXratI/AAAAAAAAqV0/Def5FTnSZRg/s1600/MOS_logo.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-CONTrLsEsGY/TjAMxpXratI/AAAAAAAAqV0/Def5FTnSZRg/s1600/MOS_logo.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Here is a short video, using Oracle's recommendation of CamStudio:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;object width="320" height="266" class="BLOG_video_class" id="BLOG_video-d7ee53718dd5b117" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"&gt;&lt;param name="movie" value="http://www.youtube.com/get_player"&gt;&lt;param name="bgcolor" value="#FFFFFF"&gt;&lt;param name="allowfullscreen" value="true"&gt;&lt;param name="flashvars" value="flvurl=http://v12.nonxt1.googlevideo.com/videoplayback?id%3Dd7ee53718dd5b117%26itag%3D5%26app%3Dblogger%26ip%3D0.0.0.0%26ipbits%3D0%26expire%3D1330141558%26sparams%3Did,itag,ip,ipbits,expire%26signature%3D7C09B203D3899E4D12C2087748F8E2D7925F2235.4181CFC5DF3B63770967009A80AB47046F18040E%26key%3Dck1&amp;amp;iurl=http://video.google.com/ThumbnailServer2?app%3Dblogger%26contentid%3Dd7ee53718dd5b117%26offsetms%3D5000%26itag%3Dw160%26sigh%3DGwW_5nbIGY-xAGeIIWtfDIvjUho&amp;amp;autoplay=0&amp;amp;ps=blogger"&gt;&lt;embed src="http://www.youtube.com/get_player" type="application/x-shockwave-flash"width="320" height="266" bgcolor="#FFFFFF"flashvars="flvurl=http://v12.nonxt1.googlevideo.com/videoplayback?id%3Dd7ee53718dd5b117%26itag%3D5%26app%3Dblogger%26ip%3D0.0.0.0%26ipbits%3D0%26expire%3D1330141558%26sparams%3Did,itag,ip,ipbits,expire%26signature%3D7C09B203D3899E4D12C2087748F8E2D7925F2235.4181CFC5DF3B63770967009A80AB47046F18040E%26key%3Dck1&amp;iurl=http://video.google.com/ThumbnailServer2?app%3Dblogger%26contentid%3Dd7ee53718dd5b117%26offsetms%3D5000%26itag%3Dw160%26sigh%3DGwW_5nbIGY-xAGeIIWtfDIvjUho&amp;autoplay=0&amp;ps=blogger"allowFullScreen="true" /&gt;&lt;/object&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-7772771303314319923?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/7772771303314319923/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=7772771303314319923' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/7772771303314319923'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/7772771303314319923'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2011/07/debug-mode-for-mos.html' title='Debug mode for MOS'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-CONTrLsEsGY/TjAMxpXratI/AAAAAAAAqV0/Def5FTnSZRg/s72-c/MOS_logo.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-8666065993117000644</id><published>2011-07-20T09:19:00.000-05:00</published><updated>2011-07-20T09:19:40.565-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MOS'/><category scheme='http://www.blogger.com/atom/ns#' term='feedback'/><category scheme='http://www.blogger.com/atom/ns#' term='search'/><category scheme='http://www.blogger.com/atom/ns#' term='enhancements'/><category scheme='http://www.blogger.com/atom/ns#' term='knowledge base'/><title type='text'>MOS 5.3: Search and Knowledge</title><content type='html'>After my initial MOS 5.3 post, I received some most excellent feedback and an opportunity to speak with Jan Syssauw. He was exceedingly gracious and honored me with a 1-hour phone conference in which we covered many different aspects of Search. In response, I thought it would only be appropriate to follow up here.&lt;br /&gt;&lt;br /&gt;I have a lot of respect for Jan (pronounced Yan). He is a very good listener and has a very professional demeanor, accepting my comments (and sometimes criticism) without belying how personally he cares for his team and his product. And yet he does - Jan very much wants Search and the KB to be an awesome experience, so I appreciate that he is reaching out to see what at least one user thinks.&lt;br /&gt;&lt;br /&gt;In retrospect, I think I may have disproportionately emphasized certain features or areas by leveling the playing field (from my point of view) and perhaps giving the impression that I thought all areas were equal and required an equal degree of attention. Let me say that I wish to correct this. :) And I'll focus first on what I think the big issues are, and leave the small things for another time.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Search Suggestions&lt;/h2&gt;First and foremost, "Search Suggestions" are a huge improvement. I initially called these "type-ahead" or "autofill", but the proper term (so I have learned) is "search suggestions". I really like the direction they are going with this. We talked about some of the nuances; for example, the issue with versions I raised in my initial post (typing "Oracle server ent" gives me several suggestions, but none of them are 11g and only one is 10g). The reason Jan gave for this was that there are lots of suggestions that kind of fall off the end of the list - if I set my preferences to see only 5 "search suggestions", then even more of those suggestions would fall off the list. Jan hopes that the more popular and more relevant suggestions will start to percolate to the top of the suggestion list. I still find it odd that Oracle 7.3 would supercede 11g....  *grin*&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Need for Speed&lt;/h2&gt;Ok, so FLASH is &lt;b&gt;REALLY&lt;/b&gt; slow for me, and I REALLY do not like the way FLASH was implemented for MOS. However, setting FLASH aside and focusing on Search, I was struck again by a need for speed. I think these are both very related, but I am going to break it into two different paragraphs to help spell it out.&lt;br /&gt;&lt;br /&gt;First, there are times when typing in a somewhat generic term (ie, "install"), I have to wait several seconds (I counted 9 seconds to retrieve 1.1 million records). What about first_rows_k?? *grin* Seriously, Oracle's flagship product is supposed to be the database, and they call themselves the "Information Company". While 9 seconds out of my life is peanuts, other companies (do I need to spell it out?) don't have you sitting around for a few seconds wondering how your fingernails got a little dirty. I have even filed a bug on a case where you can do a search on nothing and the backend server times out - as if I wanted to see every single document. *laugh*&lt;br /&gt;&lt;br /&gt;Second, Jan mentioned a couple times when we were talking about setting limits for maximum number of Search Suggestions and Number of Records to Display that setting the limit higher would negatively impact performance. How much? If I want, let's get extreme, 100 search suggestions and 1000 results per page, will my search slow down to 10 seconds, or 10 minutes?&lt;br /&gt;&lt;br /&gt;Search needs to be fast! Freakishly fast. They need &lt;a href="http://jimmyjohns.com/"&gt;Jimmy Johns&lt;/a&gt; to come and tell them about fast! *grin*&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Preferences, options, filters....&lt;/h2&gt;This one is quite tricky, and I partially found the right words when I spoke to Jan and I hope I communicated it clear enough. I and other customers have asked for more options, more flexibility, more controls. And by golly, Oracle delivered! We know have Preferences, various ways to set filters via PowerView, Product, Task/Intent, etc. In my opinion, the way these options are presented to the user are a bit confusing. Take for example PowerViews. PowerViews came out a little while ago (MOS 5.1, 5.2?) and thus are a separate form of customization than, say, refining a search via the Knowledge Browser options (by Product, Task, etc). If I set a PowerView to view only Solaris platforms, that affects all my searches. So even though the PowerView summary is at the top of the page, I often forget I have a PowerView set and I rather puzzled when various search results are filtered out. Imagine trying to look for patches specific to Red Hat if you have a PowerView set for Solaris. :)&lt;br /&gt;&lt;br /&gt;I do think it is awesome that Oracle is giving us, the customer, this much flexibility and control, and I applaud that. I only hope that we can work together to make the presentation of that power and flexibility more aesthetic and easier to grasp. In some ways, it is almost like going from a FPS game with simple controls to a Flight Simulator with tons of controls. I think this issue will be a matter of acclimation and user training &lt;b&gt;&lt;i&gt;for advanced users that want to take advantage of such knobs and levers&lt;/i&gt;&lt;/b&gt;; all other users wanting a quick, "just get me the results like Google" approach should not have to worry about these extra bells and whistles. Perhaps one possible way to approach this is to have an "Advanced Search" preference, and consolidate all such advanced features in one area. Maybe. At the very least, have the one preference to toggle the kitchen sink on and off. :)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;And some lower-priority items&lt;/h2&gt;Some other low-hanging fruit we can take advantage of might be to reduce confusing by consolidating the use of "Task" and "Intent". My guess is that a bunch of folks got together and brainstormed on what to call this, but could not come to a final decision without offending others, so they compromised. :) So I will say, as one customer, just call them &lt;b&gt;Tasks&lt;/b&gt;. Forget about "Intent". In my mind, "intent" sounds like you want to practice your ESP or something. But you knew that before I typed it, right....&lt;br /&gt;&lt;br /&gt;Redo the way an article is displayed. For a while now, the articles slide in from right to left, squeezing the left-hand side. Either get rid of that effect, or make it happen in .4 seconds max.&lt;br /&gt;&lt;br /&gt;I like the "intent" (tongue in cheek) behind the "auto-detection" features. When on the conference with Jan, he demonstrated what this auto-detection is currently doing; for example, if you type "install" in the search box, you wait a few seconds than get a screenful of suggested articles. At the top of the list is a box asking you to clarify your intent (hmm... there is that word again), which can be used to help filter results. A similar thing happens if you search for database (refine by product, for example). This is somewhat similar to what we developed at "&lt;a href="http://orajourn.blogspot.com/search?q=%22the+bridge%22"&gt;The Bridge&lt;/a&gt;".&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-8666065993117000644?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/8666065993117000644/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=8666065993117000644' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/8666065993117000644'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/8666065993117000644'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2011/07/mos-53-search-and-knowledge.html' title='MOS 5.3: Search and Knowledge'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-3755069773801976627</id><published>2011-07-14T01:01:00.003-05:00</published><updated>2011-07-14T01:22:35.973-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='notes'/><category scheme='http://www.blogger.com/atom/ns#' term='MOS'/><category scheme='http://www.blogger.com/atom/ns#' term='health recommendations'/><category scheme='http://www.blogger.com/atom/ns#' term='guided resolutions'/><category scheme='http://www.blogger.com/atom/ns#' term='autofill'/><category scheme='http://www.blogger.com/atom/ns#' term='release 5.3'/><category scheme='http://www.blogger.com/atom/ns#' term='review'/><category scheme='http://www.blogger.com/atom/ns#' term='sr'/><title type='text'>MOS 5.3</title><content type='html'>re:&amp;nbsp;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: x-small;"&gt;&lt;a href="https://supporthtml.oracle.com/oip/faces/secure/km/DocumentDisplay.jspx?id=1326487.1" style="color: #6070b4; font-size: 14px; font-weight: normal;" target="_blank"&gt;Document 1326487.1&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: x-small;"&gt;. &amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 11px;"&gt;&lt;strong&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;My Oracle Support Release 5.3 Features&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I knew that new features/enhancements were coming to MOS this past weekend, and I was looking forward to seeing what they were. I had heard that Search was improving. So when I read this Release Document, I was just a little underwhelmed at the level of detail. The "Release Highlights" all sound good, but I wanted meat. And then just today I realized that the details are actually in another document,&amp;nbsp;My Oracle Support Release 5.3 Detailed Benefits Table (&lt;a href="https://supporthtml.oracle.com/ep/faces/secure/km/DocumentDisplay.jspx?id=1329876.1"&gt;Doc ID 1329876.1&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;More details in this document. But still not quite what I was hoping for. None-the-less, I decided to look into them.&lt;br /&gt;&lt;br /&gt;Please note, I am a bit cynical in my comments. I realize a lot of hard work went into these enhancements, and there is a ton of "stuff" going on behind the scenes that I do not know about.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[EDIT: Egads, Blogger really mucked up my tables!!! Holy off-the-page, batman!]&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;table align="left" border="1" cellpadding="1" cellspacing="1" &gt;&lt;tbody&gt;&lt;tr&gt;&lt;td &gt;&lt;strong&gt;Knowledge preferences&lt;/strong&gt;&lt;/td&gt;&lt;td &gt;&lt;div align="left"&gt;Customize your preference page&lt;/div&gt;&lt;/td&gt;&lt;td &gt;Knowledge preferences page on the Settings tab allows you to customize your knowledge settings&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;There are only 4 things you can customize, "Search Term Suggestion" (and associated number, max of 10), "Search Intent Clarification", "Search Result Set Length" (with a measly max of 25), and default "Searched Sources". That's it. I am disappointed. The "Searched Sources" only has two options, either the KB or ALL. Some preference. Better than nothing, I guess.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;table align="left" border="1" cellpadding="1" cellspacing="1"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Support Identifier Management&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;Ability to delete multiple Support Identifiers at once&lt;/td&gt;&lt;td &gt;New window added for sizing control to change number of rows displayed for Support Identifier and managed users&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;meh. Could be helpful for organizations with really large numbers to manage. Glad we don't.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;table align="left" border="1" cellpadding="1" cellspacing="1" &gt;&lt;tbody&gt;&lt;tr&gt;&lt;td &gt;&lt;strong&gt;Search Improvements&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;Search Term Suggestion; search box has a type-ahead feature offering search suggestions using our knowledge base dictionary&lt;/td&gt;&lt;td&gt;Faster search results&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Here we go, the fabled Search Improvements!&lt;br /&gt;I have put this to the test already and it does help a bit. The only downside is that it is only available in FLASH (of course), since FLASH slows things down for me.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;table align="left" border="1" cellpadding="1" cellspacing="1"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Message Center on the Dashboard&lt;/td&gt;&lt;td&gt;This new feature consolidates all the pending user action for Automated Service Request, Configurations, and new user Support Identifier requests&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I had to look carefully for this - it is really small, and in the upper right-hand corner, and often occluded by the annoying green slider message box that I was told was going away. Automated Service Requests (ASR) are the domain of Sun products, thus not relavant for me personally. I could care less if a "pending user request" popped up, since I get mailed about them anyway. I am actively looking for a way to make this "Message Center" go away. Not sure why this is under the "Search Improvements" section.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;table align="left" border="1" cellpadding="1" cellspacing="1"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Auto-detection of product names&lt;/td&gt;&lt;td&gt;Quickly refine your search results for a product&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This is still a bit buggy. When I type "Oracle server ent", I get 8 products, 6 of which are more than 6 years old, nothing for 11g or 9i, only one for 10g. "Quickly refine"?!? Or maybe I am simply using it incorrectly - not really obvious to me.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;table align="left" border="1" cellpadding="1" cellspacing="1"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td &gt;Auto-detection of common tasks and intents&lt;/td&gt;&lt;td &gt;Quickly refine your search results based on selected task&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Not exactly sure how this works. Obviously, not relevant for the search bar on every page, since there is no "task" selected. And it seems you can only select a "task" once a product is selected, no way to skip right to it. When I did look for a "task", the "Customer Recommended" document was #23 out of 25. I see that it is sorted by date, but not finding any way to sort by, say, reverse date, or even "Customer Recommended" for that matter. Or even by rating. The "Refine Search" bar on the left is really slow.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;table align="left" border="1" cellpadding="1" cellspacing="1"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td &gt;&lt;u&gt;'Customer Recommended'&lt;/u&gt;&amp;nbsp;indicator on search hit list&lt;/td&gt;&lt;td&gt;Benefit from the feedback of other users who liked knowledge base documents&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Mentioned above. It is not clear exactly how a document gets the fabled rating. Seems similar to the "like" button.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;table align="left" border="1" cellpadding="1" cellspacing="1"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;More comprehensive and intelligent search tips&lt;/td&gt;&lt;td &gt;Additional guidance to get the most out of the search engine&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Not much to say about this one - I'll have to take their word for it. The "type-ahead" auto-fill thing is probably the most visible aspect, and I like it so far.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;table align="left" border="1" cellpadding="1" cellspacing="1" &gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;More search sources in the form of additional product documentation&lt;/td&gt;&lt;td &gt;Expands the knowledge base of possible solutions&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;So, now, I can search for JDEdwards and Sun documentation. Umm.. yippee?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;table align="left" border="1" cellpadding="1" cellspacing="1"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td &gt;Ability to set default search source to "All Sources" (in preferences)&lt;/td&gt;&lt;td &gt;Expands the knowledge base of possible solutions&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Mentioned above, but don't oversell it. A small step in the right direction. :)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;table align="left" border="1" cellpadding="1" cellspacing="1"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td &gt;&lt;strong&gt;Browse / Navigation Improvements&lt;/strong&gt;&lt;/td&gt;&lt;td &gt;Redesigned Knowledge Management tab with new "Browse Knowledge" region&lt;/td&gt;&lt;td&gt;Easier to find content that solves your problem&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Not seeing how this works. Thus not easier at all. How do I do a search for a specific product and a specific intent with my keywords? Seems like when I enter keywords in the search bar, it completely ignores what I selected for product and intent. Where are the enhancements?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;table align="left" border="1" cellpadding="1" cellspacing="1"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Direct navigation to "premium content" using task, product and release refinement&lt;/td&gt;&lt;td&gt;Easier to find content that solves your problem&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Easier, eh? Still can't find it. I must be really stupid. :)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;table align="left" border="1" cellpadding="1" cellspacing="1"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Removed product browse tree (in favor of Knowledge Guidance)&lt;/td&gt;&lt;td &gt;Easier to find content that solves your problem&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Umm... they just replaced "tree" with "hierarchy". And moved it into a drop-down button. Oh wait, they had that before as well.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;table align="left" border="1" cellpadding="1" cellspacing="1" &gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Health Recommendations&lt;/strong&gt;&lt;/td&gt;&lt;td &gt;Ability to set lifecycle (Production, Stage, Test, Development) of multiple Systems at once&amp;nbsp;&lt;/td&gt;&lt;td&gt;Easier to maintain and manage Systems and Targets&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Interesting. I guess that is a good thing, and it seems to work. Gotta love the little warning message (which should be removed, imo):&lt;br /&gt;"The change will take approximately 2 seconds to complete. A message will inform you of the final result."&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I am not going to comment on the other 5 sections of "Health&amp;nbsp;Recommendations" because I do not use them. For folks that do, I can see how these might be good things, but given what I have see so far with other "enhancements", I have to question how much of an improvement this actually is.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;table align="left" border="1" cellpadding="1" cellspacing="1" &gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Guided Resolution&lt;/strong&gt;&lt;/td&gt;&lt;td &gt;Task-based Advisor helps to guide through a series of steps in a task&lt;/td&gt;&lt;td&gt;Helps you solve problems based on the process or workflow&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I have no idea what this means. Where does one find this "Task-based Advisor"? Going to have to skip this whole section because I have no idea what they are talking about. It does recall to mind the old Libraries they used to keep. Again, sounds like a good idea, just not really obvious. Or maybe I really am dumb.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;table align="left" border="1" cellpadding="1" cellspacing="1" &gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;My Oracle Support Community&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;&lt;span class="Apple-style-span" style="font-size: 14px;"&gt;New user profile enhancement&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span class="Apple-style-span" style="font-size: 14px;"&gt;Allows user to enter biographical or specialized information and the ability to control emails sent from Oracle.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Not finding anything I want to fill out in this "profile enhancement". Provide my education?? Manage Certification logos? Gah! And the only knob for "controlling emails" is a radio button that says "receive emails based on your community subscriptions". Not what I was expecting at all.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;table align="left" border="1" cellpadding="1" cellspacing="1" &gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Ability to upload documents, pictures, and videos&lt;/td&gt;&lt;td&gt;Add information in the format that communicates your question or situation clearly&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This sounds like a good thing - I did not realize you could not do that before. But I only have 8 Community points, so....&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;table align="left" border="1" cellpadding="1" cellspacing="1"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Allow users to view and manage the documents they subscribe to&lt;/td&gt;&lt;td&gt;Helps to manage solutions so you can solve problems faster&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This made me laugh.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;General notes:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;still see annoying green slider box in upper right.&lt;/li&gt;&lt;li&gt;when displaying a document, still see the annoying "slide left" effect that takes a couple seconds.&lt;/li&gt;&lt;li&gt;Good ideas and intention. Disappointed with the implementation.&lt;/li&gt;&lt;li&gt;still hate the lack of any decent "back" functionality (a FLASH thing). Clicking through breadcrumbs erases options I might have selected earlier. (Big problem with search!!)&lt;/li&gt;&lt;li&gt;new tab for "Advanced Customer Services". Really, an advertisement?!? How do I delete that?&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To Do:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Learn more about Health Recommendations and Guided Resolutions. Dare I have high hopes?&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-3755069773801976627?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/3755069773801976627/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=3755069773801976627' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/3755069773801976627'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/3755069773801976627'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2011/07/mos-53.html' title='MOS 5.3'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-1903631682640319209</id><published>2011-06-17T08:07:00.001-05:00</published><updated>2011-06-17T08:09:44.359-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bugs'/><category scheme='http://www.blogger.com/atom/ns#' term='first_rows_k'/><category scheme='http://www.blogger.com/atom/ns#' term='bug 11858963'/><category scheme='http://www.blogger.com/atom/ns#' term='cbo'/><title type='text'>Bug 11858963: optimization goes wrong with FIRST_ROWS_K (11g)?</title><content type='html'>At the beginning of March, I noticed some very odd things in a 10053 trace of a problem query I was working on. I also made some comments on Kerry Osborn's &lt;a href="http://kerryosborne.oracle-guy.com/2010/04/funny-developer-tricks-first_rows/#comment-38234"&gt;blog&lt;/a&gt; related to this matter. Oracle Support turned this into a new bug (11858963), unfortunately an aberration of Fix&amp;nbsp;4887636. I was told that this bug will not be fixed in 11gR1 (as 11.1.0.7 is the terminal release), but it will be included in future 11gR2 patches.&lt;br /&gt;&lt;br /&gt;If you have access to SRs, you can follow the history in SR&amp;nbsp;3-314198695. For those that cannot, here is a short summary.&lt;br /&gt;&lt;br /&gt;We had a query that suffered severe performance degradation after upgrading from 10.2.0.4 to 11.1.0.7. I attempted to use SQLT but initially run into problems with the different versions of SQLT, so I did the next best thing and looked at the 10053 traces directly. After a bit of digging, I noticed several cases where the estimated cardinality was completely off. For example:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 11px;"&gt;First K Rows: non adjusted N = 1916086.00, sq fil. factor = 1.000000&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 11px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 11px;"&gt;First K Rows: K = 10.00, N = 1916086.00&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 11px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 11px;"&gt;First K Rows: old pf = 0.1443463, new pf = 0.0000052&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 11px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 11px;"&gt;Access path analysis for FRRGRNL&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 11px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 11px;"&gt;***************************************&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 11px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 11px;"&gt;SINGLE TABLE ACCESS PATH (First K Rows)&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 11px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 11px;"&gt;Single Table Cardinality Estimation for FRRGRNL[FRRGRNL]&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 11px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 11px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 11px;"&gt;Table: FRRGRNL Alias: FRRGRNL&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 11px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 11px;"&gt;Card: Original: 10.000000 Rounded: 10 Computed: 10.00 Non Adjusted: 10.00&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;So, the idea behind FIRST_ROWS_K is that you want the entire query to be optimized (Jonathan Lewis would spell it with an "s") for the retrieval of the first K rows. Makes sense, sounds like a good idea. The problem I had with this initial finding is that every single rowsource was being reduced to having a cardinality of K. That is just wrong. Why is it wrong? Let's say you have a table with, um,&amp;nbsp;1916086 rows. Would you want the optimizer to pretend it has 10 rows and make it the driver of a Nested Loop? Not me. Or likewise, would you want the optimizer to think "Hey, look at that, 10 rows, I'll use an index lookup". Why would you want FIRST_ROWS_K to completely obliterate &lt;i&gt;&lt;b&gt;ALL&lt;/b&gt;&lt;/i&gt; your cardinalities?&lt;br /&gt;&lt;br /&gt;I realize I am exposing some of my naivete above. Mauro, my Support Analyst corrected some of my false thinking with the following statement:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;The tables are scaled under First K Rows during the different calculations (before the final join order is identified) but I cannot explain any further how / when / why.&lt;br /&gt;Keep in mind that the CBO tweak -&amp;gt; cost -&amp;gt; decide (CBQT is an example)&lt;br /&gt;Unfortunately we cannot discuss of the CBO algorithms / behaviora in more details, they are internal materials.&lt;br /&gt;Regarding the plans yes, they are different, the "bad plan" is generated with FIRST_ROWS_10 in 11g&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;The "good" plan is generated in 10.2.0.4 (no matter which optimizer_mode you specify, FIRST_ROWS_10 is ignored because of the limitation) or in 11g when you disable 4887636 (that basically reverts the optimizer_mode to ALL_ROWS).&lt;br /&gt;Basically the good plan has never been generated under FIRST_ROWS_10 since because of 4887636 FIRST_ROWS_10 has never been used before&lt;/blockquote&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;I still need to wrap my head around "the limitation" in 10.2.0.4 and how we never used FIRST_ROWS_K for this particular query, but I believe that is exactly what Fix 4887636 was supposed to be addressing.&lt;br /&gt;&lt;br /&gt;Here are some of the technical details from Bug 1185896:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;]]potential performance degradation in fkr mode&lt;br /&gt;]]with fix to bug4887636 enabled, if top query block&lt;br /&gt;]]has single row aggregation&lt;br /&gt;REDISCOVERY INFORMATION:&lt;br /&gt;fkr mode, top query block contains blocking construct (i.e, single row aggregation). Plan improves with 4887636 turned off&lt;br /&gt;WORKAROUND:&lt;br /&gt;_fix_control='4887636:off'&lt;/blockquote&gt;&lt;br /&gt;I assume fkr mode is FIRST_ROWS_K, shortened to F(irst)KR(ows). The term "blocking construct" is most interesting - why would a single row aggregation be labeled as a "block construct"?&lt;br /&gt;&lt;br /&gt;Also, this was my first introduction to turning a specific fix off. That in itself is kinda cool.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-1903631682640319209?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/1903631682640319209/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=1903631682640319209' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/1903631682640319209'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/1903631682640319209'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2011/06/bug-11858963-optimization-goes-wrong.html' title='Bug 11858963: optimization goes wrong with FIRST_ROWS_K (11g)?'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-8299626362630536491</id><published>2011-05-16T15:09:00.001-05:00</published><updated>2011-05-16T15:09:59.034-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bug dbms_system.ksdwrt'/><category scheme='http://www.blogger.com/atom/ns#' term='alert.log'/><category scheme='http://www.blogger.com/atom/ns#' term='diagnostic_dest'/><title type='text'>alert.log appears not be updated</title><content type='html'>After a few days of spinning my wheels and subjecting the poor recipients of oracle-l to multiple posts, I have identified an issue in Oracle code that I believe needs to be looked at.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;First, some background.&lt;/b&gt;&lt;br /&gt;We are running Oracle EE 11.1.0.7 on Solaris 10. We also have a job that occasionally bzips (compresses) the alert.log. The logic in the job is supposed to check if the file is actively being written to before zapping it, but by pure chance (so it would seem), in this particular case the alert.log was still open by the database when the file was scorched. This led to the appearance of the alert.log not receiving any more updates from the database. We attempted to bounce the database which had no&amp;nbsp;discernible&amp;nbsp;effect. I also changed the diagnostic_dest, which caused us to go from slightly strange to absolutely bizarre, and what opens the door for the rest of this post.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;What I found&lt;/b&gt;&lt;br /&gt;After changing diagnostic_dest several times, posting on oracle-l, the Oracle Community forums and playing tag with an Oracle Support Analyst, and doing lots of truss commands against sqlplus, I started to focus on this result from truss:&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;access("./alert.log", F_OK) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= 0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now, you may notice that this "access" command is saying that the file in question ("./alert.log") is legit. This caused no small amount of head-scratching. I got the same results no matter which directory I ran the commands from. In my system, I only had two files with this name, one in $ORACLE_HOME/dbs and one in $DIAG/trace. Neither were actively updated by the database. It was not clear to me, at first, that Oracle was finding one of these log files. Especially since it never did anything with it. I searched file descriptors in /proc/*/fd and found nothing. I even grepped keywords from all text files looking for strings that should show up in this particular alert.log.&lt;br /&gt;&lt;br /&gt;For the life of me, I could not figure out what directory ./alert.log was in. When I compared to other databases, this same access always returned Err#2 ENOENT. So I knew this must be key, but not sure exactly how. On a whim, I decided to delete the alert.log in $ORACLE_HOME/dbs. Lo and behold, the problem seemed to go away magically.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;The BUG&lt;/b&gt;&lt;br /&gt;So here is the root problem, in my opinion. The Oracle code line is looking for $ORACLE_HOME/dbs/alert.log, but completely fails to write to the file if it is found. Instead, the branch simply exits out. How is that helpful?&lt;br /&gt;&lt;br /&gt;&lt;b&gt;In retrospect....&lt;/b&gt;&lt;br /&gt;I believe when I changed diagnostic_dest to a non-existing directory, Oracle automatically created alert.log in $ORACLE_HOME/dbs. I guess I learned a few things from this. :) Also, I learned a few tidbits along the way. One can use KSDWRT to write messages to the alert.log. Dan Morgan's &lt;a href="http://psoug.org/reference/dbms_system.html"&gt;library&lt;/a&gt; (still hosted by PSOUG) shows this. Also learned a little more about truss and dtrace as I was researching this issue.&lt;br /&gt;&lt;br /&gt;Now the hard part; convincing Oracle that this is a problem and needs to be corrected.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-8299626362630536491?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/8299626362630536491/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=8299626362630536491' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/8299626362630536491'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/8299626362630536491'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2011/05/alertlog-appears-not-be-updated.html' title='alert.log appears not be updated'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-1532960428115325084</id><published>2011-05-10T08:53:00.001-05:00</published><updated>2011-05-10T09:03:17.566-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the bridge'/><category scheme='http://www.blogger.com/atom/ns#' term='MOS'/><category scheme='http://www.blogger.com/atom/ns#' term='workshop'/><title type='text'>"The Bridge": Day 3 (part 2)</title><content type='html'>I have received some pictures (not all, but most the important ones).&lt;br /&gt;&lt;br /&gt;First, a recap of &lt;b&gt;Day 2&lt;/b&gt;:&lt;br /&gt;Our "realistic" picture evolved a little bit; Ahjay added some grouping tags ("WHERE", "WHAT") which we incorporated from there on out.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-IBgfvhH74Rk/Tck-E5V5V1I/AAAAAAAAikM/FrNM2xMAQ0Y/s1600/photo+4.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://3.bp.blogspot.com/-IBgfvhH74Rk/Tck-E5V5V1I/AAAAAAAAikM/FrNM2xMAQ0Y/s320/photo+4.JPG" width="239" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;And here is what our OBJECT list finally looked like; complete with attributes and verbs:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-MZV9Hfg_aTk/Tck-Wtx_kxI/AAAAAAAAikQ/U5EbgvHralo/s1600/010.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://2.bp.blogspot.com/-MZV9Hfg_aTk/Tck-Wtx_kxI/AAAAAAAAikQ/U5EbgvHralo/s320/010.png" width="194" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Day 3&lt;/b&gt;&lt;br /&gt;Hard at work.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-OsupCRKP8NA/Tck-xLEeApI/AAAAAAAAikU/Huw9VCCIydo/s1600/photo+2.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://3.bp.blogspot.com/-OsupCRKP8NA/Tck-xLEeApI/AAAAAAAAikU/Huw9VCCIydo/s320/photo+2.JPG" width="239" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;After hashing things out in the morning, we finally had something akin to a prototype forming at our fingertips.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-yhipwmj61YA/Tck_Y0A8TTI/AAAAAAAAikY/4oVzj_-06m0/s1600/012.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://2.bp.blogspot.com/-yhipwmj61YA/Tck_Y0A8TTI/AAAAAAAAikY/4oVzj_-06m0/s320/012.png" width="194" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;I really struggled with the overall complexity; I wanted simplicity. As a compromise, we worked very hard to make as much optional as possible, attempting to capitalize on pre-filled defaults and "quickfill" options, trying to use the technology and data that should already be available to reduce user interaction. For instance, if the user might be presented with the most recent Products at the top of one's list. Or setting your default QuickFill option (Previous SR, Profile or OCM) in your global Preferences. You will see, also, at the top left blue stickies for "Support Recommended" and "Product specific tips"; these are to be dynamically populated as you type and fill in information - the more information the user provides, the more relevant and specific the search becomes. I do not have any pictures, but on one of our white sheets we put in a meter as a gimmick to relate how more information upfront helps the user and the analyst focus on the problem (akin to the Password Strength Meter).&lt;br /&gt;&lt;br /&gt;Near the end of the day, our final draft prototype was looking like this:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-ruUO5bk45zY/TclBEZp8OeI/AAAAAAAAikk/PcfUn_6ZpwQ/s1600/011.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="194" src="http://3.bp.blogspot.com/-ruUO5bk45zY/TclBEZp8OeI/AAAAAAAAikk/PcfUn_6ZpwQ/s320/011.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Again, you can see how "insta search" is being populated in the right-hand side, hopefully not too distracting, but also hopefully to be filled with information that would perhaps prevent an SR or guide a customer down the right path. Again, we are assuming huge improvements to Search. :) &amp;nbsp;This picture also demonstrates one possible "multi-screen" approach, trying to cram in as much as possible "above the fold". I argued for the "one-screen" approach, but compromised and suggested that a Preference be added to allow either one-page or multiple pages.&lt;br /&gt;&lt;br /&gt;Another thing that might be slightly less obvious is that we are trying to keep the big picture in mind, or "tell a story" as Kelli put it. We are trying to describe a problem, which has a beginning (ie, the environment), a middle or body (the Description) and an ending (optional files, template questions, further elaboration, etc).&lt;br /&gt;&lt;br /&gt;In the end, it still feels like way too much complexity to me. I noted earlier that I really want to talk to a human to route the issue (which obviates the whole "Category" mess). I do not mind filling in all the technical details, but what if you had a "Contact Analyst" button that, like Amazon and many other companies, auto-dialed you (the user) and attempted to get a IHUB person on the phone asap? Yes, I realize from Oracle's standpoint this is impractical. But does anyone else want that?&lt;br /&gt;&lt;br /&gt;It will be interesting to see what comes out of this project. I think I am excited. The workshop itself was definitely very productive, eye-opening and an awesome experience that I am fully thankful to Oracle for.&lt;br /&gt;&lt;br /&gt;Before we all parted ways, we did get a group photo. Say "Cheese!"&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-k9TiwP9G6wI/TclDEXqasQI/AAAAAAAAiks/0WINpF_c6II/s1600/013.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="194" src="http://1.bp.blogspot.com/-k9TiwP9G6wI/TclDEXqasQI/AAAAAAAAiks/0WINpF_c6II/s320/013.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-1532960428115325084?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/1532960428115325084/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=1532960428115325084' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/1532960428115325084'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/1532960428115325084'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2011/05/bridge-day-3-part-2.html' title='&quot;The Bridge&quot;: Day 3 (part 2)'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-IBgfvhH74Rk/Tck-E5V5V1I/AAAAAAAAikM/FrNM2xMAQ0Y/s72-c/photo+4.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-2790449672822111821</id><published>2011-05-05T21:33:00.000-05:00</published><updated>2011-05-05T21:33:37.624-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the bridge'/><category scheme='http://www.blogger.com/atom/ns#' term='MOS'/><category scheme='http://www.blogger.com/atom/ns#' term='sr creation'/><category scheme='http://www.blogger.com/atom/ns#' term='workshop'/><title type='text'>"The Bridge": Day 3 (part 1)</title><content type='html'>Still no pictures yet, so this is Part 1 of Day 3.&lt;br /&gt;&lt;br /&gt;Day 3 was crunch time; by 5:pm we were aiming to have a working prototype. Because we expanded our scope (rather significantly) and spent so much time on&amp;nbsp;tangential&amp;nbsp;(but very important and sometimes relevant) details, the idea of getting a working prototype seemed rather dubious. But I think we did it. To a degree.&lt;br /&gt;&lt;br /&gt;Picking up where we left off, we started to tackle the actual UI design itself. We had already done a lot of work on Search, so we needed to focus on the SR part of it. I came in a little earlier and drew up my own mock ups - they are horribly cluttered, but I personally think they are kinda cool. :) Basically, my mockup&amp;nbsp;capitalizes&amp;nbsp;on the vast similarities between Search and Creating an SR; providing keywords (ie, title), a product (and version) and you can start going to town. Category is a bit tricky, and I will cover it a little more in the last paragraph, but if you can nail down Category you can potentially narrow down your Search (called "Task Intent") rather dramatically and better yet, you are primed to punch in and route an SR. So why not do both in parallel? Maybe even on the same screen. You start filling in information, and in one pane you start seeing search results aggregated by facets (like what Advanced Search does now, but much more dynamic and insta-search), while at the same time your "Create SR" button lights up. And maybe even a "Post to Forums" button. I briefly argued for this approach, and I readily admitted that the huge downside is that the screen gets very cluttered very fast. I think we adopted a hybrid (eg, compromise), where the "Related articles" shows up insta-matically in a somewhat&amp;nbsp;unobtrusive&amp;nbsp;region floating off to the side.&lt;br /&gt;&lt;br /&gt;We did a couple of usability tests; frankly, I think we need specific "Usability Test" training to learn how to do these better. :) I was not entirely satisfied with the particular way we approached this topic. But the good news is that we discovered many holes in our current prototype. Late in the day, we voted and started to tackle some of the more critical (or easy-to-fix) issues. Near the top of that list was whether or not to display the entire SR Creation process as one page or multiple pages. Again, some were very concerned about cluttering the screen and wanted "screen-sized" sections. I want everything on one page. In the end I posited that the user should have a preference for how he/she wants to view this process. We will see what happens with that.&lt;br /&gt;&lt;br /&gt;Actually, this topic consumed a bit of time. After we green-lighted the idea of multiple pages, we got to work going through several permutations of possible screen layouts. Again, I found it ironic that we kept coming back to a design that is very similar to what we have today in MOS. Granted, we are added a lot of behind-the-scenes features that auto-fills (and insta-searches) as much as possible - that is not to be overlooked. But our final "look and feel" does not diverge much from the current design, in my opinion. In fact, if I count correctly, our final design may actually look more complicated. It is hard to say without having a real GUI to step through. Even though it looks more complicated, we are actively working to allow the user to input as little as possible to get the SR filed.&lt;br /&gt;&lt;br /&gt;I have mentioned this previously, but it bears repeating. We were very much biased by the current implementation. In some ways, we spent a huge chunk of time trying to "fix" and patch current brokeness, instead of redesigning from the ground up. This is not to say we did not think out of the box (or at least try to). &amp;nbsp;And right now as I type this, I cannot think of one single "out of the box" new thing we pushed. Maybe I am simply tired and not remembering well.&lt;br /&gt;&lt;br /&gt;Another point of discussion that came up, and in retrospect I wished we spent more time on, is the current super-criticality of "categories". Currently, SRs are routed based on the sub-category (or category if no sub exists). These are currently filtered by which product one chooses. In our experience, choosing the most appropriate sub/category is often&amp;nbsp;tedious&amp;nbsp;and seems like a relatively useless step from the users point of view. We briefly talked about driving the sub/category off keywords in the Description field, and to be done in the "insta-search" way (you start typing, and the list of possible sub/categories to choose from grows smaller). But the bigger issue, in my opinion, is all about the routing in the first place. Oracle has placed a lot of emphasis on building automated logic to get the SR to a specialist team. I have a problem with that, at least how it is done currently. In my personal "Bleu Sky" vision (Day 1), I created a big easy "Create SR" button, with no requirements whatsoever. How the heck is that any good? Well, think about it, what happens? Rather, what if you changed the button to say "Chat with a human being"? By the end, we made comparisons to various other companies (ie, Amazon) that allows you to fill in call-back information, a computer actually calls you 1 second later, and then attempts to connect you to a live person. I love that concept!! As you can imagine, the managers and directors and support representatives at the meeting hated that idea. :) Yes, currently, it is hugely impractical - the IHub would be drowned to oblivion. Currently. But if we are thinking&amp;nbsp;Utopian&amp;nbsp;thoughts.... There are other ideas to simply routing. For instance, drastically reduce the number of routes. How? Well.... we didn't talk about that, yet. :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-2790449672822111821?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/2790449672822111821/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=2790449672822111821' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/2790449672822111821'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/2790449672822111821'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2011/05/bridge-day-3-part-1.html' title='&quot;The Bridge&quot;: Day 3 (part 1)'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-2843978608559987200</id><published>2011-05-04T01:00:00.000-05:00</published><updated>2011-05-04T01:00:40.667-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the bridge'/><category scheme='http://www.blogger.com/atom/ns#' term='MOS'/><category scheme='http://www.blogger.com/atom/ns#' term='enhancements'/><category scheme='http://www.blogger.com/atom/ns#' term='workshop'/><title type='text'>"The Bridge": Day 2</title><content type='html'>It is late and I am exhausted. And I have no pictures from today (/me looks at Richard Miller).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;We started off on a good foot, having already taken a good stab at objectifying the tasks. We further hashed out all more objects, added more attributes, added verbs and relationships. Some objects were much easier than others; for instance, Product really only consists of a product name and version number in the scope of an SR. Yes, it is a "child" member of other objects.&lt;br /&gt;&lt;br /&gt;In retrospect, we got bogged down in many areas, and sometimes it seemed like those areas were really minor and we were spinning our wheels. But the "spinning wheel" did demonstrate that even in our small group there is ambiguity and misunderstanding of core elements. For example, is a Primary Contact a subset of a "Contact Type"? Or is it different enough from other contacts (ie, Secondary, Manager) that it deserves it own types. One member argued quite vociferously that it is its own object because it is hanlded differently, like populated from a User Profile, while the others are not. After ripping up and redoing Contacts in various permutations, we finally decided on a single Contact object with various conditional properties and verbs.&lt;br /&gt;&lt;br /&gt;There were other examples of the same thing, I just do not remember them off the top of my head. These little excursions took up a bit of time. On top of that, we also delved heavily into the Knowledge Base and Search, since we had decided to expand our scope the previous day. While much of our journey through this topic is quite useful in the context of filing and resolving an SR, it consumed time as well. So even though we had covered a bit of ground, Richard Miller declared that we were several hours behind in the late afternoon. :) I am not sure what that means for tomorrow.&lt;br /&gt;&lt;br /&gt;Some very newsworthy things that came out of our session. I have not signed any non-disclosure agreements, but I do think the Managers want to keep a lot of new developments under wraps. So I'll go about it indirectly. We chatted up some more "Blue Sky" features as we discussed things we did not like about the current implementation. One of the key features to our new approach is using Search heavily at the outset of a possible SR creation process. I know, you are thinking this is a HORRID idea. But if Search were actually much improved (in terms of performance and relevance), we see this as being a huge boon. We could be wrong, time will tell. Basically, you have a form that provides an opportunity for the user to provide a ton of information. Much of the form is optional, but the idea is that the more you provide, the better the search results. Using ideas like Google's word-completion and instant results, and eBay's and Amazon's left-hand pane of refining and drilling-down, we explain how these kinds of features would significantly enhance the user's perception of Search by providing fast, dynamic feedback on the criteria entered. On top of that, the user may have a chance to save the search filters/results and shove all the pertinent information entered into an SR, or maybe even a Community forum post. Some of the above ideas have already been developed and we saw some simple demos. Like using quickfill and/or word completion in various areas. Very nice to see that they are already make in-roads in that direction.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I am particularly torn about the latest prototype GUI mock-up that our group has achieve so far. I claim my role, so I am not blaming everyone else. I say I am torn because the pages/screens that we "developed" today still look very busy and crammed full of things to fill out. It almost looks like we have merely re-arranged the existing SR fields that one normally fills out. I think the key importance in our approach today is that we are aiming for two things:&lt;br /&gt;&amp;nbsp;- allow as many optional fields as possible&lt;br /&gt;&amp;nbsp;- thus giving the user a choice between providing less detail and possibly a more vague search, or more detail and possibly a more accurate search&lt;br /&gt;&lt;br /&gt;We are both assuming that search will be improved significantly, and providing ideas on how exactly to do that. The dynamic feedback mechanism is crucial I think, since it gives the user a good idea as to how many docusments are returned and how to refine it. I think. It looks good on paper right now. :)&lt;br /&gt;&lt;br /&gt;Ok, that's it for me. I hope to procure more pictures tomorrow.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-2843978608559987200?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/2843978608559987200/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=2843978608559987200' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/2843978608559987200'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/2843978608559987200'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2011/05/bridge-day-2.html' title='&quot;The Bridge&quot;: Day 2'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-9048112881635011161</id><published>2011-05-03T10:44:00.000-05:00</published><updated>2011-05-03T10:44:19.981-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rac'/><category scheme='http://www.blogger.com/atom/ns#' term='books'/><category scheme='http://www.blogger.com/atom/ns#' term='what are you crazy'/><title type='text'>Do people really do this in real life?</title><content type='html'>&lt;span style="font-size: small;"&gt;"&lt;/span&gt;&lt;span style="font-size: small;"&gt;My name is Newton Sequeira and I am an Author  Relationship Executive at Packt Publishing. Packt recently green lit a  book on Oracle 11g R2 RAC Administration Cookbook and we are now  searching for an author to develop the book.&lt;br /&gt;I was reading through your  &lt;a href="http://orajourn.blogspot.com/search?q=RAC"&gt;blog&lt;/a&gt; and wondered  whether you might be interested in this project?&lt;br /&gt;Thanks for considering this proposal. I would appreciate if you could please let me know your views."&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;This simply scares me. Do publishers really approach potential authors this way? Believe you me, I am the very last person &lt;b&gt;&lt;i&gt;any&lt;/i&gt;&lt;/b&gt; publisher would want to be writing this particular book. Even if I were to complete such an ambitious project, I would be the laughing stock of the Oracle community. For at least a year. And based on what little I know of author-publisher relationships, the author endures crushing timelines and relentless editors and enjoys a very small fraction of the royalties. Yeah, awesome incentive there.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;If you see my name on this book, don't buy it. Please.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-9048112881635011161?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/9048112881635011161/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=9048112881635011161' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/9048112881635011161'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/9048112881635011161'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2011/05/do-people-really-do-this-in-real-life.html' title='Do people really do this in real life?'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-2074646514995247297</id><published>2011-05-03T00:42:00.000-05:00</published><updated>2011-05-03T00:42:23.362-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='redesign'/><category scheme='http://www.blogger.com/atom/ns#' term='MOS'/><category scheme='http://www.blogger.com/atom/ns#' term='task flow'/><category scheme='http://www.blogger.com/atom/ns#' term='sr creation'/><category scheme='http://www.blogger.com/atom/ns#' term='workshop'/><title type='text'>"The Bridge": Day 1</title><content type='html'>Today we had a great session. Obvious introductions were first; another functional user who files a lot of SRs for Finance and HR modules, a couple of upper-level managers, a IHUB engineer and a front-end "user experience" ADF developer (was that too redundant?).&lt;br /&gt;&lt;br /&gt;Honestly, I was a bit overwhelmed at first, having never done task flows in a group like this before. But I liked the concept. Our moderator/taskmaster Mitch is a good guy, and at times we tried his patience. :) We started off defining what we thought the "Big Picture" is - note how we labeled it "Create SR". At one point, one of the managers said, half-jokingly, "My god, what have we created?!?":&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-lj9x75L4uxY/Tb-O1hff8SI/AAAAAAAAii4/aIjcOjzv8g0/s1600/photo+1.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://2.bp.blogspot.com/-lj9x75L4uxY/Tb-O1hff8SI/AAAAAAAAii4/aIjcOjzv8g0/s320/photo+1.JPG" width="239" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;As you can see, we have lots of stickies. Mitch loves sticky notes (aka, post-it notes). We identified key processes and showed how they related to each other, and finally we marked it up with pink stickies for problematic areas. We also identified some "out of scope" topics. This first go was a really rough draft but provided a framework from which to build.&lt;br /&gt;&lt;br /&gt;After we had the current picture in mind, Mitch asked us to dream about what we &lt;i&gt;&lt;b&gt;wanted&lt;/b&gt;&lt;/i&gt; it to look like. To dream a little. To think of a Blue Sky. Spelling errors (wrong to call them typos when you write them out? *grin*) were the trademark of the evening, but we pushed forward. The following picture is what the other user and I came up with:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-ROQkWrbgQTw/Tb-QdAeZUfI/AAAAAAAAijA/fYOq-tNpVQ0/s1600/photo+5.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://3.bp.blogspot.com/-ROQkWrbgQTw/Tb-QdAeZUfI/AAAAAAAAijA/fYOq-tNpVQ0/s320/photo+5.JPG" width="239" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;I did the one on the left. I kept it really basic, because that is what Mitch indicated. And I wanted to emphasize how we need to keep the process simple and as fast as possible. The other user representative has a lot of experience filing SRs so has essentially figure out how to "game" the system to make it work fast. Included on the other side are a number of additional (and some optional) items, some of which overlap mine. I do not have a picture of the diagram the managers/developers came up with, but it wanted more forms and more questions answered. :) After getting it all down, we users then marked each step with how desirable it was (H = High, M = Medium, L = Low), and the developer group marked how feasible it was (H = Hard, E = Easy). The goal was to find as many highly desirable and easily feasible points as possible. I kinda think we did not pay too much attention to that. OH well. The next phase was putting these two (Realistic + Desirable) together. In the middle, we experience a Scope Changed because we started to see how important "Search" is to this process, and how we users much rather find existing information that solves our problem then filing an SR in the first place. Thus our Scope evolved into "Solving Problems" and this "Step 1" reflects how many of the things that could be used to initialize an SR could actually be pointed at the Knowledge Base. Like so:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-gB8PBNclNm4/Tb-STf3rJrI/AAAAAAAAijI/WnoDMTYRlUc/s1600/photo+6.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://4.bp.blogspot.com/-gB8PBNclNm4/Tb-STf3rJrI/AAAAAAAAijI/WnoDMTYRlUc/s320/photo+6.JPG" width="239" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Lest you despair (some consider KB to be a four-letter word), we had lots of talks about improving the KB search functions, and especially focusing on using the Advanced Search capabilities. This reflects the combination of our "Blue Sky" ideas - of simplifying the existing framework and trying to think of what is the bare amount needed to go search for information, while still providing plenty of robust functionality for power users who want to provide a ton of extra detail.&lt;br /&gt;&lt;br /&gt;Here is a shot of us "in action" - you can briefly glimpse the chaos:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-RF1ppCONhdA/Tb-TzJ5JfRI/AAAAAAAAijQ/vC-T1G7VwOQ/s1600/photo+3.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://4.bp.blogspot.com/-RF1ppCONhdA/Tb-TzJ5JfRI/AAAAAAAAijQ/vC-T1G7VwOQ/s320/photo+3.JPG" width="239" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In the end, we also worked on "Step 2", which was the SR Creation portion of it, and discussed at length how these two steps play together, and how Sev 1 changes the ballgame a little (more often than not, if you file a Sev 1, you are not going to take the time to Search). With 30 minutes left of the night, we dove into objectifying the tasks. We merely scratched the surface, but I think we all felt it was significant progress.&lt;br /&gt;&lt;br /&gt;I am certainly very impressed by this process. There are some obvious inter-group challenges when certain folks dominate the discussion, but overall we are making wonderful progress and I am very happy we are having these discussions. I only hope we are drastically pushing the managers and developers in a direction we will later regret. :) I am also struck by the complexity and the number of pieces involved. We very briefly touched on how OCM/EM play a role in providing data to the SR creation process, and we obviously tacked the bigger "purple elephant" of Search and the Knowledge Base (how many people are using it and finding what they need?).&lt;br /&gt;&lt;br /&gt;And now I am mentally exhausted. And need to grab some sleep.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-2074646514995247297?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/2074646514995247297/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=2074646514995247297' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/2074646514995247297'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/2074646514995247297'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2011/05/bridge-day-1.html' title='&quot;The Bridge&quot;: Day 1'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-lj9x75L4uxY/Tb-O1hff8SI/AAAAAAAAii4/aIjcOjzv8g0/s72-c/photo+1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-3804108294097390420</id><published>2011-04-25T11:42:00.000-05:00</published><updated>2011-04-25T11:42:19.679-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='redesign'/><category scheme='http://www.blogger.com/atom/ns#' term='MOS'/><category scheme='http://www.blogger.com/atom/ns#' term='metalink'/><category scheme='http://www.blogger.com/atom/ns#' term='support'/><title type='text'>MOS Workshop: Fixing SRs</title><content type='html'>So I am heading to Oracle the first week of May (May 2-4) to talk about improving MOS, specifically the SR creation process.&lt;br /&gt;&lt;br /&gt;I have two similar previous posts on this topic:&lt;br /&gt;&lt;a href="http://orajourn.blogspot.com/2011/04/heading-out-to-talk-to-mos-devs-in-may.html"&gt;http://orajourn.blogspot.com/2011/04/heading-out-to-talk-to-mos-devs-in-may.html&lt;/a&gt;&lt;br /&gt;&lt;a href="http://orajourn.blogspot.com/2011/04/mos-mashup-summary-or-saga.html"&gt;http://orajourn.blogspot.com/2011/04/mos-mashup-summary-or-saga.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The agenda is:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span style="color: black; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US;"&gt;The Service Request process is undergoing a redesign and a specific customer intensive feedback type session called “The Bridge” is being used to evaluate changes to the design. This process works over a 3 day period with two customers, the business owner, a lead developer, a designer and two facilitors to help the structured process to move forward.&lt;br /&gt;&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US;"&gt; The results are extensive requirements and user interfaces which are tested and approved during these sessions by development, customers, and business owners. This process works because the customers are in the room.&lt;/span&gt;&lt;/blockquote&gt;&lt;span style="color: black; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US;"&gt; &lt;!--[if !supportLineBreakNewLine]--&gt;&lt;br style="mso-special-character: line-break;" /&gt; &lt;!--[endif]--&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US;"&gt;I ask for your help because I am but one person. I have filed a goodly number of SRs, ranging from the stupid to the complex, so I feel comfortable in that I can represent my own thoughts in what I would like to see improved. And I'll detail those ideas below. But if there are other pressing matters that I miss, please speak up! :)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US;"&gt;Overall, I want the SR creation process to be easier on me, the client. I see the merit of Configurations and suppling an extra level of detail to the SR Analyst, and I see how the OCM &lt;b&gt;&lt;i&gt;intends&lt;/i&gt;&lt;/b&gt; to make the collection of such configurations mostly transparent. But above and beyond what is best for the analyst, I want to have a satisfying and confident SR creation experience.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US;"&gt;Currently, it takes a minimum of 17 steps (skipping all optional steps) in both the Flash and HTML versions to get to the point of hitting the "Create SR" button (different steps to be sure, but they amount to the same thing). Some of the steps are completely redundant, some are nonsense. I would contend that 95% of those steps can be deferred until after the SR is created - basically, you just need the SR to end up in the right Support group. A note about the OCM - In the HTML version, I found that it was faster (according to the wall clock) to &lt;b&gt;&lt;i&gt;not&lt;/i&gt;&lt;/b&gt; use the OCM because the pop-up window to choose the system/host can take a long time to churn through the available systems (at least for us). The Flash version is a bit smarter and fills-in as you type, which is perhaps one of the best things about the Flash version.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US;"&gt;What information does Oracle need at an absolute minimum to file the SR with the right group? Well, for starters, how about displaying all the possible groups? Currently (in both the HTML and Flash versions), the LOV (list of Values) that populate the "Problem" drop-down menu are determined by the Product that is chosen. Personally, I would prefer to pick an area of Support to send my SR to, instead of having to wade through various menus that play out like a "choose your own adventure" story.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US;"&gt;Once the proper group within Support is selected, I want a "File it NOW!" button. All the other information can be entered after the SR is filed. I would even be ok with Oracle spitting out a message like "the analyst is going to ask a lot of questions unless you can provide more details". This makes sense. If all you have done is quickly file an SR without providing the product, version and some details of the problem, what is the analyst supposed to do? Practice ESP?&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US;"&gt;Next, I want the ability to fill in information that is pertinent to my case. If I use the a configuration, I want a list of configurations that gives priority to usage such that those configs that I use more often would percolate to the top. Same with the product and versions. I want the whole operation geared around getting it done as fast as possible. I want it all to be saved as I go so that if my connection is lost or I timeout (emergency meeting with the boss), I want to be able to slide back into it where I left off with no hassles.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman', serif; font-size: small;"&gt;In terms of "Related Knowledge" or other relevant documents, I do not mind if Oracle wants to spin extra cycles looking and filtering for possible metalink docs that might help me out. Just do not be obnoxious about it. Run the search in the background and populate a sidebar that I can click on at my&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman', serif;"&gt;convenience&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman', serif; font-size: small;"&gt;. In fact, I would want all related docs to be here, including any others that the analyst might find and possible bugs.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman', serif;"&gt;I want my SR to be filed with an analyst who shares my working hours. I prefer they speak my language proficiently, but initially and more importantly, I want to know that when I am at work, so is my analyst. I want the option of specifying different work hours. There has been a bit of talk about indicating the skill level of the DBA filing the SR so as to get a competent analyst, and this idea has been shot down with good reason. Rather, I want Oracle to provide top quality analysts from the get-go. If you have a newbie who is taking the SR, fine, but make sure there is some oversight from an escalation manager right off the bat. I do not want to escalate the SR simply because I am smarter than the analyst.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman', serif;"&gt;Lastly, I want my experience to be completely independent of my browser choice. I realize this is a huge obstacle as HTML "standards" are not standard at all.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman', serif;"&gt;Here are some things that Oracle is doing well, and I want the basic functionality to be retained. In both the HTML and Flash versions, there is an attachment link where you can view uploaded files. I like how the Flash version allows you to map a system after filing the SR. Although, I do not like how you have to change other parameters as well just to make that stick. I like how entries in the SR can be filtered and/or sorted. I like the concept of the OCM (as mentioned previously) - I think there is still untapped potential there. I like how the Flash version allows one to navigate the various sections of the SR creation process (the HTML version only has a "back" and a "next" button). Pre-filled values - the more the merrier.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman', serif;"&gt;I am toying with the idea of generating a step-by-step example of my concerns. I have already down two recorded webX sessions with Oracle about this, and it would be simpler just to make those public. :) But I did not record them, Oracle did.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-3804108294097390420?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/3804108294097390420/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=3804108294097390420' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/3804108294097390420'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/3804108294097390420'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2011/04/mos-workshop-fixing-srs.html' title='MOS Workshop: Fixing SRs'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-8988359176170880829</id><published>2011-04-20T15:18:00.000-05:00</published><updated>2011-04-20T15:18:51.893-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MOS'/><category scheme='http://www.blogger.com/atom/ns#' term='feedback'/><category scheme='http://www.blogger.com/atom/ns#' term='enhancements'/><title type='text'>MOS Mashup: the summary or the saga?</title><content type='html'>Jonathan Lewis started a small &lt;a href="http://jonathanlewis.wordpress.com/2011/03/07/mos/"&gt;conversation&lt;/a&gt;; what I gleaned from that thread is he and Tanel (and other experts?) mainly use MOS for "bug hunting" and looking up specific documents. Not so much for filing SRs. Therefore their comments revolved around the utility of the site in that context. However, the general consensus is that they do not use the Flash version, only the HTML version.&lt;br /&gt;&lt;br /&gt;Lots of threads on oracle-l - I'll provide the first thread from the freelists and let you read through it if you like.&lt;br /&gt;&lt;br /&gt;Robert Freeman "&lt;a href="http://www.freelists.org/post/oracle-l/Do-you-ask-the-question-How-do-I-work-with-Oracle-Support"&gt;Do you ask the question: How do I work with Oracle Support....?&lt;/a&gt;":&lt;br /&gt;Lots of varied comments here, great for "mining" what users are expecting. If I have a ton of free time, I would love to go through and categorize what I find here more thoroughly. In summary, 1 overtly positive comment, 12 negative and 11 on the fence (both good and bad). This thread was mostly about the analysts and not MOS, per se, but a few comments did tickle MOS (negative).&lt;br /&gt;&lt;br /&gt;Jared Still "&lt;a href="http://www.freelists.org/post/oracle-l/Just-my-opinion-the-move-of-MOS-to-Flash-is-still-a-bunch-of-crap"&gt;Just my opinion - the move of MOS to Flash is still a bunch of crap&lt;/a&gt;":&lt;br /&gt;14 negative comments and 2 "neutral" - I did not find a single person who absolutely loved Flash, let alone MOS. In fact, the majority seem to feel that Flash is REALLY BAD(tm) and the HTML version is passable. General sense that the design was driven from top-heavy management structure, not from collected opinions of the user-base. A little progress seen on fixing bugs, but not nearly enough. MOS still excruciatingly slow.&lt;br /&gt;&lt;br /&gt;Yon Huang "&lt;a href="http://www.freelists.org/post/oracle-l/Anything-Flash-MOS-can-do-HTML-MOS-cannot"&gt;Anything Flash MOS can do HTML MOS cannot?&lt;/a&gt;":&lt;br /&gt;A number of browser differences ("you got an error in XXXX broswer, try the YYYY browser"). Some comments about how Flash was initially better at creating SRs, but now it seems the HTML version is more robust. With the possible exception of annoying timeouts. As if it would take an hour to file an SR, say it ain't so!!!&lt;br /&gt;&lt;br /&gt;Andrew Kerber "&lt;a href="http://www.freelists.org/post/oracle-l/more-MOS-pain"&gt;more MOS pain&lt;/a&gt;":&lt;br /&gt;I think the initial issue might not have been the interface (MOS) itself, but more about how some documents are not published ("unpublished"). I agree, I also find this practice highly annoying. If I cannot see, don't mention it.&lt;br /&gt;&lt;br /&gt;Don Granaman "&lt;a href="http://www.freelists.org/post/oracle-l/Obtuse-errors-at-MOS"&gt;Obtuse errors at MOS&lt;/a&gt;":&lt;br /&gt;I also have seen a number of these errors, even recently. This can be generalized into a category of the "Unexplainable", strange messages that pop up for no apparent reason with no apparent solution path. Or like when the entire GUI is in Japanese.&lt;br /&gt;&lt;br /&gt;Amit Bansal "&lt;a href="http://www.freelists.org/post/oracle-l/Problems-with-MOS"&gt;Problems with MOS&lt;/a&gt;":&lt;br /&gt;Browser and performance issues.&lt;br /&gt;&lt;br /&gt;Jon Crisler "&lt;a href="http://www.freelists.org/post/oracle-l/Metalink-Fiasco"&gt;Metalink fiasco&lt;/a&gt;":&lt;br /&gt;This long strand of messages wandered all over the place and I could not bring myself to read all of them. There are some good efforts to point to specific problems and possible solutions. I am dearly hoping that someone categorized that already.... you know, reinventing the wheel and all. :)&lt;br /&gt;&lt;br /&gt;There is a ton more on oracle-l - what I have above only scratches the surface. Not to mention the proliferation of myriad blogs. But two I do want to mention are from the folks at Oracle who have started a couple blogs which have garnered their own collection of colorful ideas.&lt;br /&gt;&lt;br /&gt;Chris Warticki's "&lt;a href="http://blogs.oracle.com/support/"&gt;Support&lt;/a&gt;":&lt;br /&gt;I actually took it as a good sign when Oracle briefly pulled the plug on Chris after a noticeably &lt;a href="http://blogs.oracle.com/Support/2010/02/if_mos_is_down_then_what.html"&gt;contentious article&lt;/a&gt;. Chris knows there are issues with the GUI and Support in general, and he tries really hard to put a positive spin on all of it. Its just that there is only so much positive spin one can put on.... anyway, many of the folks who commented on the oracle-l articles are active here as well.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://blogs.oracle.com/supportportal/"&gt;Support Portal&lt;/a&gt; - maintained by members of the Dev team:&lt;br /&gt;I have had a lot of great conversations with Richard Miller, and I am glad he started blogging a bit more. As I blogged about &lt;a href="http://orajourn.blogspot.com/2008/08/software-configuration-manager.html"&gt;earlier &lt;/a&gt;(a long time ago it seems), they have been doing a great job of collecting feedback and Richard did write a series of posts (&lt;a href="http://blogs.oracle.com/supportportal/2009/10/part_one_gathering_feedback_fr.html"&gt;1&lt;/a&gt;, &lt;a href="http://blogs.oracle.com/supportportal/2009/10/part_two_actual_user_feedback.html"&gt;2&lt;/a&gt;, &lt;a href="http://blogs.oracle.com/supportportal/2009/10/part_three_-_-_special_areas_o.html"&gt;3&lt;/a&gt;) about that collection process. Good stuff. The only major downside is... what did they actually do with all that awesome feedback? How is MOS better for it? *pause* I do not hear anyone singing the praises of MOS.&lt;br /&gt;&lt;br /&gt;Whew.... that is a lot of stuff. Here is my Very Basic, Gross Summary(tm).&lt;br /&gt;Customers want the online Support Site to be very fast and they want it to work. They do not want to see silly little nonsense messages. They do not want to jump through hoops and tie themselves in knots to do basic things. Customers want to talk with and interact with humans. Not monkeys reading scripts. Not a cumbersome website. Customers want a powerful search utility that helps them find documents and information quickly. Lastly, customers expect that when they are asked for their feedback, something will magically happen. When nothing happens, the pool of that feedback can quickly turn sour and/or dry.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-8988359176170880829?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/8988359176170880829/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=8988359176170880829' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/8988359176170880829'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/8988359176170880829'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2011/04/mos-mashup-summary-or-saga.html' title='MOS Mashup: the summary or the saga?'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-69814071853688683</id><published>2011-04-19T15:17:00.000-05:00</published><updated>2011-04-19T15:17:58.381-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MOS'/><category scheme='http://www.blogger.com/atom/ns#' term='support'/><category scheme='http://www.blogger.com/atom/ns#' term='feedback'/><title type='text'>Heading out to talk to MOS Devs in May</title><content type='html'>I have been invited to a workshop to talk about enhancements to MOS. I am dearly hoping to collect and possibly organize feedback from the user community in general. So here is what I am looking for:&lt;br /&gt;1) What do you like about MOS? Ie, the things you do not want to see changed.&lt;br /&gt;2) What do you not like about MOS? The more specific the better, and bonus points for suggesting an alternative.&lt;br /&gt;&lt;br /&gt;I'll be compiling my own list in the next few days. I realize many user communities have tossed this topic around ad nauseum, so this little effort is mostly my feeble way to gather all that wonderful feedback into a small concise package that can be communicated in a very clear and distinct manner.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-69814071853688683?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/69814071853688683/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=69814071853688683' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/69814071853688683'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/69814071853688683'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2011/04/heading-out-to-talk-to-mos-devs-in-may.html' title='Heading out to talk to MOS Devs in May'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-4441412476628608149</id><published>2010-06-25T15:14:00.000-05:00</published><updated>2010-06-25T15:14:06.458-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='features'/><category scheme='http://www.blogger.com/atom/ns#' term='&quot;concepts guide journey&quot;'/><category scheme='http://www.blogger.com/atom/ns#' term='utilities'/><title type='text'>Concepts Guide: 11/27 - Oracle Utilities</title><content type='html'>Wow, this chapter was hugely disappointing! I mean, it makes for a better sales pitch than technical introductions to useful features. I believe I could summarize this chapter using a pseudo-code:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;products[] = getListofProducts();&lt;br /&gt;foreach product in products[]&lt;br /&gt;do&lt;br /&gt;printHeader "Overview of $product"&lt;br /&gt;print "$product is a powerful utility to manage your data quickly"&lt;br /&gt;end&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;What is even more disappointing is that I have used all of these features/products (with the exception of the Data Pump API) and know first-hand that they are all quite useful and handy. DataPump in particular is blazingly fast at moving raw data (but amazingly slow with the subsequent ddl like indexes and stats). I mean, I could go on and say a number of excellent things about these products and the specific "things" they do, and only scratch the surface at that, and I would have surpassed what is covered in the Concepts Guide.&lt;br /&gt;&lt;br /&gt;The one thing I did learn was that I did not realize DBID could be used to set the DBNAME. I'll have to get that a try sometime.&lt;br /&gt;&lt;br /&gt;Woot, two chapters in one day!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-4441412476628608149?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/utility.htm' title='Concepts Guide: 11/27 - Oracle Utilities'/><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/4441412476628608149/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=4441412476628608149' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/4441412476628608149'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/4441412476628608149'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2010/06/concepts-guide-1127-oracle-utilities.html' title='Concepts Guide: 11/27 - Oracle Utilities'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-2651245147108386343</id><published>2010-06-25T14:57:00.000-05:00</published><updated>2010-06-25T14:57:01.327-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='application architecture'/><category scheme='http://www.blogger.com/atom/ns#' term='&quot;concepts guide journey&quot;'/><title type='text'>Concepts Guide: 10/27 - Application Architecture</title><content type='html'>Again, I am struck by the archaic terminology (minicomputers and mainframes?). In a way, I guess the fact that the underlying technologies have not changed all that much speaks to the stability of those particular designs. And that's a good thing, right?&lt;br /&gt;&lt;br /&gt;The architecture described in the first few pages is interesting. With a title like "Application Architecture", I was mislead into thinking this chapter was more about the application, but rather it is the fundamental pieces that Oracle has built to interface with various applications. I am a bit cautious about the apparent benefits of scaling vertically and horizonatally; obviously, everyone wants the option to scale if needed. While Vertical scaling seems to be the most common solution, I am a bit discouraged how hard Oracle PR has pushed Horizontal scaling in the form of RAC, almost as if it were a panacea for all functional and performance issues. But I digress.&lt;br /&gt;&lt;br /&gt;I was excited to see the section "How Oracle Net Services work". As with previous technical material in this document, I was again disappointed with the high-level summary provided, instead of the real nuts and bolts. Ironically, in light of the coverage, I was surprised to find mention of "industry-standard higher level protocols"; seems to be a bit of bandwidth to advertise how compliant they are. I would think the reader would be more interested in the details that specifically relate to how Oracle talks to itself, leaving the underlying transports systems for a book of another scope. The whole point of an API is to abrstract out the details that one does not really care about. So I was glad to move on to the next section about the Listener and Services.&lt;br /&gt;&lt;br /&gt;Yet my concern did not stop there. Check out this quote from the Listener section:&lt;br /&gt;&lt;blockquote&gt;When multiple databases or instances run on one computer, as in Real Application Clusters, service names enable instances to register automatically with other listeners on the same computer. A service name can identify multiple instances, and an instance can belong to multiple services. Clients connecting to a service do not have to specify which instance they require.&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Wow. Ok, so RAC runs on one computer?!? Since when? I have to admit that I am greatly impressed by how PMON communicates not only with the local listener, but also remote listeners &lt;b&gt;&lt;i&gt;on different computers&lt;/i&gt;&lt;/b&gt;. But there is no mention of local_listener, remote_listeners or how those play a huge role. Worse, "services" have not even been covered in sufficient detail yet; it would probably help to point out that while a service may map to multiple instances, all such instances must be part of the same database. Regardless, I have to repeat that I am duly impressed by the slickness we call "services" (head nod to Jeremy Schneider for his paper on making it a little more public). If only more beans were spilled out of the can here in the Concepts Guide.&lt;br /&gt;&lt;br /&gt;And then the chapter ends right there. Egads! 6 pages covers Application Architecture?!?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-2651245147108386343?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/dist_pro.htm' title='Concepts Guide: 10/27 - Application Architecture'/><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/2651245147108386343/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=2651245147108386343' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/2651245147108386343'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/2651245147108386343'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2010/06/concepts-guide-1027-application.html' title='Concepts Guide: 10/27 - Application Architecture'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-7773318009612398338</id><published>2010-06-04T13:26:00.001-05:00</published><updated>2010-06-04T13:27:22.031-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='lgwr'/><category scheme='http://www.blogger.com/atom/ns#' term='pmon'/><category scheme='http://www.blogger.com/atom/ns#' term='&quot;concepts guide journey&quot;'/><category scheme='http://www.blogger.com/atom/ns#' term='smon'/><category scheme='http://www.blogger.com/atom/ns#' term='ckpt'/><category scheme='http://www.blogger.com/atom/ns#' term='dbwr'/><title type='text'>Concepts Guide: 9/27 - Process Architecture</title><content type='html'>"Figure 9-1 can represent multiple concurrent users running an application on the same computer as&amp;nbsp;Oracle. This particular configuration usually runs on a mainframe or minicomputer."&lt;br /&gt;&lt;br /&gt;Wow, this section of the documentation must have been recycled for a number of years. =)&lt;br /&gt;&lt;br /&gt;Good pictures, descriptions of various processes.&lt;br /&gt;&lt;br /&gt;In general, I like the "See also" sections, but I wish the link would go directly to the relevant&amp;nbsp;section of the reference, instead of the top-most TOC page.&lt;br /&gt;&lt;br /&gt;This section confused me:&lt;br /&gt;"When a checkpoint occurs, Oracle must update the headers of all datafiles to record the details of the checkpoint. This is done by the CKPT process. The CKPT process does not write blocks to disk; DBWn&amp;nbsp;always performs that work.&lt;br /&gt;&lt;br /&gt;The statistic DBWR checkpoints displayed by the System_Statistics monitor in Enterprise Manager&amp;nbsp;indicates the number of checkpoint requests completed."&lt;br /&gt;&lt;br /&gt;If The CKPT process is responsible for updating the datafile headers and DBWR is responsible for&amp;nbsp;something else (writing blocks to disk), why is the statistic called DBWR checkpoints? That is quite&amp;nbsp;misleading, and perhaps leads to the confusion that spawned the warning about the DBWR in the first&amp;nbsp;place. =)&lt;br /&gt;&lt;br /&gt;Both PMON and SMON "check regularly". What is "regularly"?&lt;br /&gt;&lt;br /&gt;While there are a lot of good ideas imbedded in Oracle, it is surprising that some of the still have&amp;nbsp;such an antiquated and/or obfuscated interfaced. For example, the job scheduling system. The job queue&amp;nbsp;processes are quite cool, but using them is a pain in the arse. The EMGC GUI is not too shabby, but&amp;nbsp;what really sucks is the API; what about a simple API for those of us who do command-line work? VPD and&amp;nbsp;Streams are the same way (have not yet seen any GUI for VPD). At least Shared Server is a little easier&amp;nbsp;to grasp and implement, but it is still very easy to shoot yourself in the foot.&lt;br /&gt;&lt;br /&gt;In terms of performance in the context of Shared Server, would not immediate results from FIRST_ROWS_N operations be queued as well? So it would be possible that queued results would actually return slower than when using a dedicated server?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Overall I found this chapter disappointingly light on details, or examples for that matter. I would love to see the program flow, end-to-end, of requesting, establishing, executing and concluding a transaction. Likewise, the last few sections (under "The Program Interface") don't really say much at all - it is most useful as a dictionary or appendix, nothing really that describes what things are or how they work, or the role they play in the larger picture. I mean, they do a little, but not a whole lot.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-7773318009612398338?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/process.htm' title='Concepts Guide: 9/27 - Process Architecture'/><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/7773318009612398338/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=7773318009612398338' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/7773318009612398338'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/7773318009612398338'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2010/06/concepts-guide-927-process-architecture.html' title='Concepts Guide: 9/27 - Process Architecture'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-5873522944830787873</id><published>2010-02-18T13:20:00.002-06:00</published><updated>2010-02-18T13:44:05.009-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bugs'/><category scheme='http://www.blogger.com/atom/ns#' term='vpd'/><category scheme='http://www.blogger.com/atom/ns#' term='rls'/><category scheme='http://www.blogger.com/atom/ns#' term='anydata'/><title type='text'>VPD + bad ANYDATA practices can really bite</title><content type='html'>&lt;span class="Apple-style-span"   style="  ;font-family:arial;font-size:small;"&gt;&lt;div&gt;After several days of intense testing, 4 SRs with Oracle Support (and another with the ERP vendor), and the very helpful information from Maxim Demenko about "&lt;a href="http://www.freelists.org/post/oracle-l/How-does-one-enter-dates-beyond-the-implicit-Oracle-internal-date-limits,1"&gt;out-of-range&lt;/a&gt;" date values, I have developed a testcase that demonstrates how using bad ANYDATA practices in the context of VPD can really mess you up.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Some background:&lt;/div&gt;&lt;div&gt;We have an application that recently started to utilize ANYDATA. Unfortunately, the application did not implement validation checks, and the nature of ANYDATA makes table check constraints a near impossibility (I have not found any good ways to go about it). So we (not I, but colleagues) developed VPD rules to validate data. After a month of testing, a tester noticed that we had some really funny dates, ranging from 4290 BC to 5090 BC.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;We tried tracing (10046, 10053, 10730), but nothing jumped out at us; except we may have uncovered a new bug, but more on that in a second. We tried using LogMiner, but Oracle Support finally convinced us that LogMiner does not support ANYDATA. :-( Finally we just started shooting in the dark, testing different combinations of rules and data inputs.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;We stumbled upon the fact that using CAST to convert ANYDATA into a datatype has bad consequences. In particular, if you try something like cast(some_anydata_column as varchar2(1)) and the column is a DATE, for example, you get a ora-3113/ora-7445 (under 10.2.0.4 + JanPSU2010). The fine folks who had written our RLS policies had used CAST extensively, and the ironic part is that no errors were being generated on the application side. Instead, bad dates were sneaking into the dataset.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;After reading the documentation a bit more, I discovered that ANYDATA is an object-oriented object (much to my surprise), and it has member functions. We had a hard time trying to figure out exactly how to use the member functions since one needs to instantiate a member first, and the documentation does not give any examples, let alone explain the usage of "object-oriented" in a relationship database. Finally I stumbled upon using sys.anydata as an instantiation, which seemed to work well for us.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Why did Oracle develope ANYDATA?!? It seems anti-RDBMS. And it makes things messy for us DBA types. As I explained to my colleagues, object-oriented data buckets are great for developers, up until they break. Then they are a pain to figure out.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I still have an outstanding question of exactly how the ANYDATA column overflows into the DATE field and gives us whacked out dates. If any Oracle gurus out there want to chime in, please do so.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Here is the code I used to replicate our issue:&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;drop user test cascade;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;drop user test_no_vpd cascade;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;create user test_no_vpd identified by test4#;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;grant create session, EXEMPT ACCESS POLICY to test_no_vpd;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;create user test identified by test3#;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;grant create session, alter session, resource, create any context to test;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;grant execute on dbms_rls to test;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;connect test/test3#;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;CREATE TABLE GORSDAV (&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt; GORSDAV_TABLE_NAME VARCHAR2(30 CHAR) NOT NULL,&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt; GORSDAV_VALUE SYS.ANYDATA NOT NULL,&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt; GORSDAV_ACTIVITY_DATE DATE NOT NULL,&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt; pill_1 number default 1,&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt; pill_2 number default 2,&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt; pill_3 number default 3)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;insert into gorsdav values ('some_table_1',sys.anydata.convertnumber(1),sysdate,0,0,0);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;insert into gorsdav values ('some_table_1',sys.anydata.convertdate(sysdate),sysdate,0,0,0);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;insert into gorsdav values ('some_table_1',sys.anydata.convertvarchar2('Y'),sysdate,1,0,0);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;insert into gorsdav values ('some_table_2',sys.anydata.convertvarchar2('Yes'),sysdate,0,0,0);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;insert into gorsdav values ('some_table_2',sys.anydata.convertvarchar2('Y'),sysdate,0,0,3);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;insert into gorsdav values ('some_table_2',sys.anydata.convertvarchar2('No'),sysdate,0,0,0);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;insert into gorsdav values ('some_table_3',sys.anydata.convertvarchar2('MaybeSo'),sysdate,0,0,0);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;commit;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;-- Using FGAC example from http://www.orafusion.com/art_fgac.htm&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;-- A dummy procedure to satisfy the CREATE CONTEXT command; does not actually do anything&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;PROMPT Create Application Role Procedure&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;create or replace procedure&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt; set_testapp_role(p_user varchar2 default sys_context('userenv', 'session_user')) is&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;v_ctx varchar2(16) := 'testapp_ctx'; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;begin&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;dbms_session.set_context(v_ctx,'rolename','APP_OWNER');&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;end;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;/&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;PROMPT Create context&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;create or replace context testapp_ctx using set_testapp_role;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;-- This is just a mock up test; I am not concerned about real-life roles or security,&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;-- thus I am returning the same predicate no matter who the user is&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;PROMPT Create security function&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;create or replace function testapp_security_function (p_schema varchar2, p_object varchar2)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt; return varchar2 is&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;begin&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;return '(sys.anydata.accessvarchar2(gorsdav_value) = ''Y'' and pill_1 = 1) or pill_1 &lt;&gt; 1';&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;end;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;/&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;PROMPT Create RLS Table Policy&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;declare&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;begin&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;DBMS_RLS.ADD_POLICY (&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;  object_schema =&gt; 'TEST',&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;  object_name =&gt; 'GORSDAV',&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;  policy_name =&gt; 'TESTAPP_POLICY',&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;  function_schema =&gt; 'TEST',&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;  policy_function =&gt; 'TESTAPP_SECURITY_FUNCTION',&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;  statement_types =&gt; 'SELECT,UPDATE,INSERT,DELETE',&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;  update_check =&gt; TRUE,&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;  enable =&gt; TRUE,&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;  static_policy =&gt; FALSE);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;end;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;/&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;PROMPT Inserting a control row into the table to show the date and insert are fine&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;insert into gorsdav values ('some_table_4',sys.anydata.convertvarchar2('123456789'),sysdate,0,0,0);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;commit;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;PROMPT Selecting data from table - should return eight rows with no errors&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;select * from gorsdav;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;-- The following function uses CAST to get the varchar2 data; however, a majority of the&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;-- data is larger than the CAST target, thus we get an error. Even if we use varchar2(200),&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;-- some datatypes are DATE and NUMBER.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;PROMPT Create "bad" security function&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;create or replace function testapp_security_function (p_schema varchar2, p_object varchar2)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt; return varchar2 is&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;begin&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;return '((cast(gorsdav_value as varchar2(1)) = ''Y'' and pill_1 = 1) or pill_1 &lt;&gt; 1)';&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;end;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;/&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;PROMPT Inserting into table - this will work with no problems.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;insert into gorsdav values ('some_table_4',sys.anydata.convertvarchar2('Y'),sysdate,0,2,0);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;commit;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;PROMPT Inserting into table - this will complete successfully, but will insert a "bad" date&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;insert into gorsdav values ('some_table_4',sys.anydata.convertvarchar2('123456789'),sysdate,0,0,0);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;commit;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;-- PROMPT Selecting data from table - should hang for about 10 seconds and kick you out with&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;-- PROMPT ORA-3113 and ORA-7445 in the alert.log&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;-- select * from gorsdav;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;grant select on test.gorsdav to test_no_vpd;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;PROMPT Connecting as a non-VPD user (exempt access policy)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;connect test_no_vpd/test4#&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;select * from test.gorsdav;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-5873522944830787873?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/5873522944830787873/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=5873522944830787873' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/5873522944830787873'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/5873522944830787873'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2010/02/vpd-bad-anydata-practices-can-really.html' title='VPD + bad ANYDATA practices can really bite'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-2876311123760733565</id><published>2010-01-05T15:36:00.003-06:00</published><updated>2010-01-05T15:55:55.083-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Dan Morgan'/><category scheme='http://www.blogger.com/atom/ns#' term='treedump'/><category scheme='http://www.blogger.com/atom/ns#' term='internals'/><category scheme='http://www.blogger.com/atom/ns#' term='index'/><category scheme='http://www.blogger.com/atom/ns#' term='Richard Foote'/><title type='text'>TreeDump</title><content type='html'>Daniel Morgan alerted me to an &lt;a href="http://www.morganslibrary.org/reference/sys_op_lbid.html"&gt;index rebuild package&lt;/a&gt; he worked on; as I was reading up on sys_op_lbid (which is incredibly interesting, btw), I came across Richard Foote's "&lt;a href="http://www.dbafan.com/book/oracle_index_internals.pdf"&gt;Index Internals&lt;/a&gt;", another awesome read.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Getting past the humurous myth busters (does anyone escape his righteous wrath?!? *grin*), I was delighted to learn about treedump:&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;alter session set events 'immediate trace name treedump level &amp;amp;index_object_id';&lt;/span&gt;&lt;/span&gt; -- smartquotes removed&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I had been experimenting with block dump on index blocks, trying to slug my way through the various header and pagetable blocks. While that is eye-opening in itself, the treedump really paints a human-understandable picture. As Richard has stated in other documents, indexes rarely ever look like the typical pyramid scheme (the one that everyone on the Planet uses, including himself *smile*); instead, more often than not, the "trees" get really wide very fast, and are usually rather shallow (not too many levels deep). The treedump not only exposes this commonality, but succinctly demonstrates why. Namely, each branch block of size DB_BLOCK_SIZE can contain hundreds or thousands of references to children blocks (be they further branch blocks or leaf blocks).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Mr. Foote's "Internals" presentation goes on to divulge other useful tidbits and I intend to revisit it to reinforce my learning. He is one smart dude.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;My only request now is a live, dynamic graphical representation of the index "tree"; when teaching students (for example) how indexes are built, having a visual component really helps to emphasize what is going on. When I do them by hand (whiteboard and marker), I find it also goes a long way to demystify otherwise confusing (and thus prone to &lt;b&gt;&lt;i&gt;myths&lt;/i&gt;&lt;/b&gt;) concepts as deleted index entries, "fragmentation", "unbalanced" and index block splits. What can I say, I am visually oriented.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Thanks to Dan Morgan for vigilantly working to improve Oracle for us lower-lifeforms (ie, the index rebuild/coalesce package is really helpful). Without his nudging me, I would not have yet found sys_op_lbid, nor explored the internals a bit more.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-2876311123760733565?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/2876311123760733565/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=2876311123760733565' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/2876311123760733565'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/2876311123760733565'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2010/01/treedump.html' title='TreeDump'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-3237672889260998623</id><published>2009-10-08T14:08:00.002-05:00</published><updated>2009-10-08T14:11:29.134-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='&quot;concepts guide journey&quot;'/><category scheme='http://www.blogger.com/atom/ns#' term='cache'/><category scheme='http://www.blogger.com/atom/ns#' term='SGA'/><category scheme='http://www.blogger.com/atom/ns#' term='PGA'/><category scheme='http://www.blogger.com/atom/ns#' term='memory'/><category scheme='http://www.blogger.com/atom/ns#' term='concepts'/><title type='text'>Concepts Guide: 8/27 - Memory Architecture</title><content type='html'>&lt;div&gt;Like the picture on the 2nd page. Yes, I am visually oriented.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;On page 4:&lt;/div&gt;&lt;div&gt;When automatic SGA memory management is enabled, the sizes of the different SGA&lt;/div&gt;&lt;div&gt;components are flexible and can adapt to the needs of a workload without requiring&lt;/div&gt;&lt;div&gt;any additional configuration.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;However, the SGA components are flexible regardless of the setting for automatic SGA memory management (aka, automatic shared &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;memory management, ak ASMM). While I agree that ASMM as a conceptual feature is rather cool, there are known issues when &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;allocations and deallocations oscillate rapidly, causing locks on the underlying pools and decreasing performance overall.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To be truly effective, dynamic memory management would allow the kernel to dynamically allocate memory segments from the OS. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;As it stands, 100% of greater(SGA_TARGET,SGA_MAX_SIZE) is allocated when the instance starts; if SGA_MAX_SIZE is greater, the &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;memory is allocated but not used, saved away for a potential future use. How is that dynamic?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;From page 5:&lt;/div&gt;&lt;div&gt;"As the workload changes, memory is redistributed to ensure optimal performance."&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;*cough cough* Unless of course you hit a bug....&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Good overview and discussion of the SGA and buffer cache in general.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Page 6:&lt;/div&gt;&lt;div&gt;"If the user process finds a dirty buffer as it searches the LRU list, it moves that buffer&lt;/div&gt;&lt;div&gt;to the write list and continues to search."&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I did not realize that the user process could move dirty buffers to the write list; I thought only the DBWriter processes &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;could do that. Hmm...&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Slightly disappointed that there is no talk about the negative ramifications of setting a large buffer cache, specifically &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;how it adversely affects the time to scan the LRU. The positive effects are fairly obvious. =) I was also hoping for more &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;coverage of the Redo Log buffer. But, the couple of paragraphs in the document (and more laterin Chap 9?) at least introduce &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;the concept. I still find it strange that the defaults are so small.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;By the time I get to page 10, I am ready for another picture; it would be nice to start with the overall picture, and then &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;"zoom in" on each section to go along with the text a little bit.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Data Dictionary Cache, aka Row Cache. Is this the same cache that 11g is using to store sql results?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Like the detailed steps on page 12; this is the kind of details I have been waiting for. And now I can rip them up. =)&lt;/div&gt;&lt;div&gt;The first bullet of #2 states that the ANALYZE command (when used to update/modify stats) flushes the cursor from the shared &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;pool. People still use the ANALYZE command in 10g? I thought the dbms_stats procedures were preferred and more popular. In &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;any event, the underlying mechanics are still the same; if you alter the stats, the cursor is no longer valid and dropped. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now if only we had a way to surgically splice out individual cursors without having to make relatively "impactful" changes...&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Bullet 3 is interesting, I had no idea that changing the global name flushed the shared pool. Wow.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The couple of paragraphs about the Large Pool are succint, a bit too much so. How does Oracle decide when to use Large Pool &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;memory, as opposed to the Shared Pool? What are some good rules of thumb in terms of how much to allocate (probably covered &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;in the Performance Tuning Guide, but the Concepts Guide should say _something_)? No Large Pool Advisor? =)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The section on Streams Pool is even worse. It does not tell me what exactly the memory is used for, how to tune it, what to &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;do with it, nothing. And the 2nd paragraph is quite confusing; the Streams Pool may come from different parent pools &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;depending on how SGA_TARGET is set? Who signed off on that little bit of tom-foolerly?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The section on Dynamic SGA is almost misleading. The shared memory allocated to the server instance does not actually change &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;at all; 100% of the requested memory (even if it is not used) is given during instance startup. This concept of a "dynamic &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;memory usage" feature totally ignores that fact. So if the instance gets 50GB of memory but only uses 500MB, you are wasting &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;45GB for no good reason. That is not dynamic memory.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;"Both the buffer cache and the SGA pools can grow and shrink at runtime according to some internal, Oracle-managed policy." &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This is the Concepts Guide, for crying out loud! Some internal, Oracle-managed policy?!? Who wrote that?!? Worse, this &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;particular policy has some serious drawbacks, especially earlier in 10g. We observed that Oracle would thrash itself trying &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;to resize the "dynamic" pools many times a second, apparently oscillating between two different "optimal" thresholds. Some &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;policy.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;LOCK_SGA: I have never heard of this parameter. And, oh, here is the reason why; we run Solaris. &lt;sarcasm&gt;Good thing the &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Concepts Guide cleared that up.&lt;/sarcasm&gt; So, this is the Concepts Guide, right? I am not reading some PR BS, am I? Why would &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;LOCK_SGA be a bad thing? If you are running a Production database, especially on a host that is dedicated to Oracle, why &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;would I ever want memory pages to swap out?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;SHARED_MEMORY_ADDRESS: Again, never heard of this one. In fact, Google is suspiciously quiet on this one as well. Why would I &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;want to set this parameter? Don't get me wrong, I am glad the Concepts Guide at least says *something*, but some explanations &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;would be nice. I assume this parameter is offset; if you set the same thing in multiple databases, I would have a hard time &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;believing that this parameter actually is meant to grab an absolute, OS Memory address. That would be just silly. Actually, I &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;am surprised this is not a underscore parameter. Which makes me wonder, is this short little blurb the only thing that keeps &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;this parameter from being "internally supported"?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Didn't realize the PGA had two independently-maintained subsections (pesistent area and run-time area). Good to know.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It is puzzling that the author would choose to include v$sesstat and v$sysstat as means of collecting performance statistics for the PGA without giving any insight whatosever as to what to look for; in fact, just browsing v$statname (the lookup table for the statistic#) does not make this any more clearer either. I personally find it quite unhelpful a document that purports to "demystify" something flippantly references a source that is not at all obvious.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I'll wrap up with that. I still find it hard to wade through these chapters; drains my brain. *grin* Overall I felt that I learned a few small things about the Memory Architecture, but I still feel like I have a ways to go before I fully grasp the skeleton that holds everything together. I hope this becomes more lucid as the chapters progress.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-3237672889260998623?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/memory.htm' title='Concepts Guide: 8/27 - Memory Architecture'/><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/3237672889260998623/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=3237672889260998623' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/3237672889260998623'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/3237672889260998623'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2009/10/concepts-guide-827-memory-architecture.html' title='Concepts Guide: 8/27 - Memory Architecture'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-6233816989593348676</id><published>2009-09-23T09:36:00.003-05:00</published><updated>2009-09-23T10:01:40.950-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='x$ table'/><category scheme='http://www.blogger.com/atom/ns#' term='&quot;concepts guide journey&quot;'/><category scheme='http://www.blogger.com/atom/ns#' term='data dictionary'/><category scheme='http://www.blogger.com/atom/ns#' term='concepts'/><title type='text'>Concepts Guide: 7/27 - Data Dictionary</title><content type='html'>I still cannot believe "someone" had the gall to reduce the data dictionary to 5 pages. =) And one blank page to rub salt into the wound.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I had an interesting challenge when trying to explain the dictionary to a colleague. So we all have a general idea of what the data dictionary is and what it does (just read the first page of this chapter in the docs). When does it get built? Interesting question. Usually we say that catalog.sql builds the dictionary, or even bsq.sql. However, did you realize that 601 fixed tables (10.2.0.4) exist in memory just for starting the instance (NOTE: &lt;b&gt;&lt;span class="Apple-style-span" style="text-decoration: underline;"&gt;&lt;i&gt;no&lt;/i&gt;&lt;/span&gt;&lt;/b&gt; database!)? Try this one on for size:&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;dev&gt; /u01/app/oracle/product/10.2.0.4/dbs: echo "db_name = SAC" &gt; initSAC.ora&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;dev&gt; /u01/app/oracle/product/10.2.0.4/dbs: . oraenv&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;ORACLE_SID = [DUMMY] ? SAC&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;ORACLE_HOME = [/u01/app/oracle] ? /u01/app/oracle/product/10.2.0.4&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;dev&gt; /u01/app/oracle/product/10.2.0.4/dbs: sqlplus / as sysdba&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;SQL*Plus: Release 10.2.0.4.0 - Production on Wed Sep 23 09:32:35 2009&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;Connected to an idle instance.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;SAC_SQL &gt; startup nomount&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;ORACLE instance started.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;Total System Global Area  419430400 bytes&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;Fixed Size                  2286584 bytes&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;Variable Size             114105352 bytes&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;Database Buffers          268435456 bytes&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;Redo Buffers               34603008 bytes&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;SAC_SQL &gt; select count(*) from X$KQFTA;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;  COUNT(*)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;----------&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;       601 &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you want all the names of those fixed tables, select KQFTANAM.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So, even without running any scripts, we have "data dictionary" objects residing in memory. This helps me to understand what the dictionary is and what it does. For an analogy, it is like the overhead address space a program uses to store all its global variables. In this case, it is just happens to be organized into relational tables with gobbly-gook table/column names and normalized up the wazoo! =)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I have to confess, I was quite disappointed with this chapter. Of the 5 pages, the first 4 tell you not to change anything and give a brief overview of the differences between USER, ALL and DBA views. The last page starts to get just a tiny bit juicy and at least mention dynamic performance views, but then like a cheap battery dies out too soon.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There is some really cool stuff locked away in the x$ tables, let alone the rest of the db metadata. For a quick glimpse under the covers, I found &lt;a href="http://www.eygle.com/refer/Oracle_x$table_list.htm"&gt;eygle&lt;/a&gt;'s list quit informative and helpful; it is allegdegly a copy of Metalink note &lt;span class="Apple-style-span" style="font-family: monospace; font-size: medium; font-weight: bold; white-space: pre; "&gt;22241.1&lt;span class="Apple-style-span" style="font-family: Georgia, serif; font-weight: normal; white-space: normal; font-size: 16px; "&gt;, which is supposed to be internal only (I cannot see it at this point in time); it merely lists the fixed tables to demonstrate the naming convention, but it also gives us an idea how things are organized and what types of things the kernel tracks. I hope one day Oracle wakes up and realizes the advantage of sharing more information like this.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Yong Huang also has a &lt;a href="http://yong321.freeshell.org/computer/x$table.html"&gt;listing&lt;/a&gt;.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-6233816989593348676?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/datadict.htm' title='Concepts Guide: 7/27 - Data Dictionary'/><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/6233816989593348676/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=6233816989593348676' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/6233816989593348676'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/6233816989593348676'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2009/09/concepts-guide-727-data-dictionary.html' title='Concepts Guide: 7/27 - Data Dictionary'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-1921245882483732441</id><published>2009-09-21T09:06:00.004-05:00</published><updated>2009-09-21T09:53:45.967-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='lessons'/><category scheme='http://www.blogger.com/atom/ns#' term='parameter'/><title type='text'>Learning about parameters</title><content type='html'>We are kicking off an effort to analyze and hopefully standardize parameters across some 200 databases. Fortunately, we have a history of parameters which is made possible by an in-house job that scrapes them from each database every night.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So this post is more about my own little path of discovery; I am sure most of you know this already.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Lesson 1: Pay attention to what the documentation says&lt;/b&gt;&lt;/div&gt;&lt;div&gt;For instance, db_cache_size has this little blurb in the 10gR2 docs:&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Tahoma, sans-serif; font-size: small; "&gt;&lt;blockquote&gt;The value must be at least &lt;code style="font-family: monospace; font-size: 12px; "&gt;4M * number of cpus * granule size&lt;/code&gt; (smaller values are automatically rounded up to this value).&lt;/blockquote&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;Let us assume the documentation means to say 4*1024*1024, as opposed to 4 megabytes; 4 megabytes * granule size (which is also in bytes) would give you bytes squared, which makes no sense. We will also assume the granule size = 8KB, but in order for the numbers to be realistic, we will say 8 bytes. That first 4M is really throwing things off. 4M * 8 bytes = 33,554,432 bytes, or 32 megabytes.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So let's say we have a generic setting of, say 200M (bear with me). If you upgrade your host from using 5 CPUs (4M * 5 cpus * 8K = 32MB * 5 = 160MB) to 10 CPUs (160MB * 2 = 320MB), the setting for db_cache_size will automatically jump up to 320MB, despite your explicit setting of 200M. If you had budgeted your databases to max out memory, you might want to be a tad careful. =)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Lesson 2: Comments in the init file are stored in x$ksppcv.ksppstcmnt (and thus v$parameter.UPDATE_COMMENT)&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Of course, one has to put the comments in the right place. We pretty much discovered this by accident; if you put a # followed by text after the parameter=value, you are all set. Of course, if you ever look at spfiles, they have the same thing. Just something we have missed for a very long time. =) We have found this to be very handy in identifying parameters that deviate from a given "standard" or are set as a result of a bug. Or an upgrade (which are just really massive bug fixes, as well as new bug introductions, right? *grin*).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Lesson 3: Undocumented/unpublished x$ tables really sucks&lt;/b&gt;&lt;/div&gt;&lt;div&gt;I really wish Oracle would document the x$ tables for us. So I am looking at &lt;i&gt;X$KSPPI.ksppity&lt;/i&gt;; all the online blogs/white papers/articles that I can find decode this value into 4 groups (boolean, string, number, file). But wait, in 10gR2 I have &lt;b&gt;&lt;i&gt;5&lt;/i&gt;&lt;/b&gt; distinct types (1-4, 6). 6 seems to correspond to "Big Integer", that little convention of using [K|M|G] after a number to distinguish a shorthand for its size. Not sure why 5 was skipped - we do not have any values for 5.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Overdramatic? Saying that such a small thing sucks? This is merely the tip of the iceberg - there is so much out there that is not available for the general public, and the experts end up making guesses (really good and quite often very accurate guesses, but guesses none-the-less).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Well that is it for now. Still exploring, learning... seeing what's out there.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-1921245882483732441?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/1921245882483732441/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=1921245882483732441' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/1921245882483732441'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/1921245882483732441'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2009/09/learning-about-parameters.html' title='Learning about parameters'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-1472963407634799277</id><published>2009-09-11T15:25:00.002-05:00</published><updated>2009-09-11T15:42:56.596-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='object dependencies'/><category scheme='http://www.blogger.com/atom/ns#' term='&quot;concepts guide journey&quot;'/><category scheme='http://www.blogger.com/atom/ns#' term='concepts'/><title type='text'>Concepts Guide: 6/27 - Dependencies Among Schema Objects</title><content type='html'>Almost nice to have a short chapter. I cheated a peeked ahead and saw that Chapter 7 is only 6 pages; how the heck did they squeeze the Data Dictionary into 6 pages? Guess we will have to wait and see.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I like how Oracle automatically attempts to recompile dependent objects if the referenced object is changed - the discussion in this chapter highlights Oracle's infrastruture (although does not detail it) and how it all happens like black magic. =) Here is a quick example:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;SQL &gt; create table t1 (a char(1));&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;Table created.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;SQL &gt; create view v1 as select * from t1;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;View created.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;SQL &gt; create view v2 as select * from v1;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;View created.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;SQL &gt; select object_name, status from dba_objects where object_name like '__';&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;OBJECT_NAME                    STATUS&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;------------------------------ -------&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;V1                             VALID&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;V2                             VALID&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;T1                             VALID&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;SQL &gt; alter table t1 add (b char(1));&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;Table altered.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;SQL &gt; select object_name, status from dba_objects where object_name like '__';&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;OBJECT_NAME                    STATUS&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;------------------------------ -------&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;V1                             INVALID&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;V2                             INVALID&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;T1                             VALID&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;SQL &gt; select * from v2;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;no rows selected&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;SQL &gt; select object_name, status from dba_objects where object_name like '__';&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;OBJECT_NAME                    STATUS&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;------------------------------ -------&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;V1                             VALID&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;V2                             VALID&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;T1                             VALID&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Note how V2 depends on V1, which depends on T1. Even though the text is not clear on whether or not a recurssive recompilation will occur, we can see that in practice, it does. Cool stuff.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The notes on page 6 (Object Name resolution) are key to remember. It seems easy sometimes to forget the order of precedence:&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;own schema&lt;/li&gt;&lt;li&gt;public synonym&lt;/li&gt;&lt;li&gt;schema matches fully-qualified object owner&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There is an important ramification to this:&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;div&gt;Because of how Oracle resolves references, it is possible for an object to depend on the nonexistence of other objects. This situation occurs when the dependent object uses a reference that would be interpreted differently were another object present.&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;For instance, it is possible that V1 needs to have T1 &lt;i&gt;&lt;b&gt;not &lt;/b&gt;&lt;/i&gt;be in the current schema, but rather a synonym.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Right below that is a section on how SQL also maintains a dependency on the referenced object. Because Oracle (as of Oracle 11gR1) does not fully support surgically removing individual sql cursors, one workaround is to change the dependent object, which immediately invalidates any associated cursors. Great for if you want a new query plan because something changed and you do not want to redo the stats. Well... kinda great; not to many shops allow the DBA to make changes to the table on the fly in Production. =)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The section on remote dependencies was slightly interesting - I did not realize that Oracle checked not only on timestamps, but also on signatures. When you think about it, it is amazing how much Oracle does behind the scenes.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-1472963407634799277?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/depend.htm#i3265' title='Concepts Guide: 6/27 - Dependencies Among Schema Objects'/><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/1472963407634799277/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=1472963407634799277' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/1472963407634799277'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/1472963407634799277'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2009/09/concepts-guide-627-dependencies-among.html' title='Concepts Guide: 6/27 - Dependencies Among Schema Objects'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-8774535579453263160</id><published>2009-09-09T14:01:00.002-05:00</published><updated>2009-09-09T14:15:39.880-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='workshop'/><category scheme='http://www.blogger.com/atom/ns#' term='RAC Attack'/><title type='text'>RAC Attack!</title><content type='html'>Jeremy Schneider graced us with RAC Attack last week - it was quite awesome! Jeremy brings such a wealth of knowledge and passion for the technology that often times I found myself hard pressed to keep the workshop going. As I was the "organizer" person, I felt some responsibilities in those directions.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It also opened my eyes on several fronts. This is the first time I have helped to facilitate such a workshop, and there were a number of interesting obstacles, logistical and technological. Jeremy handled it all with his usual easy manner and we got it all worked out quite well. For instance, the harddrives of the individual computers were just a tad too small to accomodate all the jumpstart VM images that Jeremy likes to deploy; as a result, we ended up hosting files on various computers and mapping network drives. Not the quickest thing in the world, but hey, it worked. Also, again from the perspective of a facilitator, I found it challenging to address the numerous questions that folks had from time to time, which gave me a greater respect for those who do this kind of thing on a regular basis. Not only did Jeremy answer questions, but took advantage of several opportunities to delve into the deeper details of "how things work".&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In retrospect, we are faced with the ubiquitous puzzle of how to address different styles of learning. For those, like me, who crave the hands-on aspect, this workshop is excellent! For those who need more lecture, this lab was a bit of a wake-up call. *grin* Actually, if only we had more time, we could certainly have entertained more dialogue; RAC is rich with controversy. =)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Jeremy was also able to spill the beans a little on Oracle 11gR2, since someone decided to release the Linux version the Tuesday before the workshop began. So we were treated to a few sneak peeks and tidbits. Good stuff.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Personally, I was challenged to discover new ways to do these kind of labs/workshops. I heard a lot of positive feedback about the wide variety of skill sets and job roles in the class, but as a result of that, the various backgrounds required different levels of "background information". Going forward, I would try to break the labs into more modular components (opposed to a totally open lab time) and preceed each lab with some solid instruction. What Jeremy did was great for DBAs, but we had some folks who needed a bit more hand-holding. That is just the nature of the beast. The good news is that Jeremy equipped us to do exactly that - we can now hold our own lab and choose any pace we want. I am hoping to pursue this a little and get others involved, especially in terms of disucssing how we as an organization want to tackle overlapping job roles in regards to cluster and storage management.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The virtualization aspect was also very nice. I think it gave us a glimpse into what we can do with virtualized resources, something we can definitely utilize more fully for future labs and group sessions.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Thanks, Jeremy,&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-8774535579453263160?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/8774535579453263160/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=8774535579453263160' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/8774535579453263160'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/8774535579453263160'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2009/09/rac-attack.html' title='RAC Attack!'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-3640229633430700228</id><published>2009-06-24T15:16:00.003-05:00</published><updated>2009-06-24T15:20:24.969-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='&quot;concepts guide journey&quot;'/><category scheme='http://www.blogger.com/atom/ns#' term='concepts'/><category scheme='http://www.blogger.com/atom/ns#' term='schema objects'/><title type='text'>Concepts Guide: 5/27 - Schema Objects</title><content type='html'>I found that reading the Guide is quite hard if you are already tired. ;-)&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;As always, I like pictures. Figure 5-1 on page 5-3 does justice. Although they would make their point more clear by labelling the schemas.&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Was not aware of intra-block chaining (pp 5-5) - interesting concept. Especially since it does not affect performance (does not increase the number of IO calls).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Figure 5-3 is good in that it really helps to see the various pieces of a block and the row, including the headers.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;As much as I hate how nulls are handled in Oracle, the one good thing is that I like how Oracle just does not even record information for null-trailing rows (ie, column-length not stored in block). Except, of course, if you have LONG data - DO NOT USE LONG! =)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I was not aware how table compression actually worked. Now that I know a little more about it, I am surprised the guide did not mention any limitations. For example, if a block has 100% unique data (uncompressable), would the symbol table still be built and populated? If not, what is the cut-off? At what point does Oracle deem compression worthwhile, pragamatically?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I have never seen a practical use for nested tables, but I'll keep my eyes open. I jumped to 27-7 as referenced just to see what it said. I still have never seen a practical use for nested tables.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The fact that sessions are "bound" to temp tables was new to me; I did not realize you could not do ddl on a temp table if is already bound to a session. Kinda makes sense, though. I wonder why they do not simply call it "locking"? =) Afterall, that is how normal tables are handled.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Ojbect Views really confuse me, not being familiar with the concept. And this being the Concepts Guide, I found that the short little blurb did not really help me much at all.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I also did not realize that one could put declaritive constraints on views; interesting way to propagate metadata information for restricted environments.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The short paragraph on Materialized View Logs did not do the concept any justice. I get the impression that either space and/or time was restrained when this section was done. =)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The intro section to Dimensions left my head whirling. I am not a Warehousing guy by any means; while I appreciate the extra background and the quasi-example, I find that it deep-dives too quick for me. And using an example of a year being tied to a year-row is just the most absurd thing I have ever heard. Why not a practical, real-life example that "anyone" can grasp?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Good discussion for sequences; I like how the good is balanced with the bad - the "Caution" is stronger than I expected, but I think very important and am glad to see that the authors made it stand out.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Nice long section on indexes. *grin* I always find it strange to find in 10g documentation references to "analyze table", when most of the time I believe they really mean collect stats, for which we are told to use dbms_stats instead. The intro to deterministic (user-defined) indexes was quite interesting. I would personally consider this an example of "black magic" in Oracle. Another one of those cases where there is a strong lack of practical examples.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Figure 5-7 starts out looking like a great pictoral example. However I found it to be quite confusing. Actually, what I really want to see is how an index is built, starting with one row. At the very least, it would be helpful to augment the figure with text explaining the function of the values for the branch blocks. However, excellent information on how searches are mathematically bounded (big-O notation).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Excellent piece on bitmap indexes; great examples, wonderful discourse. I appreciate the balanced approach to addressing the pros and cons of bitmap indexes, which may at the outset seem to be the pancea of query performance issues. The sidebar on cardinality was very well done as well.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The section on Index-organized tables was also quite interesting, however I wonder why, if they are so highly recommended for OLTP applications, why are they not more popular?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Application Domain indexes, and the Oracle Data Cartridge in general, are another area of black magic that I fear ever going back to. I dabbled in it once when attempting to define custom statistics for a function and never looked back. =) I am sure they have their place on some "True Expert"'s shelf, but not here....&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Like IOTs, the Concepts Guide does a good job selling Clusters and Hash Clusters as beneficial methods, but I do not see many folks using it in Real Life. Is it merely the learning curve that keeps the standard DBA away from these features? We have a lot of third-party apps; shall we assume that the vendors simply do not have the expertise to utilize these fun but advanced toys?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Interesting stuff none-the-less.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-3640229633430700228?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/schema.htm' title='Concepts Guide: 5/27 - Schema Objects'/><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/3640229633430700228/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=3640229633430700228' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/3640229633430700228'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/3640229633430700228'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2009/06/concepts-guide-527-schema-objects.html' title='Concepts Guide: 5/27 - Schema Objects'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-7104360811144895976</id><published>2009-06-12T13:24:00.003-05:00</published><updated>2009-06-12T13:34:42.432-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='nothing-to-be-scared-of'/><category scheme='http://www.blogger.com/atom/ns#' term='marketing'/><category scheme='http://www.blogger.com/atom/ns#' term='mumbo-jumbo'/><title type='text'>Fusion Tables</title><content type='html'>So I admit it, I read slashdot (who doesn't?? *grin*). While some topics I really do not care about, for some reason "Oracle" in the headline does. =) And I am not opposed to Oracle-bashing, because I do a fair share myself.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Slashdot post: &lt;a href="http://developers.slashdot.org/story/09/06/12/1658206/Oracle-Beware-mdash-Google-Tests-Cloud-Based-Database"&gt;http://developers.slashdot.org/story/09/06/12/1658206/Oracle-Beware-mdash-Google-Tests-Cloud-Based-Database&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I love how folks at Google Labs come up with all this crazy stuff. And not just GL, but Apple and lots of other places as well. The way technology moves is absolutely spellbinding, and I mean that in the most literal sense possible. *grin*&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;What I hate is techno-marketing &lt;a href="http://www.itworld.com/saas/69183/watch-out-oracle-google-tests-cloud-based-database"&gt;gibberish&lt;/a&gt;:&lt;/div&gt;&lt;div&gt;&lt;blockquote&gt;"So now we have an n-cube, a four-dimensional space, and in that space we can now do new kinds of queries which create new kinds of products and new market opportunities"&lt;/blockquote&gt;&lt;/div&gt;&lt;div&gt;Ok so I can grapple with n-cube or 4-space. Show me a query that can create a new kind of product. Heck, show me a query that can make an old product! Create new market opportunities?!? Come on, everything in the galaxy is a market opportunity. You couldn't hit a house fly with a query. And I mean that in the most literal sense. *wink*&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-7104360811144895976?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://googleresearch.blogspot.com/2009/06/google-fusion-tables.html' title='Fusion Tables'/><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/7104360811144895976/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=7104360811144895976' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/7104360811144895976'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/7104360811144895976'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2009/06/fusion-tables.html' title='Fusion Tables'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-7209956361905218902</id><published>2009-05-21T11:04:00.003-05:00</published><updated>2009-05-21T11:08:30.495-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='transactions'/><category scheme='http://www.blogger.com/atom/ns#' term='&quot;concepts guide journey&quot;'/><category scheme='http://www.blogger.com/atom/ns#' term='concepts'/><title type='text'>Concepts Guide: 4/27 - Transactions</title><content type='html'>&lt;div&gt;Good info on transactions. Lots of detail, great overview. The example of a bank and financial transactions is a great analogy and fits well with the discussion. The statements about asynchronous commits was rather interesting. I had my doubts, so I looked up the referenced Oracle Database Application Developer's Guide - Fundamentals. Chapter 2 of that book (http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14251/adfns_sqlproc.htm#sthref182) informed me about the commit_write parameter. I found out that one could specify NOWAIT - as the caveats mention, one has to be aware that when using this parameter data could potentially be lost. I wonder how many folks have "accidentally" set this parameter thinking they were getting better performance for free.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Naming transactions - I had no idea LogMiner could search for named transactions. That is really cool, and I'll have to keep that in mind.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I have to reread the part on two-phase commit and distributed transactions.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The coverage of autonomous transactions and pl/sql is really helpful as well. This is the kind of stuff that crosses the lines between DBA and Developers - clearly, the text states that developers are responsible for avoiding deadlock conditions. A "pure" DBA is an oxymoron in the sense that any DBA worth his/her salt is going to have to know a little about sql and pl/sql. And the more one knows, the more effective of a DBA one can be. Which cements my belief, and one of the few areas in which I agree about the recent changes in Oracle Certification, that SQL and PL/SQL need more limelight as a fundamental DBA skill.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Short chapter. But a great chapter. Whitespace on 3-9 and 3-10??&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-7209956361905218902?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/transact.htm#i6564' title='Concepts Guide: 4/27 - Transactions'/><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/7209956361905218902/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=7209956361905218902' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/7209956361905218902'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/7209956361905218902'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2009/05/concepts-guide-227-transactions.html' title='Concepts Guide: 4/27 - Transactions'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-687288488725346672</id><published>2009-05-15T12:57:00.002-05:00</published><updated>2009-05-15T13:00:09.628-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='datafiles'/><category scheme='http://www.blogger.com/atom/ns#' term='documentation'/><category scheme='http://www.blogger.com/atom/ns#' term='&quot;concepts guide journey&quot;'/><category scheme='http://www.blogger.com/atom/ns#' term='tablespaces'/><category scheme='http://www.blogger.com/atom/ns#' term='concepts'/><title type='text'>Concepts Guide: 3/27 - Tablespaces, Datafiles, and Control Files</title><content type='html'>&lt;div&gt;Again, I like the figures on 3-1 and 3-3,3-4; good to have something other than just plain words. &lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Interesting how the discussion starts with Bigfile tablespaces, especially since these are not default and are a new feature. I strongly disagree that bigfile tablespaces + OMF "simplify datafile management" (3-5). While they do make many things transparent to the user (which is mostly good), and yes, even make &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;some&lt;/span&gt;&lt;/span&gt; things easier for the DBA, it by no means makes things more simple. This is especially true for OMF. The caveats listed on 3-6 are noteworthy, especially in regards to recovery. We do a lot of clones were we copy databases across the wire, and we find that these operations work better on multiple small files in parallel, instead of gigantic, fewer files. The addition of OMF potentially just makes things that much more confusing when trying to diagnose issues, not to mention trying to teach concepts and architecture to Jr. DBAs. "Don't worry about where the files are or what they are called" is not exactly a "teachabel" moment.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Who uses exabyte storage centers anyway? *grin* The few, the proud?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The short blurb on 3-7 for the SYSAUX tablespace had a very intriguing note. "It reduces the number of tablespaces created by default, both in the seed database and in user-defined databases." Really? So in 9i we had fewer tablespaces, by default, and yet SYSAUX somehow reduces tablespaces in 10g? What did I read wrong?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Based on these short accounts, it is not overly clear what the purpose of the SYSTEM or SYSAUX tablespaces actually do for a living. Ok, so they store metadata that make the database run. What does that mean. It will be interesting to flesh out the details a bit.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;On the other hand, the descriptions of Undo and Temporary tablespaces is quite helpful, and I thought the author did a great job at introducing those concepts. Not so sure about the "use" statements on 3-9. Use a tablespace to create tablespaces?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Following that, I appreciated and value the explanations of Extent and Segment Management. I still do not quite understand the justification for extents, but I do see the importance of Locally Managed Tablespaces and ASSM. Kinda makes me wonder when (not if) the older, manual methods will be deprecated.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I like the detail the author goes into for the Temporary Tablespaces. However, the blurb about sort segments has me wondering. Does Oracle really only use one shared sort segment? The wording is a little confusing; at one point it sounds like there is one sort segment (and only one?) per TEMP tablespace, yet the last sentence on 3-13 states that the sort segment will grow to be as large as all the storage requirements for all sorts in the instance. Perhaps the implication is that the sum of all sort segments will grow to accomodate such space usage?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The Controlfile overview is good - I was hoping for another picture. =) I can't wait for a deep-dive on this critical file.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Overall, a great chapter. I thought the organization was a bit backwards, starting with BigFile tablespaces and ending with controlfiles, but maybe that's just me. A great introduction into the core pieces of the lower-level storage mechanisms.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-687288488725346672?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/physical.htm#g21431' title='Concepts Guide: 3/27 - Tablespaces, Datafiles, and Control Files'/><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/687288488725346672/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=687288488725346672' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/687288488725346672'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/687288488725346672'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2009/05/concepts-guide-327-tablespaces.html' title='Concepts Guide: 3/27 - Tablespaces, Datafiles, and Control Files'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-8673847724183419239</id><published>2009-05-07T14:40:00.002-05:00</published><updated>2009-05-07T15:15:46.067-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='documentation'/><category scheme='http://www.blogger.com/atom/ns#' term='&quot;concepts guide journey&quot;'/><category scheme='http://www.blogger.com/atom/ns#' term='concepts'/><title type='text'>Concepts Guide: 2 of 27</title><content type='html'>The figures (diagrams) in this chapter really help explain the basic structures of blocks, which are in themselves basic building blocks for understanding how Oracle works. After reading this chapter, I am quite unclear what the &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;purpose &lt;/span&gt;&lt;/span&gt;of the extent is. But I'll get to that shortly.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The discussion about high water marks is good, but slighlty misleading due to the fact that Oracle does not have &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;a&lt;/span&gt;&lt;/span&gt; water mark, but rather two; a low high water mark (LHWM) and a high high water (HHWM). *grin* And the space above the LHWM is &lt;span class="Apple-style-span" style="text-decoration: underline;"&gt;not&lt;/span&gt; guartanteed to be free (only above the HHWM).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I rather enjoyed the section on data blocks (starting 2-3). While the bit about data being stored in a byte on the OS is a tad confusing, the pictures and discussion really helps one to gain a toehold as one starts the journey up this monstrous moutain. I did not realize the "overhead" section was actually so small, considering all the information stored in the header. This section left me want more details, which I hope are forthcoming in later chapters. *grin*&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;With the many advantages of ASSM (automatic segment space management), I am surprised that Manual mode is even available. Perhaps there is a use case for particular warehousing applications that need to manually control the freespace? Might as well throw LMT (Locally managed Tablespaces) in as well - if Oracle has such a &lt;a href="http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_7003.htm#i2096553"&gt;strong recommendation&lt;/a&gt; against the older, more manual methods. =)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;On 2-6, I found myself appreciating the information about free space and the various storage parameters and row chaining/migration. Again, the figures really help here, and I can only hope that they continue throughout the rest of this Guide. I did learn that Oracle only coalesces free space at the time of DML when needed - Oracle does not even attempt to coalesce during "idle" times. Which is interesting - why not?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So on 2-9 we finally get to extents. They seem like middlemen in this game, acting as a second layer of abstraction between "blocks" and "segments". Why? What role do extents play? While I did not find a clear answer by reading this chapter, I would have to assume that the most important role they do play is to allocate a group of blocks together for a particular segment (ergo, segment type), kinda make them sticky. Could not segment headers be made a little larger and subsume all the responsibilities of extents? Just curious. Perhaps I am missing something fundamental here. Maybe the whole point is to keep the respective object headers small? I did find one &lt;a href="http://dbwebapplications.com/managing-database-objects/module2/oracle-extents-data.html"&gt;page&lt;/a&gt; that does not answer the question what-so-ever. *grin* I also see a short blurb about the Segment Space advisor (in the context of Extents, keep in mind) - call me naive, but I would expect Oracle to automatically resolve fragmentation quietly, internally, automatically.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The subsequent explanations of the various segment types were good, and I liked the way the Undo concept was spelled out. The way Temporary extents/segments and Undo retention is detailed is excellent! Again, a great overview of some very basic things (and not so basic, appropriately).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-8673847724183419239?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/logical.htm#i8531' title='Concepts Guide: 2 of 27'/><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/8673847724183419239/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=8673847724183419239' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/8673847724183419239'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/8673847724183419239'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2009/05/concepts-guide-2-of-27.html' title='Concepts Guide: 2 of 27'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-6493892333927331755</id><published>2009-05-06T10:28:00.004-05:00</published><updated>2009-05-06T10:51:38.464-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='documentation'/><category scheme='http://www.blogger.com/atom/ns#' term='&quot;concepts guide journey&quot;'/><category scheme='http://www.blogger.com/atom/ns#' term='concepts'/><title type='text'>Sojourn through the Concepts Guide: 1 of 27</title><content type='html'>I have been challenged on at least three occasions to read the Concepts guide (thanks to Tom Kyte, Rich Niemiec and Job Miller).&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The Concepts Guide (Book? Epic Saga?) is quite large. 542 pages at 8.07mb (PDF version), compacting the knowledge about the Oracle RDBMS into a mere 27 chapters. Since I am most familiar with 10g, I decided to start there. I noticed that the Primary Author (Michele Cyran) is also noted as Primary for the &lt;a href="http://www.oracle.com/pls/db92/db92.to_toc?pathname=server.920%2Fa96524%2Ftoc.htm&amp;amp;remark=docindex"&gt;9i&lt;/a&gt; version, and I imagine that she is listed as a Contributing Author in the &lt;a href="http://www.oracle.com/pls/db111/to_toc?pathname=server.111/b28318/toc.htm"&gt;11g&lt;/a&gt; version merely because so much of the content is reused (which makes sense - hard to improve upon a such a good thing). After reading the first few pages of each, I confirmed that much of the original content is unchanged. Again, this makes sense - we are talking about concepts, and the basic, fundamental concepts of the RDBMS have not changed that much, if at all (aside from new features).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The first chapter, as an overview, is excellent! I found myself being surprised that it was possible to sum up the entire thing in just 38 pages without obviously cutting out too much. Given that, I was equally surprised that there is so much attention given to the Grid Architecture (one blatant, rather large addition since the 9i version).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So, going through the first chapter chronologically.&lt;/div&gt;&lt;div&gt;I found the opening statements quite appropriate - again, an excellent summary. How often have DBAs been asked by lay folks and family members "What is a database?". I like how the author starts at ground zero and builds upwards.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The next 7 pages spent a bit of time on the Grid Architecture. Surprising, as it spans not only the roadmap of the database but extends to Applications and even to the enterprise as well (from Storage to how Information is handled as a commodity). While I agree with the theory of these ideas, and I see how it would be easy to get caught up in the novelty, from practical experience I know these features are whitewashed pretty well for general consumption as the PR folks try to sell it. But I digress. The bottomline is that I value the insight we are provided by these pages, as it gives those of us outside the Oracle Corp a general idea where Larry is going.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The "How Oracle Works" section on 1-17 is excellent as well. This is the kind of stuff that makes me want to go and read about all the nitty-gritty details. The flow and overly-simplisitic nature of this section is perfect in this part of the Guide.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Another interesting point was the short blurb on Quiesce (1-20). I have never thought to use Quiesce to put the database into a sort of "restricted mode". In fact, the few occasions in the past that I have found my database in Quiesced mode, SYS could not do anything (other than shutdown/startup and change the mode back). Shows how little I know about this feature.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The rest of the chapter was appropriately basic, in my opinion. Lots of good bits of information, and I think they set the stage well for the rest of the Guide.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-6493892333927331755?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/intro.htm#i68236' title='Sojourn through the Concepts Guide: 1 of 27'/><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/6493892333927331755/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=6493892333927331755' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/6493892333927331755'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/6493892333927331755'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2009/05/sojourn-through-concepts-guide-1-of-27.html' title='Sojourn through the Concepts Guide: 1 of 27'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-3392575470014108714</id><published>2009-05-05T08:23:00.004-05:00</published><updated>2009-05-05T08:41:42.339-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='oui'/><category scheme='http://www.blogger.com/atom/ns#' term='install'/><category scheme='http://www.blogger.com/atom/ns#' term='support'/><title type='text'>runInstaller problems: a tale of no support</title><content type='html'>Granted, I am in a rather cynical mood; after painfully working my way through several SRs this past week (about 6 on Enterprise Manager and/or agents alone), I was not in the mood for any more games. So I gritted my teeth rather loudly when I had to open another SR about the Oracle Universal Installer. Or maybe we should call it the "Oracle Undetermined Installer"? Oracle Unbeknowst Installer?&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;We were doing a lot of Oracle Home installs. Yes, I could simply have clone a Home (choose your poison), but this was for a class and I wanted students to go through the experience. And we were using the silent installer, because that is just so much cooler. And much faster too boot. So half-way through, we start seeing something really strange - we would get the normal banner, the "Please Wait...." message and then... nothing. No matter how long you waited, nothing. The annoying part is that runInstaller likes to kick things off in the background, so it is not unusual to see some messages flash by, but one can still navigate. So if you see "Please Wait..." and yet can still type, one thinks the installer is still running. One would be wrong.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The Installer was simply aborting. The logs had absolutely no meaningful help in them whatsoever. So I pleaded my case with the smart folks on oracle-l and filed a case with Oracle. As always, I received some interesting information from oracle-l quickly, and Oracle Support just sorta... slowly... asked for an RDA (why?!? For all that is sacred and worthy, why on earth do you need an RDA for this?!?), asked for versions, and without blinking an eye told me my OS was unsupported.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Flustered, I fired up the Installer in graphical mode. Lo and behold, I get an error message saying /tmp was full (or rather, only 50mb was free, which is apparently not enough room for the temp JRE it wants to kick off). So after deleting some crap that the installer left behind from previous runs, I can now run the silent installer.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Thanks, Oracle Support, for being so helpful.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The OUI seems really antiquated. No, I take that back. It does some really awesome stuff when dealing with clusters! Amazing! But simple things like having a fully documented silent installer with cookbook response files are quite lacking. And the total absense of helpful error messages? But like many things with Oracle, they concentrate on the "bright shiny new things" and often do not turn back to polish the older things. No, that is not fair either - that is quite wrong. Oracle does go back and fix some things rather well. But the things that get left behind or fall through the cracks, they cause one to stumble, and are thus more noticeable. =) Unfortunately.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-3392575470014108714?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/3392575470014108714/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=3392575470014108714' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/3392575470014108714'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/3392575470014108714'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2009/05/runinstaller-problems-tale-of-no.html' title='runInstaller problems: a tale of no support'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-8372837587772100964</id><published>2009-04-02T14:17:00.002-05:00</published><updated>2009-04-02T14:42:08.224-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='assessment'/><category scheme='http://www.blogger.com/atom/ns#' term='skills'/><category scheme='http://www.blogger.com/atom/ns#' term='certfication'/><category scheme='http://www.blogger.com/atom/ns#' term='eve-online'/><title type='text'>If Oracle were an MMO, what skills would you be trained in?</title><content type='html'>Been thinking a lot about certification and skill assement lately. Had some excellent &lt;a href="http://www.dannorris.com/2009/01/15/certifications-response-to-bex-huffs-post/"&gt;correspondence&lt;/a&gt; with &lt;a href="http://www.dannorris.com/"&gt;Dan Norris&lt;/a&gt;, commented on Paul Sorensen's &lt;a href="http://blogs.oracle.com/certification/2008/07/to_certify_or_not_to_certify_p_1.html"&gt;article&lt;/a&gt;, and talked with a new acquatance who is pursuing research on a &lt;a href="http://www.infobasis.com/Library/SkillsManagement.pdf"&gt;Skills Management&lt;/a&gt; White paper. Dan Norris also hooked me up with Dan Morgan, who has been chewing on a new way to do certification that closely follows what the &lt;a href="www.abms.org"&gt;Medical Board&lt;/a&gt; does. All the while I am teaching a class that is supposed to prep the students for Oracle Certification (OCA, possibly OCP for those that can hack it), and really disliking the &lt;a href="http://www.amazon.com/gp/product/0072257903/ref=s9_sims_c2_s3_p14_t1?pf_rd_m=ATVPDKIKX0DER&amp;amp;pf_rd_s=center-2&amp;amp;pf_rd_r=0KPS120VNP3QX08KTT1R&amp;amp;pf_rd_t=101&amp;amp;pf_rd_p=470938631&amp;amp;pf_rd_i=507846"&gt;book&lt;/a&gt;.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Then in my free time, &lt;a href="http://www.10046.ch:7000/apex/f?p=10046:1:8013082023170638"&gt;Stefan Knecht&lt;/a&gt; has re-introduced me to EVE Online (ummm... thanks? *grin*). EVE has a very cool, but very slow, skill training system. I am sure most folks would probably be familiar, in concept at least, with games like Blizzard's Warcraft that give "experience points" to characters for doing certain things. In EVE, you basically just pick a book and x hours later, you know that skill. A little strange, perhaps. But the cool thing (IMO) is the tech tree is based on the skill set, with a very thoughtful dependency relationship and considerable time investment for more advanced skills.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So... what happens when you smash these things together? What if you had some kind of classification like "Standard DBA Level 3", and, by definition, there were a set of prerequisite skills that the owner of said classification would have demonstrated proficiency in. Perhaps such granular classification does not make a perfect analogy in the game world, but still my mind is chewing on it. Perhaps being "certified" in every single skill a "standard" DBA does is not only impractical but unwieldly. But surely there would be a way to have some sort of dependancy tree. Almost anything is better than Oracle University's current system. =)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;As I dwell on this topic, I have been thinking about what those skills might be. For instance, there are obviously broad categories like "Backup &amp;amp; Recovery", "Performance Tuning", "High Availability". Each of these could be further divided into component pieces; at some point, you get down to atomic skills. What are those atomic skills? There is obviously a similarity to the Mercer Salary Survey as well. Perhaps that is the closest thing I kind find in the IT world that attempts to do something like this. I am sure there are other efforts.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Another way this does fit with the game analogy is that it would not be feasibly for a person to attempt to specialize in everything (kinda counter-intuitive, anyway). As with EVE, you choose a career-path and pursue it (invest time). DBAs, or any professional career for that matter, are like this - start with something fundamental and then build on it in one direction or another.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-8372837587772100964?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/8372837587772100964/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=8372837587772100964' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/8372837587772100964'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/8372837587772100964'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2009/04/if-oracle-were-mmo-what-skills-would.html' title='If Oracle were an MMO, what skills would you be trained in?'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-5293022285876712740</id><published>2009-04-01T10:33:00.004-05:00</published><updated>2009-04-01T10:38:10.450-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sqlplus'/><category scheme='http://www.blogger.com/atom/ns#' term='strange antics'/><title type='text'>Default number of rows displayed for "SET FEEDBACK"</title><content type='html'>A colleague walked into my office and asked me what the default threshold was for the number of rows in SET FEEDBACK. I said "I am pretty sure it is just on", but wanting to be absolutely positive, I looked it up.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Tahoma; font-size: 17px; font-weight: bold; "&gt;SET FEED[BACK] {&lt;span class="underline" style="text-decoration: underline; "&gt;6&lt;/span&gt; | &lt;span class="italic" style="font-style: italic; "&gt;n&lt;/span&gt; | &lt;span class="underline" style="text-decoration: underline; "&gt;ON&lt;/span&gt; | OFF}&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;How odd! Why would the default be set to 6?? What kind of number is that? Why would you have a default number at all?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The colleague walked out with a smile.&lt;/div&gt;&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-5293022285876712740?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/5293022285876712740/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=5293022285876712740' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/5293022285876712740'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/5293022285876712740'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2009/04/default-number-of-rows-displayed-for.html' title='Default number of rows displayed for &quot;SET FEEDBACK&quot;'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-715399493337793166</id><published>2009-03-04T14:54:00.002-06:00</published><updated>2009-03-04T15:30:43.621-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='partitioned indexes'/><category scheme='http://www.blogger.com/atom/ns#' term='parallel'/><category scheme='http://www.blogger.com/atom/ns#' term='buffer busy waits'/><category scheme='http://www.blogger.com/atom/ns#' term='file header block'/><category scheme='http://www.blogger.com/atom/ns#' term='character conversion'/><title type='text'>Resolving file header contention on tempfiles</title><content type='html'>We are finding many bottlenecks as we attempt to optimize a character-set conversion for our 450gb database. One of the tricks is using a custom-made script (&lt;a href="http://orajourn.blogspot.com/2008/01/datapump-index-work-around.html"&gt;paresh&lt;/a&gt;) to build indexes in parallel (ie, many indexes at once), since datapump likes to do them one at a time, albeit using a &lt;span style="font-style: italic;"&gt;degree of parallelism&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;So, the most recent bottleneck was &lt;span style="font-weight: bold;"&gt;buffer busy waits&lt;/span&gt;. So after a little digging around, we finally came up with this query:&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;blockquote&gt;select p1 "File #", p2 "Block #", p3 "Reason Code" from v$session_wait where event = 'buffer busy waits';&lt;/blockquote&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;The tricky part was that we were getting back p1 values that exceeded the highest file_id found in both dba_data_files and dba_temp_files. Tanel Poder and K Gopalakrishnan helped us out by stating that these extraordinary numbers were actually the "real" file_id for the tempfiles, which are numbered file_id+db_files, and you get db_files from v$parameter.&lt;br /&gt;&lt;br /&gt;With that out of the way, we realized that were hitting file header block contention (Reason Code 13) on the temp files. As Tanel succintly put it, "it's the &lt;span class="il"&gt;block&lt;/span&gt; 2 in the file, this is where the LMT extent management bitmap header &lt;span class="il"&gt;block&lt;/span&gt; lives." So our index builds were hammering the few lucky header blocks in our tempfiles that contained the extent bitmap.&lt;br /&gt;&lt;br /&gt;My first thought was to increase the size of the tablespace extents, thinking that perhaps if there were few extents to worry about, the extent bitmap would not be in such high demand. Turns out the effectiveness of that idea was rather poor - or at least unnoticeable. Then I decided to increase the number of header blocks. One simple way to do that is add more tempfiles. And Viola! Now I create x number of tempfiles for x number of slave processes, and I have yet to see any more file header block contention on my tempfiles. Coolness.&lt;br /&gt;&lt;br /&gt;On to the next bottleneck...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-715399493337793166?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/715399493337793166/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=715399493337793166' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/715399493337793166'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/715399493337793166'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2009/03/resolving-file-header-contention-on.html' title='Resolving file header contention on tempfiles'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-2390188064169090187</id><published>2009-02-19T11:29:00.003-06:00</published><updated>2009-02-19T12:17:34.338-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='database control'/><category scheme='http://www.blogger.com/atom/ns#' term='grid control'/><category scheme='http://www.blogger.com/atom/ns#' term='enterprise manager'/><category scheme='http://www.blogger.com/atom/ns#' term='emgc'/><title type='text'>Complaint about Enterprise Manager (version 10g)</title><content type='html'>First off, let me say that EM has some really cool stuff going on! This post will be largely negative and critical, but I do not want to discount the fact that the developers of this tool have done a lot of hard work to make some things very neat and slick. Real-time data for performance monitoring at various levels is quite nice. While the interface is kooky (very!), I have to give credit for the massive conglomeration of features that are packed into this "free" tool. And most of them work to boot! *grin*&lt;br /&gt;&lt;br /&gt;Ok, so my first gripe is just administrating the EM itself. The logfiles are a complete mess. There is no one log file that summarizes all the activity. If you get an error in the GUI, it will most likely say "see log file for further details". Which log file? Granted, &lt;span style="font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt;most&lt;/span&gt;&lt;/span&gt; of them are in one place (depending on if you are using DBControl or GC), but not all of them. Worse, it is very common to find a logfile that repeats what you saw on the GUI and it refers to itself for further details! How is that helpful? I want one file that can either tell me where exactly the problem is, or at least point to the file where the &lt;span style="font-style: italic; font-weight: bold;"&gt;real&lt;/span&gt; further details are. Same for the config files. There are xml fiels sprinkled throughout, and .properties. Since EM is comprised of so many different components, there are many different log files and many different configuration files. But nothing ties them all together. Say I want to alter the ports of the components (I have tried this, and it is not pretty). I had to touch about 5 or 6 different files, each with multiple entries for various port numbers. And then there are those ports that are defined by global variables, with no indication where those are set. If one wanted a headache, a lemon-encased gold brick to the skull would be more appealing.&lt;br /&gt;&lt;br /&gt;What next.... The GUI itself is extremely cluttered and the opposite of intuitive. I understand that some tools take a while to learn how to navigate (ie, TOAD - still catching on), but there are some functions I use quite often and I always find myself in the wrong place. Here is a tricky example, how about "Historical SQL". Do you mean the sql that EM has generated on your behalf, or AWR SQL? What about "features" that do not work quite well. We have tried Data Masking and Change Capture, both of which hung and finally died without any visible productive work. And trying to debug that?? See above paragraph. =) Or how about that infamous "remove datafile" option in the Tablespace screen? Cool, I did not know you could remove a datafile from a tablespace, this must be new. Yeah, try it and get back to me on that. I have had the opportunity to Queisce my database by accident; if you flip through the Maintenance Window management screens (just click ok or next), you can freeze your database because one of the options to specify the type of the current maintenance window defaults to Quiesce, even if that is not the current type. Handy, eh?&lt;br /&gt;&lt;br /&gt;I am curious what the 11g EM will be like. I briefly looked at the 11g Database Control, but not enough to make any kind of judgement. Would it be foolish to even hope that the administration side of things has been made easier?&lt;br /&gt;&lt;br /&gt;'nuff for now.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-2390188064169090187?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/2390188064169090187/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=2390188064169090187' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/2390188064169090187'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/2390188064169090187'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2009/02/complaint-about-enterprise-manager.html' title='Complaint about Enterprise Manager (version 10g)'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-8047453461627965649</id><published>2009-02-16T13:10:00.003-06:00</published><updated>2009-02-16T14:09:36.572-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='query tuning'/><category scheme='http://www.blogger.com/atom/ns#' term='10053'/><category scheme='http://www.blogger.com/atom/ns#' term='SQLTXPLAIN'/><category scheme='http://www.blogger.com/atom/ns#' term='selectivities'/><category scheme='http://www.blogger.com/atom/ns#' term='clustering_factor'/><category scheme='http://www.blogger.com/atom/ns#' term='10046'/><title type='text'>A tuning performance example using 10046, SQLTXPLAIN and 10053</title><content type='html'>In my &lt;a href="http://orajourn.blogspot.com/2009/02/kudos-to-carlos-sierra.html"&gt;tribute&lt;/a&gt; to Carlos Sierra, I implied (well, rather, I just said) that I had more to write. Well, here it is.&lt;br /&gt;&lt;br /&gt;I was alerted to a "slow performing" job in our ERP (the one out in Massachusetts). My first response is to turn on a 10046 trace; 99% of the time, this is extremely effective. The other 1% I either hit that strange issue where the event itself will change the query plan (I hate that!) or the job does too much stuff client-side for me to be of much use ("Yeah, umm... you only used .01 seconds of CPU time for your 5-hour job").&lt;br /&gt;&lt;br /&gt;I have a script I use to create a trigger that turns on event 10046 (and others). If blogger had a better way to post links, I would put it up. But the guts are pretty easy to figure out - I accept parameters, then basically build a query that does the following:&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;&lt;/span&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;CREATE OR REPLACE TRIGGER SYS.$trig_name&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;AFTER LOGON&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;ON DATABASE&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;begin&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;if (USER = '$user') then&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;  execute immediate 'alter session set max_dump_file_size = UNLIMITED';&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;  execute immediate 'alter session set tracefile_identifier = ''$user''';&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;  -- execute immediate 'alter session set statistics_level = all';&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;  execute immediate 'alter session set events = ''$trace trace name context forever, level $level''';&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;end if;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;end;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;/&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If the session is already connected (hmm... that was redundant), I like to do the following:&lt;br /&gt;&lt;blockquote style="color: rgb(51, 51, 153);"&gt;&lt;span style="font-size:85%;"&gt;set feed off verify off&lt;br /&gt;set lines 112&lt;br /&gt;select 'EXEC DBMS_MONITOR.SESSION_TRACE_ENABLE(session_id =&gt; '||sid||', serial_num =&gt; '||serial#||', waits =&gt; TRUE, binds =&gt; TRUE);' "Turn Trace on for user" from v$session where username = '&amp;amp;&amp;amp;username';&lt;br /&gt;select 'EXEC DBMS_MONITOR.SESSION_TRACE_DISABLE(session_id =&gt; '||sid||', serial_num =&gt; '||serial#||');' "Turn trace off for user" from v$session where username = '&amp;amp;&amp;amp;username';&lt;br /&gt;set feed on verify on&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;I have never seen a really good reason to use only level 4 or only level 8; I would use only level 1 if all I want is the SQL, but for the most part, level 12 all the way, baby!&lt;br /&gt;&lt;br /&gt;Just to see what I can see, I run the resulting trace file through tkprof with sort options (sort=prsela,exeela,fchela), which puts the queries with the highest run times at the top of the tkprof output file. Lo and behold, I get a few solid candidates with this particular example.&lt;br /&gt;&lt;br /&gt;&lt;blockquote style="color: rgb(51, 51, 153);"&gt;&lt;span style="font-size:85%;"&gt;SELECT SSBSECT_TERM_CODE,SSBSECT_PTRM_CODE,SSBSECT_REG_FROM_DATE,&lt;br /&gt;  SSBSECT_REG_TO_DATE,SSBSECT_CRN,SSBSECT_SUBJ_CODE,SSBSECT_CRSE_NUMB,&lt;br /&gt;  SSBSECT_SEQ_NUMB,SSBSECT_SSTS_CODE,SSBSECT_CAMP_CODE,SSBSECT_CRSE_TITLE,&lt;br /&gt;  SCBCRSE_TITLE,SSBSECT_SCHD_CODE,SSBSECT_INSM_CODE,SSBSECT_NUMBER_OF_UNITS,&lt;br /&gt;  SSBSECT_DUNT_CODE,SSBSECT_LINK_IDENT,SSRXLST_XLST_GROUP,&lt;br /&gt;  SSBSECT_RESERVED_IND,SSBSECT_MAX_ENRL,SSBSECT_ENRL,SSBSECT_SEATS_AVAIL,&lt;br /&gt;  SSBSECT_WAIT_CAPACITY,SSBSECT_WAIT_COUNT,SSBSECT_WAIT_AVAIL&lt;br /&gt;FROM&lt;br /&gt; SSVSECT  order by ssbsect_term_code, ssbsect_subj_code, ssbsect_crse_numb,&lt;br /&gt;  ssbsect_seq_numb&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;call     count       cpu    elapsed       disk      query    current        rows&lt;br /&gt;------- ------  -------- ---------- ---------- ---------- ----------  ----------&lt;br /&gt;Parse        1      0.27       0.27          0          0          0           0&lt;br /&gt;Execute      1      0.00       0.00          0          0          0           0&lt;br /&gt;Fetch        1    996.36    1970.42         88     956167     176632           0&lt;br /&gt;------- ------  -------- ---------- ---------- ---------- ----------  ----------&lt;br /&gt;total        3    996.63    1970.70         88     956167     176632           0&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;I was told that this usually takes closer to 5 minutes (not 33 minutes). Stranger yet, all examples of this query with valid predicates trimmed the run-time down significantly (sub-second), which tells me that predicates are being pushed into the view (a good thing).&lt;br /&gt;&lt;br /&gt;Just as a litmus test, I ran this query with a privileged account (SYS), and noticed that the query plan was indeed much better - so at least I knew there &lt;span style="font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt;was&lt;/span&gt;&lt;/span&gt; a better plan. And then I realized that we use FGAC policies against the underlying tables to enforce VPD. Great. Tuning FGAC is no fun at all. Because I like to have the complete query in front of me, I got the view source (formatted in TOAD), then ran the query with the original user id and event 10730 turned on (captures VPD predicates). I was then able to reconstruct the query that finally got passed into the parser.&lt;br /&gt;&lt;br /&gt;Trying to get the original query to use a better plan, I started playing around with hints and statistics (in independent tests). The hints are a pain because, as Jonathan Lewis will often point out, you want to use a ton of 'em (not just one or two). Which got me to thinking about the 10053 trace and how that gives you the hints to reconstruct a query plan in a nice format (easier than reading other_xml out of v$sql_plan). I also stumbled upon some new index statistics that gave me the "better" query plan. As I attempted to explain which statistics did the trick, I turned to SQLXPLAIN to compare the queries for me, and it did a wonderful job (as stated in previous post)! It helped me to narrow down the problem to the fact that the the combination of more rows and fewer leaf blocks had altered the clustering factor enough to be noticeable.&lt;br /&gt;&lt;br /&gt;"Now wait", you say, "how do you get more rows and &lt;span style="font-weight: bold; font-style: italic;"&gt;fewer&lt;/span&gt; leaf blocks?!?" Easy. If you rebuild your index and do not collect stats for a few months on a busy table... viola! *evil grin* Ok, I need to include the fact that we recently went through a character set conversion which required us to completely rebuild the database; at the time, we also decided to import all the old stats, which is much faster than generating new ones. Unfortunately, we overlooked the fact that indexes will generate new stats when you build them, so importing old stats is a bad idea (in general) for indexes.&lt;br /&gt;&lt;br /&gt;So, we have an altered clustering factor. How did that affect the query plan to go from 5 minutes to 33 minutes? To be honest, I do not have all the answers yet. I am still researching the "why" behind this. What I have gathered so far is that the index selectivities have changed dramatically (these came out of the 10053 trace):&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;OLD/SLOW&lt;/span&gt; - uses PK index&lt;br /&gt;  Index: PK_SSBSECT  Col#: 53 1 2&lt;br /&gt;    LVLS: 2  #LB: 4104  #DK: 649804  LB/K: 1.00  DB/K: 1.00  CLUF: 30917.00&lt;br /&gt;&lt;br /&gt;  Access Path: index (IndexOnly)&lt;br /&gt;    Index: PK_SSBSECT&lt;br /&gt;    resc_io: 3.00  resc_cpu: 21564&lt;br /&gt;    ix_sel: 7.6946e-07  ix_sel_with_filters: 7.6946e-07&lt;br /&gt;    Cost: 3.01  Resp: 3.01  Degree: 1&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;NEW/FAST&lt;/span&gt; - use table scan instead&lt;br /&gt;  Index: PK_SSBSECT  Col#: 53 1 2&lt;br /&gt;    LVLS: 2  #LB: 3072  #DK: 689157  LB/K: 1.00  DB/K: 1.00  CLUF: 34646.00&lt;br /&gt;&lt;br /&gt;  Access Path: index (IndexOnly)&lt;br /&gt;    Index: PK_SSBSECT&lt;br /&gt;    resc_io: 2294.00  resc_cpu: 119163783&lt;br /&gt;    ix_sel: 0.74604  ix_sel_with_filters: 0.74604&lt;br /&gt;    Cost: 2326.68  Resp: 2326.68  Degree: 1&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;So, CLUF increased by 12% and LB decreased by a whopping 25% and DK up by 5.7%. So how did I end up with a ix_sel that was different by 10^6? I mean, I see why a tablescan was preferred! =) But what the heck?&lt;br /&gt;&lt;br /&gt;Did I mention I am eagerly awaiting for that 10053 parser? =)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-8047453461627965649?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/8047453461627965649/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=8047453461627965649' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/8047453461627965649'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/8047453461627965649'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2009/02/tuning-performance-example-using-10046.html' title='A tuning performance example using 10046, SQLTXPLAIN and 10053'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-4245889773988045417</id><published>2009-02-13T11:58:00.003-06:00</published><updated>2009-02-13T12:23:44.189-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='query tuning'/><category scheme='http://www.blogger.com/atom/ns#' term='tools'/><category scheme='http://www.blogger.com/atom/ns#' term='carlos sierra'/><category scheme='http://www.blogger.com/atom/ns#' term='BDE'/><category scheme='http://www.blogger.com/atom/ns#' term='SQLTXPLAIN'/><title type='text'>Kudos to Carlos Sierra</title><content type='html'>I have been playing more and more with Oracle's SQLTXPLAIN; or rather, let me give the full credit to Carlos Sierra, who has written and fully supports this nifty little gem.&lt;br /&gt;&lt;br /&gt;Jonathan Lewis get me hooked on dbms_xplan, and I like it a lot! Just the other day I picked up +PEEKED_BINDS as an option from various posters (Tanel Poder, Greg Rahn, Jonathan Lewis) and started using it right away. And I never really tackled SQLTXPLAIN just because.... I had used the earlier version (TRCANLYZR...or something). Until recently.&lt;br /&gt;&lt;br /&gt;Carlos has really done a bit of quality work on this piece; he has provided excellent documentation and some good examples. He has shown a wonderful amount of foresight in generating various traces (10053, 10046) and packages functionality like generating testcases, comprehensive web reports and sql plan comparisons. The last of those I had an opportunity to explore today, and it helped me find a problem with some indexes (that will be a seperate post after the dust settles). I just really like the presentation and functionality of this tool. The "main" html report is very tasteful with expand/collaspe java snippets, go flow, and tons of useful information. The comparison did a great job at highlighting areas of concern, and his "Observations" often make me think about something, even if only to affirm. I like the flexibility of grabbing a sql_id, sql hash or plan_hash.&lt;br /&gt;&lt;br /&gt;True, it is not perfect yet. Very close, though. I do not like how the install scripts ask for a "schema user" or "application user". To work around that, I create a new role (SQLTXPLAIN_ROLE) and provide that as my "application_user". Then, whenever I want to run SQLTXPLAIN, I just grant/revoke that role to the real application userid. Also, altering the parameters are a little kludgy. I love that Mr. Sierra has made the parameters available and has provided documentation for them (a pleasant surprise), but it would be nice to specify them at run time in a more "normal" fashion. Like, having a flag to turn off the table exports. And what about using datapump instead? =)&lt;br /&gt;&lt;br /&gt;One other thing that I am still working on is to get it to work as a client-side piece. After working through a few kinks (ie, my bads) with Sierra, the only portion that bothers me a little is that it keeps asking me for the password for exporting tables. For the most part, I want to skip that.&lt;br /&gt;&lt;br /&gt;Anyway, this tool is AWESOME! I love it! I will still use dbms_xplan a bit (afterall, this tool does as well), since it is much lighter weight. But I am definitely adding SQLTXPLAIN to my toolbox and telling others about it. I have also had a few exchanges with Carlos, and he is definitely on the ball.&lt;br /&gt;&lt;br /&gt;I am extremely curious about one thing yet. There are a number of interesting tables in the SQLTXPLAIN schema. What is SQLT$_10053_PARSE for? I have never seen it populated with any information. Is there a tool that parses the 10053? Can I have it?!? =)&lt;br /&gt;&lt;br /&gt;Now I wonder what other tools BDE has hidden away....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-4245889773988045417?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/4245889773988045417/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=4245889773988045417' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/4245889773988045417'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/4245889773988045417'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2009/02/kudos-to-carlos-sierra.html' title='Kudos to Carlos Sierra'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-4653933776183965880</id><published>2009-01-26T09:05:00.004-06:00</published><updated>2009-01-26T09:45:16.840-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='certfication'/><category scheme='http://www.blogger.com/atom/ns#' term='ocm'/><category scheme='http://www.blogger.com/atom/ns#' term='experience'/><category scheme='http://www.blogger.com/atom/ns#' term='ocp'/><title type='text'>Teaching and Certifcation</title><content type='html'>I have been presented with the opportunity to teach at a nearby community college, and I was instantly interested. Little did I know what would be under this newly turned stone.&lt;br /&gt;&lt;br /&gt;The class is the 4th part of a 4-part series based (loosely) on Watson &amp;amp; Bersinic's "Oracle 10g All-in-one Certification Exam Prep". After going over the book and finding it dishearteningly weak on practicality, I opted to rewrite the curriculum a little. Or rather, a bit.&lt;br /&gt;&lt;br /&gt;The book is interesting; it is a comprehensive, rehashed summarization of the online documentation that aims to get you ready to take the OCA and OCP tests. Perhaps it does that. Ever since Bush's "No Child Left Behind" poorly-implemented federal program cursed our educational systems, I have been convinced that "teaching to the test" is horrible in the long-run and only encourages bad habits of short-term consumption and regurgitation. However, the book is also rife with errors, both in the form of typos, bad index pages, and also technical errors and self-contradictory statements. To top it off, the list price is a freakin' $105!!&lt;br /&gt;&lt;br /&gt;Having had dreams of utilizing the tenets of the OCM practicum in a classroom setting, I took this bull by the horns and decided to make all the online homework based on the published &lt;a href="http://education.oracle.com/pls/web_prod-plq-dad/db_pages.getpage?page_id=41&amp;amp;p_exam_id=10gOCM#3"&gt;OCM outline&lt;/a&gt;. Some of the outline topics are rather easy to work up a lab for (ie, creating a database, using RMAN, etc). Some of the topics are a bit more difficult to recreate; for example, what exactly does the 10g OCM practicum test in terms of RAC setup and configuration? But for my purposes, I do not really care. Just as a disclaimer, I have never taken the 10g OCM.&lt;br /&gt;&lt;br /&gt;This is a relatively entry-level class, so I am concentrating on the "basics"; I am going to make sure the students know how to create, configure, connect to, manage, backup, recover, tune and optimize the database. The first homework assignment was awesome (IMO). Awesome because these students, after attending the prerequisite classes, had never created a database from the command-line before; they even struggled with some of the things like where to put datafiles, how to size the memory parameters and running the catalog/catproc scripts. And I think that is a good kind of struggle. They asked questions, they explored, they made mistakes. In general, they got their hands dirty doing what we in the real world do. Opposed to answering some silly multi-choice question about which line of sql has an error in it.&lt;br /&gt;&lt;br /&gt;And what does this have to do with Certification? Would you hire someone who held an OCP card yet had never created a database? Never had the frustration of a ora-4031 (or any number of ORA errors)? What the heck is Oracle actually certifying as a "Professional" anyway? Oracle ostentaciously says that they require the instructor-led training classes specifically for that "hands-on" aspect of the OCP. Have you ever taken those courses? The labs are a joke. The classes are mostly boring lectures. Unless you end up with someone passionate like Andy Fortunak or Sue Jang. Still, I find the whole scheme rather offensive.&lt;br /&gt;&lt;br /&gt;I spotted a &lt;a href="http://www.dannorris.com/2009/01/15/certifications-response-to-bex-huffs-post/#"&gt;blog entry&lt;/a&gt; by Dan Norris, who in turn had stumbled up on a &lt;a href="http://bexhuff.com/2009/01/what-is-a-technology-certificate-really-worth"&gt;thought-provoking&lt;/a&gt; blog entry by Bex Huff. Dan also mentioned that Oracle has a &lt;a href="http://blogs.oracle.com/certification/"&gt;Certification blog&lt;/a&gt;, so I quickly made my way over there and &lt;a href="http://blogs.oracle.com/certification/2008/07/to_certify_or_not_to_certify_p_1.html#comment-47320"&gt;spouted&lt;/a&gt; a little. I really mean what I said there; rewrite the certification paradigm and actually make it worth something, instead of a cash cow for Oracle U; isn't Larry already rolling in enough dough?&lt;br /&gt;&lt;br /&gt;To top it all off, my students will not be eligible for certification even if they do pass the OCP. Why? The community college where I teach is not a "Oracle Certified Teaching Partner". So, even though the students will most likely get a much better education at the community college than some class they have to travel to and pay $3500 for, they will not be able to be certitifed as those that are able to expend the time and money to do so.&lt;br /&gt;&lt;br /&gt;I dearly hope my students appreciate the hell I am putting them through. =) Fortunately, I have recieved a lot of feedback that they thoroughly enjoy it. It is going to be a good semester.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-4653933776183965880?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/4653933776183965880/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=4653933776183965880' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/4653933776183965880'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/4653933776183965880'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2009/01/teaching-and-certifcation.html' title='Teaching and Certifcation'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-4697826066348608050</id><published>2008-12-04T07:52:00.003-06:00</published><updated>2008-12-04T08:20:49.994-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='clusterware'/><category scheme='http://www.blogger.com/atom/ns#' term='documentation'/><category scheme='http://www.blogger.com/atom/ns#' term='upgrade'/><category scheme='http://www.blogger.com/atom/ns#' term='asm'/><title type='text'>Upgrading clusterware/ASM from 10g to 11g - a complaint</title><content type='html'>I have a RAC setup with 3 environments; DEV, BCP and Production. So, starting with my development cluster, I made an attempt to upgrade the clusterware and ASM from 10g to 11g. That was quite painful. I will not spend much time complaining about the documentation here (and there is a lot I could say *grin*). But allow me to take a little tangent.&lt;br /&gt;&lt;br /&gt;I collected all my "constructive criticisms" and suggestions into what I hoped was a cogent document and fired it off to Oracle Support and Erik Peterson of the RAC SIG. Erik forwarded my note to a document manager, and his response was overwhelmingly encouraging and very understanding. The Oracle Analyst in Support that picked up my case was also quick to understand my frustrations. Both of these two different groups were able to collaborate and redeliver a nutshell document that was supposed to supplant/supplement the online documentation.&lt;br /&gt;&lt;br /&gt;For the clusterware upgrade, they hit it on the nose. I was able to upgrade the clusterware in my BCP environment with no problem. Well.... I admit, I am still very confused about the CRS and ASM software owners. There seems to be a push to use different users (in both cases) other than the normal "oracle" user. There is not much justification in the documentation, IMO; rather a bland "for security reasons" statement.&lt;br /&gt;&lt;br /&gt;The ASM upgrade was a little more tricky. All the documentation that I have, including the new nutshell cookbook, indicate that ASM can be upgraded in a rolling fashion. &lt;span style="font-style: italic; font-weight: bold;"&gt;That is a lie&lt;/span&gt;! *grin* I have a new SR open that is exploring this little nuance (or not so little, depending on how much time you have spent trying to wrap your head around this). Apparently, ASM Rolling Upgrades are available in 11gR2. Oh..... well, guess I'll just go download 11gR2 then. Wait - it is not available yet?!? So the documentation lists steps that are not applicable to any version that is currently available? Did I read the right?&lt;br /&gt;&lt;br /&gt;So confusing. The good news is that I was able to complete the BCP upgrade with less pain. Since the documentation strongly suggests that one create a new ASM user, there are a ton of manual steps to follow if you choose to go that route. However, smart DBA that I am *sly grin*, I kept the same user and was able to use the DBUA to go from 10g to 11g (10.2.0.3 to 11.1.0.6) - that was sweet. Why would I want to switch users and go through many manual processes? What is the rationale for that? The patchset upgrade from 11.1.0.6 to 11.1.0.7 was less friendly. As I mentioned above, all the documentation states that you should do a rolling upgrade. This is not possible. So I hacked my way through; had to shutdown abort my instances which left shared memory segments hanging around that I had to manually kill off. Not a big deal, but the error messages can be very confusing (ie, ora-12547 TNS lost contanct).&lt;br /&gt;&lt;br /&gt;I am looking forward to the document changes that will result from my contacts with Oracle.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-4697826066348608050?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/4697826066348608050/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=4697826066348608050' title='13 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/4697826066348608050'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/4697826066348608050'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2008/12/upgrading-clusterwareasm-from-10g-to.html' title='Upgrading clusterware/ASM from 10g to 11g - a complaint'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>13</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-46880239118489552</id><published>2008-09-18T15:43:00.003-05:00</published><updated>2008-09-18T15:51:30.686-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tuning'/><category scheme='http://www.blogger.com/atom/ns#' term='cbo'/><category scheme='http://www.blogger.com/atom/ns#' term='cardinality feedback'/><title type='text'>A Tuning experiment</title><content type='html'>As I learn more about the CBO and Banner, I start to wonder about "system tuning". I like Cary Millsap's "Method R" concept; I was thinking about how to adapt that in the narrow field of sql statements. If, for example, I turn set statistics_level = ALL, I know I can generate rowsource statistics at the cost of perhaps 5% overhead to my system. Doing this in a development environment, I could utilize Wolfgang Breitling's "Cardinality Feedback" to find sql statements that are not performing optimally, and maybe even rank them by degradation. Maybe.&lt;br /&gt;&lt;br /&gt;Why would I want to do that? Good question. In and of itself, it is a hard sell if my only purpose is to go on a witch hunt and try to tune the system purely from the sql. However, I think the bigger advantage is to use the various sql statements as teachable moments, a way to develope real-life examples for our DBAs that demonstrate how our application(s) behave, and how to attack "slow" statements. The fortunate side-affect is that we end up making some things faster.&lt;br /&gt;&lt;br /&gt;Just an idea. I have not been able to drill down into 11g's automatic tuner yet, but I have to believe it is using something similar to cardinality feedback. If memory serves, I believe it does spend some extra overhead reconsidering previous sql plans in an attempt to find those that are not optimal (or that crazy phrase "suboptimal"). Now I have to go back and read up on that again just to refresh myself....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-46880239118489552?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/46880239118489552/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=46880239118489552' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/46880239118489552'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/46880239118489552'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2008/09/tuning-experiment.html' title='A Tuning experiment'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-3833874999015400182</id><published>2008-08-27T13:30:00.004-05:00</published><updated>2008-08-27T14:23:55.215-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='we8iso8859P1'/><category scheme='http://www.blogger.com/atom/ns#' term='we8mswin1252'/><category scheme='http://www.blogger.com/atom/ns#' term='al32utf8'/><category scheme='http://www.blogger.com/atom/ns#' term='character conversion'/><title type='text'>Character Sets</title><content type='html'>I have been tasked with presenting on the topic of converting the character set for our Banner system databases. We have been through the exercise several times, which has been quite an eye-opening experience in itself (&lt;a href="http://orajourn.blogspot.com/2008/01/datapump-index-work-around.html"&gt;The DataPump Index work-around&lt;/a&gt;, &lt;a href="http://orajourn.blogspot.com/2008/04/dbmspclxutilbuildpartindex.html"&gt;dbms_pclxutil.build_part_index&lt;/a&gt;, &lt;a href="http://orajourn.blogspot.com/2008/06/create-tablespace-ddl.html"&gt;creating tablespaces&lt;/a&gt;). Essentially, the vendor has decided in all its god-like wisdom to force all customers to start using a multibyte Unicode character set that will support international characters (AL32UTF8) when they upgrade to the latest version 8. Yea, not very practical for us at a Big Ten school.&lt;br /&gt;&lt;br /&gt;Anyway, I have taken this thing to heart and have been learning a lot about codepoints and various facts about character sets. We will be converting from WE8ISO8859P1 to AL32UTF8, a single-byte ISO 8859-1 West European somewhat basic (eg, simple) codepoint to the latest'n'greatest multibyte grandaddy of Universal character sets. The big issue is making sure that all the data stays the same, even if physically it is stored a little different. Along the way, I have had to come to terms with phrases such as "Lossy Data" and "Truncation Data". &lt;a href="http://aprilcsims.wordpress.com/2008/07/10/migrating-to-al32utf8-on-10gr2-for-banner/"&gt;April Sims&lt;/a&gt; has been a great help in answering some questions and getting me to focus my searches. In the end, Metalink note 252352.1 laid out an example that finally opened my eyes for Lossy Data.&lt;br /&gt;&lt;br /&gt;I was having a hard time understanding why one must go through WE8MSWIN1252 first to resolve lossy data. And what was meant by the notation in Metalink Note 260192.1:&lt;br /&gt;&lt;blockquote&gt;if you have a WE8ISO8859P1 database and lossy then changing your WE8ISO8859P1 to WE8MSWIN1252 will most likly solve you lossy [sic]&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Why? Well, the Euro example in note 252352.1 is great. To paraphrase, the Euro is stored as codepoint 128 in WE8ISO8859P1. In this case, that character set essentially has an empty hole there, no previous definitions for that codepoint. So if one were to attempt to select it in some kind of "native" WE8ISO8859P1 environment, there would be nothing. So how did it get there? It is passed in from a &lt;i&gt;&lt;b&gt;different character set&lt;/b&gt;&lt;/i&gt;. And if using that same character set on the client side, you can easily retrieve the correct symbol.&lt;br /&gt;&lt;br /&gt;Since WE8WSWIN1252 is a superset of WE8ISO8859P1 (meaning it has all the same codepoints for existing symbols, and then some), and it is most likely that a client in the US inserted data with a US Microsoft character set, the codepoint will be mapped to a valid symbol. Since that codepoint is "valid" in WE8MSWIN1252, it can then be converted to any other character set that also supports that symbol.&lt;br /&gt;&lt;br /&gt;Where this falls apart (the "likly" part) is if the client using a "foreign" character set inserts a symbol that is mapped to a completely different symbol (via the codepoint) in our target client character set. In that case, you are screwed. =) Unless you would want to convert that data manually for each case of incompatible character sets. Not I.&lt;br /&gt;&lt;br /&gt;Truncation data is a little easier to grasp. Metalink note 119119.1 mentions the English pound sign (£):&lt;br /&gt;&lt;blockquote&gt;The pound sign for example is indeed 163 ( A3 in hexadecimal) in the WE8ISO8859P1 and WE8MSWIN1252 charactersets, but in AL32UTF8 the pound sign is code 49827 (C2 A3 in hex).&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;In our case, the fix is handled by setting nls_length_semantics=CHAR (opposed to the default BYTE). We also found out through experimentation that nls_length_semantics is completely ignored for SYS and SYSTEM objects; in fact, the data dictionary is always with BYTE semantics. Interesting, eh?&lt;br /&gt;&lt;br /&gt;Metalink Notes:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;260192.1&lt;/span&gt; Changing WE8ISO8859P1/ WE8ISO8859P15 or WE8MSWIN1252 to (AL32)UTF8&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;225938.1&lt;/span&gt; Database Character Set Healthcheck&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;252352.1&lt;/span&gt; Euro Symbol Turns up as Upside-Down Questionmark&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;279068.1&lt;/span&gt; Usage of Character Set Scanner Utility (csscan) version 1.1&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;137127.1&lt;/span&gt; Character Sets, Code Pages, Fonts and the NLS_LANG Value&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;241047.1&lt;/span&gt; The Priority of NLS Parameters Explained&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;158577.1&lt;/span&gt; NLS_LANG Explained (How does Client-Server Character Conversion Work?)&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;179133.1&lt;/span&gt; The correct NLS_LANG in a Windows Environment&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;119119.1 &lt;/span&gt;AL32UTF8 / UTF8 (Unicode) Database Character Set Implications&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Others:&lt;br /&gt;&lt;a href="http://download.oracle.com/docs/cd/B19306_01/server.102/b14225/applocaledata.htm"&gt;Oracle® Database Globalization Support Guide 10g Release 2 (10.2)&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-3833874999015400182?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/3833874999015400182/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=3833874999015400182' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/3833874999015400182'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/3833874999015400182'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2008/08/character-sets.html' title='Character Sets'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-2293195216122269385</id><published>2008-08-01T09:16:00.002-05:00</published><updated>2008-08-01T09:44:34.962-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='scm'/><category scheme='http://www.blogger.com/atom/ns#' term='feedback'/><category scheme='http://www.blogger.com/atom/ns#' term='metalink 3'/><title type='text'>Software Configuration Manager</title><content type='html'>I learned that Oracle Support has a couple Oracle blogs up:&lt;br /&gt;&lt;a href="http://blogs.oracle.com/supportportal/"&gt;http://blogs.oracle.com/supportportal/&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blogs.oracle.com/Support/"&gt;http://blogs.oracle.com/Support/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I think I was just checking on them when I noticed that the supportPortal was being a little more aggressive looking for more feedback. Over the years, I have participated in many of the Survey's that Oracle sends you after you close an SR, and have made no small number of comments (both good and bad) to a growing number of contacts I have established within Oracle, so this seemed like yet another opportunity to voice my opinion. I think I do that much more when I get the impression Oracle is actually listening; I don't share the same thoughts here because, well.... I highly doubt Oracle is reading this. =) No offense.&lt;br /&gt;&lt;br /&gt;So let me blur the lines a little. First, I think Oracle is doing a much better job at collecting client feedback. However, the more critical part is what they are doing with that feedback. Unfortunately, for us end users, those comments seem to disappear into a black box, never to surface again (much like Enhancement Requests). I chatted with some really nice folks at Oracle (Kristal and Cherryl) and they both reassured me that Oracle is taking our comments seriously, and in fact hinted that the ongoing evolution of Metalink 3 is largely due to user feedback, and even newer things are coming down the pike.&lt;br /&gt;&lt;br /&gt;Taking the invitation from the SupportPortal blog seriously, I called up for an appointment and got hooked up right away. I think the lady running the feedback session was working at home (heard a small child in the background), and she had some setup work to accomplish before we got down to it. But 90 minutes later I had made numerous observations about many aspects of the Software Configuration Manager and Metalink 3 in general. It was refreshing (and exhausting) to not only state some things I either liked or did not, but also to demonstrate via a recorded web session. Very satisfying; I recommend this to anyone who deals with metalink on a frequent basis.&lt;br /&gt;&lt;br /&gt;So, what did I say? In general, I like the eye-candy of the new interface, but it is also a little slow and sometimes downright confusing. For instance, there is no way to bookmark bugs. The options to configure the layout are a nice thought, but still a little limited; it reminds me of how limited blogger is compared to WordPress, if that helps at all. Don't get me wrong, I think it is quite handy to configure the layout, but I really look forward to improvements. The key point, Software Configuration Manager, is a great concept. Unfortunately, I have some political roadblocks to fully utilizing SCM with my employer, which makes it a little frustrating when attempting to comment on the SCM because it is not SCM's fault at all. =) We require that we either have separate CSI numbers, or implement some sort of access to control such that not all our end-users have equal access to a site-wide license. But if we ignore that for a little while, I think SCM is awesome and has a lot of potential. Just the fact that it helps speed up SRs significantly is a big bonus. I have heard some misgivings about allowing Oracle to retrieve information in such a fashion, even if only passively, but I personally do not have an issue with it.&lt;br /&gt;&lt;br /&gt;I do not like how some of the questions are completely inane. For instance, 99% of my SRs are for the Oracle Server - Enterprise Edition. 99% of the time I forget what exactly my "Product" is called and have to hunt for it amongst a list of several hundred product options, most of which we are not even licensed for. Why? What about a list of 10 most recent products for my CSI? What about a list that only contains products I am licensed for? And when attempting to find a category that somewhat matches the subject of an SR, I hate having to select one from the list of 30 or so. I want a searchable list. And a fast search at that; the LOVs in the patch pages really suck.&lt;br /&gt;&lt;br /&gt;I concluded by saying that it would be vitally important to me see how Oracle is using this feedback. I have repeated this message to my Oracle contacts and with nearly all feedback I give to Oracle. I long to see what difference I make. Don't you?&lt;br /&gt;&lt;br /&gt;Kudos to the teams involved in the feedback gathering operations. And BIG PROPS to Cheryl, Joey and Kristal (all of Oracle).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-2293195216122269385?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/2293195216122269385/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=2293195216122269385' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/2293195216122269385'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/2293195216122269385'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2008/08/software-configuration-manager.html' title='Software Configuration Manager'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-325936328121487146</id><published>2008-06-26T10:05:00.003-05:00</published><updated>2008-06-26T10:17:50.407-05:00</updated><title type='text'>create tablespace ddl</title><content type='html'>I recently went looking for ways to recreate tablespaces, as we prepare to migrate our production database to a different character set (necessitated by the vendor, grrr). DBMS_METADATA is really cool, and I like it alot. Data Pump essentially uses DBMS_METADATA (I believe), so I thought one of those cool tools would be the way to go. Close, but not quite. If you do a complete export/import of your database, you end up reorganizing all your data, in essence defragging the whole thing. Which is good (nay, GREAT!). But Data Pump only lets you create tablespaces with the original datafile sizes.&lt;br /&gt;&lt;br /&gt;Granted, considering that this is Production, prudence would say that one will have tested this several times (as we are currently doing) before actually running the process in Production. And in doing so, one will know exactly how large the files should be, and can in fact extract the ddl (metadata api, data pump, TOAD, etc) from the test database. As a simple exercise, I still want a way to generate slightly customized tablespace ddl. So I ended up writing my own.&lt;br /&gt;&lt;br /&gt;Some of the key things I wanted was to be to dynamically adjust the initial sizes of the datafiles. Also, for the sake of portability, I added a runtime parameter for maxsize. I am still torn about LMT being locked into UNIFORM, but since that is all we use here, I am not too worried for us. =) But I do want LMT and ASSM to be default; for 10g, I see no reason to turn these off at all.&lt;br /&gt;&lt;br /&gt;Blogspot is going to horribly screw up the formatting for this, and I have not found a way around it. Sorry.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;REM create_tablespace_ddl.sql&lt;br /&gt;REM Charles Schultz&lt;br /&gt;REM 25-Jun-2008&lt;br /&gt;REM&lt;br /&gt;REM Generates tablespace DDL&lt;br /&gt;REM Assumes the following:&lt;br /&gt;REM - Excluding ('SYSTEM','SYSAUX','USERS','TEMP','TOOLS','UNDOTS')&lt;br /&gt;REM - All LMT&lt;br /&gt;REM - All ASSM&lt;br /&gt;REM - All datafiles AUTOEXTEND, initial size = half of current, or size of initial extent, maxsize defaults to 4000M&lt;br /&gt;REM&lt;br /&gt;REM Retains INITIAL_EXTENT settings for LMT&lt;br /&gt;REM&lt;br /&gt;REM Builds 5 inline materialized views&lt;br /&gt;REM - tablespace_specs: gets the data from dba_tablespaces and dba_data_files, ordering by file_id&lt;br /&gt;REM - first_ddl:        generates the initial "CREATE TABLESPACE" statement, along with the first datafile&lt;br /&gt;REM - last_ddl:         generates the tablespace options (LMT, ASSM)&lt;br /&gt;REM - mid_ddl:          generates statements for any datafiles that are not the first&lt;br /&gt;REM - tablespace_ddl:   Combines all ddl, ordered by tablespace name and section&lt;br /&gt;REM&lt;br /&gt;REM Limitations&lt;br /&gt;REM - Does not allow for BIGFILES, but this is a trivial change&lt;br /&gt;REM - Does not allow for LMT Autoallocate. Again, not a difficult modification&lt;br /&gt;&lt;br /&gt;PROMPT This script will generate tablespace ddl, making the following assumptions:&lt;br /&gt;PROMPT - All tablespaces are Locally Managed (LMT) with UNIFORM sizes&lt;br /&gt;PROMPT - All tablespaces have automatic segment space management (ASSM)&lt;br /&gt;PROMPT - All datafiles autoextend&lt;br /&gt;PROMPT&lt;br /&gt;&lt;br /&gt;accept sqlfile default 'create_tablespaces.sql' char prompt 'Enter name for generated sql file [create_tablespaces.sql]: '&lt;br /&gt;accept initial_size default '50' char prompt 'Percent by which to shrink datafile initial sizes, 0 being none [50]: '&lt;br /&gt;accept max_size default '4000' char prompt 'MAXSIZE of autoextend datafiles, in megabytes [4000]: '&lt;br /&gt;&lt;br /&gt;set head off newpage 0 pages 0 verify off feed off lines 200&lt;br /&gt;spool &amp;SQLFILE&lt;br /&gt;with tablespace_specs as &lt;br /&gt;(select row_number() over (partition by tb.tablespace_name order by df.file_id) rn_up,&lt;br /&gt; row_number() over (partition by tb.tablespace_name order by df.file_id desc) rn_down,&lt;br /&gt; tb.BIGFILE,&lt;br /&gt; tb.TABLESPACE_NAME,&lt;br /&gt; df.FILE_NAME,&lt;br /&gt; greatest(df.BYTES*((100-greatest(least(&amp;INITIAL_SIZE,100),0))/100),tb.INITIAL_EXTENT) file_size,&lt;br /&gt; df.INCREMENT_BY*tb.block_size INCREMENT_BY,&lt;br /&gt; tb.INITIAL_EXTENT&lt;br /&gt; from dba_tablespaces tb,dba_data_files df&lt;br /&gt; where tb.TABLESPACE_NAME = df.TABLESPACE_NAME&lt;br /&gt; and tb.tablespace_name not in ('SYSTEM','SYSAUX','USERS','TEMP','TOOLS','UNDOTS')&lt;br /&gt; ),&lt;br /&gt;first_ddl as&lt;br /&gt;(select tablespace_name,&lt;br /&gt; 1 section_num,&lt;br /&gt; 'create tablespace '||tablespace_name||' datafile '''||file_name||''' size '||file_size||' autoextend on next '||increment_by||' maxsize '||&amp;MAX_SIZE||'M' text&lt;br /&gt; from tablespace_specs where rn_up = 1),&lt;br /&gt;last_ddl as&lt;br /&gt;(select tablespace_name,&lt;br /&gt; 3 section_num,&lt;br /&gt; 'EXTENT MANAGEMENT LOCAL UNIFORM SIZE '||INITIAL_EXTENT||' SEGMENT SPACE MANAGEMENT AUTO;' text&lt;br /&gt; from tablespace_specs where rn_down = 1),&lt;br /&gt;mid_ddl as&lt;br /&gt;(select tablespace_name,&lt;br /&gt; 2 section_num,&lt;br /&gt; ','''||file_name||''' size '||file_size||' autoextend on next '||increment_by||' maxsize '||&amp;MAX_SIZE||'M' text&lt;br /&gt; from tablespace_specs where rn_up &gt; 1),&lt;br /&gt;tablespace_ddl as&lt;br /&gt;(select text,tablespace_name, section_num from first_ddl&lt;br /&gt; union&lt;br /&gt; select text,tablespace_name, section_num from mid_ddl&lt;br /&gt; union&lt;br /&gt; select text,tablespace_name, section_num from last_ddl&lt;br /&gt; order by tablespace_name, section_num)&lt;br /&gt;select text from tablespace_ddl&lt;br /&gt;/&lt;br /&gt;spool off&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-325936328121487146?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/325936328121487146/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=325936328121487146' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/325936328121487146'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/325936328121487146'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2008/06/create-tablespace-ddl.html' title='create tablespace ddl'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-1077618369246271480</id><published>2008-06-11T14:38:00.002-05:00</published><updated>2008-06-11T14:53:28.847-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Adrian Billington'/><category scheme='http://www.blogger.com/atom/ns#' term='tom kyte'/><category scheme='http://www.blogger.com/atom/ns#' term='stragg'/><title type='text'>Stragg</title><content type='html'>Tom Kyte popularized the STRAGG function, a sometimes critical piece missing from Oracle's arsenal of cool commands, has been bandied about quite a bit:&lt;br /&gt;http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:21961626004&lt;br /&gt;&lt;br /&gt;We were recently tasked with using a STRAGG-like function but with dynamic delimiters. Tom Kyte's standard STRAGG does not handle that. Enter Adrian Billington, who took it one step further (look for "10g goes one further"). I really liked his example, and it caused me to research the COLLECTION functionality a little deeper. A little - I do not claim to have mastered it by any means.&lt;br /&gt;&lt;br /&gt;Unfortunately for us, we seem to be hitting bug 4381035 (not exactly sure about that, but the best hit I can find). This is under 10.2.0.2.&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;&lt;span style="color: rgb(51, 51, 153);"&gt;BANDEV_SQL &gt; CREATE OR REPLACE TYPE oracle.stragg_type AS TABLE OF VARCHAR2(4000);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;/&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;  2  &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;Type created.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;BANDEV_SQL &gt; CREATE OR REPLACE FUNCTION oracle.stragg (&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;            nt_in        IN stragg_type,&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;            delimiter_in IN VARCHAR2 DEFAULT ','&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;            ) RETURN varchar2 IS&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;   v_idx PLS_INTEGER;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;   v_str varchar2(32000);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;   v_dlm VARCHAR2(10);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;BEGIN&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;   v_idx := nt_in.FIRST;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;   WHILE v_idx IS NOT NULL LOOP&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;      v_str := v_str || v_dlm || nt_in(v_idx);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;      v_dlm := delimiter_in;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;      v_idx := nt_in.NEXT(v_idx);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;   END LOOP;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;   RETURN v_str;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;END stragg;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;/&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;  2    3    4    5    6    7    8    9   10   11   12   13   14   15   16   17   18   19   20   21   22  &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;Function created.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;BANDEV_SQL &gt; drop table test;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;Table dropped.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;BANDEV_SQL &gt; create table test (a char(2), b char(1));&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;Table created.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;BANDEV_SQL &gt; insert into test values ('aa','1');&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;1 row created.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;BANDEV_SQL &gt; insert into test values ('aa','2');&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;1 row created.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;BANDEV_SQL &gt; insert into test values ('aa','3');&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;1 row created.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;BANDEV_SQL &gt; select a, oracle.stragg(CAST(COLLECT(b) as ORACLE.STRAGG_TYPE)) b from test group by a;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;select a, oracle.stragg(CAST(COLLECT(b) as ORACLE.STRAGG_TYPE)) b from test group by a&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;                             *&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;ERROR at line 1:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;ORA-00932: inconsistent datatypes: expected - got -&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This was a bummer. After a bunch of reading and experimenting, I finally hit upon something that seems to be working:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-size:85%;" &gt;&lt;span style="font-family:courier new;"&gt;BANDEV_SQL &gt; select a, oracle.stragg(cast(multiset(select b from test) as oracle.STRAGG_TYPE),'|') b from test group by a;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;A&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;--&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;B&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;--------------------------------------------------------------------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;aa&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;1|2|3&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I am not exactly sure why MULTISET is working better than COLLECT in this case; it seems to me that both should be producing nested tables.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-1077618369246271480?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/1077618369246271480/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=1077618369246271480' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/1077618369246271480'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/1077618369246271480'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2008/06/stragg.html' title='Stragg'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-3017801139233489587</id><published>2008-05-16T14:13:00.003-05:00</published><updated>2008-05-16T14:55:59.452-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bugs'/><category scheme='http://www.blogger.com/atom/ns#' term='banner'/><category scheme='http://www.blogger.com/atom/ns#' term='gjbcolr'/><category scheme='http://www.blogger.com/atom/ns#' term='filter operation'/><category scheme='http://www.blogger.com/atom/ns#' term='cbo'/><category scheme='http://www.blogger.com/atom/ns#' term='dynamic sampling'/><title type='text'>I am digging this learning thing</title><content type='html'>One of the mixed blessings of Oracle is that there is always something you can learn, no matter how good you are, or how much experience you have in the field. And I still have a lot to learn.&lt;br /&gt;&lt;br /&gt;This week I had the unique pleasure of speaking directly with an Oracle Developer about an SR I had file in regards to query. In fact, this query is what lead me down the path of last week's &lt;a href="http://orajourn.blogspot.com/2008/05/learned-couple-things-this-week.html"&gt;discovery&lt;/a&gt;. We have a 3rd party ERP (Banner from SunGard), and one of the tables is GJBCOLR, a "collector" table for various jobs. My understanding is that it used like a scratch table, and jobs will routinely insert rows, work on them, then delete them. Sound like a TEMPORARY table at all? I am told that SunGard needs this to be a permanent table for some reason, and I am still trying to hunt down that reason. But I digress.&lt;br /&gt;&lt;br /&gt;This table routinely has a high water mark. In the SR I filed for Oracle, we observed that the stats pegged it with 21 million consisten reads (HHWM), even though it really had about 290 rows. Sure, we can drop the HHWM (ie, truncate table, alter table shrink, etc) as explain in my previous post, but the table will just grow again due to how Banner uses it. So my next thought was to delete the stats and force dynamic sampling. To my horror, the CBO was able to find a low cost FTS, favored over a Index access by a factor of 10. According to my developer buddy, he highly suspects this is due to a bug in dynamic sampling, since the 10053 trace shows the dynamic stats put the number of blocks at an incredibly low 95. We are talking about OSEE 10.2.0.2, and he found a bug fix in 10.2.0.3 that is only slightly related but he firmly believes it probably affects the same thing. One of the workarounds I wanted to run past the developer is faking the stats, putting them enormously high so that indexes are always favored, and he tentatively agreed. So hopefully that will solve our problem.&lt;br /&gt;&lt;br /&gt;However, realizing what a rare opportunity I had to be talking to a developer, I asked him a few questions about the optimizer and the particular query we were looking at. I am sure a month from now I will be smacking my head about not asking him other questions, but hey.... =)&lt;br /&gt;&lt;br /&gt;The query plan looks like this:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;--------------------------------------------------------------------------------&lt;br /&gt;| Id  | Operation               | Name    | Rows  | Bytes |TempSpc| Cost (%CPU)|&lt;br /&gt;--------------------------------------------------------------------------------&lt;br /&gt;|   0 | SELECT STATEMENT        |         |   210K|    50M|       | 14353   (6)|&lt;br /&gt;|   1 |  SORT ORDER BY          |         |   210K|    50M|   106M| 14353   (6)|&lt;br /&gt;|*  2 |   FILTER                |         |       |       |       |            |&lt;br /&gt;|*  3 |    HASH JOIN RIGHT OUTER|         |   210K|    50M|       |  2412  (18)|&lt;br /&gt;|   4 |     TABLE ACCESS FULL   | FTVDTYP |    54 |   378 |       |     3   (0)|&lt;br /&gt;|   5 |     TABLE ACCESS FULL   | FFBMAST |   210K|    49M|       |  2387  (17)|&lt;br /&gt;|*  6 |    TABLE ACCESS FULL    | GJBCOLR |     1 |    50 |       |    29   (4)|&lt;br /&gt;--------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Predicate Information (identified by operation id):&lt;br /&gt;---------------------------------------------------&lt;br /&gt;&lt;br /&gt;  2 - filter( EXISTS (SELECT /*+ */ 0 FROM "GENERAL"."GJBCOLR"&lt;br /&gt;             "GJBCOLR" WHERE "GJBCOLR_VALUE"=:B1 AND "GJBCOLR_ONE_UP_NO"=4549363 AND&lt;br /&gt;             "GJBCOLR_JOB"='FFRAGRP' AND "GJBCOLR_NUMBER"='01'))&lt;br /&gt;  3 - access("FFBMAST_OTHER_SRC_DTYP_NUM"="FTVDTYP_SEQ_NUM"(+))&lt;br /&gt;  6 - filter("GJBCOLR_VALUE"=:B1 AND "GJBCOLR_ONE_UP_NO"=4549363 AND&lt;br /&gt;             "GJBCOLR_JOB"='FFRAGRP' AND "GJBCOLR_NUMBER"='01')&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;I include the predicate information because that becomes important later on. Not knowing much about the FILTER operation other than that it works on two children, I asked him how it works. It is almost exactly like a nested loop operation. However, he specifically said the Hash Join is a source and the GJBCOLR subquery is a probe, which indicates to me a hash join, not a nested loop. But, like a nested loop, each result of the HJ child is compared to the GJBCOLR subquery, hence the subquery is executed 210K times. I asked why the HJ child is not second (as opposed to first), and he mentioned it had to do with how Oracle used part of the GJBCOLR subquery as a filter predicate. I am not entirely positive why that is the intended result, but I hope to chew on it a bit more. As you can see, the subquery was transformed into a EXISTS clause (not present in the original), and I believe that is part of the answer.&lt;br /&gt;&lt;br /&gt;Now if only I could talk to a developer everytime I file an SR.....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-3017801139233489587?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/3017801139233489587/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=3017801139233489587' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/3017801139233489587'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/3017801139233489587'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2008/05/i-am-digging-this-learning-thing.html' title='I am digging this learning thing'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-7677385409783411541</id><published>2008-05-09T15:29:00.003-05:00</published><updated>2008-05-09T16:12:09.119-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hwm'/><category scheme='http://www.blogger.com/atom/ns#' term='assm'/><category scheme='http://www.blogger.com/atom/ns#' term='rman'/><title type='text'>Learned a couple things this week</title><content type='html'>We had a couple examples of how a high watermark affects FTS, especially when that FTS gets executed on the wrong side of a FILTER operation. Which got me to delving into the black magic of high water marks.&lt;br /&gt;&lt;br /&gt;First off, Oracle only mentions them in passing. If you search for LHWM (low high water mark), you will get a couple hits in metalink for a bug and nothing in the documentation. So, what the heck is a low high watermark anyway? And a &lt;span style="font-weight: bold; font-style: italic;"&gt;high&lt;/span&gt; high watermark?&lt;br /&gt;&lt;br /&gt;Apparently, after a couple lessons from K Gopalakrishna, Ric Van Dyke and couple others, the LHWM is the boundary at which all blocks below it are gauranteed to be formatted and used at least once. Above the HHWM we are gauranteed that all blocks are unformatted and never used. Between the two we have the "grey area"; namely, a mixture of blocks that have and have not been used. I believe there are two bitmaps (or two levels of bitmaps?), one that maintains the freelists for below the LWHM, and another for above the HHWM. On Full Table Scans, Oracle will scan everything below the LHWM, and then use the L2 bitmap to find blocks that need to be scanned above the LHWM.&lt;br /&gt;&lt;br /&gt;Oracle seems to have gone to great lenghts to make these two watermarks as confusing as possible. In the documentation, and when using packages like dbms_space, we are led to believe there is only one HWM, even for an ASSM tablespace.&lt;br /&gt;&lt;br /&gt;Thankfully, folks have discovered "dump file". &lt;a href="http://www.jlcomp.demon.co.uk/faq/blockdump.html"&gt;Norman Dunbar&lt;/a&gt; gives a couple quick examples. This is good stuff; there is a lot in the dump files that would warrant a closer look. But for right now, let's look at the watermark bits of information:&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153); font-family: courier new;"&gt;alter system dump datafile 5 block min 1 block max 100;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153); font-family: courier new;"&gt;  Extent Control Header&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153); font-family: courier new;"&gt;  -----------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153); font-family: courier new;"&gt;  Extent Header:: spare1: 0      spare2: 0      #extents: 1      #blocks: 8     &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153); font-family: courier new;"&gt;                  last map  0x00000000  #maps: 0      offset: 2716  &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153); font-family: courier new;"&gt;      Highwater::  0x01403030  ext#: 1      blk#: 7      ext size: 8     &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153); font-family: courier new;"&gt;  #blocks in seg. hdr's freelists: 0     &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153); font-family: courier new;"&gt;  #blocks below: 7809  &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153); font-family: courier new;"&gt;  mapblk  0x00000000  offset: 1     &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153); font-family: courier new;"&gt;      Disk Lock:: Locked by xid:  0x000a.013.000003a4&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153); font-family: courier new;"&gt;  --------------------------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153); font-family: courier new;"&gt;  Low HighWater Mark : &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153); font-family: courier new;"&gt;      Highwater::  0x01403030  ext#: 992    blk#: 7      ext size: 8     &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153); font-family: courier new;"&gt;  #blocks in seg. hdr's freelists: 0     &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153); font-family: courier new;"&gt;  #blocks below: 7809  &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153); font-family: courier new;"&gt;  mapblk  0x01402aa1  offset: 177   &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153); font-family: courier new;"&gt;  Level 1 BMB for High HWM block: 0x01403019&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153); font-family: courier new;"&gt;  Level 1 BMB for Low HWM block: 0x01403019&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This is not necessarily the world's best example, but heck, it is raw data. =) I have yet to decipher what all that means, but I am working on it. I believe that the LHWM "blocks below" will always be less than the HHWM "blocks below", but the difference would count the number of blocks in that grey area.&lt;br /&gt;&lt;br /&gt;As an aside, I also found that you can dump all the file headers with:&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 51, 153);"&gt;alter session set events 'immediate trace name file_hdrs level 10';&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The level is a bit confusing, as I tried various numbers and the resulting trace seem to be exactly the same.&lt;br /&gt;&lt;br /&gt;On the RMAN side, we came across a peculiar curiosity. With &lt;span style="font-weight: bold; font-style: italic;"&gt;no recovery catalog&lt;/span&gt;, if you recover a controlfile and have archive logs beyond the time of the controlfile, we found that on OSEE 10.2.0.1, RMAN is not smart enough to roll forward if you specify an "UNTIL TIME" in the future relative to the controlfile. Instead, you will see errors that resemble messages if the backup is corrupted; RMAN will attempt to go backwards in time to find a file that matches an appropiate SCN. Of course, it will never find one. This behavior is "fixed" in OSEE 10.2.0.4 (we did not try any of the intermediate patch levels), and RMAN will now roll the database forward beyond the controlfile time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-7677385409783411541?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/7677385409783411541/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=7677385409783411541' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/7677385409783411541'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/7677385409783411541'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2008/05/learned-couple-things-this-week.html' title='Learned a couple things this week'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-7432384120889772296</id><published>2008-04-16T10:11:00.002-05:00</published><updated>2008-04-16T10:24:17.849-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='partitioned indexes'/><category scheme='http://www.blogger.com/atom/ns#' term='dbms_pclxutil.build_part_index'/><title type='text'>dbms_pclxutil.build_part_index</title><content type='html'>While working on our &lt;a href="http://orajourn.blogspot.com/2008/01/datapump-index-work-around.html"&gt;datapump workaround&lt;/a&gt;, I stumbled upon dbms_pclxutil.build_part_index. This is a handy little bugger that has been around since at least 8.1.5, and has some interesting limitations. For starters, the said index has to be partitioned and unusable. Not a biggie, but why? I also found out (the hard way) that not only do you have to run the procedure as the table owner, but also the index owner as well. Or to put it in other words, you have to create the index in the same schema as the table, and run the procedure from that schema only. That rather confounds me; when I asked Oracle Support about this, I was given some schtick about how they can't have users running around building partitioned indexes on other people's tables. If you ask me, I am thinking some developer back in the early '90s wrote this handy piece of code, but made some assumptions, and those assumptions were never corrected going forward. Strange how after all these releases, it is still not very well documented.&lt;br /&gt;&lt;br /&gt;ah well....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-7432384120889772296?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/7432384120889772296/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=7432384120889772296' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/7432384120889772296'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/7432384120889772296'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2008/04/dbmspclxutilbuildpartindex.html' title='dbms_pclxutil.build_part_index'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-7217749390877769088</id><published>2008-04-11T08:32:00.003-05:00</published><updated>2008-04-11T19:35:37.148-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='11g'/><category scheme='http://www.blogger.com/atom/ns#' term='dbcontrol'/><title type='text'>11g and DBControl, Part 2</title><content type='html'>After finding two bugs with 11g DBControl already (and that was just the installation), I am finding another basic problem. I am experimenting with RAT and attempting to replay a workload. The ability to export a workload from a 10.2.0.4 database and replay it in 11g is a huge thing. &lt;span style="font-style: italic; font-weight: bold;"&gt;If it works&lt;/span&gt;. If it works, we may have a huge demand for it; shipping off our workload to 3rd-party vendors (software and hardware) for benchmarking, internal testing of various upgrade options, etc.&lt;br /&gt;&lt;br /&gt;So I set out to generate and capture a workload in a freshly upgraded 10.2.0.4 database. First I have to set pre_11g_enable_capture to true, which is a little odd. Why is it default to off? From there, you can loosely follow the online &lt;a href="http://download.oracle.com/docs/cd/B28359_01/server.111/b28274/wcr.htm#BABIEJII"&gt;documentation&lt;/a&gt;:&lt;br /&gt;backup source database&lt;br /&gt;capture workload&lt;br /&gt;restore database elsewhere&lt;br /&gt;preprocess workload&lt;br /&gt;replay workload&lt;br /&gt;&lt;br /&gt;I was good up until the last step. Since the topic is DBControl, I decided to use DBControl to preprocess the workload after I datapumped my source into a target 11g database. DBControl then directs you to hit a link to replay the workload by configuration and initiating worker threads (aka, Client Connections). My workload was a mere 20 minutes (just for an initial test). My "Client Connections" have been attempting to start for 14 hours so far. They would probably run indefinitely if I let them.&lt;br /&gt;&lt;br /&gt;I have Oracle Support working on this, but I have to admit, all these little buggy problems with my first experience in 11g is not very encouraging. No, let me restate that - they are downright discouraging. The "base" realease is 11.1.0.6, which seems to indicate the 5th minor patch. How did these issues make it through 5 rounds of testing? I am rather confused. Perplexed. Mystified. Discombulated. Nothing like kicking the tires and finding that they are flat.&lt;br /&gt;&lt;br /&gt;Just as a side note, I also ran a workload capture for 14 hours (different box). Oracle generated over 37 &lt;span style="font-style: italic; font-weight: bold;"&gt;thousand&lt;/span&gt; files! Wow.&lt;br /&gt;&lt;br /&gt;Updated 19:35 pm&lt;br /&gt;Here are all the bugs that matched from WebIV (kinda scary):&lt;br /&gt;Bug.5932196 (80) DEADLOCK BETWEEN MV_REFRESH (DEL) AND AUTO GATHER_STATS_JOB Gen V111:&lt;br /&gt;3 Bug.6668534 (80) REPLAY CLIENT HANG UPON REPLAYING KILLED SESSION (ORA-28) Gen V111:&lt;br /&gt;3 Bug.6668157 (80) WRC CLIENT HANG WHEN START REPLAY FAILS Gen V1110:&lt;br /&gt;3 Bug.6661772 (80) TRANSACTION ID AT CAPTURE FILE HAS AN INVALID VALUE Gen V1110:&lt;br /&gt;3 Bug.5637692 (80) CANNOT REPLAY TKTUIM1.TSC WORKLOAD. WRC CLIENT ENCOUNTERS SIGNAL 3. Gen V111:&lt;br /&gt;3 Bug.5636024 (80) TEST WITH UPIALL BUNDLED FUNCTION HANGS DURING REPLAY Gen V11:&lt;br /&gt;3 Bug.6608197 (80) WRC CLIENT HANG WHEN 2 MMONS WAIT ON EACH OTHERS MSG Gen V111:&lt;br /&gt;3 Bug.6596423 (80) WRC REPLAY PROCESS HUNG WHEN TESTING GLOBAL PORTAL EXCHANGE DUE TO I&lt;br /&gt;NCIDENT Gen V111:&lt;br /&gt;3 Bug.5587101 (80) INTERMITTENT HANG DURING REPLAY WITH OCI CONNECTION POOLING WKLD Gen V11:&lt;br /&gt;3 Bug.6521269 (80) WRC REPLAY PROCESS HUNG WHEN TESTING GLOBAL PORTAL EXCHANGE DUE TO LOB Gen V111:&lt;br /&gt;3 Bug.6141226 (80) REPLAY HANG AFTER 10 HOURS CAPTURE Gen V111:&lt;br /&gt;3 Bug.6068506 (80) WCR REPLAY HANGS WAITING FOR COMMIT THAT WAS NOT SUBMITTED Gen V1110:&lt;br /&gt;3 Bug.6046429 (80) TST&amp;amp;PERF - WRC HANG WHEN WORKLOAD REPLAY Gen V1110:&lt;br /&gt;3 Bug.6025549 (80) WCR REPLAY HANGS WAITING FOR ROW LOCK&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-7217749390877769088?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/7217749390877769088/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=7217749390877769088' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/7217749390877769088'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/7217749390877769088'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2008/04/11g-and-dbcontrol-part-2.html' title='11g and DBControl, Part 2'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-4279206765759406234</id><published>2008-04-03T14:38:00.004-05:00</published><updated>2008-04-03T15:50:15.412-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='metalink'/><title type='text'>Metalink 3 coming "next year"</title><content type='html'>While communicating with an Oracle Global Customer Care employee today, I learned that Metalink 3 is coming next year. This should be interesting.&lt;br /&gt;&lt;br /&gt;I filed 3 feedback SRs today:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Allow Bugs older than 14 days to be views on Headlines&lt;/li&gt;&lt;li&gt;Remove "News &amp;amp; Notes" from headlines&lt;/li&gt;&lt;li&gt;Correct problems with "Certify &amp;amp; Availability" section of Headlines&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;I also some outstanding requests to view more than 365 days worth of SRs, and allow some sort of hierarchies within a single CSI.&lt;br /&gt;&lt;br /&gt;Update Thu Apr  3 15:44:03 CDT 2008&lt;br /&gt;From the horse's mouth:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-weight: bold;"&gt;Faster problem resolution&lt;/span&gt;&lt;br /&gt;         - Speed problem resolution with quick access to the information you need with our new personalized dashboard&lt;br /&gt;         - Facilitate faster resolution with a robust knowledgebase and powerful self-service tools&lt;br /&gt;         - Optimize system availability with enhanced Service Request (SR) management&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Extended preventative, automated support capabilities&lt;/span&gt;&lt;br /&gt; - Receive a simple, fast, easy way to maintain your Oracle systems&lt;br /&gt; - Mitigate risk with simplified configuration management solutions such as Software Configuration Manager&lt;br /&gt;         - Proactively prevent problems and accelerate problem resolution with automated HealthChecks and Product Alerts&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Increased personalization&lt;/span&gt;&lt;br /&gt;         - Utilize increased personalization and knowledge integration via OracleMetaLink 3's new user interface for powerful information management&lt;br /&gt;         - Personalize your homepage content for easier access to self-service tools and configuration data&lt;br /&gt; - Quickly access your Service Request history with MySRs &lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-4279206765759406234?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/4279206765759406234/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=4279206765759406234' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/4279206765759406234'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/4279206765759406234'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2008/04/metalink-3-coming-next-year.html' title='Metalink 3 coming &quot;next year&quot;'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-9053177970356025420</id><published>2008-04-02T14:48:00.005-05:00</published><updated>2008-04-04T13:57:17.037-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='11g'/><category scheme='http://www.blogger.com/atom/ns#' term='emca'/><category scheme='http://www.blogger.com/atom/ns#' term='dbcontrol'/><title type='text'>11g and DBControl</title><content type='html'>After hearing and reading about so many of the wonderful new toys with 11g, I decided to give some of them a whirl; I tend to learn better when I can break it myself.&lt;br /&gt;&lt;br /&gt;Unfortunately, I ended up breaking something else even before I could begin. When installing the software with the basic default options (starter database, DBConsole), emca blew chunks when trying to start dbconsole. This is not the kind of headache I wanted, but I am hoping to use this as a learning opportunity. Somehow. Hopefully I will be able to provide a resolution when this is over with.&lt;br /&gt;&lt;br /&gt;For starters, the trace and emConfig.log are a bit hard to read. I did find some key occurences of "OC4J Configuration issue", so I turned to Metalink and google. Metalink was particularly unhelpful. The closest match I could find was Note 549079.1, which is good in and of itself, but 1) it says 10g, not 11g, 2) none of the 3 cases in step 5 applied (I tried all of them). I am still slogging through Google hits, but so far the only solutions I am finding are for 10g, and they do not seem to apply to 11g.&lt;br /&gt;&lt;br /&gt;From emConfig.log&lt;br /&gt;&lt;span style="color: rgb(51, 0, 153);font-family:courier new;font-size:85%;"  &gt;CONFIG: OC4J Configuration issue. /u01/app/oracle/product/11.1.0/oc4j/j2ee/OC4J_DBConsole_server1_TEMP not found.&lt;br /&gt;&lt;br /&gt;Apr 2, 2008 2:12:05 PM oracle.sysman.emcp.util.PlatformInterface executeCommand&lt;br /&gt;WARNING: Error executing /u01/app/oracle/product/11.1.0/bin/emctl start dbconsole&lt;br /&gt;Apr 2, 2008 2:12:05 PM oracle.sysman.emcp.EMConfig perform&lt;br /&gt;SEVERE: Error starting Database Control&lt;br /&gt;Refer to the log file at /u01/app/oracle/cfgtoollogs/dbca/TEMP/emConfig.log for more details.&lt;br /&gt;Apr 2, 2008 2:12:05 PM oracle.sysman.emcp.EMConfig perform&lt;br /&gt;CONFIG: Stack Trace:&lt;br /&gt;oracle.sysman.emcp.exception.EMConfigException: Error starting Database Control&lt;br /&gt;    at oracle.sysman.emcp.EMDBPostConfig.performConfiguration(EMDBPostConfig.java:869)&lt;br /&gt;    at oracle.sysman.emcp.EMDBPostConfig.invoke(EMDBPostConfig.java:250)&lt;br /&gt;    at oracle.sysman.emcp.EMDBPostConfig.invoke(EMDBPostConfig.java:213)&lt;br /&gt;    at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:235)&lt;br /&gt;    at oracle.sysman.assistants.util.em.EMConfiguration.run(EMConfiguration.java:460)&lt;br /&gt;    at java.lang.Thread.run(Thread.java:595)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now, why would a required file not be found? Keep in mind this is coming straight out of the OUI, so I have this expectation that all required files would be automatically created.&lt;br /&gt;&lt;br /&gt;I manually created the missing directories (recursive copy of existing directories) and the emca -repos create command was able to do a lot more. Now I get this really strange message:&lt;br /&gt;&lt;span style="color: rgb(51, 0, 153);font-family:courier new;font-size:85%;"  &gt;CONFIG: Unable to determine local host vide /u01/app/oracle/product/11.1.0/server1_TEMP/sysman/config/emd.properties : No such file or directory&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;What is a "host vide"? Nothing on metalink or Google for that one.&lt;br /&gt;&lt;br /&gt;UPDATE Fri Apr  4 13:56:56 CDT 2008&lt;br /&gt;Resolved. See comments.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-9053177970356025420?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/9053177970356025420/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=9053177970356025420' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/9053177970356025420'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/9053177970356025420'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2008/04/11g-and-dbcontrol.html' title='11g and DBControl'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-191254162049952118</id><published>2008-02-14T08:08:00.002-06:00</published><updated>2008-02-14T09:07:29.582-06:00</updated><title type='text'>Love/hate, Part I</title><content type='html'>I have this love/hate relationship with Oracle. Although I rarely hear it, I would find it hard to believe that anyone who works with Oracle for very long does not feel the same way in these days. But hey, perhaps I am wrong and the people who gush over Oracle really do just have a passion for the software.&lt;br /&gt;&lt;br /&gt;Allow me to ramble a little. This is a blog after all.&lt;br /&gt;&lt;br /&gt;On the plus side, I have learned a lot, and that Oracle RDBMS-specific education has really boosted my career. While I still have a long way to go, I have come a long way from the Sybase newbie I started out as, not having any clue what SQL meant, let alone what it was or how to use it. I gained a solid appreciation not only for all the hard work that goes into all the cool stuff that Oracle does, but the wealth of support from the User community as well. There are some really slick, intelligent and brilliant professionals out there who are not Oracle employees. And not merely a handful, but a throng.&lt;br /&gt;&lt;br /&gt;Now a negative. The folks who are leading Oracle are way too ambitious in my opinion. They want to control everything. There is way too much emphasis on the bleeding edge, and not enough support for the "tried and true". I am a DBA, and my niche focus hardly ever veers off into other Oracle products like BI, AS, SOA or any other slew of acronyms. If the database server is truly Oracle's flagship product, it is not because of its superior quality, in my opinion, but rather because they charge an arm and a leg for support. I could write a whole book about Oracle Support.&lt;br /&gt;&lt;br /&gt;Another positive thing. Oracle's RDBMS is fodder for some most excellent theoretical and scientific arguments. Watch some interchanges between Oracle gurus on the usenet, oracle-l or the Oracle forums; some of those discussions are worthy of a doctoral thesis. Oracle does some really mind-blowing things, especially in the areas of manipulating data. In general, the software is fast, scalable and rather solid.&lt;br /&gt;&lt;br /&gt;And the pendulum swings. Oracle tries to do too much. Let's look at the RDBMS. 8i came out in 1999, 9i in 2001, 10g in 2003, 10.2.0.1 in 2005, 11g in 2007. Each new release introduced hundreds of new features, and thousands of new bugs. The worst part, every two years a stable-but-older version is falling off the support list. This problem is exacerbated within patch levels, where the rate of turn-over seems to be about 1 patch per year, each with new features and new bugs, killing support for the new two-off patches. Oh how I wish Oracle would commit to sticking with a "stable" version, making it bullet-proof.&lt;br /&gt;&lt;br /&gt;All these new features are a double-edged sword. The media loves "new features", Oracle Support, I am sure, hates them. As a customer, user and DBA, I love the new technologies and the learning opportunities, but I hate how there is often poor documentation, lack of support and a host of accompanying bugs.&lt;br /&gt;&lt;br /&gt;Am I complaining? You bet. Am I a whiner? I could care less. Taking a step back, I have a big beef with software development in general. Example, Microsoft Vista. Like the Grammy's, there should be awards for best-written and most-stable products. Or perhaps that would be too depressing.&lt;br /&gt;&lt;br /&gt;In my opinion, one of the most ironic statements to come out of Ellison's mouth was the whole "War on Complexity". Oracle definitely lost that war. Look at the monstrosity called "Oracle Enterprise Manager". Sure, its free, and that is why other companies are capitalizing and making money by offering a commercial, better product for managing databases. If there really is a war on complexity, then I will walk to the moon. What I see is a war on simplicity. And it is not even fair to call it a war; rather, a wholesale rape.&lt;br /&gt;&lt;br /&gt;I have had the opportunity to interact directly with Oracle employees at various levels. For the most part, I have been blown away by the graciousness, intelligence and customer-focus these men and women have. In talking with them, I have been convinced that that there are a lot of good people working hard to make an excellent product. What I dislike is the general direction of the product, and the decisions being made that influence it thus. And again, for the record, when I say "the product", I only really care about the RDBMS. I do not have anything good to say about other offerings. =)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-191254162049952118?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/191254162049952118/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=191254162049952118' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/191254162049952118'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/191254162049952118'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2008/02/lovehate-part-i.html' title='Love/hate, Part I'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-2627025620630372089</id><published>2008-01-08T08:26:00.000-06:00</published><updated>2008-01-08T12:50:44.115-06:00</updated><title type='text'>My first chain blog [sic]</title><content type='html'>I usually delete emails that have anything to do with "being tagged", forward to x number of buddies and family members, etc. Irregardless of who they are from, I just marked them as spam and forget about them. So I get this email from Dan Norris and my finger is hovering over the kill button when I start to read a little of the preview. Hmm... a blog tag. Still, I am not overly excited, but it is from Dan, so I open it up and read it. Then I read the links (to his &lt;a href="http://www.dannorris.com/2008/01/07/8-things-and-tag-round-2/"&gt;blog&lt;/a&gt; and his buddy &lt;a href="http://oracleappslab.com/2008/01/07/orablog-tag/"&gt;Jake&lt;/a&gt;), then I keep reading more links. Interesting stuff.&lt;br /&gt;&lt;br /&gt;Ok, so just this once I will indulge these silly chain mail things (well don't I sound mature). Actually, I was honored to be included in Dan's 8, and I am having a hard time coming up with 8 folks I would contact. But not being a big fan of such things anyway, I have no problems bending the rules a little.&lt;br /&gt;&lt;br /&gt;And just for the record, I did enjoy this exercise, especially reading about other folks with whom I have communicated, and some I have never met.&lt;br /&gt;&lt;br /&gt;1. I was awarded a "Citizenship Award" from the American Daughters of the Revolution. To this day, I have never taken the time to find out who that group (cult?) is. I was in high-school at the time, and when asked what I wanted to do with my life, I said I wanted to make video games. Yes, I was an outstanding citizen.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_YT5SurzgoNo/R4OMCKhBFZI/AAAAAAAADvI/vrP2NeuB4tM/s1600-h/ffca25a624df4708c44c2110aa94c92f24207380.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://bp2.blogger.com/_YT5SurzgoNo/R4OMCKhBFZI/AAAAAAAADvI/vrP2NeuB4tM/s200/ffca25a624df4708c44c2110aa94c92f24207380.jpg" alt="" id="BLOGGER_PHOTO_ID_5153116367452444050" border="0" /&gt;&lt;/a&gt;3. My beautiful &lt;a href="http://www.xanga.com/lilleygirl/" target="_blank"&gt;wife&lt;/a&gt; originally was attracted to me when I had a monster beard and earlocks to boot. Make no doubt, the hirsute appearance has not the draw; she liked me despite that.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;4. In boyscouts, our troupe was a drum and bugle corp. I played a contra bass which I thoroughly enjoyed even though I was not that great (and that is being generous). I enjoyed traveling around Illinois, even done to Missouri once, not to mention several parades in downtown Chicago.&lt;br /&gt;&lt;br /&gt;2. I put a pitchfork through my foot when I was kid. It hurt. It was right after my dad said "Be careful with that thing, you could hurt yourself." I proved him right.&lt;br /&gt;&lt;br /&gt;10. When I started blogging about Oracle stuff, I had only just heard about the late Lex de Haan. He seemed like a really impressive and well respected man, so I named my &lt;a href="http://sacrophyte.blogspot.com/" target="_blank"&gt;first blog&lt;/a&gt; in his honor. Ironically, blogger updated their software and I have not been able to go back to the old blog.&lt;br /&gt;&lt;br /&gt;7. I am the oldest of 5 children, and I am proud of them all. One brother plays professional volleyball and travels a lot (even outside the states), another brother is helping special needs students at our old high school and working on his Education certification; one is taller than me, the other is bigger, and I am not a small person by any means. One sister was working at McGraw Hill until she switched to a smaller publisher that she enjoys much more, and my other sister, on a lark, picked up Muay Thai with the well-known Team Toro for kicks.&lt;br /&gt;&lt;br /&gt;13. One of these is false.&lt;br /&gt;&lt;br /&gt;6. Going to college at the University of Illinois in Champaign-Urbana (I know, it is called UI&lt;i&gt;&lt;b&gt;UC&lt;/b&gt;&lt;/i&gt;), I had the wonderful experience of trying out the grassroots of the WWW with Mosaic. I maintained a webpage that blatantly said "I am &lt;i&gt;&lt;b&gt;NOT &lt;/b&gt;&lt;/i&gt;the author of Peanuts", but I still received fan mail. I even had a teacher ask me to write a special comic strip for her classroom. I was touched, but on the other hand, I got to thinking that some people just want to believe something no matter what you tell them.&lt;br /&gt;&lt;br /&gt;0. I bailed hay once, and we had roosters for a short time while I was growing up. To put this in perspective, I grew up in the Chicago 'burbs, 10 miles outside of downtown. There are no farms within 10 miles of downtown, at least none that are not called zoos. I bailed hay because my parents at one time thought we were going to move out to a farm (Minnesota), so we tried out farm-life for a week. Crazy idea that. A couple years later, we somehow brought home roosters as pets and kept them in the basement of our neighborhood bungalow. Another crazy idea that. They did not last long; one died and the other was called out because our neighbors did not like how it crowed before the sun came up.&lt;br /&gt;&lt;br /&gt;1.6180339  I jumped out of a perfectly normal, safe, solid, airplane at over 14000 feet. Instead of a parachute strapped to my back, I had a another guy who was risking his life for a measly $200. Also, if you did not get the golden ratio hint, my first dbms was Sybase (in a dusty attic somewhere in my memory).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I am going to tag Job Miller (great excuse to start a blog!) and &lt;a href="http://ravigaur.blogspot.com/"&gt;Ravi Gaur&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-2627025620630372089?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/2627025620630372089/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=2627025620630372089' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/2627025620630372089'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/2627025620630372089'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2008/01/my-first-chain-blog-sic.html' title='My first chain blog [sic]'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp2.blogger.com/_YT5SurzgoNo/R4OMCKhBFZI/AAAAAAAADvI/vrP2NeuB4tM/s72-c/ffca25a624df4708c44c2110aa94c92f24207380.jpg' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-3356499768468914679</id><published>2008-01-02T15:58:00.001-06:00</published><updated>2008-01-04T15:05:06.077-06:00</updated><title type='text'>The DataPump Index work-around</title><content type='html'>As I mentioned in a previous post, I did not like the way Data Pump does indexes. Apparently, many other folks feel the same way.&lt;br /&gt;&lt;br /&gt;UPDATES: We are working on a new version which we hope to have ready in the next couple days. While it does not do anything fancy like Data Pump does, it does successfully parallelize those operations that current (10.2.0.3) limited to one worker process. Additionally, I have communicated with the fine folks working on Data Pump, and am very excited with the work they are doing to improve it.&lt;br /&gt;&lt;br /&gt;Here is the script I am using to run indexes in parallel (the formatting sucks - thanks Blogger!):&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;#!/bin/ksh&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;####################&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;## Charles Schultz 19-Dec-2007&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;## Copied from http://sysadmintalk.com/showthread.php?threadid=762&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;## Assume paresh = Parallel Execution Shell&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;##&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;## Additionally, the original script was written for bourne shell. I have switched it to&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;## use kshell since that is what we use; I have left as much of the original code in tact,&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;## and attempted to comform to the style.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;##&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;## Still could use some cleaning up. The error reporting is not stellar, but I believe it&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;## is passable.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;####################&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;SETX=""&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;# SETX="set -x"                                 # Uncomment this line to set -x&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;$SETX&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;# OLD SYNTAX:    paresh command_file parallel_count&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;# NEW SYNTAX:    paresh command_file parallel_count [$ORACLE_SID]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;## GLOBAL VARIABLES -- Added by Charles Schultz 19-Dec-2007&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;LOCAL_BIN="/u01/app/oracle/local/bin"           # Directory where dbhome and oraenv are located&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;TMP="/var/tmp"                                  # Customizable TEMP directory&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;OUTPUT="paresh_output"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;SLEEP_SEC=.1                                    # Duration of pause between get_shell requests&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;shell_status=0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;egrep="grep -E"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;DRYRUN=${DRYRUN:-"N"}                           # Did not want to mess with command-line parameters,&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;                                                # so I made this either a hard-coded or environment var&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;# DRYRUN="Y"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;#-------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;# message&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;# Establish a timestamp and echo the message to the screen.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;# Tee the output (append) to a unique log file.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;#-------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;#&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;message()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;$SETX&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;timestamp=`date +"%D %T"`&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;echo "$timestamp $*" | tee -a $logfile&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;return&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;#-------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;# run_sql&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;# Added by Charles Schultz 19-Dec-2007&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;# Takes SQL as a parameter and runs it via sqlplus&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;# Connects "/ as sysdba"; avoids having to deal with passwords,&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;# but could be a security risk if not careful about the input file&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;#-------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;#&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;run_sql()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;$SETX&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;shell_status=0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;$SQLPLUS /nolog &lt;&lt;&gt; $SQLLOGTMP 2&gt;&amp;amp;1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;connect / as sysdba&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;set echo on&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;set timing on&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;@$SQLFILE&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;exit&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;EOS&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;errors=`$egrep "ORA-|SP2-" $SQLLOGTMP`&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;if [ "$errors" != "" ]&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;then&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   cat $SQLLOGTMP &gt;&gt; $SLAVE_ERROR_LOG&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   shell_status=1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;fi&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;cat $SQLLOGTMP &gt;&gt; $SQLLOG&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;return&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;#-------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;# get_shell&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;# This function is responsible for establishing the next&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;# command to be processed. Since multiple processes might&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;# be requesting a command at the same time, it has a built-&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;# in locking mechanism.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;#-------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;# MODIFICATIONS  Charles Schultz 19-Dec-2007&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;#&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;# Workfile will have SQL DDL statements, and thus span more than&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;# one line. I have adapted get_shell to read a chunk of lines&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;# up to either the CREATE or DECLARE statement. This is specific&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;# for DDL generated by 10.2.0.3 IMPDP index metadata.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;#&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;# Also, updated the worker thread to go against sqlplus instead&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;# of executing the command "as is".&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;#-------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;#&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;get_shell()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;$SETX&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;echo "`date` $1 Shell Request $$" &gt;&gt; $lklogfile&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;while :                                         # until a command or end&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;do&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;        next_shell=""                           # initialize command&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;        if [ ! -s ${workfile} ]                 # if empty file (end)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;        then                                    #&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;        break                                   # no more commands&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;        fi                                      #&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;        if [ ! -f $lockfile ]                   # is there a lock?&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;        then                                    # not yet...&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;        echo $$ &gt; $lockfile                     # make one&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;        echo "`date` $1 Lock Obtained $$" &gt;&gt; $lklogfile&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;        if [ "$$" = "`cat $lockfile`" ]&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;        then                                    # we created it last&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;           ## START -- Added by Charles 19-Dec-2007&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;           ## Get the next line number of the last statement we are interested in&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;           ##  FOR ALTER DDL (ie, Constraints)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;           # chunk_end=`$egrep -n "ALTER" $workfile|head -2|sed 's/:.*//'`&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;           ##  FOR Data Pump Index DDL&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;           chunk_end=`$egrep -n "CREATE|DECLARE" $workfile|head -2|sed 's/:.*//'`&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;           if [ "$chunk_end" = "" ]&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;           then&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;              break                             # No more chunks found, exit&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;           fi&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;           line_num=${chunk_end##* }            # if two line numbers found, line_num != chunk_end&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;                                                # grab the last number as the line number&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;           if [ $line_num = $chunk_end ]        # if only one line found, run everything else&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;           then&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;              ## Run whatever is left in the workfile&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;              next_shell=`cat $workfile`&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;              echo "" &gt; $workfile&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;           else                                 # else get the next chunk&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;              line_num=$((line_num-1))&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;              next_shell=`head -${line_num} $workfile`          # Get chunk of work&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;              sed -e 1,${line_num}d $workfile &gt; ${workfile}.tmp # Chop off chunk of work&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;              mv ${workfile}.tmp $workfile&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;           fi&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;           ## END -- Added by Charles 19-Dec-2007&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;           rm -f $lockfile                      # turn off lock&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;           echo "`date` $1 Shell Issued " &gt;&gt; $lklogfile&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;           return                               # done, command in&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;        else                                    # variable "next_shell"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;        echo "`date` $1 Lock FAULTED $$" &gt;&gt; $lklogfile&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;        fi                                      # double check faulted&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;# else                                          # locked by other&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;# echo "`date` $1 Lock Wait $$" &gt;&gt; $lklogfile&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;        fi                              &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;        sleep $SLEEP_SEC                        # brief pause&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;done                                            # try again&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;return                                          # only if no commands&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;#-------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;# paresh_slave&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;# This code is executed by each of the slaves. It basically&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;# requests a command, executes it, and returns the status.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;#-------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;# Modified by Charles Schultz 19-Dec-2007&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;# Passes next_shell to run_sql&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;#-------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;#&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;paresh_slave()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;$SETX&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;export SQLFILE="$OUTPUT/paresh_${1}.sql"        # Sql file for this slave&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;SLAVE_ERROR_LOG="$OUTPUT/paresh_${1}_sql.errors"  # Error log file for this slave&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;echo "" &gt; $SLAVE_ERROR_LOG&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;SQLLOG="$OUTPUT/paresh_${1}_sql.log"            # Sql log file for this slave&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;echo "" &gt; $SQLLOG&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;SQLLOGTMP="$OUTPUT/paresh_${1}_sql.log.tmp"     # Temp Sql log file for this slave&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;shell_count=0                                   # Commands done by this slave&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;get_shell $1                                    # get next command to execute&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;while test "$next_shell" != ""&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;do                                              # got a command&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   shell_count=`expr $shell_count + 1`&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   message "Slave $1: Running sql: $next_shell"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   echo "set sqlblanklines on" &gt; $SQLFILE       # This was added to avoid errors with blank lines in source&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   echo "$next_shell" &gt;&gt; $SQLFILE&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   shell_status=0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   if [ "$DRYRUN" = "Y" ]&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   then&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;      message "NOTE: This is a DRYRUN; no actual work will be done"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   else&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;      run_sql                                   # execute command&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   fi&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   # shell_status=$?                            # get exit status&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   if [ "$shell_status" -gt 0 ]&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   then                                         # then message&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;      message "Slave $1: ERROR IN SQLPLUS status=$shell_status"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;      echo "Slave $1: ERROR IN Shell SQLPLUS status=$shell_status" &gt;&gt; $errfile&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   fi                                   &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;# message "Slave $1: Finished Shell"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   get_shell $1                                 # get next command&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;done                                            # all done&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;message "Slave $1: Done (Executed $shell_count Shells)"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;return                                          # slave complete&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;##############################################################&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;# paresh_driver&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;# This code is executed by the top level process only. It&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;# parses the arguments and spawns the appropriate number&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;# of slaves. Note that the slaves run this same shell file,&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;# but the slaves execute different code, based on the&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;# exported variable PARESH.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;#-------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;#&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;paresh_driver()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;$SETX&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;rm -f $lklogfile                                # start a new log file&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;if [ "$1" = "" ]                                # first argument?&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;then                                            # no?&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   master_file="master.list"                    # default value&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;else                                            # yes?&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   if [ ! -f "$1" ]                             # does file exist?&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   then                                                 # no?&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   echo "$0: Unable to find File $1"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   exit 1                                       # quit&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   else                                         # yes?&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   master_file="$1"                             # use specified filename&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   fi&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;fi&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;if [ "$2" = "" ]                                # Second Argument?&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;then                                            # no?&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   parallel_count=4&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;else                                            # Yes?&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   if [ "$2" -lt 1 ]                            # Less than 1?&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   then                                         # Yes?&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   echo "$0: Parallel Process Count Must be &gt; 0"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   exit 1                                       # quit&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   else                                         # no?&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   parallel_count=$2                            # Use Specified Count&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   fi&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;fi&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;## Added by Charles 13-Dec-2007&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;export PATH="$LOCAL_BIN:$PATH"                  # Setup Oracle Environment&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;export ORACLE_SID=${3:-$ORACLE_SID}             # Set ORACLE_SID&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;export ORAENV_ASK=NO;. $LOCAL_BIN/oraenv&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;export SQLPLUS="$ORACLE_HOME/bin/sqlplus"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;if [ ! -e $SQLPLUS ]&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;then&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   echo "Oracle Home $ORACLE_HOME not valid for Oracle SID $ORACLE_SID - exiting"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   exit 1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;fi&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;mkdir -p $OUTPUT&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;## Added by Charles 13-Dec-2007&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;message "------------------------------"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;message "Master Process ID: $PARESH"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;message "Processing File: $master_file"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;message "Parallel Count: $parallel_count"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;message "Log File: $logfile"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;message "Working Output Directory: $OUTPUT"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;message "------------------------------"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;cp $master_file $workfile                       # make a copy of commands file&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;while test $parallel_count -gt 0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;do&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;  if [ ! -s $workfile ]                 &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;  then                  &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;     message "All Work Completed - Stopped Spawning at $parallel_count"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;     break                                         # Quit spawning&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;  fi&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;  $0 $parallel_count &amp;amp;          &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;  message "Spawned Slave $parallel_count [pid $!]"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;  parallel_count=`expr $parallel_count - 1`&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;done                    &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;wait            &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;message "All Done"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;return  &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;#-------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;# main&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;# This is the main section of the program. Because this shell&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;# file calls itself, it uses a variable to establish whether or&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;# not it is in Driver Mode or Slave Mode.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;#-------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;#&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;if [ "$PARESH" != "" ]                          # If variable is set&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;then                                            # then slave mode&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   workfile=$TMP/paresh.work.$PARESH            # Work file with parent pid&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   lockfile=$TMP/paresh.lock.$PARESH            # Lock file with parent pid&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   lklogfile=$TMP/paresh.lklog.$PARESH&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   logfile=$TMP/paresh.log.$PARESH              # Log File with parent pid&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   errfile=$TMP/paresh.err.$PARESH              # Error File with parent pid&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   paresh_slave $*                              # Execute Slave Code&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;else                                    &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   PARESH="$$"; export PARESH                   # Establish Parent pid&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   workfile=$TMP/paresh.work.$PARESH            # Work File with parent pid&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   lockfile=$TMP/paresh.lock.$PARESH            # Lock File with parent pid&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   lklogfile=$TMP/paresh.lklog.$PARESH&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   logfile=$TMP/paresh.log.$PARESH              # Log File with parent pid&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   errfile=$TMP/paresh.err.$PARESH              # Error File with parent pid&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   rm -f $errfile                               # remove error file&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   paresh_driver $*                             # execute Driver Code&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   rm -f $workfile                              # remove work file&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   rm -f $lklogfile                             # remove lock log file&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   if [ -f $errfile ]                           # Is there was an error&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   then&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   message "*************************************************"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   message "FINAL ERROR SUMMARY. Errors logged in $errfile"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   cat $errfile | tee -a $logfile&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   message "*************************************************"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   exit 1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;   fi&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;fi&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;exit&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-3356499768468914679?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/3356499768468914679/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=3356499768468914679' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/3356499768468914679'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/3356499768468914679'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2008/01/datapump-index-work-around.html' title='The DataPump Index work-around'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-4026194913337258383</id><published>2007-12-21T14:36:00.001-06:00</published><updated>2007-12-21T15:57:36.927-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='datapump'/><category scheme='http://www.blogger.com/atom/ns#' term='character conversion'/><title type='text'>Data Pump Rocks!</title><content type='html'>For the past week, we dove into Data Pump with a vengeance. I have never played with it before; I think I may have tried a table export or two, but nothing really serious. So last week I had no clue what a huge improvement over the "traditional" exp/imp Data Pump is. Of course, it goes without saying that there will be bugs and gotchas, but that pretty much comes with the territory. Sad but true.&lt;br /&gt;&lt;br /&gt;The purpose we engaged in this activity in the first place is that our ERP ostentatiously decided that they want to support international characters, which means that all of us state-side have to upgrade regardless of any character needs. They didn't ask me! *grin* But the silver lining is that we have learned so much about Data Pump.&lt;br /&gt;&lt;br /&gt;Just for the sake of numbers, we were able to pump the data from a 478gb database to a set of dumpfiles totaling 175gb in about 3 hours, and then turn around and pump that back into an empty database in about 4 hours or so. Yes, there are some hidden truths in there. For instance, we completely ignored indexes; they will explode your timeframe significantly.&lt;br /&gt;&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold"&gt;EXPDP&lt;/span&gt;&lt;br /&gt;We hit some issues early on with the export. At first, we thought we were hitting the LOB issue. After filing an SR, we learned of Metalink note 286496.1 which covers tracing and an "undocumented" METRICS parameter. METRICS seems like a vastly handy little piece of information, so I am quite flabbergasted that it is "undocumented". According to the note, we set TRACE=480300, which has some trace information for the Master and Worker processes. In addition, I set event 10046 to get the waits. That was eye opening. The database was spending an enormous amount of time waiting on "library cache pin" while creating Global Temporary Tables. Very odd. After playing ping-pong with the Support Analyst and thinking about it for a while, I realized that all of the objects experiencing a wait had FGAC enabled for VPD. Ok, one strike against me for not choosing a VPD-free login (ie, one that has been granted EXEMPT ACCESS POLICY), but one strike for Data Pump for doing something rather poorly. I am hoping to hear more about this particular behavior and how it will be resolved.&lt;br /&gt;&lt;br /&gt;We also set our TEMP space to extend without limit and set the pools (shared pool and buffer cache) a bit higher than normal.&lt;br /&gt;&lt;br /&gt;The parameter file we used:&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,153);font-family:courier new;" &gt;directory=DPUMP&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,153);font-family:courier new;" &gt;dumpfile=${ORACLE_SID}_full%U.dmp&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,153);font-family:courier new;" &gt;logfile=${ORACLE_SID}_full_debug.log&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,153);font-family:courier new;" &gt;full=y&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,153);font-family:courier new;" &gt;parallel=16&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,153);font-family:courier new;" &gt;metrics=y&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,153);font-family:courier new;" &gt;userid="xxx/yyy"&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,153);font-family:courier new;" &gt;TRACE=480300&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold"&gt;IMPDP&lt;/span&gt;&lt;br /&gt;The very first thing I tried was NETWORK_LINK; for "traditional" exp/imp, we use a pipe as an intermediate file instead of exp to a dump file and imp from the dump file. Since Data Pump writes asynchronously, this is not possible, but the alternative is to communicate via a Database Link. Unfortunately, LONG objects are not yet supported via this method, excluding this option as a viable method.&lt;br /&gt;&lt;br /&gt;The next problem we encountered was that the metadata contained a tablespace specification for a non-existent tablespace on two of our partitioned tables. This turned out to be extremely counterintuitive. If you precreate the table (on the proper, existing tablespaces), IMPDP will fail trying to create the table (on the wrong, non-existing tablespace). Even if you specify TABLE_EXISTS_ACTION=TRUNCATE!! Our Support Analyst is telling me that this is the expected behavior. Was not my expectation at all. To fix it, we create the tablespace and viola, we have a working import process.&lt;br /&gt;&lt;br /&gt;Lastly, we struggled for a long time with the arduous process of creating indexes. Data Pump&lt;br /&gt;says it is creating indexes in parallel. In reality, it using the parallel degree clause of the CREATE INDEX statement, utilizing the RDBMS parallel server processes. This seems rather antithetical to the rest of Data Pump, especially if you consider that no matter how much parallelize, you bottleneck with the query coordinator. I much prefer that Data Pump use a Parallel Degree of 1 for the index creations, but launch multiple creations at the same time. In fact, I downloaded a script called &lt;a href="http://sysadmintalk.com/showthread.php?threadid=762"&gt;paresh&lt;/a&gt;. I had to modify it a bit to use the DDL generated by IMPDP Metadata for indexes, but it seems to work quite well. I need to modify it more for error checking, but at least it creates indexes truly in parallel.&lt;br /&gt;&lt;br /&gt;So, with that out of the way, we are now working on a "clean" import given these exceptions. For the init.ora, we use:&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,153);font-family:courier new;" &gt;nls_length_semantics = CHAR&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,153);font-family:courier new;" &gt;## Import Debugging&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,153);font-family:courier new;" &gt;max_dump_file_size = unlimited&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,153);font-family:courier new;" &gt;# event="10046 trace name context forever, level 12"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,153);font-family:courier new;" &gt;## Import Speed-up parameters&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,153);font-family:courier new;" &gt;shared_pool_size = 1000M&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,153);font-family:courier new;" &gt;sga_max_size = 2000M&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,153);font-family:courier new;" &gt;parallel_max_servers = 24&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,153);font-family:courier new;" &gt;_disable_logging = TRUE&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,153);font-family:courier new;" &gt;DB_BLOCK_CHECKSUM=FALSE ## DEFAULT = TRUE&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,153);font-family:courier new;" &gt;## DISK_ASYNCH_IO=TRUE ## DEFAULT&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,153);font-family:courier new;" &gt;## DB_BLOCK_CHECKING=FALSE ## DEFAULT&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;A note of WARNING about _disable_logging. It is an underscore parameter, so all the usual warnings accompany that. I found out the hard way what happens if you shutdown abort while attempting to rollback sql statements:&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,153);font-family:courier new;" &gt;SMON: following errors trapped and ignored:&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,153);font-family:courier new;" &gt;ORA-01595: error freeing extent (3) of rollback segment (1))&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,153);font-family:courier new;" &gt;ORA-00607: Internal error occurred while making a change to a data block&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,153);font-family:courier new;" &gt;ORA-00600: internal error code, arguments: [4193], [114], [232], [], [], [], [], []&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;More information can be found in Metalink Note 39282.1.&lt;br /&gt;&lt;br /&gt;Our IMPDP parameter file is similar to EXPDP, but excluding some objects:&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,153);font-family:courier new;" &gt;directory=DPUMP&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,153);font-family:courier new;" &gt;dumpfile=${ORACLE_SID}_full%U.dmp&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,153);font-family:courier new;" &gt;logfile=${ORACLE_SID}_full_no_indexes.log&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,153);font-family:courier new;" &gt;full=y&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,153);font-family:courier new;" &gt;parallel=16&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,153);font-family:courier new;" &gt;metrics=y&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,153);font-family:courier new;" &gt;userid="xxx/yyy"&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,153);font-family:courier new;" &gt;TRACE=480300&lt;/span&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,153);font-family:courier new;" &gt;EXCLUDE=index,constraint&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;We are still playing with the fastest way to migrate constraints. One thought is to do two passes:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;import metadata&lt;/li&gt;&lt;li&gt;disable constraints&lt;/li&gt;&lt;li&gt;import data&lt;/li&gt;&lt;li&gt;enable constraints in parallel&lt;/li&gt;&lt;li&gt;build indexes in parallel&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Another thought is to disable the constraints on the source, but that may not be practical for our situation. We will see.&lt;br /&gt;&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold"&gt;In the End&lt;/span&gt;&lt;br /&gt;I am optimistic that our latest changes are going to produce some fast numbers. Of course, there are other areas that could be tweaked (place dumpfiles on independent mount points, for example), but we went with the low-hanging fruit, and I think we scored. Another outcome is that we have made contact with the Data Pump Product Manager and her supervisor, which is priceless! They are excellent people and very patient and willing to listen. Amazing folks over there!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-4026194913337258383?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/4026194913337258383/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=4026194913337258383' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/4026194913337258383'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/4026194913337258383'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2007/12/data-pump-rocks.html' title='Data Pump Rocks!'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-920838093874159197</id><published>2007-12-07T10:43:00.000-06:00</published><updated>2007-12-07T10:49:00.409-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='good for a laugh'/><title type='text'>All I want for Christmas</title><content type='html'>We have a particularly naughty database this week. However, it still has high hopes for the "giving season":&lt;br /&gt;&lt;br /&gt;&lt;div dir="ltr" align="left"&gt;&lt;span class="850423216-07122007"&gt;&lt;span style=";font-family:Lucida Console;font-size:78%;"  &gt;SQL &gt; select dbms_random.string('U', 4) from dual;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div dir="ltr" align="left"&gt;&lt;span class="850423216-07122007"&gt;&lt;span style=";font-family:Lucida Console;font-size:78%;"  &gt;DBMS_RANDOM.STRING('U',4)&lt;br /&gt;------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;RIBS&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;That was for real. We had quite a laugh about that little coincidence this morning.&lt;br /&gt;&lt;span class="850423216-07122007"&gt;&lt;span style=";font-family:Lucida Console;font-size:78%;"  &gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-920838093874159197?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/920838093874159197/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=920838093874159197' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/920838093874159197'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/920838093874159197'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2007/12/all-i-want-for-christmas.html' title='All I want for Christmas'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-4738234540277507172</id><published>2007-11-26T15:27:00.001-06:00</published><updated>2007-11-26T15:45:31.293-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rac'/><category scheme='http://www.blogger.com/atom/ns#' term='srvctl'/><category scheme='http://www.blogger.com/atom/ns#' term='crs'/><category scheme='http://www.blogger.com/atom/ns#' term='asm'/><title type='text'>Managing CRS, part 1</title><content type='html'>This CRS beasty is a bit much to chew on. Maybe it is just me.&lt;br /&gt;&lt;br /&gt;Anyway, I started asking around how to check our mount and start options for databases registered with CRS. Strangely, nobody had an answer for me. Probably lack of me asking the right question, rather than lack of knowledge. But, I did find an easy answer:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;srvctl config database -d DB_NAME -a&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This helped me understand why our standby RAC databases were opening in read-only mode as opposed to mounting into a recovery mode. I had been following the &lt;a href="http://www.oracle.com/technology/deploy/availability/pdf/MAA_WP_10g_RACPrimaryRACPhysicalStandby.pdf"&gt;MAA&lt;/a&gt; documentation for setting up a standby, which ostensibly does not cover the mount and start options (nor role) for standby databases. Very curious. I modified our standby databases with this kind of command:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;srvctl modify database -d DB_NAME -r PHYSICAL_STANDBY -s mount -y AUTOMATIC -p +DATA/db_name/spfiledb_name.ora&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;While these options are well documented, you have to find it first. For those of us who are new to the scene, we do not always have the faintest idea of where to look. Is it a CRS command, or an OCR command? While you can usually depend on folks in the RAC SIG and oracle-l to help out, sometimes they are just too busy (hmm... it is Thanksgiving....). Or, in a twist of Jonathan Lewis' quotes, "Sometimes, you just get unlucky."&lt;br /&gt;&lt;br /&gt;So now that I figured out that one small piece to the puzzle, I have stumbled upon other questions. How do you get a report for all the start/mount options for all databases? I do not really want to run srvctl config for each database. What about other services, like the listener? I tried playing around with &lt;a href="http://download.oracle.com/docs/cd/B19306_01/rac.102/b14197/srvctladmin.htm#CDCFGDBI"&gt;srvctl config listener&lt;/a&gt;, but I am not getting anything useful out of it. Especially since there is no -a flag. I am currently trying &lt;a href="http://download.oracle.com/docs/cd/B19306_01/rac.102/b14197/srvctladmin.htm#i1008814"&gt;srvctl config service&lt;/a&gt;, but all my half-baked guesses are not getting me anywhere. I tried variations on the listner name and what I thought the service was, and I also tried the name reported by crs_stat.&lt;br /&gt;&lt;br /&gt;The lack of comprehensive tools (like a good '&lt;a href="http://orajourn.blogspot.com/2007/09/rac-how-not-to-design-application.html"&gt;du&lt;/a&gt;') still bug me with the ASM as well.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-4738234540277507172?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/4738234540277507172/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=4738234540277507172' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/4738234540277507172'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/4738234540277507172'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2007/11/managing-crs-part-1.html' title='Managing CRS, part 1'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-4525824132108125340</id><published>2007-11-16T14:42:00.000-06:00</published><updated>2007-11-16T15:11:56.623-06:00</updated><title type='text'>Reverse mapping ASM disks</title><content type='html'>As we have been working with our sysadmin and storage folks, I often have to do some digging to find out which ASM diskgroups belong to which volume, and what devices those volumes are on. Fortunately, we only have 4 at the moment, so it is a quick dig. However, I am always disappointed that Oracle did not provide an easy way to do this. Or if they did, they did not make obvious mentions in any of their documentation.&lt;br /&gt;&lt;br /&gt;Google showed me a great, concise script that &lt;a href="http://blogs.oracle.com/AlejandroVargas/"&gt;Alejandro Vargas&lt;/a&gt; wrote. I enhanced it a little to go against the ASM instance to grab diskgroup information as well.&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;--- start ---&lt;br /&gt;export ORACLE_SID=+ASM&lt;br /&gt;export ORAENV_ASK=NO&lt;br /&gt;. oraenv&lt;br /&gt;&lt;br /&gt;$ORACLE_HOME/bin/sqlplus -S "/ as sysdba" &amp;lt;&amp;lt; EOS 2&amp;gt;&amp;amp;1 |grep [A-Z] &gt; asmdisks.txt&lt;br /&gt;set head off feed off&lt;br /&gt;select a.group_number||' '||b.disk_number||' '||a.name||' '||b.label&lt;br /&gt;from v\$asm_diskgroup a, v\$asm_disk b&lt;br /&gt;where a.group_number = b.group_number&lt;br /&gt;/&lt;br /&gt;exit&lt;br /&gt;EOS&lt;br /&gt;&lt;br /&gt;printf "%-9s %-30s %-3s %-10s %-3s\n"  "ASM Disk" "Device Path [MAJ,MIN]" "GRP" "Disk Group" "DSK"&lt;br /&gt;/etc/init.d/oracleasm querydisk `/etc/init.d/oracleasm listdisks` | cut -f2,10,11 -d" " | perl -pe 's/"(.*)".*\[(.*),  *(.*)\]/$1 $2 $3/g;' | while read v_asmdisk v_minor v_major&lt;br /&gt;do&lt;br /&gt;v_device=`ls -la /dev | grep " $v_minor,  *$v_major " | awk '{print $10}'`&lt;br /&gt;grp=`grep $v_asmdisk asmdisks.txt|cut -f1 -d" "`&lt;br /&gt;dsk=`grep $v_asmdisk asmdisks.txt|cut -f2 -d" "`&lt;br /&gt;diskgroup=`grep $v_asmdisk asmdisks.txt|cut -f3 -d" "`&lt;br /&gt;&lt;br /&gt;printf "%-9s /dev/%-25s %-3s %-10s %-3s\n" $v_asmdisk "$v_device [$v_minor, $v_major]" $grp $diskgroup $dsk&lt;br /&gt;done&lt;br /&gt;&lt;br /&gt;\rm asmdisks.txt&lt;br /&gt;---- end ----&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-4525824132108125340?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://blogs.oracle.com/AlejandroVargas/newsItems/viewFullItem$285' title='Reverse mapping ASM disks'/><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/4525824132108125340/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=4525824132108125340' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/4525824132108125340'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/4525824132108125340'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2007/11/reverse-mapping-asm-disks.html' title='Reverse mapping ASM disks'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-3747475335358681098</id><published>2007-11-12T14:43:00.000-06:00</published><updated>2007-11-14T13:19:41.521-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jonathan lewis'/><category scheme='http://www.blogger.com/atom/ns#' term='cbo'/><title type='text'>Day 3: Understanding and Assisting the CBO</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Session 1: Basic Cost Arithmetic&lt;/span&gt;&lt;br /&gt;Anyone that has read any of Jonathan's previous works will recognize the information surrounding the costing formulas; he also gives generous credit to Wolfgang Breitling and Alberto Dell'era. What is really great is that all three of these guys are very generous in sharing of their knowledge and experience, wishing to enhance the community by helping others. Just amazing!&lt;br /&gt;&lt;br /&gt;One of the first things Jonathan went over was the environment; there are a lot of factors that play a part in calculating costs of various different pieces of Oracle. The system stats are very important in that they determine cpu speed and io latency, which in turn determine how fast basic Oracle operations occur. Another important number is multiblock read count. I found it very interesting that the hidden underscore parameter _db_file_exec_read_count defaults to db_cache_size/processes (if db_file_multiblock_read_count is not set). Processes; so let's say you set the number of processes really high "just because". You can see that your exec read count will be quite small, and for no good reason.&lt;br /&gt;&lt;br /&gt;Jonathan also talked about the importance of sizing the memory parameters appropriately. I think the general impression is that you do not want to gimp your system by being too frugal with memory. Obviously, this will affect large operations (sorts, hashes, etc) more than anything else, but those large operations can get real nasty real fast (think multipass for hashes). Two underscore parameters that Jonathan highlighted were _pga_max_size and _smm_max_size (unfortunately, there were not many details on what these two did, or I missed them).&lt;br /&gt;&lt;br /&gt;He made a very interesting statement in that truncating a table does not reset the stats. That sounded very strange to me. Is that true in 10g?? If Oracle goes to the trouble to reset the highwater mark, why would the stats not be updated? They merely have to be zeroed out.&lt;br /&gt;&lt;br /&gt;We spent a good chunk of time on clustering. Not just in this session, but in others as well. There is quite a serious flaw in how clustering is calculated for data that is scattered. Consider the case where row(n) is in block(mod(n,2)), or in other words, all the odd rows are in block 1, even rows in block 0. To determine clustering, Oracle will walk the data and count each time the block id changes. Since the id changes for each row, Oracle will calculate the clustering factor really really small, when in fact, the clustering is actually pretty good (total of two blocks, half your data is in one block or the other). A low cluster factor translate into a high IO cost. An articially high IO cost may lead to a sub-optimal plan (where a good plan that has a false high IO cost is ignored in favor of a lower-cost other plan).&lt;br /&gt;&lt;br /&gt;This also prompted me to learn more about clustering factor.&lt;br /&gt;&lt;br /&gt;Related to that, I was convicted several times of a need to identify what our "significant" or "important" data is. That is probably the number one question I returned to again and again. What is the Banner "business important" data? There are several dictionary views and object statistics (including predicate statistics) that I want to investigate further, but I actually do have an overly optimistic hope that our vendor has some idea.&lt;br /&gt;&lt;br /&gt;There are a couple other flaws in IO costing that Jonathan pointed out.&lt;br /&gt;Flaw #1: Oracle assumes that index block reads are from disk, not cache. Always.&lt;br /&gt;Flaw #2: Oracle assumes index single-block read is the same cost as table multi-block read. Always.&lt;br /&gt;&lt;br /&gt;TO address Flaw #1, we have optimizer_index_cache, which tells us, on average, how many of our index blocks are in cache (expressed as a percentage). Jonathan stressed that this is only relevant for index root and branch blocks, as leaf blocks are not cached. I have a hard time believing leaf blocks are not cached, and that is something else I would want to look into at some point. Perhaps I merely misunderstood him.&lt;br /&gt;&lt;br /&gt;For Flaw #2, we have optimizer_index_cost_adj which tells us what percentage of a multiblock read is an index read (probably somewhere in the vicinity of 33%).&lt;br /&gt;&lt;br /&gt;However, for both issues, Jonathan suggests that neither be set if (a BIG IF) system stats have been collected and are correct.&lt;br /&gt;&lt;br /&gt;Jonathan pointed out a curious rounding error introduced with optimizer_index_cost_adj; the calculated cost will be rounded &lt;b&gt;&lt;i&gt;down&lt;/i&gt;&lt;/b&gt;, which can potentially lead to the wrong index being chosen. Event 10183 can be used to turn off cost rounding.&lt;br /&gt;&lt;br /&gt;On the topic of multiblock reads, Jonathan showed us a chart demonstrating how Oracle scales the parameter away from excessively high numbers. For a value of 4, the adjusted value may be 4.175. But for higher values, say 32, the adjusted value might be 16.407. 128, 40.85. Due to system stats, Jonathan is recommending that most people might want to turn off db_file_multiblock_read_count.&lt;br /&gt;&lt;br /&gt;In light of the importance of system stats, it would be good for us to review sys.aux_stats$, and or dbms_stats.get_system_stats().&lt;br /&gt;&lt;br /&gt;Since clustering_factor has no meaning with bitmap indexes (think about it), it is overloaded to count the number of entries in the bitmap; "some key values will have multiple rows".&lt;br /&gt;&lt;br /&gt;Even though there was only one slide and a short blurb about this, I was struck by the last point of the session. Using first_rows_n optimizer modes is really going to play havoc with explain plans. Costs and execution paths are essentially squeezed to fit into the first row target, much like doing a "where rownum &lt;= n". This fact alone makes it very difficult to interpret exactly what the explain plan is attempting to convey.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Session 2: Join Mechanisms&lt;/span&gt;&lt;br /&gt;Understanding Joins is important because Oracle attempts to convert everything into a two table join, including subqueries. This is not necessarily bad, it is just the way Oracle does it.&lt;br /&gt;&lt;br /&gt;Jonathan's slides included a few examples of correlated and non-correlated subqueries. Jonathan's observation is that most "bad" join decisions are made because of cardinality being off, be it off by one or off by millions. Being off by one can go a long way. Which, in my mind, makes Wolfgang's Cardinality Feedback all the more important. Also, "off by one" can be really critical when you consider that perhaps the stats are just a tad old and new rows have come into the table, or have been deleted. That could be the difference between a "good" join and a "bad" join. Scary, eh?&lt;br /&gt;&lt;br /&gt;There are a number of slides that talk about Nested Loop joins, but I am going to skip over to Merge joins. Actually, skipping all the way to One Pass sorts. There is an Urban Legend that all in-memory sorts are faster than disk sorts. Jonathan prooved this is not always the case. Up until 10.2.0.2, Oracle used binary insertion trees to maintain a map for merges; the bigger the memory, the larger this tree could potentially become (smaller memory would force a flush to disk). Because of such large sizes of binary trees, the CPU requirements shot up exponentially to maintain the index. Hence, with those versions, more memory actually made those merge operations far worse.&lt;br /&gt;&lt;br /&gt;Jonathan had a caution about 9i 10053 trace events; the "Max Area Size" listing is completely wrong and useless, for it ignores the Workarea_size_policy parameter.&lt;br /&gt;&lt;br /&gt;And more caveats. When Oracle executes asynchronous writes, the wait time is not recorded (because it is asynchronous). You have to keep an eye on direct_path_temp to see if the numbers are stacking up.&lt;br /&gt;&lt;br /&gt;He introduced two trace events, 10032 and 10033. The former dumps statistics about sorts, the second traces IO for sorts to disk. Since file sizes are small for event 10033, it is not impractical to set it at the system level when diagnosing a sort issue.&lt;br /&gt;&lt;br /&gt;Multipass sorts are extremely bad. Avoid them!! Setting sort_area_size large enough to avoid multipass sorts is highly recommended. He quotes Steve Adam's as saying you should be able to get by with a sort_area_size of 45mb to sort 12gb.&lt;br /&gt;&lt;br /&gt;Hash joins are a bit interesting. Among other things, Jonathan talked about how the workarea_size_policy comes into play. If set to manual, each hash queue will get hash_area_size/2 memory. What happens if you have more than 2 queues? That's right, you have queues whose sum of memory exceeds hash_area_size. The worst part is that each queue gets this memory regardless if it is needed or not. Say you want to hash 2k of data. You still get hash_area_size/2 for each queue. Wastage!&lt;br /&gt;&lt;br /&gt;Setting workarea_size_policy to automatic allows the queues to only grab what they need.&lt;br /&gt;&lt;br /&gt;Jonathan also spend some time on Trace Event 10104, "One of the most useful traces in the Oracle suite".  It gives a comprehensive break down of hashes, and can be used with Trace 10046 for even greater detail. For multipasses, look for terms like how much memory is available (Memory for slots, in bytes) vs Estimated Build size. Also "Total number of partitions" vs "Number of partitions that fit in memory". That might be your first clue. There is also a stat for number of rows iterated; the fewer iterations the better.&lt;br /&gt;&lt;br /&gt;In the end, Hashes may scale more linearly, if AND ONLY IF you do not hit an exception, and there are a number of those. Nested Loops grow faster, but tend to be smoother especially if the index/data is buffered.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Session 3: Selectivity and Hints&lt;/span&gt;&lt;br /&gt;The rules governing selectivity start off relatively basic (although still a little bit of math involved), but quickly get complicated in my opinion. The boundary conditions really throw you. For join selectivity, one thing to be aware of is that Oracle assumes predicate independence. Jonathan has bantered this in his blog (where I first read about it). For example, consider two columns, 'month' and 'number_of_days' which tells the number of days in the month. If you use "where month between 10 and 12 and number_of_days = 30", Oracle assumes that any of those months can have 30 days. We know that is not true.&lt;br /&gt;&lt;br /&gt;Jonathan had a great example calculating cardinality in a sample query; I'll not repeat it here for the time being.&lt;br /&gt;&lt;br /&gt;One gotcha to remember (among many) is that when the optimizer generates numbers for you, it is not necessarily against the sql query you provided. In fact, you might as well assume it is NOT the same query; the numbers are for the interally optimized plan, of which only snippets are available to you via the 10053 trace.&lt;br /&gt;&lt;br /&gt;We also covered transitive closure. Jonathan has a bit to say in his book and blog, and the bottmline is that sometimes Oracle will remove a predicate that it thinks is redundant (ie, a = b, b = c, therefore a = c). Lucky you. This can often lead to Cartesian joins, or alternative access paths being used (remember, generally speaking, access paths should have higher priority than filter predicates).&lt;br /&gt;&lt;br /&gt;There are also a number of sanity checks to be aware of. One that Jonathan demonstrated is a case where Oracle will not choose ndv values from opposite tables when doing a multi-column join. I am still reading those slides, as it is taking me a little while to comprehend the ramifications. However, one of the issues seems to be that merely making a cosmetic change to your code opens it up to the possibility of hitting one of these sanity checks, and has the potential to throw the optimizer a huge wrench. Just remember that there are no certainties.&lt;br /&gt;&lt;br /&gt;Jonathan also had some very strong words about hints. In fact, he even goes so far to say that "A 'hint' is a directive that the optimizer MUST accept and act upon." Now, as Jonathan pointed out, sometimes in an act of obedience, Oracle will ignore the hint. *grin* Yes, sounds contradictory. If you give a full(t) and index(t) hint, by "obedience" Oracle will consider the plans that both hints dictate (yes, BOTH hints), and will give you the cheapest plan. That is the key point. Oracle uses a Cost-Based Optimizer, and will always generate numbers to determine the cheapest plan. If you use hints, you want to use enough hints to trim out all other plans that the optimizer might possibly choose. The 10053 trace is handy in figuring that out.&lt;br /&gt;&lt;br /&gt;He gave two examples to showcase this. One with a noparallel hint on the table; Oracle found a cheap plan using parallel on the index (think of a naughty two-year old). In another case, say you specify parallel on a table, but the plan is serial. That is because the serial plan is cheaper.&lt;br /&gt;&lt;br /&gt;In another example, Jonathan shows the use_nl hint, and specifies two tables &lt;span style="color: rgb(51, 51, 153); font-family: courier new;"&gt;/*+ use_nl(t1 t2) */&lt;/span&gt;. This does *NOT* mean nest loop t1 and t2 with t1 as the first table. No no no. It means&lt;span style="color: rgb(51, 51, 153); font-family: courier new;"&gt; /*+ use_nl(t1) use_nl(t2) */&lt;/span&gt;. Yes indeed. So it tells Oracle to use a nested loop on t1 and a nested loop on t2, but it does not specify an order. In the example it seems to work because Oracle only came up with two plans, and the one we expected just happened to be the cheaper one. "Sometimes you get lucky". Sometimes, even though you did something wrong, you got the results you were expecting to see. Be careful about that.&lt;br /&gt;&lt;br /&gt;As always, be wary of "exceptions". There is a hint (and underscore parameter) that specifically says "ignore hints." Go scratch your head over that one.&lt;br /&gt;&lt;br /&gt;The ORDERED hint is funny in that Oracle seems to apply it in the end game of optimization. Jonathan specifically gave us a Hash example in which the Ordered hint was obeyed, but the plan was in the oppositive order. Apparently. Watch out for subqueries because remember that Oracle likes to unnest them, and might screw up your seemingly simple order. In 10g, we can use the LEADING hint instead. Still have to watch out for query block names that are dynamically generated due to optimizations; it is possible to specify non-pre-existing query blocks if you know how Oracle is going to name them. If you do not, your order may be a little different.&lt;br /&gt;&lt;br /&gt;10g also makes it easier to logical name the hint operands. You can say "&lt;span style="color: rgb(51, 51, 153); font-family: courier new;"&gt;index(t1(id1))&lt;/span&gt;" or "&lt;span style="font-family: courier new; color: rgb(51, 51, 153);"&gt;index(@sub2 t4@sub2(t4.id)&lt;/span&gt;" Obviously, those are not physical names, but labels. Jonathan has observed that it is easier to provide a negative hint than a positive one.&lt;br /&gt;&lt;br /&gt;Bottom line, in order to use hints well:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Set the join order&lt;/li&gt;&lt;li&gt;Join method for n-1 tables&lt;/li&gt;&lt;li&gt;Access path for every table&lt;/li&gt;&lt;li&gt;Average two hints per table to do it well&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Session 4: Telling the Truth&lt;/span&gt;&lt;br /&gt;Last day, last session. =) Need I say more?&lt;br /&gt;&lt;br /&gt;Some interesting things about this session. Jonathan gets into some strange anomalies and how they are avoided if you give more, seemingly irrelevant, information. For instance, defining columns (esp. mandatory columns) as "not null" helps the optimizer tremendously when using not null predicates.&lt;br /&gt;&lt;br /&gt;The stats play a big role in "telling the truth". Old stats are just as bad as bad stats. However, Oracle does provide a way to synthesize stats if needed; I found this whole concept quite intriguing when reading his book and papers earlier. And it comes back to what is your "interesting" data? What data does the application/business like? Oracle has several rules for dealing with "normal" data, but it is entirely possible that you are interested in anything but. Which makes it important to identify the "important" data, and take advantage of the tools that Oracle has given us to help convery that to the optimizer. Stats, and possibly histograms.&lt;br /&gt;&lt;br /&gt;Jonathan went back to the example for clustering factor. It is entirely possible to have data that Oracle thinks is scattered, when in fact it is merely grouped weird. That is a case of "lying" to the optimizer.&lt;br /&gt;&lt;br /&gt;For the most part, the default stats work. Oracle CBO assumes a normal, boring distribution of data, so if that is the case, you are all set to go. When the data is grouped into "weird, wacky and stretchy bits", the stats and histograms may have holes. Sometimes is still does a fairly good job to compensate, and sometimes you just get unlucky. =)&lt;br /&gt;&lt;br /&gt;He had an interesting blurb for histograms in OLTP. He is suggested that instead of letting the normal stats collect histograms, the front-end should be aware of "important" data, and code for it appropriately. Can you imagine Banner doing that? Neither can I.&lt;br /&gt;&lt;br /&gt;I will have to wrap it up with that. I will try to over these notes from the Days with Jonathan Lewis, but I need a break.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-3747475335358681098?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/3747475335358681098/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=3747475335358681098' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/3747475335358681098'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/3747475335358681098'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2007/11/day-3-understanding-and-assisting-cbo.html' title='Day 3: Understanding and Assisting the CBO'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-7196871481533005444</id><published>2007-11-08T20:17:00.000-06:00</published><updated>2007-11-08T20:26:40.699-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jonathan lewis'/><category scheme='http://www.blogger.com/atom/ns#' term='cbo'/><title type='text'>Day 2 with Jonathan Lewis: Writing Optimal SQL</title><content type='html'>"Writing optimal SQL" seemed a bit ambitious for this day's class. I get the feeling that Jonathan has a wealth of knowledge and it is hard for him to condense it into a mere 6-hour time slice (4 x 1.5 hour sessions). Here are my highlights and thoughts from the material covered today.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Session 1: Background&lt;/span&gt;&lt;br /&gt;Jonathan started out by reiterating (for emphasis) the obvious difference between "local" optimization (or 'optimisation' as he writes) and "global" optimization; sure, we can make an individual query go faster, but at what cost? Which brings us to the point that one always has to make a choice on where one spends one's resources.&lt;br /&gt;&lt;br /&gt;Today's session concentrated on global optimization strategies (any of which could be used locally if you think about it), which comes down to always keeping your eye open for wasted resources, whether it be expensive CPU operations, unnecessary buffer gets or multiple visits to disk. As with all things in life, there are exceptions, today labeled as Contradictions. For instance, sometimes to increase logical I/O, one must increase physical I/O, and vice-versa. Jonathan gave the example of a typical index read. Say it takes 1 header block, 1 branch block and 4 leaf block reads to get all data. It is possible that the same data could be gotten with a FTS of 3 block read requests. Which one is better? What's in cache?&lt;br /&gt;&lt;br /&gt;For the most part, the most efficient (and hence "best") way to get data is to got it precisely. This goes back to the little note yesterday about using access predicates in favor of filter predicates; if you can get only the data you want on the first pass, there is not need to filter data later on (and thus discard data gotten). And even though indexes usually help us target precise blocks (via rowids), they are balanced out by the fact that they generate overhead for DML.&lt;br /&gt;&lt;br /&gt;Jonathan had a very interesting section on column ordering in indexes. There is a widely-held thought that you put the most selective columns at the front of the index. Overall, the focus needs to be on how dense the data retrieved from the index is, which may require that you put the most repeated column first in the index. Jonathan states that, "all other things being equal", you generally want to put equality predicates at the front of the index, range predicates at the rear. Be as precise as possible. That word is going to come up again and again.&lt;br /&gt;&lt;br /&gt;Which got me to thinking. How does one determine what "business critical" data is? What is the "interesting" data? This question is made more convoluted in a large ERP system. Surely, it is not practical to go table by table to figure out what data is most often used, most often needed. And I have this sinking feeling that the vendor is not too up-to-par on an answer for this particular question either.&lt;br /&gt;&lt;br /&gt;There was mention of index-(hash-)join and and-equal joins; I am not very familiar with the latter and am making a note to learn more about it.&lt;br /&gt;&lt;br /&gt;We got to talking about bitmap indexes. Bitmap indexes are great for static or "mostly read-only" tables; bad for OLTP systems. To bridge this gap, Oracle has made Bitmap Conversions more easily accessible for B-tree indexes.&lt;br /&gt;&lt;br /&gt;Again, Jonathan made mention of using &lt;span style="font-family: courier new;"&gt;dbms_xplan.display_cursor(null,null,'ALLSTATS LAST')&lt;/span&gt;. I want to do more research on that; for it seems like an awfully wonderful tool to use. Must enable row source statistics (again, there is a very handy query-level hint, /*+ gather_plan_statistics */).&lt;br /&gt;&lt;br /&gt;Jonathan also showed us some very interesting queries for metadata analysis.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 51, 153);"&gt;select blocks, count(*)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 51, 153);"&gt;from (&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 51, 153);"&gt; select /*+ index(t1 t1_pk) */&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 51, 153);"&gt;   my_id,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 51, 153);"&gt;   count(distinct substr(rowid,1,15)) blocks&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 51, 153);"&gt; from t1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 51, 153);"&gt; group by my_id&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 51, 153);"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 51, 153);"&gt;group by blocks&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 51, 153);"&gt;order by blocks&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 51, 153);"&gt;/&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This query counts the number of blocks for each value (knocks off the row number from rowid to get file id + block id).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;select /*+ index(t,"T1_I1") */&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt; count(*) nrw,   -- number of rows&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt; count(distinct sys_op_lbid(49721, 'L', t.rowid)) nlb,  -- number of leaf blocks&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt; count(distinct hextoraw(sys_op_descend("DATE_ORD") || sys_op_descend("SEQ_ORD"))) ndk, -- number of distinct keys&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt; sys_op_countchg(substrb(t.rowid,1,15),1) clf  -- clustering factor&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;from "TEST_USER"."T1" t&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;where "DATE_ORD" is not null&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;or "SEQ_ORD" is not null&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;/&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Talk about a little bit of black magic! I get the impression Jonathan ripped this out of a 10046 trace for calculating index stats, based on some of his non-standard uses. The last argument of sys_op_countchg should be the number of freelists; 2 through 16 if using ASSM.&lt;br /&gt;&lt;br /&gt;There was a great word about documentation, especially since we have embarked upon a broad documentation project at work. Among other anecdotes, there was a good observation that "The harder it was to fix, the more documentation you need".&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Session 2: Basic Coding&lt;/span&gt;&lt;br /&gt;I did not like this section that much. Perhaps it was just me. But it seemed like a lot of the "standards" are quite subjective; is Jonathan teaching us his own peculiar style of coding?? =)&lt;br /&gt;&lt;br /&gt;I did come away from this session with a few things, however. Due to Oracle's mostly-successful (dare I say, Mostly Harmless?) CBO, one can usually write a pretty intuitive sql and have it optimized properly. Sometimes, when we try to get clever and optimizer it ourselves, we botch it, or duplicate the work that the CBO would have done anyway, at the cost of making the code even more obscure and hard to read. As Occam's Razor infers, Keep it simple.&lt;br /&gt;&lt;br /&gt;As popular as analytics are becoming, they are most definitely not the end-all be-all. They are meant for number crunching on small data sets.&lt;br /&gt;&lt;br /&gt;Jonathan pointed out a rather bizarre observation of subqueries; Oracle assumes subqueries will reduce the rows to 5% (not &lt;span style="font-weight: bold;"&gt;BY&lt;/span&gt; 5%, but &lt;span style="font-weight: bold; font-style: italic;"&gt;TO&lt;/span&gt; 5%). "This is insanely stupid. Sometimes." Yes, Jonathan qualifies everything he says. Usually.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Session 3: Sundry Methods&lt;/span&gt;&lt;br /&gt;To kick things off, we dove into examine the costs of Nested Loop (NL) joins vs Hash Joins. Essentially:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Cost of NL = C1 + N * C2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Cost of HJ = C1 + C2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;For a nested loop, C1 is the cost getting rows from table 1, C2 is the cost of getting rows from table 2, per row from table 1. Hence, if we can keep either N (the number of rows gotten from table 1) or C2 down, the total NL cost is relatively low. We can keep C2 low by using indexes and/or getting at the data precisely.&lt;br /&gt;&lt;br /&gt;For a hash join, we are doing full table scans. We hash the join columns (and store the hash results in memory), the use the second table to probe the first, hashing the join columns on the second table to see if they match the hashed versions of the first. Note that the growth of cost is linear, whereas for nested loops is not (multiply by N).&lt;br /&gt;&lt;br /&gt;Another problem with nested loops is that Oracle assumes that the tables are statistically independent. Jonathan (and others including Alberto Dell'era) have made a number of observations about this online.&lt;br /&gt;&lt;br /&gt;One thing to keep in mind about hash joins is that it greedily gobbles memory. Do not try to make a large table the first table of a hash join.&lt;br /&gt;&lt;br /&gt;Another important part about writing sql is that it helps to have a clear description of what exactly the query is to do, and to have a picture or diagram to further enhance the description. Sometimes a query is not optimal merely because of the way the "english" description implied how the query get data. There is more than one way to skin a cat.&lt;br /&gt;&lt;br /&gt;Jonathan used an example of a "typical" FIFO index supporting a workflow process, in which a status is pushed through several states. The index will eventually have a long tail of mostly empty blocks, as all the activity is on recent timestamps. To address this issue, it helps to 1) only index relevant data instead of empty of null data using a function-based index, 2) have multiple smaller indexes. The benefit of #2 is that it is much easier to coalesce it, thereby keeping it well maintained. While talking about FBI, Jonathan quipped:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Encapsulation is wonderful. Hiding things is naughty.&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Repeating a horrid modern-day developer practice of pushing procedural logic into sql, Jonathan touched on filter subqueries (where you have one subquery that handles one case and another subquery for another case). Jonathan made mention of the lnnvl function, which stands for "logical not null value"; a good way to test the value of a potentially null value.&lt;br /&gt;&lt;br /&gt;He also talked about several "what if..." scenarios. In these, he states things like "if it is cheaper to get into table 2 through table 1...". I am not quite sure what he means by this. Something I need to follow up with him about.&lt;br /&gt;&lt;br /&gt;We also covered the "untunables", or particular queries that did not lend themselves to being optimized by Oracle very well. Jonathan went to details to say that Oracle prefers and forces queries into a "left-deep" tree. Some queries actually perform much better when the access paths and join order is not "left-deep", but instead "bushy tree", or more balanced. This was showcased by a query with a 5-table join, with entries at either end. A "bushy tree" works towards the table in the middle, thus reducing the rows needed to propagate predicates and join conditions.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Session 4: More Methods&lt;/span&gt;&lt;br /&gt;Jonathan showed us a fairly simple example of query rewrite using dbms_advanced_rewrite.declare_rewrite_equilvalence. This really does raise some questions; like, how different can source_stmt be from destination_stmt? Does it strictly follow the same rules as cursor sharing? Or can you completely rewrite the query as long as the columns are of the same datatype?&lt;br /&gt;&lt;br /&gt;We also looked at subquery caching. I had a great talk with Ric Van Dyke (awesome dude!) afterwards about this. I was curious if there was any way to see or monitor subquery caching in affect, other than attempting to guess at its potential use via results in an explain plan. He did not know of a way, but guessed that it might possibly be exposed somehow in one of the x$ tables. I find subquery caching to be quite interesting, if for nothing else that it can really play havoc with your explain plan and make them unexplainable unless you really know what is going on. Surely, there is a way to tell when your plan used subquery caching, and to what degree.&lt;br /&gt;&lt;br /&gt;Jonathan showed us "update join views", which I thought were quite clever. I have used dynamic materialized views (using the "with" clause, or "out of line views") to generate a view from a table join for an update, but having an update join view seems much more elegant. It does have some strict requirements; the driving table must be key-preserved, meaning that the column we want to update is deterministically joined.&lt;br /&gt;&lt;br /&gt;We looked at pagination, aka judicious use of rownum, to efficiently get top-n rows. Another related trick (for more complex situations) is to manipulate index rowids directly. This happens when the logic requires that you get and sort all data prior to using rownum. One can do all sorts of sorting and aggregation, returning index-only columns and the rowid, then take the rownum from that and access the table using the relevant rowids. Quite clever that.&lt;br /&gt;&lt;br /&gt;We took a brief glance at OEM, and moved quickly to profiles and outlines. Cool stuff. When talking about profiles, Jonathan made it a point to implore that we ask our Sales/Tech Reps when (NOT if) opt_estimate would be documented and supported. Profiles are essentially a series of opt_estimate hints that alter existing statitstics. How cool is that?!? =)&lt;br /&gt;&lt;br /&gt;Jonathan ended on a note about hints. In general, hints are bad. Don't use them. But sometimes you have to, and when you do, make sure you do not hold back. A lone hint on a 7-table join is next to useless; it is better to provide at least 6 hints to determine the join order, plus anything else to determine the query plan you want. Or to put it a different way, and average of 2 hints per table, 1 to determine join method, one to determine access path. Jonathan had some interesting things to say about hints, his seemingly prolific use of them notwithstanding:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;They are badly documented&lt;/li&gt;&lt;li&gt;Nobody knows what they do&lt;/li&gt;&lt;li&gt;They change usage occasionally&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Jonathan really likes to say that "sometimes you stop getting lucky". Meaning that sometimes you use something (a hint) incorrectly but, lucky you, it happens to work the way you think it should. When it "stops working", it is actually working correctly and you just stopped getting lucky about it.&lt;br /&gt;&lt;br /&gt;That is about it for today. My ass is really hurting after sitting in those chairs.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-7196871481533005444?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/7196871481533005444/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=7196871481533005444' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/7196871481533005444'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/7196871481533005444'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2007/11/day-2-with-jonathan-lewis-writing.html' title='Day 2 with Jonathan Lewis: Writing Optimal SQL'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-6494508802038804940</id><published>2007-11-07T22:21:00.000-06:00</published><updated>2007-11-20T09:02:11.054-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jonathan lewis'/><category scheme='http://www.blogger.com/atom/ns#' term='sql plan'/><category scheme='http://www.blogger.com/atom/ns#' term='cbo'/><title type='text'>Day 1 with Jonathan Lewis: Execution Plans</title><content type='html'>Here is my rough draft from notes I took during the first of Jonathan Lewis's 3 1-day CBO classes. These are merely highlites, for I could not possibly be comprehensive.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Session 1: Finding execution plans&lt;/span&gt;&lt;br /&gt;If a database has been upgraded from 9i, the plan table may be of an old version. Additionally, it will not be global temporary table. You can run &lt;span style="font-family:courier new;"&gt;@?/rdbms/admin/catplan.sql&lt;/span&gt; to set it up properly. This also creates a public synonym and grants acces to public.&lt;br /&gt;&lt;br /&gt;When tracing, helfpful to use query block names (qb_name) in sql to identify later on in trace file.&lt;br /&gt;&lt;br /&gt;The 10132 trace is new, and provides a great alternative to running the 10053 trace (much more condense and practical). Great for baselining all query plans when set at a system level.&lt;br /&gt;&lt;br /&gt;tkprof is a little tricky - traceonly does NOT mean that the query is not run; it only eliminates the resulting output of a query. Hence, inserts, updates and deletes still execute, but a straight select will not do much (no output).&lt;br /&gt;&lt;br /&gt;Can format autotrace formatting with _plus_exp columns.&lt;br /&gt;&lt;br /&gt;The pipelined dbms_xplan.display function is very nice. There are several other functions in that package I was not aware of, like display_cursor, display_awr and display_sqlset. display_cursor is great for getting the plan of a cursor currently in memory.&lt;br /&gt;&lt;br /&gt;Since the function is pipelined, it can be used in a table join operation. Jonathan showed a greate example finding the query plan for all cursors that contained a FULL TABLE SCAN.&lt;br /&gt;&lt;br /&gt;Jonathan's tests with reporting sql also showed easy ways to implement query-level optimizer paramters via hints (ie, /*+ opt_param('parallel_execution_enabled','false') */).&lt;br /&gt;&lt;br /&gt;Rowsource execution statistics can be generated by setting statistics_level = all, or more surgically with _rowsource_execution_statistics = true. Can also be set with a hint (/*+ gather_plan_statistics */).&lt;br /&gt;&lt;br /&gt;What I really like about rowsource execution stats is that you can easily generate Estimated and Actual stats, and can use something like Wolfgang's Cardinality Feedback to get a fairly good idea where performance problems may be popping up. The "ALLSTATS LAST" parameter of dbms_xplan.display_cursor displays this quite nicely. I need to do some more research on this function so we can use it more readily. Great tool for developers and DBAs alike.&lt;br /&gt;&lt;br /&gt;Finding cursors in v$sql is made efficient with hash value and sql address. Unfortunately, 10g statspack has an "old" hash value that is inefficient. Do not use it.&lt;br /&gt;&lt;br /&gt;When looking at parsed cursors, especially via sprepsql, the version count can be quite useful. Since the stats are aggregated, you have to be careful about summarizing and translating what the stats actually are trying to say about the query.&lt;br /&gt;&lt;br /&gt;Any "explain" may be untrue.&lt;br /&gt;&lt;br /&gt;Like House says, "Everyone lies."&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Section 2: Interpreting Execution Plans&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The good news about reading explain plans is that it is (should be and can be) much easier than it might first look. For the most part, it comes down to the good old standby, "Divide and Conquer". To that extent, Jonathan has two basic rules when breaking down plans, which essentially follow the concept of finding all your child cursors until you run out of descendants (think left tree-walk). The bad news is that there are, as always, exceptions. But the rules cover a vast majority of plans. And they are simple.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;There are no complicated execution plans, only long execution plans.&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;First off, it really helps to look at the query plan with some aids. The PID (Parent ID) column is essential. Having the children indented incrementally also helps.&lt;br /&gt;&lt;br /&gt;RULE 1 - Single-Child Parent&lt;br /&gt;The child follows the parent and feeds the parent.&lt;br /&gt;&lt;br /&gt;RULE 2 - Multi-Child Parent&lt;br /&gt;The parent is an operation that determines how the children's results are combined.&lt;br /&gt;&lt;br /&gt;All explain plans are a combination of Rule 1 and Rule 2. So what you do is break it down using those rules. That is what this section does; I'll leave it to you to go through Jonathan's slides yourself. =)&lt;br /&gt;&lt;br /&gt;Rule 1 is relatively free of tricks. Rule 2, however, is a lot more convoluted when you start looking at the various different operations, and the various ways those operations are implemented. So while it may be "easy" to group them together, interpreting them takes a little time to understand the myriad subrules. However, the context usually helps that a bit. For instance, if you see a BITMAP AND operation, you are likely to see BITMAP CONVERSION operations; knowing what an operation is expecting (ie, ROWIDs, bitmap numbers, etc) helps you figure out what the child operation is passing up. I did not take many notes on this section because the slides are quite informative and easy to grasp once you see them.&lt;br /&gt;&lt;br /&gt;When talking about filter predicates, I learned that access predicates are much more preferred if they can replace filter predicates. The reason being that filter predicates usually happen after you get the data, while access predicates determine how you get the data. This can be showcased by an inappropriate range scan; if you have an index with 3 columns and the query only specifies column 1 and column 3, the optimizer has to do a range scan for column 2. If the query can be adjusted to included column 2, the optimizer no longer has to do a range scan, and can move the filter predicate to an access predicate. Basically, without column 2, the range of "interested rows" in the index is bounded by the smallest value of (column 1, column 3) and the largest value; a range which may (quite possibly) include values that you are not really interested in (and have to be FILTERED out). If you define all columns, you only grab the rows you want in the first place.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;select * from t1 where id = nvl(:b1, id&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;"Horrendously bad practice."&lt;br /&gt;"The ideal is to go back and smack someone."&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;The execution plan has to include a path for both :b1 is null and :b1 is not null. Instead, the application should have two different queries for these conditions. Additionally, the above code does not catch rows when id is null.&lt;br /&gt;&lt;br /&gt;Jonathan stressed the idea of watching your query plans to see if the optimizer uses any unusual enhancements, so that one may learn from them. For instance, Oracle has a MIN/MAX optimization for indexes. This is especially useful for correlated subqueries that can be optimized by (redundantly) copying a predicate from the parent query that just happens to contain extra columns of an existing index. Sometimes work will be completely removed, like in the case with ORDER BY elimination.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Section 3: Problems with Plans&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So now that Jonathan has razzle-dazzled us with all this awesome stuff, here comes some bad news.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Explain plan may be telling lies&lt;/li&gt;&lt;li&gt;Trace files don't always have stat lines&lt;/li&gt;&lt;li&gt;tkprof might not dump the stat lines even if they are in the trace file&lt;/li&gt;&lt;li&gt;tkprof may dump the "wrong" stat lines&lt;/li&gt;&lt;li&gt;v$sql_plan might be out of date&lt;/li&gt;&lt;li&gt;v$sql_plan can have holes&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Explain plans are not aware of the datatypes for bind variables. Hence, if you are trying to get an acurate explain plan, it is a good idea to explicitly declare the datatypes of bind variables with a cast or to_ function.&lt;br /&gt;&lt;br /&gt;Jonathan made some interesting comments about "good" applications. In particular, he stated that they do not close their cursors. We have been telling our developers to close cursors. Why is that? I think the statement needs to be taken in the context, or at least the assumption, that the cursors will be held open for the intent of reusing them, opposed to forgetting to close them when not needed. When cursors are not closed, their stat lines are not dumped to a trace file. Hence, if you want plans and statistics for a unclosed cursor, have to get them out of v$ views.&lt;br /&gt;&lt;br /&gt;In cases where a cursor has multiple versions and/or executions, tkprof will only report on the first one in the trace file, even though it summarizes the stats for all of them. It is entirely possible that one bad execution caused a majority of the "bad" stats, and that the explain plan in tkprof is for a completely different execution.&lt;br /&gt;&lt;br /&gt;While showing us some sql to demonstrate subquery factoring, he showed us his materialize hint (/*+ materialize */). There is also a inline hint that does the opposite.&lt;br /&gt;&lt;br /&gt;Scalar subqueries are slightly problematic in that they are not costed properly, due to the fact that Oracle does not know how many times it will run.&lt;br /&gt;&lt;br /&gt;Jonathan talked about "hash table cache" and "scalar subquery cache", both of which I am quite unfamiliar with, and want to research them a little more. Oracle will automatically cache hashed results of a scalar subquery so that it does not have to execute the subquery over and over. However, if two values of the subquery happen to hash to the same address, the first one in wins, and the second value has to be calculated again and again and again...&lt;br /&gt;&lt;br /&gt;Additionally, Oracle has introduced "order by" elimination with 10g. Unfortunately, sometimes "order by" is quite useful when dealing with scalar subqueries and thus one may need to use the no_eliminate_oby hint.&lt;br /&gt;&lt;br /&gt;There is another hint that can be used to swap the join inputs of a hash join (/*+ use_hash(t3) swap_join_inputs(t3) */). 10g also allows use of the no_swap_join_hint to further fine-tune exactly which table you want to be thrown into memory as the "first" table.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Section 4: Advanced Features&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The MIN/MAX optimization that we talked about earlier has another nice little feature. It is not a filter predicate, but rather an access predicate, meaning it gets exactly the one little piece of data that it wants and nothing else.&lt;br /&gt;&lt;br /&gt;Have to watch query plans. If you expect an optimal subquery but see a filter operation for it, you may want to re-evaluate it.&lt;br /&gt;&lt;br /&gt;Remote operations are quite an interesting phenonemon when it comes to query plans. Although remote statistics are fetched, they are not fully used when generating a query plan. For instance, a 3-table join may be ordered such that a remote table is joined to a local table, which is then joined to a remote table. How much sense does that make? In most cases, the query will perform better if remote operations are done in as large a chunk as possible (and reasonable), instead of making many small trips back and forth.&lt;br /&gt;&lt;br /&gt;Parallel operations are quite unique. Contrary to popular belief, they are not always a good thing.&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;Parallel query is designed to be brutal and inefficient.&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;I believe Jonathan said this because the idea of parallel query is to use up more resources (ie, more CPU) than a serial query would. In fact, it attempts to max out the CPU in an attempt to get the query done as fast as possible. I think he even said that parallel query should never be used in an OLTP database, but I did not write that down, so I could be wrong about that.&lt;br /&gt;&lt;br /&gt;Anyway, parallel query has to be carefully tuned, for it is far too easy to thrash your system. Looking at an explain plan and trace files, we have to be careful about what we find. The infamous "idle" waits associated with parallel operations may indicate problems, or the may not, it depends on where they are happening. If an explain plan shows many P-&gt;P (parallel to parallel) operations, that could easily be a source of contention. Much better to have PCWP (forgot to write the definition) operations. In the case of a HASH join, you do not want to broadcase a large table to all the parallel query slaves; instaed, broadcast the small one (for memory) and read from the disk directly for the larger table (and joined locally). For nested loops, it is better to join and aggregate smaller chunks at a time, thus reducing "an entire layer of slaves".&lt;br /&gt;&lt;br /&gt;Near the end, I had trouble keeping up with my notes (both because my butt was sore from the hard chair, getting tired, and being overwhelmed with so much information). We moved on to partitioned queries, and talked about the benefits of being careful when designed partitions and how to take advantage of parallel query. To fully realize the potential of partition-wise joins, it is best to partition early in the plan so that correllated, similar work can be parallelized.&lt;br /&gt;&lt;br /&gt;On a slightly off-topic of partition statistics, Jonathan mentioned:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;You ought to be faking your statistics. Sometimes.&lt;/blockquote&gt;&lt;br /&gt;Especially true since subpartition statistics are not dealt with properly at all.&lt;br /&gt;&lt;br /&gt;And finally, if you see a "PX SEND BROADCAST" in your query plan, that automatically means you are not doing any partition-wise joins. They are mutually exclusive.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;One last quote from Jonathan Lewis:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt; You &lt;span style="font-style: italic; font-weight: bold;"&gt;stop&lt;/span&gt; getting lucky&lt;/blockquote&gt; In reference to performance problems that happen all the sudden even though "nothing changes"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-6494508802038804940?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/6494508802038804940/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=6494508802038804940' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/6494508802038804940'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/6494508802038804940'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2007/11/day-1-with-jonathan-lewis-execution.html' title='Day 1 with Jonathan Lewis: Execution Plans'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-1070974526878476513</id><published>2007-10-26T13:28:00.000-05:00</published><updated>2007-10-26T13:29:51.292-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='capcha'/><category scheme='http://www.blogger.com/atom/ns#' term='spam'/><title type='text'>I hate comment spam</title><content type='html'>I finally made it to the state where I qualify for comment spam. GRRRR. Where is the "do not call" list?&lt;br /&gt;&lt;br /&gt;My apologies for having to turn on capcha.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-1070974526878476513?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/1070974526878476513/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=1070974526878476513' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/1070974526878476513'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/1070974526878476513'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2007/10/i-hate-comment-spam.html' title='I hate comment spam'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-8916383111053269774</id><published>2007-10-26T12:50:00.000-05:00</published><updated>2007-10-26T13:33:20.804-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rman'/><category scheme='http://www.blogger.com/atom/ns#' term='asm'/><category scheme='http://www.blogger.com/atom/ns#' term='raw disk'/><title type='text'>Redo log gaps with RAW disk: There has got to be an easier way...</title><content type='html'>Of course, I admit right off the bat that we are still new with RAC, ASM and Raw disks. I have been asking around trying to find out what the "common practice" is when resolving the redo log gaps between a primary and standby database, specifically when using RAW disk. I think RAC just makes this scenario a little more complicated by the fact that you have two redo streams you have to keep an eye on.&lt;br /&gt;&lt;br /&gt;So, here is the beef of my complaint. Let's say your archive log destinations are explicitly set for the standby SERVICE, letting the other destination "default" to the &lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;db_create_file_dest&lt;/span&gt;, which just happens to be the +DATA diskgroup under ASM (a RAW disk). As an aside, I am curious why it does not default to the &lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;db_recovery_file_dest&lt;/span&gt;, but that is a post for another day. Let's say your standby is down for whatever reason, and eventually you want to bring it back up. Oh yeah, there is no Data Guard, so forget about "automatic" gap resolution. How are you going to copy the archive logs from the primary to the standby?&lt;br /&gt;&lt;br /&gt;There are no copy commands in ASM. At least, not for copying from a diskgroup to a device managed by a different file system, say, a cooked filesystem. One could use dd. But I would have to do a lot of reading to figure out what the offsets are, not to mention that the archive logs will most likely not be nicely laid out in contiguous blocks that you can gobble up with one dd command. The only option is to use RMAN. RMAN stands for Recovery Manager. You are going to use the Recovery Manager to copy files. Oh joy.&lt;br /&gt;&lt;br /&gt;I am still searching for the best way to do this, but this is what I have now. Mostly for my own reference. =)&lt;br /&gt;&lt;br /&gt;First, find the last log sequence number that was applied to the standby. Add 1. Call this minseq. If you have multiple instances, call this minseqN, where N = the instance number.&lt;br /&gt;&lt;br /&gt;On the primary site:&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;rman target /&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;RMAN&gt; backup archivelog from logseq :minseq;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Again, if using multiple instances:&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;rman target /&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt; RMAN&gt; backup archivelog from logseq :minseq1 thread 1;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;...&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt; RMAN&gt; backup archivelog from logseq :minseqN thread N;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;[ for now on, I will assume one instance because it is easier to type ]&lt;br /&gt;&lt;br /&gt;Next, restore the archive logs to a cooked filesystem. In this case, I am going to use a standard ufs3 mount called /u02/backup.&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;RMAN&gt; run {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;2&gt; set archivelog destination to '/u02/backup/';&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;3&gt; restore archivelog from logseq :minseq;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;4&gt; }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Your archive logs are now "normal" files that can be accessed with normal OS commands. Copy them over to the standby site (we use scp). Wherever they end up on the standby site, I find it helpful to make a listing (including full path), one file per line. You will see why in a moment.&lt;br /&gt;&lt;br /&gt;On the standby site, recover the standby database:&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;SQL &gt; recover automatic standby database;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;When you are prompted for a archive log, select the appropriate member from the list you made; you can copy the whole line and paste it into the prompt. Repeat until you cannot find any more entries on your list.&lt;br /&gt;&lt;br /&gt;And Viola! You have resolved the archive log gap. Finally.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Some notes&lt;/span&gt;&lt;br /&gt;If you know of a better way to do this, please let me know. =) I would love to do the whole thing from RMAN, but I have not figured out how to recover from specific archive logs; I keep getting the unhelpful "&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;RMAN-06054: media recovery requesting unknown log:&lt;/span&gt;", even if I specify a archivelog destination. Obviously, I need to learn more about this aspect of RMAN.&lt;br /&gt;&lt;br /&gt;I left out a small fact; we are not using a recovery catalog for this operation. Why not? In retrospect, it probably would have made things easier. But we are migrating away from a recovery catalog, so that is what we started with. If it turns out that using a recovery catalog is going to help us significantly, I would make a case to implement it. I believe it would have resolved the RMAN-06054 above, but I am not yet positive about that.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-8916383111053269774?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/8916383111053269774/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=8916383111053269774' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/8916383111053269774'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/8916383111053269774'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2007/10/redo-log-gaps-with-raw-disk-there-has.html' title='Redo log gaps with RAW disk: There has got to be an easier way...'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-1334781244563114630</id><published>2007-09-25T15:15:00.001-05:00</published><updated>2007-09-25T21:27:39.555-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rac'/><category scheme='http://www.blogger.com/atom/ns#' term='redo log'/><category scheme='http://www.blogger.com/atom/ns#' term='bad application design'/><category scheme='http://www.blogger.com/atom/ns#' term='asm'/><title type='text'>RAC: "How not to design an application"</title><content type='html'>We have a new Luminis database that was being tested for an upgrade (4.01 or something like that). We found that we were constantly maxing out db_recovery_file_dest_size (database hangs, look in alert.log). The following is what I sent to my team members.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;In RAC class, Andy warned us about the redo logs and how they can be a source of contention for some very basic things. Let us use LUMDEV as an object lesson.&lt;br /&gt;&lt;br /&gt;Luminis has this little heartbeat function (I do not know the official name or the official purpose, but this is my observation) that updates 1 row of 1 table; a table with only 1 row. It does this continually. Better yet, this is execute not from one session, but from 7 sessions! So you have 7 sessions banging against this 1 row of this 1 table all the time. Obviously, the data in that row is not meant to stick around a long time.&lt;br /&gt;&lt;br /&gt;Usually, in a normal database this is not such a big deal. Might cause some waits because of an exclusive transaction, but nothing that causes the rest of the database to wait or contend. In RAC, the world changes drastically.&lt;br /&gt;&lt;br /&gt;Andy taught us that each instance masters its own list of global cache locks. These locks exist for every single block in a database (you can imagine what a nightmare it is for large databases). The list of master block locks are split up evenly between all participating nodes (and must be remastered when a node is added or deleted). These locks are often upgraded and downgraded (exclusive and shared), and often sent across the private interconnect (fancy word for NIC) to other instances. When an exclusive lock is requested on a different node than what is already holding the exclusive lock, the lock must first be downgraded, then re-upgraded for the requesting instance. Every time a lock is downgraded like this, the redo log buffer must be flushed.&lt;br /&gt;&lt;br /&gt;See where this is going? You have 1 table with 1 row, meaning one block. Because the application is repeatedly requesting an exclusive lock from both instances, the global cache lock is constantly downgraded and upgraded. This produces many many many many many many archived logs for all those log buffer flushes. LUMDEV can easily consume over 18gb of redo space on this one operation alone.&lt;br /&gt;&lt;br /&gt;Crazy, eh?&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;On a similar thread, I am not all that crazy about the dual management of both the ASM FRA diskgroup &lt;span style="font-weight: bold; font-style: italic;"&gt;and&lt;/span&gt; db_recovery_file_dest_size. Here is what I posted to the ASM Oracle Forums:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;For those of us who run multiple databases on a box with shared disk for FRA, I am finding the extra layer of ASM and &lt;i&gt;db_recovery_file_dest_size&lt;/i&gt; to be a minor inconvenience. The Best Practice white papers I have found so far say that you should use &lt;i&gt;db_recovery_file_dest_size&lt;/i&gt;, but they do not specify how you should set it. Currently, we have been setting &lt;i&gt;db_recovery_file_dest_size&lt;/i&gt; rather small, as the databases so far are small and even at 3x the database size, the parameter is still significantly smaller than the total disk available in that diskgroup.&lt;br /&gt;&lt;br /&gt;So, my question; is there any downside to setting &lt;span style="font-style: italic;"&gt;db_recovery_file_dest_size&lt;/span&gt; equal to the total size of the FRA diskgroup for all databases? Obviously, this means that the amount of free space in the diskgroup may be consumed even if &lt;i&gt;db_recovery_file_dest_size&lt;/i&gt; is not yet full (as reflected in the instance &lt;i&gt;V$RECOVERY_FILE_DEST&lt;/i&gt;). But is that really a big deal at all? Can we not simply monitor the FRA diskgroup, which we have to do anyway? This eliminates the need to worry about an additional level of disk management. I like to keep things simple.&lt;br /&gt;&lt;br /&gt;The question is relevant to folks using other forms of volume management (yes, I know, ASM is "not a volume manager"), but seems germane to the ASM forum because most articles and DBAs that I have talked to are using ASM for FRA.&lt;br /&gt;&lt;br /&gt;Most importantly, what ramifications does "over-sizing" &lt;span style="font-style: italic;"&gt;db_recovery_file_dest_size&lt;/span&gt; have? Aside from the scenario above.&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;I am really toying with the idea of making the recovery destination super-large and relying on the management of the FRA. To check space issues in the FRA, I can use asmcmd (the "du" output sucks, IMO) or query against the instance itself:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;+ASM1_SQL &gt; select FREE_MB, trunc((TOTAL_MB-FREE_MB)/TOTAL_MB,2) "% Space Used" FROM V$ASM_DISKGROUP&lt;br /&gt;2  where NAME = 'FRA';&lt;br /&gt;&lt;br /&gt;FREE_MB % Space Used&lt;br /&gt;---------- ------------&lt;br /&gt;  43426          .37&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;I am still looking for a way to generate a "du"-like report for all databases in the FRA.&lt;br /&gt;&lt;br /&gt;In the database, I can check the amount of space in the recovery area:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;SQL&gt; select (SPACE_LIMIT-SPACE_USED)/1024/1024 "Space Left (MB)", trunc(SPACE_USED/SPACE_LIMIT,2) "% Space Used" from V$RECOVERY_FILE_DEST;&lt;br /&gt;&lt;br /&gt;Space Left (MB) % Space Used&lt;br /&gt;--------------- ------------&lt;br /&gt;        18624          .04&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;I would hate to have to login to each database to find out how much recovery space is left before the database hangs.&lt;br /&gt;&lt;br /&gt;UPDATE:&lt;br /&gt;Arul made a most informative and excellent response:&lt;br /&gt;http://forums.oracle.com/forums/thread.jspa?forumID=385&amp;amp;threadID=566242#2101818&lt;br /&gt;&lt;br /&gt;Basically, set your db_recovery_file_dest_size appropriately, and you will not have to worry about the ASM diskgroup at all; let Oracle maximize/optimize the space when the parameter set to size that tailored to the needs of the database.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-1334781244563114630?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/1334781244563114630/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=1334781244563114630' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/1334781244563114630'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/1334781244563114630'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2007/09/rac-how-not-to-design-application.html' title='RAC: &quot;How not to design an application&quot;'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-1144278847099172623</id><published>2007-08-22T11:15:00.000-05:00</published><updated>2007-08-22T11:18:22.074-05:00</updated><title type='text'>New blog buddies</title><content type='html'>For some reason, blogger is not letting me add new elements to the blogroll. And I do not have time to ferret out the issue.&lt;br /&gt;&lt;br /&gt;Anyway:&lt;br /&gt;&lt;a href="http://www.dannorris.com/"&gt;Dan Norris&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.ardentperf.com/category/technical"&gt;Jeremy Schneider&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blogs.oracle.com/kmcgowan/"&gt;Kirk McGowan&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Seems like there was one other....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-1144278847099172623?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/1144278847099172623/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=1144278847099172623' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/1144278847099172623'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/1144278847099172623'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2007/08/new-blog-buddies.html' title='New blog buddies'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-5465425208587404909</id><published>2007-07-24T08:38:00.000-05:00</published><updated>2007-11-14T13:20:40.722-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rac'/><category scheme='http://www.blogger.com/atom/ns#' term='asm'/><title type='text'>RAC is not easy</title><content type='html'>I have a good friend to whom I like to complain a lot (sounds like my good friend is getting the short end of the stick, doesn't it?). With good intentions, he sincerely suggested that RAC is easy. I put in a fence, working 43 hours over a 4-day weekend. Shall I call that easy? It only lasted 4 days. He is still a good friend, he just thinks everything is easy. *grin*&lt;br /&gt;&lt;br /&gt;K Gopalakrishnan once &lt;a href="http://www.freelists.org/archives/oracle-l/04-2007/msg00169.html"&gt;said&lt;/a&gt;:&lt;br /&gt;&lt;blockquote&gt;Believe me RAC install is very simple and straight forward if you religiuoly complete the pre requisites.&lt;/blockquote&gt;&lt;br /&gt;Ok, enough of the griping. My hopes in posting up some of our specific dilemmas is to document what we are doing, since so often I try to google for specific errors and never find anything useful (I am not counting the Chinese sites, because even after Google translates them, I am not sure I see any resolutions apart from the questions).&lt;br /&gt;&lt;br /&gt;So, first problem. I am following Metalink note &lt;span style="font-family:helvetica;"&gt;&lt;strong&gt;357261.1&lt;/strong&gt;&lt;/span&gt;, very religiously. That was a mistake, as it is not complete, yet. Anyway. You attempt to remove asm:&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;font-size:85%;"  &gt;&lt;urbdb1&gt; srvctl remove asm -n urbdb1,urbdb2&lt;/urbdb1&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You check to make sure it was removed:&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;font-size:85%;"  &gt;&lt;urbdb1&gt; srvctl config asm -n urbdb1&lt;/urbdb1&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;font-size:85%;"  &gt;+ASM1 /u01/app/oracle/product/asm&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It is not, so try again:&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;font-size:85%;"  &gt;&lt;urbdb1&gt; srvctl remove asm -n urbdb1&lt;/urbdb1&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;font-size:85%;"  &gt;PRKS-1033 : Failed to remove configuration for ASM instance "+ASM1" on node "urbdb1" from cluster registry, [PRKS-1023 : Failed to remove CRS resource for ASM instance "+ASM1" on node "urbdb1", [CRS-0214: Could not unregister resource 'ora.urbdb1.ASM1.asm'.]]&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;font-size:85%;"  &gt;  [PRKS-1023 : Failed to remove CRS resource for ASM instance "+ASM1" on node "urbdb1", [CRS-0214: Could not unregister resource 'ora.urbdb1.ASM1.asm'.]]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;What do you do?&lt;br /&gt;&lt;br /&gt;Oracle Support has told me that crs_unregister is buggy and not supported. *cough cough* But I am going to attempt it anyway, since Bill Wagman had some luck with it (if you follow the &lt;a href="http://www.freelists.org/archives/oracle-l/04-2007/msg00158.html"&gt;discussion&lt;/a&gt; from oracle-l, you will see that Peter McLarty suggested it).&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;&lt;urbdb1&gt; /u01/app/oracle/product/crs/bin: crs_unregister ora.urbdb1.ASM1.asm&lt;/urbdb1&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;CRS-0214: Could not unregister resource 'ora.urbdb1.ASM1.asm'.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;&lt;urbdb1&gt; /u01/app/oracle/product/crs/bin: oerr crs 214&lt;/urbdb1&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;214,    0, "Could not unregister resource '%s'."&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;// *Cause:  There was an internal error while unregistering the resource.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;// *Action: Check the CRS daemon log file.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Grrr... How quaint, check some log file somewhere on your system, and that will solve all your problems. Having no idea where my "CRS daemon log file" actually is, I use RDA to browse around and finally come up with &lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;/u01/app/oracle/product/crs/log/urbdb1/crsd/crsd.log&lt;/span&gt;&lt;/span&gt;. Unfortunately, the CRS daemon log file is not helping me much. What am I looking for?&lt;br /&gt;&lt;br /&gt;Update: 5:19 pm&lt;br /&gt;After a day of reading manuals and discussing options with the fine folks on oracle-l, we still have the same problem, albeit now I have quite a few new tools on my belt. Yes, RAC is not easy, I think I have proved that. To be a little more granular, working with the OCR is a pain in the butt.&lt;br /&gt;&lt;br /&gt;So, new tools.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;strace: a very low-level OS trace utility. I did not benefit from this, but I was able to show the output to others smarter than I. I used it on srvctl and crs_unregister.&lt;/li&gt;&lt;li&gt;The "force" flag (-f) of certain commands, like srvctl. I believe it removed something, but I do not know what; I still have my root problem.&lt;/li&gt;&lt;li&gt;&lt;a href="http://download.oracle.com/docs/cd/B19306_01/rac.102/b14197/appsupport.htm#i632140"&gt;Appendix A&lt;/a&gt; of the Clusterware Deployment and Admin Guide: has a ton of information, most of which would probably be helpful under "normal" circumstances. Did I mention we still have our root problem? However, I have to give credit to the authors, for they did a great job. There is a lot of information about log file locations (wish I knew about that earlier), how to debug various components and resources, and some descriptions of the syntax used for commands. I thought the OCR section was quite thin; perhaps I am biased because I am looking for a specific solution.&lt;/li&gt;&lt;li&gt;SRVM_TRACE=TRUE: This is documented in the above Appendix A, but I point it out because it spews out a bit more information. While not immediately helpful, it seemed like something that I should file away.&lt;/li&gt;&lt;li&gt;USER_ORA_DEBUG: mentioned one time in the Appendix, I found out that you could crank this all the way to 5. I have no idea what it does or what the appropriate values are - google is not giving much on it, yet.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;More to follow. My Support Analyst just requested that I reboot the nodes because he has no idea why the resources exist in the OCR, as ocrdump does not list them.&lt;br /&gt;&lt;br /&gt;Update: 11:22 AM, Wednesday&lt;br /&gt;LS Cheng on oracle-l pointed out what ended up being the winning goal.&lt;br /&gt;crs_stop ora.urbdb1.ASM1.asm&lt;br /&gt;&lt;br /&gt;I still do not completely understand why this is an issue. Or even how one determines that is the solution. I hope to hear back more from LS Cheng so we can understand how he arrived at that conclusion.&lt;br /&gt;&lt;br /&gt;What we ended up doing was restoring ocr to a point before we attempted to follow note &lt;span style="font-family:helvetica;"&gt;&lt;strong&gt;357261.1&lt;/strong&gt;&lt;/span&gt;. Since the services were already down, it was straight-forward to delete the databases, the ASM instance and finally the ASM database. I was actually surprised it worked so well, given all the problems and headaches we had yesterday.&lt;br /&gt;&lt;br /&gt;I will add another update when I learn more. Right now we are happy we have a RAC install back in working condition and can move forward with our projects. Oracle Support did not score any points in this round. This is becoming a bad trend.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/245514474549983999-5465425208587404909?l=orajourn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://orajourn.blogspot.com/feeds/5465425208587404909/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=245514474549983999&amp;postID=5465425208587404909' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/5465425208587404909'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/245514474549983999/posts/default/5465425208587404909'/><link rel='alternate' type='text/html' href='http://orajourn.blogspot.com/2007/07/rac-is-not-easy.html' title='RAC is not easy'/><author><name>Charles Schultz</name><uri>http://www.blogger.com/profile/07973399674184183130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://bp3.blogger.com/_YT5SurzgoNo/SC3dz3JNesI/AAAAAAAAF0g/rbZAXVRUthw/S220/ffca25a624df4708c44c2110aa94c92f24207380.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-245514474549983999.post-2735839583326622898</id><published>2007-07-23T07:31:00.001-05:00</published><updated>2007-07-23T07:53:06.697-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bugs'/><category scheme='http://www.blogger.com/atom/ns#' term='metalink'/><category scheme='http://www.blogger.com/atom/ns#' term='patch'/><title type='text'>A few notes about some "new" metalink notes</title><content type='html'>After a week of vacation, I came back to work to wrap up some Service Requests with Oracle Support and query for a status on others. During that process, I was made aware of a "new" vehicle for patch delivery, documented in Metalink note &lt;a href="https://metalink.oracle.com/metalink/plsql/f?p=130:14:3345885457349914323::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,438314.1,1,1,1,helvetica"&gt;438314.1&lt;/a&gt;. Apparently, Oracle is trying something new with NApply CPU patch; it sounds promising, and I sure hope it successfully addresses the issues from past CPU patches and the difficulty with merges, as proudly declared in the note. What I do not quite understand is that there are still going to be Super Merge patches; we have a particular bug that did not make the April CPU, so it was being worked on for the July CPU. It mi
