<?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-5309604992043123290</id><updated>2012-02-01T12:41:31.429+01:00</updated><category term='MOS'/><category term='mDNS'/><category term='direct_access'/><category term='10.3'/><category term='xplan'/><category term='decode'/><category term='prelim'/><category term='fgac'/><category term='cbo'/><category term='implicit commit'/><category term='IT'/><category term='PL/SQL'/><category term='trace'/><category term='11.2.0.2'/><category term='Philosophy'/><category term='OCM'/><category term='character device'/><category term='event 10046'/><category term='Cisco'/><category term='directory'/><category term='Metalink'/><category term='sqlplus'/><category term='ipcs'/><category term='Security'/><category term='Oracle'/><category term='listener'/><category term='Apple'/><category term='SCN'/><category term='VIP'/><category term='buffer cache'/><category term='GUI'/><category term='test'/><category term='11.2.0.1.0'/><category term='awk'/><category term='Flash'/><category term='excel'/><category term='9.2.0.8'/><category term='RAC'/><category term='11gR2'/><category term='CDP'/><category term='Logitech'/><category term='11g'/><category term='function'/><category term='BUG'/><category term='Solaris'/><category term='parallel'/><category term='windows'/><category term='Harmony Remote'/><category term='al32utf8'/><category term='performance'/><category term='SGA'/><category term='syntaxhighlighter'/><category term='ipc'/><category term='10.2.0.4'/><category term='crs_stat'/><category term='11.1.0.7'/><category term='pmon'/><category term='debug'/><category term='Wait'/><category term='spfile'/><category term='TimeMachine'/><category term='oradebug'/><category term='CMT'/><category term='srvctl'/><category term='11.1.0.6'/><category term='NULL'/><category term='trigger'/><category term='cman'/><category term='optimizer'/><category term='sysresv'/><category term='linesize'/><category term='11gR1'/><category term='ntp'/><category term='Registry'/><category term='OSX'/><category term='GCaP'/><category term='result cache'/><category term='ASM'/><category term='HCC'/><category term='10.2.0.3'/><category term='rollback'/><category term='block device'/><category term='Linux'/><category term='USL'/><category term='HP-UX'/><category term='rman'/><category term='ORA-15204'/><category term='ddl'/><category term='Amdahl'/><category term='ORA-1555'/><category term='CRS'/><category term='snoop'/><category term='multicast'/><category term='compatible.rdbms'/><title type='text'>berxblog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>83</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-2712576904787065168</id><published>2012-01-31T19:07:00.002+01:00</published><updated>2012-01-31T19:07:48.131+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='cman'/><category scheme='http://www.blogger.com/atom/ns#' term='listener'/><title type='text'>Setting Up Oracle Connection Manager (without SOURCE_ROUTE)</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;This post must be seen as a direct follow up to &lt;a href="http://www.blogger.com/profile/03392706779349258765" target="_blank"&gt;Arup Nandas&lt;/a&gt;&amp;nbsp;&lt;a href="http://arup.blogspot.com/2011/08/setting-up-oracle-connection-manager.html"&gt;Setting Up Oracle Connection Manager&lt;/a&gt;.&lt;br /&gt;As there are many references to this post, please read it first. &lt;i&gt;Problem&lt;/i&gt; and &lt;i&gt;Solution&lt;/i&gt; are quite similar, only the architecture is a little bit different:&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;The Architecture&lt;/h2&gt;&amp;nbsp;The network diagram of the three machines is slightly different:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: right;"&gt;&lt;a href="http://2.bp.blogspot.com/-y8JnUKznUok/TyV8CKREpwI/AAAAAAAAAoY/UkWVKR1DiWc/s1600/CM2_bx.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-y8JnUKznUok/TyV8CKREpwI/AAAAAAAAAoY/UkWVKR1DiWc/s320/CM2_bx.png" width="550" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;There is a&amp;nbsp;new needed connection: from the instance on dbhost1 to the connection manager on cmhost1.&lt;br /&gt;&lt;br /&gt;After changing the setup, you will need to rewrite the TNSNAMES.ORA in the following way:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;TNS_CM = &lt;br /&gt;  (DESCRIPTION = &lt;br /&gt;    (ADDRESS = &lt;br /&gt;      (PROTOCOL = TCP)(HOST = cmhost1)(PORT = 1950)&lt;br /&gt;    )&lt;br /&gt;    (CONNECT_DATA = &lt;br /&gt;      (SERVICE_NAME=srv1)&lt;br /&gt;    )&lt;br /&gt;  )&lt;/pre&gt;&lt;br /&gt;You see, the &lt;i&gt;(SOURCE_ROUTE&amp;nbsp;=&amp;nbsp;YES)&lt;/i&gt; disappeared as well as the &lt;i&gt;ADDRESS&lt;/i&gt; of the listener on &lt;i&gt;dbhost1&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;How it Works&lt;/h2&gt;&lt;br /&gt;Note, all the special parameters and settings on the clients TNSNAMES.ORA disappeared. But the cman must know about the SERVICE_NAME it has to serve. As the cman can be seen as a special kind of listener, there is a common way a listener gets informed about a SERVICE_NAME: the Instance has to register the services to the listener. In general this is done by pmon at &lt;a href="http://berxblog.blogspot.com/2011/09/when-does-pmon-register-to-remote.html" target="_blank"&gt;registering&lt;/a&gt; to logal_listener and remote_listener. In this case, &lt;b&gt;remote_listener&lt;/b&gt; is the magic parameter.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Setting Up&lt;/h2&gt;&lt;br /&gt;You can follow step (1) to (9) as in Arups blog.&lt;br /&gt;But before (10) an additional step is required:&lt;br /&gt;&lt;br /&gt;(x) on the instance add the cman to remote_listener:&lt;br /&gt;&lt;br /&gt;&lt;div style="margin-left: 50px;"&gt;&lt;pre&gt;Alter System Set remote_listener='(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=cmhost1)(PORT=1950))))' scope=both;&lt;/pre&gt;&lt;br /&gt;If there is already an entry in remote_listener, e.g. in a RAC, you can separate the different connection strings by comma. An example can be&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;Alter System Set remote_listener='SCAN-IP:1521,(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=cmhost1)(PORT=1950))))' scope=both;&lt;/pre&gt;&lt;br /&gt;(For more details about SCAN I'd recommend &lt;a href="http://www.oracle.com/technetwork/database/clustering/overview/scan-129069.pdf" target="_blank"&gt;this PDF&lt;/a&gt;)&lt;/div&gt;&lt;br /&gt;&lt;h2&gt;CMCTL Primer&lt;/h2&gt;As we have now the services registered also on cman, we can see it there. The &amp;nbsp;&lt;span style="background-color: white; color: #666666; font-family: 'Courier New', Courier, monospace; font-size: 13px; line-height: 18px; text-align: -webkit-auto;"&gt;SHOW&lt;/span&gt;&amp;nbsp;command has a 2nd parameter&amp;nbsp;&lt;span style="background-color: white; color: #666666; font-family: 'Courier New', Courier, monospace; font-size: 13px; line-height: 18px; text-align: -webkit-auto;"&gt;services&lt;/span&gt;. Here an example&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;Services Summary...&lt;br /&gt;Proxy service "cmgw" has 1 instance(s).&lt;br /&gt;  Instance "cman", status READY, has 2 handler(s) for this service...&lt;br /&gt;    Handler(s):&lt;br /&gt;      "cmgw001" established:1 refused:0 current:0 max:256 state:ready&lt;br /&gt;         &amp;lt;machine: 127.0.0.1, pid: 16786 &amp;gt;&lt;br /&gt;         (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=44391))&lt;br /&gt;      "cmgw000" established:1 refused:0 current:0 max:256 state:ready&lt;br /&gt;         &amp;lt;machine: 127.0.0.1,pid: 16784&amp;gt;&lt;br /&gt;         (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=44390))&lt;br /&gt;Service "INSTANCE1" has 1 instance(s).&lt;br /&gt;  Instance "INSTANCE1", status READY, has 1 handler(s) for this service...&lt;br /&gt;    Handler(s):&lt;br /&gt;      "DEDICATED" established:0 refused:0 state:ready&lt;br /&gt;         REMOTE SERVER&lt;br /&gt;         (ADDRESS=(PROTOCOL=TCP)(HOST=dbhost1)(PORT=1521))&lt;br /&gt;Service "cmon" has 1 instance(s).&lt;br /&gt;  Instance "cman", status READY, has 1 handler(s) for this service...&lt;br /&gt;    Handler(s):&lt;br /&gt;      "cmon" established:3 refused:0 current:1 max:4 state:ready&lt;br /&gt;         &amp;lt;machine: 127.0.0.1, pid: 16759&amp;gt;&lt;br /&gt;         (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=44374))&lt;br /&gt;The command completed successfully.&lt;/pre&gt;&lt;br /&gt;&lt;h2&gt;Fine Tuning&lt;/h2&gt;I try to create a dedicated service for all (or a well known set of) connections via the connection manager. By doing so it's sometimes easier to separate or identify different kinds of sessions.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-2712576904787065168?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/2712576904787065168/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=2712576904787065168' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/2712576904787065168'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/2712576904787065168'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2012/01/setting-up-oracle-connection-manager.html' title='Setting Up Oracle Connection Manager (without SOURCE_ROUTE)'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-y8JnUKznUok/TyV8CKREpwI/AAAAAAAAAoY/UkWVKR1DiWc/s72-c/CM2_bx.png' height='72' width='72'/><thr:total>0</thr:total><georss:featurename>Wien, Österreich</georss:featurename><georss:point>48.2081743 16.3738189</georss:point><georss:box>48.0388658 16.0579619 48.3774828 16.6896759</georss:box></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-8332187592314746740</id><published>2011-12-09T18:37:00.001+01:00</published><updated>2011-12-09T21:24:48.319+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='listener'/><title type='text'>Who created that process?</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right; margin-left: 1em; text-align: right;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://docs.oracle.com/cd/E11882_01/network.112/e10836/concepts.htm#CIAFHFAA" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;" target="_blank"&gt;&lt;img border="0" height="77" src="http://4.bp.blogspot.com/-4t75Txcaqik/TuJG4rNAJNI/AAAAAAAAAck/67b83pDjEWA/s200/connection_to_dedicated_server_proc.gif" width="200" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;&lt;span style="background-color: white; font-family: Tahoma, sans-serif; font-size: x-small; font-style: italic; font-weight: bold; text-align: -webkit-auto;"&gt;Figure 2-7&lt;br /&gt;Connection to&lt;br /&gt;a Dedicated &lt;br /&gt;Server Process&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div style="text-align: -webkit-auto;"&gt;&lt;span style="text-align: left;"&gt;For some reason I was really curios who created that process. It's not about a particular process in detail, mir a well known kind of processes. At least well known for DBAs.&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: right;"&gt;&lt;span style="text-align: right;"&gt;Which process?&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: -webkit-auto;"&gt;&lt;span style="text-align: left;"&gt;It's one of these:&lt;/span&gt;&lt;br /&gt;&lt;span style="text-align: left;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;pre&gt;oracle&amp;nbsp;&amp;nbsp;&amp;nbsp;13096&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1&amp;nbsp;&amp;nbsp;0&amp;nbsp;20:05&amp;nbsp;?&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;00:00:00&amp;nbsp;oracleTTT071&amp;nbsp;(LOCAL=NO)&lt;/pre&gt;&lt;br /&gt;Yes, it's a simple server process, nothing spectacular. Nevertheless, the &lt;a href="http://docs.oracle.com/cd/E11882_01/network.112/e10836/concepts.htm" target="_blank"&gt;Concepts guide&lt;/a&gt; is not very specific, who created that process. So I tried to find out in more detail.&lt;br /&gt;On my linux sandbox the first column of &lt;code&gt;ps -ef&lt;/code&gt; shows the &lt;code&gt;UID&lt;/code&gt;, the second is the &lt;code&gt;PID&lt;/code&gt;, the third is the &lt;code&gt;PPID&lt;/code&gt;. Unfortunately it's &lt;i&gt;1&lt;/i&gt; here, and I'm quite sure, this process was not created by &lt;code&gt;&lt;a href="http://en.wikipedia.org/wiki/Init" target="_blank"&gt;init&lt;/a&gt;&lt;/code&gt;. So this proces is somewhat orphaned, as the direct parent disappeared. Very sad!&lt;br /&gt;I decided to follow&amp;nbsp;&lt;span style="background-color: white; font-family: Tahoma, sans-serif; font-size: x-small; font-style: italic; font-weight: bold; text-align: -webkit-auto;"&gt;Figure 2-7&lt;/span&gt;&amp;nbsp;from the concepts guide. I used &lt;code&gt;strace -f -p &amp;lt;PID_of_listener&amp;gt;&lt;/code&gt; to see what's going on. &lt;code&gt;-f&lt;/code&gt; follows all forks, so also their actions are traced. &lt;br /&gt;The first 3 lines are &lt;br /&gt;&lt;code&gt;Process 2979 attached with 3 threads - interrupt to quit&lt;br /&gt;[pid &amp;nbsp;2981] futex(0xae8dee4, FUTEX_WAIT_PRIVATE, 1, NULL &amp;lt;unfinished ...&amp;gt;&lt;br /&gt;[pid &amp;nbsp;2980] restart_syscall(&amp;lt;... resuming interrupted call ...&amp;gt; &amp;lt;unfinished ...&amp;gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;So we have 3 listener processes - it's good to know and probably worth to investigating this segregation of duties - but not in this post. There are so many interesting lines, but I'm searching for a process, so let's continue with&lt;br /&gt;&lt;br /&gt;&lt;code&gt;[pid &amp;nbsp;2979] clone(Process 27028 attached&lt;/code&gt;&lt;br /&gt;&lt;code&gt;child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x2aedd9914b80) = 27028&lt;/code&gt;&lt;br /&gt;&lt;code&gt;[pid &amp;nbsp;2979] wait4(27028, Process 2979 suspended&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp;&amp;lt;unfinished ...&amp;gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;[pid 27028] clone(Process 27029 attached (waiting for parent)&lt;/code&gt;&lt;br /&gt;&lt;code&gt;Process 27029 resumed (parent 27028 ready)&lt;/code&gt;&lt;br /&gt;&lt;code&gt;child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x2aedd9914b80) = 27029&lt;/code&gt;&lt;br /&gt;&lt;code&gt;[pid 27028] exit_group(0) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = ?&lt;/code&gt;&lt;br /&gt;&lt;code&gt;Process 2979 resumed&lt;/code&gt;&lt;br /&gt;&lt;code&gt;Process 27028 detached&lt;/code&gt;&lt;br /&gt;&lt;code&gt;[pid &amp;nbsp;2979] &amp;lt;... wait4 resumed&amp;gt; [{WIFEXITED(s) &amp;amp;&amp;amp; WEXITSTATUS(s) == 0}], 0, NULL) = 27028&lt;/code&gt;&lt;br /&gt;&lt;code&gt;[pid 27029] close(15 &amp;lt;unfinished ...&amp;gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;[pid &amp;nbsp;2979] --- SIGCHLD (Child exited) @ 0 (0) ---&lt;/code&gt;&lt;br /&gt;&lt;code&gt;[pid 27029] &amp;lt;... close resumed&amp;gt; ) &amp;nbsp; &amp;nbsp; &amp;nbsp; = 0&lt;/code&gt;&lt;br /&gt;&lt;code&gt;[pid &amp;nbsp;2979] close(14 &amp;lt;unfinished ...&amp;gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;[pid 27029] close(16 &amp;lt;unfinished ...&amp;gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;[pid &amp;nbsp;2979] &amp;lt;... close resumed&amp;gt; ) &amp;nbsp; &amp;nbsp; &amp;nbsp; = 0&lt;/code&gt;&lt;br /&gt;&lt;code&gt;[pid 27029] &amp;lt;... close resumed&amp;gt; ) &amp;nbsp; &amp;nbsp; &amp;nbsp; = 0&lt;/code&gt;&lt;br /&gt;&lt;code&gt;[pid &amp;nbsp;2979] close(17) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = 0&lt;/code&gt;&lt;br /&gt;&lt;code&gt; &lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Here the listener (&lt;code&gt;[pid &amp;nbsp;2979]&lt;/code&gt;) creates a new process by the first &lt;code&gt;clone&lt;/code&gt; call. This new Process has the &lt;code&gt;PID 27028&lt;/code&gt;. This new process has only one purpose: again &lt;code&gt;clone&lt;/code&gt; a new Process: &lt;code&gt;PID 27029&lt;/code&gt; and use &lt;code&gt;exit_group(0)&lt;/code&gt; to terminate directly afterwards. By this trick the listener is not shown as parent process for &lt;code&gt;PID 27029&lt;/code&gt;. Directly after it's creation &lt;code&gt;PID 27029&lt;/code&gt; closes some file handles. As by the sequence of &lt;code&gt;clone&lt;/code&gt; calls the new process inherited a table of all open file (and network) handles it seems it tries to get rid of any it does not need as early as possible. The next part &lt;br /&gt;&lt;code&gt;[pid &amp;nbsp;2979] fcntl(16, F_SETFD, FD_CLOEXEC) = 0&lt;/code&gt;&lt;br /&gt;&lt;code&gt;[pid 27029] setsid( &amp;lt;unfinished ...&amp;gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;[pid &amp;nbsp;2979] fcntl(15, F_SETFD, FD_CLOEXEC &amp;lt;unfinished ...&amp;gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;[pid 27029] &amp;lt;... setsid resumed&amp;gt; ) &amp;nbsp; &amp;nbsp; &amp;nbsp;= 27029&lt;/code&gt;&lt;br /&gt;&lt;code&gt;[pid &amp;nbsp;2979] &amp;lt;... fcntl resumed&amp;gt; ) &amp;nbsp; &amp;nbsp; &amp;nbsp; = 0&lt;/code&gt;&lt;br /&gt;&lt;code&gt;[pid 27029] geteuid() &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = 5831&lt;/code&gt;&lt;br /&gt;&lt;code&gt;[pid &amp;nbsp;2979] fcntl(13, F_SETFD, FD_CLOEXEC) = 0&lt;/code&gt;&lt;br /&gt;&lt;code&gt;[pid 27029] setsid() &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= -1 EPERM (Operation not permitted)&lt;/code&gt;&lt;br /&gt;&lt;code&gt;[pid &amp;nbsp;2979] poll([{fd=8, events=POLLIN|POLLRDNORM}, {fd=11, events=POLLIN|POLLRDNORM}, {fd=12, events=POLLIN|POLLRDNORM}, {fd=16, events=POLLIN|POLLRDNORM}, {fd=15, events=0}], 5, -1 &amp;lt;unfinished ...&amp;gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;makes sure the file descriptos 16, 15 and 13 will remain after an &lt;code&gt;execve(2)&lt;/code&gt; call. &lt;br /&gt;And here it goes:&lt;br /&gt;&lt;code&gt;[pid 27029] execve("/appl/oracle/product/rdbms_112022_a/bin/oracle", ["oracleTTT051", "(LOCAL=NO)"], [/* 109 vars */]) = 0&lt;/code&gt;&lt;br /&gt;from the man page if execve:&lt;br /&gt;&lt;blockquote class="tr_bq"&gt;&lt;b&gt;execve()&lt;/b&gt; executes the program pointed to by filename.&lt;br /&gt;...&lt;br /&gt;&lt;b&gt;execve()&lt;/b&gt; does not return on success, and the text, data, bss, and stack of the calling process are overwritten by that of &amp;nbsp;the &amp;nbsp;program &amp;nbsp;loaded. &amp;nbsp; The &amp;nbsp;program invoked inherits the calling process’s PID, and any open file descriptors that are not set to close-on-exec. &amp;nbsp;Signals pending on the calling process are cleared. &amp;nbsp;Any signals set to be caught by the calling process are reset &amp;nbsp;to &amp;nbsp;their&amp;nbsp;default behaviour. &amp;nbsp;The SIGCHLD signal (when set to SIG_IGN) may or may not be reset to SIG_DFL.&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;If the current program is being ptraced, a &lt;b&gt;SIGTRAP&lt;/b&gt; is sent to it after a successful &lt;b&gt;execve()&lt;/b&gt;.&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;If &amp;nbsp;the &amp;nbsp;set-user-ID &amp;nbsp;bit &amp;nbsp;is set on the program file pointed to by &lt;u&gt;filename&lt;/u&gt;, and the calling process is not being ptraced, then the&amp;nbsp;effective user ID of the calling process is changed to that of the owner of the program file. &amp;nbsp;i Similarly, &amp;nbsp;when &amp;nbsp;the &amp;nbsp;set-group-ID&amp;nbsp;bit of the program file is set the effective group ID of the calling process is set to the group of the program file.&lt;/blockquote&gt;From that point on there you can see how the server process comes to life. It's very interesting in some details, but not scope of this post. After some conversation between listener and server process using file descriptors 15 and 16 (I assume these are just sockets) both close these file descriptors. The listener also closes file descriptor 13 which seems to be the TCP connection to the client. From that point the 2 processes seems to be independent.&lt;br /&gt;&lt;br /&gt;Well, now I know (at least on my test-system) the simplest way, the listener creates the process - and it uses &lt;code&gt;execve&lt;/code&gt; to do so. There still are many questions open, like what's going on at this redirection as shown in&amp;nbsp;&lt;span style="background-color: white; font-family: Tahoma, sans-serif; font-size: x-small; font-style: italic; font-weight: bold; text-align: -webkit-auto;"&gt;&lt;a href="http://docs.oracle.com/cd/E11882_01/network.112/e10836/concepts.htm#CIHHCHHJ" target="_blank"&gt;Figure 2-8&lt;/a&gt;&lt;/span&gt;.&lt;br /&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/5309604992043123290-8332187592314746740?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/8332187592314746740/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=8332187592314746740' title='2 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/8332187592314746740'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/8332187592314746740'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2011/12/who-created-that-process.html' title='Who created that process?'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-4t75Txcaqik/TuJG4rNAJNI/AAAAAAAAAck/67b83pDjEWA/s72-c/connection_to_dedicated_server_proc.gif' height='72' width='72'/><thr:total>2</thr:total><georss:featurename>Lederergasse 27, 1080 Wien, Österreich</georss:featurename><georss:point>48.2130897 16.3483585</georss:point><georss:box>48.2104447 16.343423 48.2157347 16.353293999999998</georss:box></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-3413436923961065910</id><published>2011-11-28T15:51:00.001+01:00</published><updated>2011-11-29T21:19:00.119+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='11gR2'/><category scheme='http://www.blogger.com/atom/ns#' term='rman'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>bzip2 twice?</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;a href="http://4.bp.blogspot.com/-L7zvrPkx5UU/TtUtB0-tHdI/AAAAAAAAAbM/Ik5et8ZYsVc/s1600/wheels.jpeg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-L7zvrPkx5UU/TtUtB0-tHdI/AAAAAAAAAbM/Ik5et8ZYsVc/s1600/wheels.jpeg" /&gt;&lt;/a&gt;&lt;br /&gt;To check the performance of RMAN backup I recently started to trace it a little bit. As most of the time was &lt;b&gt;not&lt;/b&gt; spent in any &lt;i&gt;reading from disk&lt;/i&gt; or &lt;i&gt;writing to media manager library&lt;/i&gt; event, it was &lt;i&gt;on CPU&lt;/i&gt;. It's good to know the CPUs are of any good, but as I still want to &lt;u&gt;know&lt;/u&gt; what's going on I tried to dig any deeper. CPU circles are not just a magic black box where we put in a problem and the answer comes out after some times. At an abstraction layer it's a chain of functions where one is called by another, and only the &lt;i&gt;last&lt;/i&gt; is the one doing anything. There is not much information in that fact per se, but developers are humans also, and they are giving the functions they code meaningful names. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;So I had just to find these names (and where most of the time is spent) to figure out what's going on. To save my time I remembered &lt;a href="http://blog.tanelpoder.com/about-2/"&gt;Tanel Poders&lt;/a&gt; &lt;a href="http://blog.tanelpoder.com/2008/10/31/advanced-oracle-troubleshooting-guide-part-9-process-stack-profiling-from-sqlplus-using-ostackprof/"&gt;Advanced Oracle Troubleshooting Guide, Part 9 – Process stack profiling from sqlplus using OStackProf&lt;/a&gt;. There he described his tool &lt;code&gt;ostackprof&lt;/code&gt;. This did all the job for me, I just had to find a rman session.&lt;br /&gt;&lt;br /&gt;Here's the shortstack where most of the time was spent:&lt;br /&gt;(This backup was done with COMPRESSION ALGORITHM ‘BASIC’)&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;-&amp;gt;__libc_start_main()-&amp;gt;main()-&amp;gt;ssthrdmain()-&amp;gt;opimai_real()-&amp;gt;sou2o()-&amp;gt;opidrv()-&amp;gt;opiodr()-&amp;gt;opiino()-&amp;gt;opitsk()-&amp;gt;ttcpip()-&amp;gt;opiodr()-&amp;gt;kporpc()-&amp;gt;kkxrpc()-&amp;gt;prient()-&amp;gt;prient2()-&amp;gt;pricbr()-&amp;gt;pricar()-&amp;gt;plsql_run()-&amp;gt;pfrrun()-&amp;gt;pfrrun_no_tool()-&amp;gt;pfrinstr_ICAL()-&amp;gt;pevm_icd_call_common()-&amp;gt;krbibpc()-&amp;gt;krbbpc()-&amp;gt;krbb3crw()-&amp;gt;krbbcdo()-&amp;gt;kgccdo()-&amp;gt;kgccbz2pseudodo()-&amp;gt;kgccbz2do()-&amp;gt;kgccm()-&amp;gt;kgccbuf()-&amp;gt;kgccgmtf()-&amp;gt;__sighandler()-&amp;gt;-&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;The naming convention for functions is not public documented by oracle, but for some reasons I'm sure functions starting with &lt;code&gt;krb&lt;/code&gt; are related to backup, whereas &lt;code&gt;kgcc&lt;/code&gt; is used for compression. Especially the &lt;i&gt;working&lt;/i&gt; function &lt;code&gt;kgcc&lt;u&gt;gmtf&lt;/u&gt;&lt;/code&gt; reads like &lt;i&gt;generate &lt;a href="http://en.wikipedia.org/wiki/Move-to-front_transform"&gt;Move To Front&lt;/a&gt;&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;At that point I had a lot more information than before, still I had no way how to improve the backup speed. As we have licensed advanced compression for that particular node, we tested with different other compression methods. LOW and MEDIUM where faster, with less compression than our previous BASIC. But HIGH was even slower!&lt;br /&gt;&lt;br /&gt;So again I used &lt;code&gt;ostackprof&lt;/code&gt; and that's the topmost stack trace - for HIGH:&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; text-align: -webkit-auto;"&gt;-&amp;gt;__libc_start_main()-&amp;gt;main()-&amp;gt;ssthrdmain()-&amp;gt;opimai_real()-&amp;gt;sou2o()-&amp;gt;opidrv()-&amp;gt;opiodr()-&amp;gt;opiino()-&amp;gt;opitsk()-&amp;gt;ttcpip()-&amp;gt;opiodr()-&amp;gt;kporpc()-&amp;gt;kkxrpc()-&amp;gt;prient()-&amp;gt;prient2()-&amp;gt;pricbr()-&amp;gt;pricar()-&amp;gt;plsql_run()-&amp;gt;pfrrun()-&amp;gt;pfrrun_no_tool()-&amp;gt;pfrinstr_ICAL()-&amp;gt;pevm_icd_call_common()-&amp;gt;krbibpc()-&amp;gt;krbbpc()-&amp;gt;krbb3crw()-&amp;gt;krbbcdo()-&amp;gt;kgccdo()-&amp;gt;__PGOSF209_kgccbzip2pseudodo()-&amp;gt;kgccbzip2do()-&amp;gt;BZ2_bzCompress()-&amp;gt;handle_compress()-&amp;gt;BZ2_compressBlock()-&amp;gt;generateMTFValues()-&amp;gt;__sighandler()-&amp;gt;-&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="text-align: -webkit-auto;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="text-align: -webkit-auto;"&gt;Do you see the difference? Until &lt;code&gt;kgccdo&lt;/code&gt; there is &lt;b&gt;no&lt;/b&gt;! And even afterwards, the functions are somewhat &lt;u&gt;similar&lt;/u&gt;. One more thing is worth to mention: the bzip2 implementation for HIGH does not use oracle internal naming convention. So it's worth to search for these names on the internet. one of my best hits was a &lt;a href="http://www.raspberryginger.com/jbailey/minix/html/commands_2bzip2-1_80_83_2compress_8c.html"&gt;&lt;code&gt;compress.c&lt;/code&gt; File Reference&lt;/a&gt;.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="text-align: -webkit-auto;"&gt;Did Oracle reinvent the wheel? No. For me it looks as if they tried their best first (by doing their own &lt;code&gt;kgcc&lt;/code&gt; implementation) and afterwards preferred simple copy&amp;amp;paste. Maybe they should just skip either of these 2 - they still can use parameters to achieve different compression quality.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="text-align: -webkit-auto;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="text-align: -webkit-auto;"&gt;If someone is interested in our results:&lt;/span&gt;&lt;br /&gt;&lt;span style="text-align: -webkit-auto;"&gt;for a single datafile of 30GB (with 100% usage) we achieved on a production system - with all it ongoing tasks:&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;b&gt; &lt;/b&gt;&lt;br /&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;td&gt;Type&lt;/td&gt;&lt;td&gt;min&lt;/td&gt;&lt;td&gt;backup-size&lt;/td&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;BASIC&lt;/td&gt;&lt;td&gt;13:32&lt;/td&gt;&lt;td align="right"&gt;5.8&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;LOW&lt;/td&gt;&lt;td&gt;5:17&lt;/td&gt;&lt;td align="right"&gt;8&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;MEDIUM&lt;/td&gt;&lt;td&gt;8:52&lt;/td&gt;&lt;td align="right"&gt;6.14&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;HIGH&lt;/td&gt;&lt;td&gt;65:29&lt;/td&gt;&lt;td align="right"&gt;4.25&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;We decided to choose MEDIUM.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-3413436923961065910?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/3413436923961065910/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=3413436923961065910' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/3413436923961065910'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/3413436923961065910'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2011/11/bzip2-twice.html' title='bzip2 twice?'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-L7zvrPkx5UU/TtUtB0-tHdI/AAAAAAAAAbM/Ik5et8ZYsVc/s72-c/wheels.jpeg' height='72' width='72'/><thr:total>0</thr:total><georss:featurename>1080 Wien, Österreich</georss:featurename><georss:point>48.2081743 16.3738189</georss:point><georss:box>48.0388658 16.0579619 48.3774828 16.6896759</georss:box></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-747400876516678524</id><published>2011-10-05T22:43:00.000+02:00</published><updated>2011-10-08T23:13:21.245+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='11.2.0.2'/><category scheme='http://www.blogger.com/atom/ns#' term='HCC'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>non-Exadata HCC</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Oracles Hybrid Columnar Compression was one of the big new features of Oracle 11.2.&amp;nbsp;Unfortunately&amp;nbsp;someone decided this feature should only be available in Exadata. Even Oracle tried to explain it with technical limitations, it was more or less obvious that's just wrong. There are some reasons for this:&lt;br /&gt;&lt;br /&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;The Database is doing the HCC compression all the time&lt;/li&gt;&lt;li&gt;The Database must be able doing the HCC decompression in case the storage cell can not or want not.&lt;/li&gt;&lt;li&gt;Beta-testers where very sure, HCC worked there without any special hardware.&lt;/li&gt;&lt;li&gt;Jonathan Lewis &lt;a href="http://jonathanlewis.wordpress.com/2011/10/04/hcc/"&gt;shows&lt;/a&gt; there are situations, where also an ordinary database creates tables with HCC&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;But fact is: Oracle decided to disable HCC for general usage. As there is no different database software in Exadata database servers, the decision whether process the statement or throw a &lt;cite&gt;ORA-64307: hybrid columnar compression is only supported in tablespaces residing on Exadata storage&lt;/cite&gt;&amp;nbsp;must be&amp;nbsp;done by any switch within the software.&lt;br /&gt;&lt;br /&gt;Here my collection of informations I have about these switch:&lt;br /&gt;&lt;br /&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;Kerry Osborne described in the book &lt;a href="http://www.apress.com/9781430233923"&gt;Expert Oracle Exadata&lt;/a&gt; in pages 46 to 48 how the ASM DiskGroup attribute&amp;nbsp;&lt;code&gt;cell.smart_scan_capable=TRUE&lt;/code&gt; is only possible on Exadata, and necessary for any kind of smart scan - so also for HCC.&lt;/li&gt;&lt;li&gt;Cern has published a &lt;a href="http://canali.web.cern.ch/canali/docs/Compressing_VLDS_Oracle_UKOUG09_LC_CERN.ppt"&gt;paper&lt;/a&gt; about Compression in Oracle - in the Appendix (pages 42 to 44) they show how to change this attribute. Not so easy and it corrupts the ASM DG.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Jonathan Lewis mentioned there might be a switch in &lt;code&gt;DBMS_COMPRESSION.GET_COMPRESSION_RATIO&lt;/code&gt; which disables the switch for the purpose of the temporary compressed tables. He did not go into details, but I decided to investigate into that direction.&lt;/li&gt;&lt;/ul&gt;The package &lt;code&gt;DBMS_COMPRESSION&lt;/code&gt; uses &lt;code&gt;prvt_compression&lt;/code&gt;, and there in &lt;code&gt;GET_COMPRESSION_RATIO&lt;/code&gt; it calls &lt;code&gt;PRVT_COMPRESSION.CHECK_HLI(1);&lt;/code&gt; to disable this switch and &lt;code&gt;PRVT_COMPRESSION.CHECK_HLI(0);&lt;/code&gt; to enables it at the end again. &lt;code&gt;CHECK_HLI&lt;/code&gt; just calls the kernel function &lt;code&gt;KDZCHECKHI&lt;/code&gt; with it's parameter, nothing more. Unfortunately it can not be called from outside of &lt;code&gt;PRVT_COMPRESSION&lt;/code&gt;. That's the way I started to investigate: I removed the line &amp;nbsp; &lt;code&gt;PROCEDURE CHECK_HLI (HLID &amp;nbsp; &amp;nbsp;IN NUMBER);&lt;/code&gt; from the package body and inserted it into the package header. (by doing so, I left the path of supported system - don't do this if you care your system!). Now I can call &lt;code&gt;CHECK_HLI&lt;/code&gt;:&lt;br /&gt;&lt;pre class="brush: sql"&gt;Connected to:&lt;br /&gt;Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production &lt;br /&gt;With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,Data Mining and Real Application Testing options&lt;br /&gt;&lt;br /&gt;SQL&amp;gt; exec sys.prvt_compression.CHECK_HLI(1);&lt;br /&gt;&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;&lt;br /&gt;SQL&amp;gt; create table bx_dba_objects Compress For Archive Low as select * from dba_objects;&lt;br /&gt;&lt;br /&gt;Table created.&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;div&gt;&lt;code&gt;prvt_compression.CHECK_HLI&lt;/code&gt; works per session; so a logon-trigger comes to my mind. &lt;br /&gt;To enable the check again, the parameter is &lt;code&gt;0&lt;/code&gt; instead of &lt;code&gt;1&lt;/code&gt;.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Update:&lt;/b&gt;&lt;br /&gt;parallel processes does not inherit this &lt;i&gt;feature&lt;/i&gt;:&lt;br /&gt;(a slightly different testcase, but same setup in general)&lt;br /&gt;&lt;pre class="brush: sql"&gt;SQL&amp;gt; select /*+ PARALLEL 8 */ count(*) from test_user.DBMS_TABCOMP_TEMP_CMP; &lt;br /&gt;select /*+ PARALLEL 8 */ count(*) from test_user.DBMS_TABCOMP_TEMP_CMP&lt;br /&gt;*&lt;br /&gt;ERROR at line 1:&lt;br /&gt;ORA-12801: error signaled in parallel query server P008, instance av2l904t:VAX1&lt;br /&gt;(1)&lt;br /&gt;ORA-64307: hybrid columnar compression is only supported in tablespaces&lt;br /&gt;residing on Exadata storage&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&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/5309604992043123290-747400876516678524?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/747400876516678524/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=747400876516678524' title='1 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/747400876516678524'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/747400876516678524'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2011/10/non-exadata-hcc.html' title='non-Exadata HCC'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>1</thr:total><georss:featurename>Lederergasse 27, 1080 Wien, Österreich</georss:featurename><georss:point>48.2130897 16.3483585</georss:point><georss:box>48.2104447 16.343423 48.2157347 16.353293999999998</georss:box></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-6707615395833697955</id><published>2011-09-07T15:30:00.000+02:00</published><updated>2011-09-07T15:30:59.374+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='trace'/><category scheme='http://www.blogger.com/atom/ns#' term='11g'/><category scheme='http://www.blogger.com/atom/ns#' term='pmon'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>when does PMON register to remote listeners</title><content type='html'>I had a complex problem today: I tried to setup a connection manager, but unlike &lt;a href="http://arup.blogspot.com/2011/08/setting-up-oracle-connection-manager.html"&gt;Arup&lt;/a&gt;, I did not like to to use &lt;code&gt;SOURCE_ROUTE&lt;/code&gt;. So I had to make the pmon register itself to the cman. As we have already an entry in &lt;code&gt;spfile&lt;/code&gt; for &lt;code&gt;remote_listener=REMOTE&lt;/code&gt;, I just enhanced this alias in tnsnames.ora by the additional line for the cmans HOST and PORT.&lt;br /&gt;Unfortunately the services did not show up in the cmans &lt;code&gt;show&amp;nbsp;services&lt;/code&gt;. Not even an &lt;code&gt;alter&amp;nbsp;system&amp;nbsp;register;&lt;/code&gt; did any good, still no service.&lt;br /&gt;After checking with tcpdump (there where &lt;b&gt;really &lt;/b&gt;no communication to the cman) and&amp;nbsp;&lt;code&gt;oradebug&amp;nbsp;event&amp;nbsp;10246&lt;/code&gt; I had still no clue how to find out why my pmon does not like to contact the cman. At a short ask for help on twitter, &lt;a href="https://twitter.com/#!/martinpaulnash"&gt;Martin Nash&lt;/a&gt; pointed me to the Note &lt;a href="https://support.oracle.com/CSP/main/article?cmd=show&amp;amp;type=NOT&amp;amp;doctype=HOWTO&amp;amp;id=787055.1"&gt;How to Trace Dynamic Registration from PMON ? [ID 787055.1]&lt;/a&gt;. There I found the event &lt;br /&gt;&lt;pre class="brush: sql"&gt;alter system set events='immediate trace name listener_registration level 3';&lt;/pre&gt;With this, (beside a lot of other useful information) I found the pmon just not knowing about the new entries.  &lt;br /&gt;As a solution I had to tell it about the new entries in tnsnames.ora by &lt;br /&gt;&lt;pre class="brush: sql"&gt;alter system set remote_listener=REMOTE;&lt;/pre&gt;This made pmon to re-read the tnsnames.ora and accept the new values. All my services shows up in cman now.&lt;br /&gt;&lt;a href="http://yong321.freeshell.org/"&gt;Yong Huang&lt;/a&gt; has some more Informations about the different trace levels &lt;a href="http://yong321.freeshell.org/oranotes/SingleClientAccessName.txt"&gt;here&lt;/a&gt;:&lt;br /&gt;&lt;blockquote&gt;Actually, trc_level 4 (user) is enough to show info about load stats. Other levels are:&lt;br /&gt;0,1: off&lt;br /&gt;2,3: err&lt;br /&gt;4,5: user&lt;br /&gt;6-14:admin&lt;br /&gt;15:  dev&lt;br /&gt;16-: support&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-6707615395833697955?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/6707615395833697955/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=6707615395833697955' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/6707615395833697955'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/6707615395833697955'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2011/09/when-does-pmon-register-to-remote.html' title='when does PMON register to remote listeners'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>0</thr:total><georss:featurename>Wien, Österreich</georss:featurename><georss:point>48.1852654 16.4209236</georss:point><georss:box>26.490510399999998 -24.0087639 69.8800204 56.850611099999995</georss:box></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-1474853459476277218</id><published>2011-08-19T11:23:00.003+02:00</published><updated>2011-08-19T12:01:29.632+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CRS'/><category scheme='http://www.blogger.com/atom/ns#' term='srvctl'/><category scheme='http://www.blogger.com/atom/ns#' term='11.2.0.2'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>incomplete list of SRVCTL commands</title><content type='html'>As I have to dig into &lt;code&gt;srvctl&lt;/code&gt; more than I liked to do, I figured the documentation is not complete (at least for my installation of 11.2.0.2):&lt;br /&gt;the Documentation for &lt;a href="http://download.oracle.com/docs/cd/E11882_01/rac.112/e16795/srvctladmin.htm#CDCGEAIH"&gt;&lt;code&gt;srvctl upgrade&lt;/code&gt;&lt;/a&gt; claims&lt;br /&gt;&lt;blockquote&gt;The &lt;code&gt;srvctl upgrade database&lt;/code&gt; command upgrades the configuration of a database and all of its services to the version of the database home from where this command is run.&lt;/blockquote&gt;&lt;br /&gt;But there is a 2nd option missing totally:&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;u&gt;Usage:&lt;/u&gt; srvctl upgrade model -s &amp;lt;source-version&amp;gt; -d &amp;lt;destination-version&amp;gt; -p {first|last} [-e &amp;lt;name&amp;gt;=&amp;lt;value&amp;gt;[,&amp;lt;name&amp;gt;=&amp;lt;value&amp;gt;, ...]&lt;/pre&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;in more detail:&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;srvctl upgrade model -h&lt;br /&gt;&lt;br /&gt;Upgrade the Oracle Clusterware resource types and resources.&lt;br /&gt;&lt;br /&gt;Usage: srvctl upgrade model -s &amp;lt;source-version&amp;gt; -d &amp;lt;destination-version&amp;gt; -p {first|last} [-e &amp;lt;name&amp;gt;=&amp;lt;value&amp;gt;[,&amp;lt;name&amp;gt;=&amp;lt;value&amp;gt;, ...]&lt;br /&gt;   -s &amp;lt;source-version&amp;gt;      Version from which to upgrade&lt;br /&gt;   -d &amp;lt;destination-version&amp;gt; Version to which to upgrade&lt;br /&gt;   -p {first|last}          Whether the command is called from the first upgraded node or the last upgraded node&lt;br /&gt;   -e &amp;lt;name&amp;gt;=&amp;lt;value&amp;gt;[,&amp;lt;name&amp;gt;=&amp;lt;value&amp;gt;, ...] Additional name value pairs for upgrade&lt;br /&gt;   -h                       Print usage&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;In general thsi should only be needed during an CRS upgrade, as part of &lt;code&gt;root.sh&lt;/code&gt; script. Nevertheless, as it's there it should be documented. Especially the &lt;code&gt;-e&lt;/code&gt; parameter seems to be worth more information than the &lt;code&gt;-h&lt;/code&gt; docu provides. &lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-1474853459476277218?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/1474853459476277218/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=1474853459476277218' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/1474853459476277218'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/1474853459476277218'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2011/08/incomplete-list-of-srvctl-commands.html' title='incomplete list of SRVCTL commands'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-6103468985891128347</id><published>2011-07-18T22:36:00.001+02:00</published><updated>2011-07-18T22:36:00.359+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Philosophy'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>estimated plan stability</title><content type='html'>Sometimes I am searching for any method to solve a problem. And after some investigations, mailing lists, direct contact of much smarter people, I come to the conclusion: &lt;blockquote&gt;It's just not possible!&lt;/blockquote&gt; (Or at least not within reasonable effort).&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;One of these problems, or more precise &lt;i&gt;questions&lt;/i&gt; is:&lt;br /&gt;&lt;blockquote&gt;How likely is the current explain plan for a given SQL statement to change?&lt;/blockquote&gt; I call this &lt;h2&gt;estimated plan stability&lt;/h2&gt;&lt;br /&gt;Unfortunately there is currently no such feature but at least I can give some examples, what I would like to have:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;E-rows vs. A-rows&lt;/b&gt;&lt;br /&gt;If they differ a lot (in any line of the execution plan) it might be a hint the plan is far away from reality, or in risk to change?&lt;br /&gt;Of course for A-rows &lt;code&gt;gather_plan_statistics &lt;/code&gt; or similar  is needed.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;b&gt;Best so far in 10053 trace &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;If you ever have analysed a 10053 trace, you might know the line starting with &lt;code&gt;Best so far ...&lt;/code&gt;.&lt;br /&gt;If the 2nd &lt;i&gt;best&lt;/i&gt; is not far from the 1st, I assume small changes in the data might lead to a different execution plan.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;b&gt;Binds outside histogram boundaries&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;If a bind variable is outside of the min/max values of a histogram, the optimiser tries to &lt;i&gt;guess&lt;/i&gt; how many rows it will get from this predicate/filter. Of course this can be horrible wrong, and should be also shown by my 1st suggestion.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;These are only 3 possibilities. They should show some areas of information where I'd like Oracle to collect and provide more data than they do at the moment. Probably they would also be valuable for others? Any other suggestions out there?&lt;br /&gt;&lt;br /&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/5309604992043123290-6103468985891128347?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/6103468985891128347/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=6103468985891128347' title='3 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/6103468985891128347'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/6103468985891128347'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2011/07/estimated-plan-stability.html' title='estimated plan stability'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-8076170916085708530</id><published>2011-07-13T22:10:00.003+02:00</published><updated>2011-07-13T22:46:09.635+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='implicit commit'/><category scheme='http://www.blogger.com/atom/ns#' term='ddl'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>avoid implicit COMMIT at DDL</title><content type='html'>Some times, I'd like to have a &lt;u&gt;transaction&lt;/u&gt; open, even there is a &lt;u&gt;DDL&lt;/u&gt; somewhere in between. &lt;br /&gt;Oracle might have some reasons for the &lt;u&gt;implicit COMMIT&lt;/u&gt;, but I have mine to avoid them in my transactions. &lt;br /&gt;&lt;br /&gt;Here a small example, how I do it (don't just copy it, it's really small, just an example)!&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Let's prepare a package and two tables&lt;/h2&gt;&lt;br /&gt;&lt;pre class="brush: sql"&gt;&lt;br /&gt;CREATE OR REPLACE PACKAGE my_ddl_package AS&lt;br /&gt;FUNCTION do_ddl(p_ddl varchar2)  return varchar2;&lt;br /&gt;END my_ddl_package;&lt;br /&gt;/&lt;br /&gt;&lt;br /&gt;CREATE OR REPLACE PACKAGE BODY my_ddl_package AS&lt;br /&gt;function do_ddl(p_ddl varchar2) return varchar2&lt;br /&gt;as&lt;br /&gt;PRAGMA AUTONOMOUS_TRANSACTION;&lt;br /&gt;begin&lt;br /&gt;&lt;br /&gt;execute immediate p_ddl;&lt;br /&gt;return NULL;&lt;br /&gt;end;&lt;br /&gt;END my_ddl_package;&lt;br /&gt;/&lt;br /&gt;&lt;br /&gt;create table t1 as select * from dual;&lt;br /&gt;&lt;br /&gt;create table t2 as select * from dual;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;And now the testcase&lt;/h2&gt;&lt;br /&gt;I try to update &lt;i&gt;t1&lt;/i&gt;, drop &lt;i&gt;t2&lt;/i&gt; and afterwards &lt;u&gt;rollback&lt;/u&gt; the update on &lt;i&gt;t1&lt;/i&gt;.&lt;br /&gt;Let's give it a try.&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: sql"&gt;&lt;br /&gt;SQL&gt; update t1 set dummy ='U';&lt;br /&gt;&lt;br /&gt;1 row updated.&lt;br /&gt;&lt;br /&gt;SQL&gt; select my_ddl_package.do_ddl('drop table t2') from dual;&lt;br /&gt;&lt;br /&gt;MY_DDL_PACKAGE.DO_DDL('DROPTABLET2')&lt;br /&gt;--------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;SQL&gt; select * from t1;&lt;br /&gt;&lt;br /&gt;D&lt;br /&gt;-&lt;br /&gt;U&lt;br /&gt;&lt;br /&gt;SQL&gt; rollback;&lt;br /&gt;&lt;br /&gt;Rollback complete.&lt;br /&gt;&lt;br /&gt;SQL&gt; select * from t1;&lt;br /&gt;&lt;br /&gt;D&lt;br /&gt;-&lt;br /&gt;X&lt;br /&gt;&lt;br /&gt;SQL&gt; select * from t2;&lt;br /&gt;select * from t2&lt;br /&gt;              *&lt;br /&gt;ERROR at line 1:&lt;br /&gt;ORA-00942: table or view does not exist&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Everything works as expected: &lt;i&gt;update&lt;/i&gt; - &lt;b&gt;DDL&lt;/b&gt; - &lt;i&gt;rollback&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Did I miss something?&lt;br /&gt;&lt;br /&gt;If you did not want to read (or think) too much, just the shortcut:&lt;br /&gt;What saved my day? It's &lt;b&gt;PRAGMA AUTONOMOUS_TRANSACTION&lt;/b&gt;!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-8076170916085708530?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/8076170916085708530/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=8076170916085708530' title='3 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/8076170916085708530'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/8076170916085708530'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2011/07/avoid-implicit-commit-at-ddl.html' title='avoid implicit COMMIT at DDL'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-6907763377393922047</id><published>2011-06-20T19:39:00.002+02:00</published><updated>2011-06-20T21:44:31.748+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='test'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>ORA-02393 on purpose</title><content type='html'>Today I got an email by a developer about an error on a test database.&lt;br /&gt;(I shortened the conversation, but tried not to change the content):&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="text-align: right;"&gt;Dev:&lt;blockquote&gt;We get an &lt;code&gt;ORA-02393: exceeded call limit on CPU usage&lt;/code&gt; almost immediatedly after executing the following stmt: &lt;code&gt;...&lt;/code&gt;Could you pls adjust the limits?&lt;/blockquote&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;After some hours of meetings I replied:&lt;br /&gt;Me: &lt;/p&gt;&lt;blockquote&gt;These limits where introduced in test to find exactly those statements which are running too slow for an OLTP application. Can we help you in tuning the statement?&lt;/blockquote&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;div style="text-align: right;"&gt;Dev: &lt;blockquote&gt;I already exchanged details on the issue with [&lt;i&gt;another DBA&lt;/i&gt;] and found the cause of the 'longer than usual' execution time (index missing ;-)&lt;br /&gt;Nonetheless 100ms max exec time is a bit too strict for a dev platform imho - but as the ... is going to be replaced soon we won't request any changes to a system/db in the last chapter of its life cycle.&lt;/blockquote&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;I did not reply yet. Just try to explain my world.&lt;br /&gt;&lt;h2&gt;Is a CPU_PER_CALL limit really needed on a test system? &lt;/h2&gt;&lt;br /&gt;In theory: no.&lt;br /&gt;&lt;br /&gt;If the developers implement a perfect code instrumentation, they would know the runtime of every statement. In test it would be evaluated for a proper per-statement performance as well as for an over all performance.&lt;br /&gt;&lt;br /&gt;But if they would do so, I would never have received this email. So the world is not perfect. The code isn't, also.&lt;br /&gt;&lt;h2&gt;Are 100ms enough time? seems really tough!&lt;/h2&gt;&lt;br /&gt;Yes, they are.&lt;br /&gt;&lt;br /&gt;Even on an 8 years old &lt;a href="http://en.wikipedia.org/wiki/UltraSPARC_III"&gt;UltraSparc III+&lt;/a&gt; you can do a &lt;b&gt;lot&lt;/b&gt; of CPU cycles within 100ms. And only CPU is count there, no time for IO or other &lt;i&gt;WAITs&lt;/i&gt;. &lt;br&gt;&lt;br /&gt;But the biggest argument for this limit: I never got any complaint about it by a &lt;i&gt;good&lt;/i&gt; statement. Only by those which needed urgent suport, anyhow.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-6907763377393922047?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/6907763377393922047/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=6907763377393922047' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/6907763377393922047'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/6907763377393922047'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2011/06/ora-02393-on-purpose.html' title='ORA-02393 on purpose'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-6208624874162938144</id><published>2011-06-06T11:47:00.004+02:00</published><updated>2011-06-06T21:46:56.760+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>Access to the database</title><content type='html'>There is a kind of discussion ongoing &lt;a href="http://www.thatjeffsmith.com/archive/2011/06/developers-in-prooooooood/"&gt;who&lt;/a&gt; should have &lt;a href="http://www.oraclenerd.com/2011/06/developer-access-to-v-views-in.html"&gt;access to a database&lt;/a&gt;, and under &lt;a href="http://www.thatjeffsmith.com/archive/2011/06/database-drivers-license/"&gt;what circumstances&lt;/a&gt;.&lt;br /&gt;I have never done either of Jeffs or Chets job, so I cannot write anything reasonable about these. But I am sometimes a kind of DBA. This makes me my best source of knowledge about this job, and the attitude I created during the years.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I developed a certain expectation about the differences between an operation guy and others, who are not responsible for productive systems. I even have my private opinion about a sales related job, but that's not my topic today.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;From my point of view it's all about &lt;b&gt;control&lt;/b&gt;. &lt;/div&gt;&lt;div&gt;For an operational focused person, my work is about control. If there is uncontrolled behaviour somewhere, this will lead to an incident. And that will causes a call. As I like to sleep at least 8 hours per day, that means one out of 3 calls will disturb this sleep (&lt;a href="http://en.wikipedia.org/wiki/Uniform_distribution_(continuous)"&gt;on average&lt;/a&gt;). &lt;/div&gt;&lt;div&gt;Of course every incident potentially costs my company money. Or reputation. This will come down to me again. Writing reports. Doing management presentations. Nonproductive paperwork.&lt;/div&gt;&lt;div&gt;After all this additional work, I will do my best to avoid this situation. Analyzing what went out of bounds, led to this uncontrolled behaviour. At the end I even try to change the environment so this will not happen again. &lt;/div&gt;&lt;div&gt;It's all about control. Freak!&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So who should get access to &lt;i&gt;my&lt;/i&gt; systems? Only those whose I can control. Or at least I can &lt;b&gt;trust&lt;/b&gt;? &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It's hard to decide whom to trust. At least to which specific level. &lt;/div&gt;&lt;div&gt;Jeffs driving &lt;i&gt;license seems&lt;/i&gt; to be a try to formalise this need. But similar to a driving license, it only shows you have the &lt;u&gt;allowance&lt;/u&gt; to drive. It rarely tells anything about the &lt;u&gt;skills&lt;/u&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Talking about skills brings one more dimension here: People living in an ecosystem where every action is controlled by a QualityAssurance team are used to go to the limits and beyond.  That's great, it's what is expected from them. Otherwise they would do their job bad.  &lt;/div&gt;&lt;div&gt;It's just not what I want in a productive environment. There boundaries are, to never be reached.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I put a more pragmatic approach: If someone takes &lt;b&gt;responsibility&lt;/b&gt; for the work, it's fine for me. As an example: if the person who added a &lt;i&gt;big bug&lt;/i&gt; during a small &lt;i&gt;hotfix&lt;/i&gt; at 5pm is called at 2am the next morning to fix this bug, I'm fine. &lt;/div&gt;&lt;div&gt;And just one more dimension: I favour to grant access to people who &lt;b&gt;know&lt;/b&gt; what they can break with this: Just ask me for any access to v$ views in my DB; you will get it, just after you show and explain me how you can halt the application if you abuse it. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Need a short &lt;u&gt;summary&lt;/u&gt;?&lt;/div&gt;&lt;div&gt;I like to &lt;b&gt;control&lt;/b&gt; access to my database, so I limit it to people who I &lt;b&gt;trust&lt;/b&gt;. &lt;/div&gt;&lt;div&gt;To gain it, show me your &lt;b&gt;responsibility&lt;/b&gt; and &lt;b&gt;knowledge&lt;/b&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/5309604992043123290-6208624874162938144?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/6208624874162938144/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=6208624874162938144' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/6208624874162938144'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/6208624874162938144'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2011/06/access-to-database.html' title='Access to the database'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-1879450793745069210</id><published>2011-06-01T06:53:00.009+02:00</published><updated>2011-06-01T10:03:49.808+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Philosophy'/><title type='text'>Artist of Farmer?</title><content type='html'>This morning I read a twitter message by &lt;a href="http://www.thatjeffsmith.com/"&gt;Jeff Smith&lt;/a&gt; (aka &lt;a href="http://twitter.com/#!/hillbillyToad"&gt;@hillibillitoad&lt;/a&gt;):&lt;br /&gt;&lt;blockquote&gt;OH: "Once we get our system running, we don't touch it." Yeah, that generally works pretty good.&lt;/blockquote&gt;I like Jeffs tweets, blogs and comments as he is a very smart guy and still keeps his mind open for other ideas.&lt;div&gt;In this particular case I have to contradict, but I was not able to condense it into 140 chars. &lt;/div&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/-utDLkkhVTOs/TeXr1rTlkqI/AAAAAAAAALo/jf79ow_vxYY/s1600/dont_touch.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 200px; height: 194px;" src="http://3.bp.blogspot.com/-utDLkkhVTOs/TeXr1rTlkqI/AAAAAAAAALo/jf79ow_vxYY/s400/dont_touch.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5613151817977664162" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;Most people in the IT business seems to follow the sentence "&lt;i&gt;never touch a running system&lt;/i&gt;" like a commandment.  For me this often sounds like the "&lt;i&gt;please don't touch&lt;/i&gt;" in an art museum. &lt;/div&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;div&gt;This brings me to an interesting question: Do these 'most people' see themselves as artists, and their work as art? &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br&gt;&lt;div&gt;Let me give you another picture: &lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;a href="http://3.bp.blogspot.com/-_IOR5hcPxHc/TeXsracCxKI/AAAAAAAAALw/mz7hz9APcfw/s1600/vertrocknet.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 400px; height: 267px;" src="http://3.bp.blogspot.com/-_IOR5hcPxHc/TeXsracCxKI/AAAAAAAAALw/mz7hz9APcfw/s400/vertrocknet.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5613152741162665122" /&gt;&lt;/a&gt;&lt;br /&gt;Imagine a farmer which  seeds the crops in spring, did really everything right and then sits down and does not touch his running system. You might guess his harvest?&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;So what's the big difference here?&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Artwork most of the time is first created for a dedicated purpose. As long as the purpose does not change, it's expected to satisfy this purpose. &lt;/div&gt;&lt;div&gt;The purpose of an artwork slowly changes, I'm quite sure most of the time it can be measured in decades or centuries. &lt;/div&gt;&lt;div&gt;Also plants are seeded for a dedicated purpose. But their purpose &lt;u&gt;is&lt;/u&gt; the rapid change. To live, to growth, to get harvested after some time. So the farmer has to look after his crops all the time. In the best case, he even can improve and steer the change to his advance. &lt;/div&gt;&lt;div&gt;For me the big difference between an artist ('&lt;i&gt;don't touch&lt;/i&gt;') and a farmer ('&lt;i&gt;care and steer&lt;/i&gt;') is the timescale of the changes. If you expect your work to be never changed (and in a definition of 'life' things which do not change are just &lt;i&gt;dead&lt;/i&gt;) prevent them from any interaction. &lt;/div&gt;&lt;div&gt;I prefer living systems. So I take the duty and care for them. &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/5309604992043123290-1879450793745069210?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/1879450793745069210/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=1879450793745069210' title='1 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/1879450793745069210'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/1879450793745069210'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2011/06/artist-of-farmer.html' title='Artist of Farmer?'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-utDLkkhVTOs/TeXr1rTlkqI/AAAAAAAAALo/jf79ow_vxYY/s72-c/dont_touch.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-8724330292427500623</id><published>2011-03-16T21:11:00.007+01:00</published><updated>2011-06-02T22:21:33.617+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='11gR2'/><category scheme='http://www.blogger.com/atom/ns#' term='directory'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>who owns that directory?</title><content type='html'>&lt;div&gt;I'm talking here about the &lt;a href="http://download.oracle.com/docs/cd/E11882_01/server.112/e16508/glossary.htm#CHDFHJCC"&gt;DIRECTORY object&lt;/a&gt; in Oracle, not the thing you might know from several OSes.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;Most objects in a current database can be created for any user, but a DIRECTORY can't. Please check the &lt;a href="http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/statements_5007.htm#SQLRF01207"&gt;CREATE DIRECTORY&lt;/a&gt; definition, there you can see &lt;img src="http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/img/create_directory.gif" alt="Description of create_directory.gif follows" /&gt;&lt;div&gt;No optional &lt;code&gt;schema.&lt;/code&gt; anywhere, as you can see with tables, indices and similar objects. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;But that's not the end of the story. There is a view which shows you all the objects in a database: &lt;code&gt;DBA_OBJECTS&lt;/code&gt;. And there is a owner. allways! &lt;/div&gt;&lt;div&gt;So let's check all the owners of directory objects there:&lt;br /&gt;&lt;pre class="brush: sql"&gt;select distinct owner from DBA_OBJECTS where object_type ='DIRECTORY';&lt;br /&gt;&lt;br /&gt;OWNER&lt;br /&gt;------------------------------&lt;br /&gt;SYS&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;div&gt;As there is a owner defined somewhere, we also can change it. It's only a question of effort.&lt;/div&gt;&lt;div&gt;Unfortunately there is no &lt;code&gt;ALTER DIRECTORY&lt;/code&gt; between &lt;a href="http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/statements_1.htm"&gt;ALTER DIMENSION and ALTER DISKGROUP&lt;/a&gt;. But it is still defined somewhere, so it can be changed! &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now I'm leaving the well prepared area of Oracle Documentation, but that just increases the fun.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Let's start with the definition of &lt;code&gt;DBA_DIRECTORIES&lt;/code&gt;. It's somewhat easier as DBA_OBJECTS and stil shows an owner(!) What a nice sense of humor.&lt;br /&gt;&lt;pre class="brush: sql"&gt;CREATE OR replace FORCE VIEW "SYS"."DBA_DIRECTORIES"&lt;br /&gt;("OWNER", "DIRECTORY_NAME", "DIRECTORY_PATH")&lt;br /&gt;AS&lt;br /&gt;SELECT u.NAME,&lt;br /&gt;o.NAME,&lt;br /&gt;d.os_path&lt;br /&gt;FROM   sys.user$ u,&lt;br /&gt;sys.obj$ o,&lt;br /&gt;sys.dir$ d&lt;br /&gt;WHERE  u.user# = o.owner#&lt;br /&gt;AND o.obj# = d.obj#&lt;br /&gt;&lt;/pre&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;For the following tests I created a DIRECTORY &lt;code&gt;D1&lt;/code&gt; with the os-path &lt;code&gt;/tmp/d1&lt;/code&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Checking sys.dir$ I found obj# &lt;b&gt;42985&lt;/b&gt; for this directory.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Just to make sure, jet's check the owner of that object. I don't trust oracle, there is too much hardcoded magic inside. But not at this point:&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: sql"&gt;select owner# from sys.obj$ where obj#=42985;&lt;br /&gt;&lt;br /&gt;OWNER#&lt;br /&gt;----------&lt;br /&gt;  0&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now I create another user and try to give him the ownership of this particular object - without any grants. The owner of an object should be able to access the object anyhow.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The user &lt;i&gt;berx&lt;/i&gt; is equiped with &lt;code&gt;CONNECT&lt;/code&gt; and &lt;code&gt;CREATE PROCEDURE&lt;/code&gt;:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;With user &lt;i&gt;berx&lt;/i&gt; let's try to access that DIRECTORY:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;pre class="brush: sql"&gt;declare&lt;br /&gt;f utl_file.file_type;&lt;br /&gt;begin&lt;br /&gt;f := utl_file.fopen('D1', 'something.txt', 'w');&lt;br /&gt;utl_file.put_line(f, 'line one: some text');&lt;br /&gt;utl_file.fclose(f);&lt;br /&gt;end;&lt;br /&gt;/&lt;/pre&gt;You will expect something like&lt;br /&gt;&lt;code&gt;&lt;br /&gt;ERROR at line 1:&lt;br /&gt;ORA-29289: directory access denied&lt;br /&gt;ORA-06512: at "SYS.UTL_FILE", line 41&lt;br /&gt;ORA-06512: at "SYS.UTL_FILE", line 478&lt;br /&gt;ORA-06512: at line 5&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Now let's give user berx the ownership of that directory.&lt;/div&gt;&lt;div&gt;In my case user &lt;i&gt;berx&lt;/i&gt; has &lt;code&gt;user$&lt;/code&gt; &lt;i&gt;41&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So I can (as sys)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;pre class="brush: sql"&gt;update sys.obj$ set owner#=41 where  obj#=42985;&lt;/pre&gt;&lt;br /&gt;back as user &lt;i&gt;berx&lt;/i&gt; - same testcase ....&lt;br /&gt;-- still &lt;code&gt;ORA-29289&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Ok. Now we know Oracle does not check the owner of that particular object to check permissions. One of their shortcuts in the code.&lt;/div&gt;&lt;div&gt;So let's give poor user &lt;i&gt;berx&lt;/i&gt; the GRANTs the ordinary way:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;pre class="brush: sql"&gt;SQL&amp;gt; grant read, write on directory D1 to berx;&lt;br /&gt;&lt;br /&gt;grant read, write on directory D1 to berx&lt;br /&gt;*&lt;br /&gt;ERROR at line 1:&lt;br /&gt;ORA-00603: ORACLE server session terminated by fatal error&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Not the effect you expected? Well, maybe one of the side-effects of my unkind interaction with the data dictionary and Oracles shortcuts.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;But as I know what I did before, I can revert all the things:&lt;br /&gt;&lt;pre class="brush: sql"&gt;SQL&amp;gt; update sys.obj$ set owner#=0 where  obj#=42985;&lt;br /&gt;&lt;br /&gt;1 row updated.&lt;br /&gt;&lt;br /&gt;SQL&amp;gt; commit;&lt;br /&gt;&lt;br /&gt;Commit complete.&lt;br /&gt;&lt;br /&gt;SQL&amp;gt; grant read, write on directory D1 to berx;&lt;br /&gt;&lt;br /&gt;Grant succeeded.&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;And with a last test as user &lt;i&gt;berx&lt;/i&gt;:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;PL/SQL procedure successfully completed.&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Everything is fine again!&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;h4&gt;Comment:&lt;/h4&gt; This post was created out of some older documents and my holey brain. But the main theme should be clear.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-8724330292427500623?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/8724330292427500623/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=8724330292427500623' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/8724330292427500623'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/8724330292427500623'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2011/03/who-owns-that-directory.html' title='who owns that directory?'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-7171067516084835944</id><published>2011-03-16T13:26:00.008+01:00</published><updated>2011-03-16T13:47:16.926+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='spfile'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='ASM'/><title type='text'>2 spfiles - some confusion</title><content type='html'>At the moment I'm in a big migration project from 9i to 11gR2. &lt;br /&gt;Most of the migrations are done like&lt;br /&gt;&lt;ul&gt;&lt;li&gt;create new DB&lt;/li&gt;&lt;br /&gt;&lt;li&gt;exp/imp&lt;/li&gt;&lt;br /&gt;&lt;li&gt;delete old DB&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;Even we have templates for all these steps, sometimes something goes wrong.&lt;br /&gt;&lt;br /&gt;Today I hit such a &lt;i&gt;something&lt;/i&gt;: &lt;br /&gt;As we use Clusters for most of our DBs, &lt;i&gt;cluster_database=TRUE&lt;/i&gt; should be set, otherwise it's generating problems. At the Creation of one DB, the 2nd instance did not come up. After some research I found out &lt;i&gt;cluster_database&lt;/i&gt; was set to &lt;i&gt;FALSE&lt;/i&gt;. No big deal, let's change it: &lt;pre class="brush: sql"&gt;alter database set cluster_database=TRUE scope=spfile;&lt;/pre&gt; But after a &lt;code&gt;srvctl stop instance -d DB_UNIQUE_NAME -i INSTANCE_NAME&lt;br&gt;&lt;br /&gt;srvctl start instance -d DB_UNIQUE_NAME -i INSTANCE_NAME&lt;/code&gt; a &lt;code&gt;show parameter cluster_database&lt;/code&gt; still gave me &lt;i&gt;FALSE&lt;/i&gt;. This confused me! &lt;br /&gt;So I checked &lt;i&gt;$ORACLE_HOME/dbs/initINSTANCE_NAME&lt;/i&gt; and there I found &lt;code&gt;spfile=+ASM_DG/DB_UNIQUE_NAME/PARAMETERFILE/spfile.268.745343891&amp;nbsp;+ASM_DG/DB_UNIQUE_NAME/PARAMETERFILE/spfile.269.745406153&lt;/code&gt; there where 2 spfiles in the pfile-definition! &lt;br /&gt;After a &lt;br /&gt;&lt;pre class="brush: sql"&gt;&lt;br /&gt;create pfile='/tmp/pfile1' from spfile='+ASM_DG/DB_UNIQUE_NAME/PARAMETERFILE/spfile.268.745343891';&lt;br /&gt;create pfile='/tmp/pfile2' from spfile='+ASM_DG/DB_UNIQUE_NAME/PARAMETERFILE/spfile.269.745406153';&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;and a &lt;code&gt;diff /tmp/pfile1 /tmp/pfile2&lt;/code&gt; I decided to use only the 1st spfile in the &lt;i&gt;$ORACLE_HOME/dbs/initINSTANCE_NAME&lt;/i&gt; and apply all the differences manually.&lt;br /&gt;Now both instances are up and fine - I just have to delete the correct spfile in ASM.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-7171067516084835944?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/7171067516084835944/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=7171067516084835944' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/7171067516084835944'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/7171067516084835944'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2011/03/2-spfiles-some-confusion.html' title='2 spfiles - some confusion'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-7734808511343615126</id><published>2010-12-30T16:11:00.004+01:00</published><updated>2010-12-30T16:41:36.591+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='11.2.0.1.0'/><category scheme='http://www.blogger.com/atom/ns#' term='optimizer'/><title type='text'>Invalid SQL if hint is missing?</title><content type='html'>Recently &lt;a href="http://hoopercharles.wordpress.com/about/"&gt;Charles Hooper&lt;/a&gt; posted a blog &lt;a href="http://hoopercharles.wordpress.com/2010/12/01/an-invalid-or-do-you-just-not-want-to-work/"&gt;An Invalid, or Do You Just Not Want to Work&lt;/a&gt;. There he asked under which circumstances a SQL should be considered &lt;i&gt;invalid&lt;/i&gt;? I tried to discuss this question in the comments there and I am still thinking about an other kind of answer. But today I'd like to show a statement, which is invalid &lt;u&gt;without&lt;/u&gt; a hint!&lt;br /&gt;&lt;br /&gt;here we go:&lt;br /&gt;(everything 11.2.0.1EE 64-bit on Linux)&lt;br /&gt;I was asked to provide a list of all views which have a &lt;i&gt;hint&lt;/i&gt; (how ironic) in it. After some test I provided this one:&lt;br /&gt;&lt;pre class="brush: sql"&gt;&lt;br /&gt;select /*+ no_merge(vv) */ owner, view_name&lt;br /&gt;from (select v.owner, v.view_name&lt;br /&gt;from dba_views v, dba_objects o&lt;br /&gt;where v.owner = o.owner&lt;br /&gt;AND  v.view_name = o.object_name&lt;br /&gt;AND o.object_type='VIEW'&lt;br /&gt;AND o.status='VALID'&lt;br /&gt;AND v.owner ='PSFT'  ) vv&lt;br /&gt;where    dbms_metadata.get_ddl('VIEW', vv.view_name, vv.owner) like '%/*+%'&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;without the &lt;i&gt;no_merge&lt;/i&gt; hint I get this error stack:&lt;br /&gt;&lt;pre class="brush: sql"&gt;&lt;br /&gt;ERROR at line 9:&lt;br /&gt;ORA-31603: object "AAB_TEST" of type VIEW not found in schema "PSFT"&lt;br /&gt;ORA-06512: at "SYS.DBMS_SYS_ERROR", line 105&lt;br /&gt;ORA-06512: at "SYS.DBMS_METADATA", line 3912&lt;br /&gt;ORA-06512: at "SYS.DBMS_METADATA", line 5678&lt;br /&gt;ORA-06512: at line 1&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;I did some &lt;i&gt;explain plan&lt;/i&gt; with and without hints, so I got these 2 outputs:&lt;br /&gt;&lt;pre class="brush: sql"&gt;&lt;br /&gt;SQL_ID bwsx4fryyu6u9, child number 0&lt;br /&gt;-------------------------------------&lt;br /&gt;select /*+ no_merge(vv) */ owner, view_name from (select v.owner,&lt;br /&gt;v.view_name    from dba_views v, dba_objects o   where v.owner =&lt;br /&gt;o.owner    AND v.view_name = o.object_name    AND o.object_type='VIEW'&lt;br /&gt;   AND o.status='VALID'    AND v.owner ='PSFT' ) vv where&lt;br /&gt;dbms_metadata.get_ddl('VIEW', vv.view_name, vv.owner) like '%/*+%'&lt;br /&gt;&lt;br /&gt;Plan hash value: 3436948868&lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;| Id  | Operation         | Name     | Starts | E-Rows | A-Rows |   A-Time   | Buffers |  OMem |  1Mem | Used-Mem |&lt;br /&gt;------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;|   0 | SELECT STATEMENT        |      |    1 |       |     14 |00:01:33.65 |  1088K|       |       |   |&lt;br /&gt;|*  1 |  VIEW          |      |    1 |     1 |     14 |00:01:33.65 |  1088K|       |       |   |&lt;br /&gt;|*  2 |   FILTER         |      |    1 |       |   8802 |00:00:00.28 |  7432 |       |       |   |&lt;br /&gt;|   3 |    NESTED LOOPS         |      |    1 |     1 |   8802 |00:00:00.25 |  7432 |       |       |   |&lt;br /&gt;|   4 |     NESTED LOOPS        |      |    1 |     1 |   8802 |00:00:00.21 |  2469 |       |       |   |&lt;br /&gt;|*  5 |      HASH JOIN         |      |    1 |     1 |   8802 |00:00:00.15 |  2464 |  1152K|  1152K| 1616K (0)|&lt;br /&gt;|   6 |       VIEW         | DBA_OBJECTS |    1 |    26 |   8802 |00:00:00.07 |  2239 |       |       |   |&lt;br /&gt;|   7 |        UNION-ALL        |      |    1 |       |   8802 |00:00:00.07 |  2239 |       |       |   |&lt;br /&gt;|*  8 |  TABLE ACCESS BY INDEX ROWID   | SUM$     |    0 |     1 |      0 |00:00:00.01 |     0 |       |       |   |&lt;br /&gt;|*  9 |   INDEX UNIQUE SCAN       | I_SUM$_1    |    0 |     1 |      0 |00:00:00.01 |     0 |       |       |   |&lt;br /&gt;|* 10 |  FILTER         |      |    1 |       |   8802 |00:00:00.06 |  2239 |       |       |   |&lt;br /&gt;|  11 |   NESTED LOOPS        |      |    1 |     1 |   8802 |00:00:00.05 |  2239 |       |       |   |&lt;br /&gt;|  12 |    NESTED LOOPS        |      |    1 |     1 |   8802 |00:00:00.03 |  2236 |       |       |   |&lt;br /&gt;|  13 |     TABLE ACCESS BY INDEX ROWID| USER$     |    1 |     1 |      1 |00:00:00.01 |     2 |       |       |   |&lt;br /&gt;|* 14 |      INDEX UNIQUE SCAN       | I_USER1     |    1 |     1 |      1 |00:00:00.01 |     1 |       |       |   |&lt;br /&gt;|* 15 |     TABLE ACCESS BY INDEX ROWID| OBJ$     |    1 |     1 |   8802 |00:00:00.03 |  2234 |       |       |   |&lt;br /&gt;|* 16 |      INDEX RANGE SCAN       | I_OBJ5     |    1 |    25 |   8803 |00:00:00.01 |   222 |       |       |   |&lt;br /&gt;|* 17 |    INDEX RANGE SCAN       | I_USER2     | 8802 |     1 |   8802 |00:00:00.02 |     3 |       |       |   |&lt;br /&gt;|* 18 |   TABLE ACCESS BY INDEX ROWID  | IND$     |    0 |     1 |      0 |00:00:00.01 |     0 |       |       |   |&lt;br /&gt;|* 19 |    INDEX UNIQUE SCAN       | I_IND1     |    0 |     1 |      0 |00:00:00.01 |     0 |       |       |   |&lt;br /&gt;|  20 |   NESTED LOOPS        |      |    0 |     1 |      0 |00:00:00.01 |     0 |       |       |   |&lt;br /&gt;|* 21 |    INDEX FULL SCAN       | I_USER2     |    0 |     1 |      0 |00:00:00.01 |     0 |       |       |   |&lt;br /&gt;|* 22 |    INDEX RANGE SCAN       | I_OBJ4     |    0 |     1 |      0 |00:00:00.01 |     0 |       |       |   |&lt;br /&gt;|* 23 |  FILTER         |      |    1 |       |      0 |00:00:00.01 |     0 |       |       |   |&lt;br /&gt;|  24 |   NESTED LOOPS        |      |    0 |     2 |      0 |00:00:00.01 |     0 |       |       |   |&lt;br /&gt;|  25 |    TABLE ACCESS BY INDEX ROWID | USER$     |    0 |     1 |      0 |00:00:00.01 |     0 |       |       |   |&lt;br /&gt;|* 26 |     INDEX UNIQUE SCAN       | I_USER1     |    0 |     1 |      0 |00:00:00.01 |     0 |       |       |   |&lt;br /&gt;|* 27 |    INDEX RANGE SCAN       | I_LINK1     |    0 |     2 |      0 |00:00:00.01 |     0 |       |       |   |&lt;br /&gt;|  28 |       NESTED LOOPS        |      |    1 |  2546 |  25853 |00:00:00.03 |   225 |       |       |   |&lt;br /&gt;|  29 |        TABLE ACCESS BY INDEX ROWID    | USER$     |    1 |     1 |      1 |00:00:00.01 |     2 |       |       |   |&lt;br /&gt;|* 30 |  INDEX UNIQUE SCAN       | I_USER1     |    1 |     1 |      1 |00:00:00.01 |     1 |       |       |   |&lt;br /&gt;|* 31 |        INDEX RANGE SCAN        | I_OBJ5     |    1 |  2546 |  25853 |00:00:00.01 |   223 |       |       |   |&lt;br /&gt;|* 32 |      INDEX RANGE SCAN        | I_USER2     | 8802 |     1 |   8802 |00:00:00.05 |     5 |       |       |   |&lt;br /&gt;|* 33 |     INDEX UNIQUE SCAN        | I_VIEW1     | 8802 |     1 |   8802 |00:00:00.03 |  4963 |       |       |   |&lt;br /&gt;|  34 |    NESTED LOOPS         |      |    0 |     1 |      0 |00:00:00.01 |     0 |       |       |   |&lt;br /&gt;|* 35 |     INDEX FULL SCAN        | I_USER2     |    0 |     1 |      0 |00:00:00.01 |     0 |       |       |   |&lt;br /&gt;|* 36 |     INDEX RANGE SCAN        | I_OBJ4     |    0 |     1 |      0 |00:00:00.01 |     0 |       |       |   |&lt;br /&gt;------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Predicate Information (identified by operation id):&lt;br /&gt;---------------------------------------------------&lt;br /&gt;&lt;br /&gt;   1 - filter("DBMS_METADATA"."GET_DDL"('VIEW',"VV"."VIEW_NAME","VV"."OWNER") LIKE '%/*+%')&lt;br /&gt;   2 - filter((("O"."TYPE#"&lt;&gt;4 AND "O"."TYPE#"&lt;&gt;5 AND "O"."TYPE#"&lt;&gt;7 AND "O"."TYPE#"&lt;&gt;8 AND "O"."TYPE#"&lt;&gt;9 AND "O"."TYPE#"&lt;&gt;10&lt;br /&gt;       AND "O"."TYPE#"&lt;&gt;11 AND "O"."TYPE#"&lt;&gt;12 AND "O"."TYPE#"&lt;&gt;13 AND "O"."TYPE#"&lt;&gt;14 AND "O"."TYPE#"&lt;&gt;22 AND "O"."TYPE#"&lt;&gt;87 AND&lt;br /&gt;       "O"."TYPE#"&lt;&gt;88) OR BITAND("U"."SPARE1",16)=0 OR (INTERNAL_FUNCTION("O"."TYPE#") AND&lt;br /&gt;       ((SYS_CONTEXT('userenv','current_edition_name')='ORA$BASE' AND "U"."TYPE#"&lt;&gt;2) OR ("U"."TYPE#"=2 AND&lt;br /&gt;       "U"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edition_id'))) OR  IS NOT NULL))))&lt;br /&gt;   5 - access("O"."NAME"="O"."OBJECT_NAME")&lt;br /&gt;   8 - filter(BITAND("S"."XPFLAGS",8388608)=8388608)&lt;br /&gt;   9 - access("S"."OBJ#"=:B1)&lt;br /&gt;  10 - filter(((("O"."TYPE#"&lt;&gt;1 AND "O"."TYPE#"&lt;&gt;10) OR ("O"."TYPE#"=1 AND =1)) AND (("O"."TYPE#"&lt;&gt;4 AND "O"."TYPE#"&lt;&gt;5 AND&lt;br /&gt;       "O"."TYPE#"&lt;&gt;7 AND "O"."TYPE#"&lt;&gt;8 AND "O"."TYPE#"&lt;&gt;9 AND "O"."TYPE#"&lt;&gt;10 AND "O"."TYPE#"&lt;&gt;11 AND "O"."TYPE#"&lt;&gt;12 AND&lt;br /&gt;       "O"."TYPE#"&lt;&gt;13 AND "O"."TYPE#"&lt;&gt;14 AND "O"."TYPE#"&lt;&gt;22 AND "O"."TYPE#"&lt;&gt;87 AND "O"."TYPE#"&lt;&gt;88) OR BITAND("U"."SPARE1",16)=0 OR&lt;br /&gt;       (INTERNAL_FUNCTION("O"."TYPE#") AND ((SYS_CONTEXT('userenv','current_edition_name')='ORA$BASE' AND "U"."TYPE#"&lt;&gt;2) OR&lt;br /&gt;       ("U"."TYPE#"=2 AND "U"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edition_id'))) OR  IS NOT NULL)))))&lt;br /&gt;  14 - access("U"."NAME"='PSFT')&lt;br /&gt;  15 - filter((DECODE("O"."STATUS",0,'N/A',1,'VALID','INVALID')='VALID' AND BITAND("O"."FLAGS",128)=0))&lt;br /&gt;  16 - access("O"."SPARE3"="U"."USER#" AND "O"."LINKNAME" IS NULL)&lt;br /&gt;       filter(("O"."NAME"&lt;&gt;'_NEXT_OBJECT' AND "O"."NAME"&lt;&gt;'_default_auditing_options_' AND "O"."LINKNAME" IS NULL AND&lt;br /&gt;       DECODE("O"."TYPE#",0,'NEXT OBJECT',1,'INDEX',2,'TABLE',3,'CLUSTER',4,'VIEW',5,'SYNONYM',6,'SEQUENCE',7,'PROCEDURE',8,'FUNCTION',9,&lt;br /&gt;       'PACKAGE',11,'PACKAGE BODY',12,'TRIGGER',13,'TYPE',14,'TYPE BODY',19,'TABLE PARTITION',20,'INDEX&lt;br /&gt;       PARTITION',21,'LOB',22,'LIBRARY',23,'DIRECTORY',24,'QUEUE',28,'JAVA SOURCE',29,'JAVA CLASS',30,'JAVA&lt;br /&gt;       RESOURCE',32,'INDEXTYPE',33,'OPERATOR',34,'TABLE SUBPARTITION',35,'INDEX SUBPARTITION',40,'LOB PARTITION',41,'LOB&lt;br /&gt;       SUBPARTITION',42,NVL(,'MATERIALIZED VIEW'),43,'DIMENSION',44,'CONTEXT',46,'RULE SET',47,'RESOURCE PLAN',48,'CONSUMER&lt;br /&gt;       GROUP',51,'SUBSCRIPTION',52,'LOCATION',55,'XML SCHEMA',56,'JAVA DATA',57,'EDITION',59,'RULE',60,'CAPTURE',61,'APPLY',62,'EVALUATIO&lt;br /&gt;       N CONTEXT',66,'JOB',67,'PROGRAM',68,'JOB CLASS',69,'WINDOW',72,'SCHEDULER GROUP',74,'SCHEDULE',79,'CHAIN',81,'FILE&lt;br /&gt;       GROUP',82,'MINING MODEL',87,'ASSEMBLY',90,'CREDENTIAL',92,'CUBE DIMENSION',93,'CUBE',94,'MEASURE FOLDER',95,'CUBE BUILD&lt;br /&gt;       PROCESS',100,'FILE WATCHER',101,'DESTINATION','UNDEFINED')='VIEW'))&lt;br /&gt;  17 - access("O"."OWNER#"="U"."USER#")&lt;br /&gt;  18 - filter(("I"."TYPE#"=1 OR "I"."TYPE#"=2 OR "I"."TYPE#"=3 OR "I"."TYPE#"=4 OR "I"."TYPE#"=6 OR "I"."TYPE#"=7 OR&lt;br /&gt;       "I"."TYPE#"=9))&lt;br /&gt;  19 - access("I"."OBJ#"=:B1)&lt;br /&gt;  21 - access("U2"."TYPE#"=2 AND "U2"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edition_id')))&lt;br /&gt;       filter(("U2"."TYPE#"=2 AND "U2"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edition_id'))))&lt;br /&gt;  22 - access("O2"."DATAOBJ#"=:B1 AND "O2"."TYPE#"=88 AND "O2"."OWNER#"="U2"."USER#")&lt;br /&gt;  23 - filter(NULL IS NOT NULL)&lt;br /&gt;  26 - access("U"."NAME"='PSFT')&lt;br /&gt;  27 - access("L"."OWNER#"="U"."USER#")&lt;br /&gt;  30 - access("U"."NAME"='PSFT')&lt;br /&gt;  31 - access("O"."SPARE3"="U"."USER#")&lt;br /&gt;  32 - access("O"."OWNER#"="U"."USER#")&lt;br /&gt;  33 - access("O"."OBJ#"="V"."OBJ#")&lt;br /&gt;  35 - access("U2"."TYPE#"=2 AND "U2"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edition_id')))&lt;br /&gt;       filter(("U2"."TYPE#"=2 AND "U2"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edition_id'))))&lt;br /&gt;  36 - access("O2"."DATAOBJ#"=:B1 AND "O2"."TYPE#"=88 AND "O2"."OWNER#"="U2"."USER#")&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;100 rows selected.&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;and&lt;br /&gt;&lt;pre class="brush: sql"&gt;&lt;br /&gt;Plan hash value: 739349040&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------------------------------&lt;br /&gt;| Id  | Operation        | Name    | Rows  | Bytes | Cost (%CPU)| Time    |&lt;br /&gt;----------------------------------------------------------------------------------------------------&lt;br /&gt;|   0 | SELECT STATEMENT       |     |  1 |   107 | 66   (2)| 00:00:02 |&lt;br /&gt;|*  1 |  FILTER         |     |    |    |  |    |&lt;br /&gt;|   2 |   NESTED LOOPS        |     |  1 |   107 | 66   (2)| 00:00:02 |&lt;br /&gt;|   3 |    NESTED LOOPS        |     |  1 |   102 | 66   (2)| 00:00:02 |&lt;br /&gt;|*  4 |     HASH JOIN        |     |  1 | 80 | 65   (2)| 00:00:01 |&lt;br /&gt;|   5 |      VIEW        | DBA_OBJECTS | 26 |   624 | 40   (0)| 00:00:01 |&lt;br /&gt;|   6 |       UNION-ALL        |     |    |    |  |    |&lt;br /&gt;|*  7 |        TABLE ACCESS BY INDEX ROWID   | SUM$    |  1 | 26 |  0   (0)| 00:00:01 |&lt;br /&gt;|*  8 |  INDEX UNIQUE SCAN      | I_SUM$_1    |  1 |    |  0   (0)| 00:00:01 |&lt;br /&gt;|*  9 |        FILTER        |     |    |    |  |    |&lt;br /&gt;|  10 |  NESTED LOOPS       |     |  1 |   121 | 40   (0)| 00:00:01 |&lt;br /&gt;|  11 |   NESTED LOOPS       |     |  1 | 99 | 39   (0)| 00:00:01 |&lt;br /&gt;|  12 |    TABLE ACCESS BY INDEX ROWID| USER$    |  1 | 17 |  1   (0)| 00:00:01 |&lt;br /&gt;|* 13 |     INDEX UNIQUE SCAN      | I_USER1    |  1 |    |  0   (0)| 00:00:01 |&lt;br /&gt;|* 14 |    TABLE ACCESS BY INDEX ROWID| OBJ$    |  1 | 82 | 38   (0)| 00:00:01 |&lt;br /&gt;|* 15 |     INDEX RANGE SCAN      | I_OBJ5    | 25 |    | 23   (0)| 00:00:01 |&lt;br /&gt;|* 16 |   INDEX RANGE SCAN      | I_USER2    |  1 | 22 |  1   (0)| 00:00:01 |&lt;br /&gt;|* 17 |  TABLE ACCESS BY INDEX ROWID  | IND$    |  1 |  8 |  2   (0)| 00:00:01 |&lt;br /&gt;|* 18 |   INDEX UNIQUE SCAN      | I_IND1    |  1 |    |  1   (0)| 00:00:01 |&lt;br /&gt;|  19 |  NESTED LOOPS       |     |  1 | 29 |  2   (0)| 00:00:01 |&lt;br /&gt;|* 20 |   INDEX FULL SCAN      | I_USER2    |  1 | 20 |  1   (0)| 00:00:01 |&lt;br /&gt;|* 21 |   INDEX RANGE SCAN      | I_OBJ4    |  1 |  9 |  1   (0)| 00:00:01 |&lt;br /&gt;|* 22 |        FILTER        |     |    |    |  |    |&lt;br /&gt;|  23 |  NESTED LOOPS       |     |  2 | 54 |  2   (0)| 00:00:01 |&lt;br /&gt;|  24 |   TABLE ACCESS BY INDEX ROWID | USER$    |  1 | 17 |  1   (0)| 00:00:01 |&lt;br /&gt;|* 25 |    INDEX UNIQUE SCAN      | I_USER1    |  1 |    |  0   (0)| 00:00:01 |&lt;br /&gt;|* 26 |   INDEX RANGE SCAN      | I_LINK1    |  2 | 20 |  1   (0)| 00:00:01 |&lt;br /&gt;|  27 |      NESTED LOOPS       |     |   127 |  7112 | 24   (0)| 00:00:01 |&lt;br /&gt;|  28 |       TABLE ACCESS BY INDEX ROWID    | USER$    |  1 | 17 |  1   (0)| 00:00:01 |&lt;br /&gt;|* 29 |        INDEX UNIQUE SCAN      | I_USER1    |  1 |    |  0   (0)| 00:00:01 |&lt;br /&gt;|* 30 |       INDEX RANGE SCAN       | I_OBJ5    |   127 |  4953 | 23   (0)| 00:00:01 |&lt;br /&gt;|* 31 |     INDEX RANGE SCAN       | I_USER2    |  1 | 22 |  1   (0)| 00:00:01 |&lt;br /&gt;|* 32 |    INDEX UNIQUE SCAN       | I_VIEW1    |  1 |  5 |  0   (0)| 00:00:01 |&lt;br /&gt;|  33 |   NESTED LOOPS        |     |  1 | 29 |  2   (0)| 00:00:01 |&lt;br /&gt;|* 34 |    INDEX FULL SCAN       | I_USER2    |  1 | 20 |  1   (0)| 00:00:01 |&lt;br /&gt;|* 35 |    INDEX RANGE SCAN       | I_OBJ4    |  1 |  9 |  1   (0)| 00:00:01 |&lt;br /&gt;----------------------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Query Block Name / Object Alias (identified by operation id):&lt;br /&gt;-------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;   1 - SEL$5947ACE7&lt;br /&gt;   5 - SET$1     / O@SEL$2&lt;br /&gt;   6 - SET$1&lt;br /&gt;   7 - SEL$8     / S@SEL$8&lt;br /&gt;   8 - SEL$8     / S@SEL$8&lt;br /&gt;   9 - SEL$DA86A24D&lt;br /&gt;  12 - SEL$DA86A24D / U@SEL$7&lt;br /&gt;  13 - SEL$DA86A24D / U@SEL$7&lt;br /&gt;  14 - SEL$DA86A24D / O@SEL$9&lt;br /&gt;  15 - SEL$DA86A24D / O@SEL$9&lt;br /&gt;  16 - SEL$DA86A24D / U@SEL$9&lt;br /&gt;  17 - SEL$12     / I@SEL$12&lt;br /&gt;  18 - SEL$12     / I@SEL$12&lt;br /&gt;  19 - SEL$11&lt;br /&gt;  20 - SEL$11     / U2@SEL$11&lt;br /&gt;  21 - SEL$11     / O2@SEL$11&lt;br /&gt;  22 - SEL$13&lt;br /&gt;  24 - SEL$13     / U@SEL$13&lt;br /&gt;  25 - SEL$13     / U@SEL$13&lt;br /&gt;  26 - SEL$13     / L@SEL$13&lt;br /&gt;  28 - SEL$5947ACE7 / U@SEL$3&lt;br /&gt;  29 - SEL$5947ACE7 / U@SEL$3&lt;br /&gt;  30 - SEL$5947ACE7 / O@SEL$4&lt;br /&gt;  31 - SEL$5947ACE7 / U@SEL$4&lt;br /&gt;  32 - SEL$5947ACE7 / V@SEL$3&lt;br /&gt;  33 - SEL$6&lt;br /&gt;  34 - SEL$6     / U2@SEL$6&lt;br /&gt;  35 - SEL$6     / O2@SEL$6&lt;br /&gt;&lt;br /&gt;Predicate Information (identified by operation id):&lt;br /&gt;---------------------------------------------------&lt;br /&gt;&lt;br /&gt;   1 - filter("O"."TYPE#"&lt;&gt;4 AND "O"."TYPE#"&lt;&gt;5 AND "O"."TYPE#"&lt;&gt;7 AND "O"."TYPE#"&lt;&gt;8 AND&lt;br /&gt;       "O"."TYPE#"&lt;&gt;9 AND "O"."TYPE#"&lt;&gt;10 AND "O"."TYPE#"&lt;&gt;11 AND "O"."TYPE#"&lt;&gt;12 AND&lt;br /&gt;       "O"."TYPE#"&lt;&gt;13 AND "O"."TYPE#"&lt;&gt;14 AND "O"."TYPE#"&lt;&gt;22 AND "O"."TYPE#"&lt;&gt;87 AND&lt;br /&gt;       "O"."TYPE#"&lt;&gt;88 OR BITAND("U"."SPARE1",16)=0 OR ("O"."TYPE#"=4 OR "O"."TYPE#"=5 OR&lt;br /&gt;       "O"."TYPE#"=7 OR "O"."TYPE#"=8 OR "O"."TYPE#"=9 OR "O"."TYPE#"=10 OR "O"."TYPE#"=11 OR&lt;br /&gt;       "O"."TYPE#"=12 OR "O"."TYPE#"=13 OR "O"."TYPE#"=14 OR "O"."TYPE#"=22 OR "O"."TYPE#"=87) AND&lt;br /&gt;       (SYS_CONTEXT('userenv','current_edition_name')='ORA$BASE' AND "U"."TYPE#"&lt;&gt;2 OR&lt;br /&gt;       "U"."TYPE#"=2 AND "U"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edition_id')) OR&lt;br /&gt;       EXISTS (SELECT 0 FROM SYS."USER$" "U2",SYS."OBJ$" "O2" WHERE "O2"."OWNER#"="U2"."USER#" AND&lt;br /&gt;       "O2"."TYPE#"=88 AND "O2"."DATAOBJ#"=:B1 AND "U2"."TYPE#"=2 AND&lt;br /&gt;       "U2"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edition_id')))))&lt;br /&gt;   4 - access("O"."NAME"="O"."OBJECT_NAME")&lt;br /&gt;   7 - filter(BITAND("S"."XPFLAGS",8388608)=8388608)&lt;br /&gt;   8 - access("S"."OBJ#"=:B1)&lt;br /&gt;   9 - filter(("O"."TYPE#"&lt;&gt;1 AND "O"."TYPE#"&lt;&gt;10 OR "O"."TYPE#"=1 AND (SELECT 1 FROM&lt;br /&gt;       "SYS"."IND$" "I" WHERE "I"."OBJ#"=:B1 AND ("I"."TYPE#"=1 OR "I"."TYPE#"=2 OR "I"."TYPE#"=3&lt;br /&gt;       OR "I"."TYPE#"=4 OR "I"."TYPE#"=6 OR "I"."TYPE#"=7 OR "I"."TYPE#"=9))=1) AND&lt;br /&gt;       ("O"."TYPE#"&lt;&gt;4 AND "O"."TYPE#"&lt;&gt;5 AND "O"."TYPE#"&lt;&gt;7 AND "O"."TYPE#"&lt;&gt;8 AND "O"."TYPE#"&lt;&gt;9&lt;br /&gt;       AND "O"."TYPE#"&lt;&gt;10 AND "O"."TYPE#"&lt;&gt;11 AND "O"."TYPE#"&lt;&gt;12 AND "O"."TYPE#"&lt;&gt;13 AND&lt;br /&gt;       "O"."TYPE#"&lt;&gt;14 AND "O"."TYPE#"&lt;&gt;22 AND "O"."TYPE#"&lt;&gt;87 AND "O"."TYPE#"&lt;&gt;88 OR&lt;br /&gt;       BITAND("U"."SPARE1",16)=0 OR ("O"."TYPE#"=4 OR "O"."TYPE#"=5 OR "O"."TYPE#"=7 OR&lt;br /&gt;       "O"."TYPE#"=8 OR "O"."TYPE#"=9 OR "O"."TYPE#"=10 OR "O"."TYPE#"=11 OR "O"."TYPE#"=12 OR&lt;br /&gt;       "O"."TYPE#"=13 OR "O"."TYPE#"=14 OR "O"."TYPE#"=22 OR "O"."TYPE#"=87) AND&lt;br /&gt;       (SYS_CONTEXT('userenv','current_edition_name')='ORA$BASE' AND "U"."TYPE#"&lt;&gt;2 OR&lt;br /&gt;       "U"."TYPE#"=2 AND "U"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edition_id')) OR&lt;br /&gt;       EXISTS (SELECT 0 FROM SYS."USER$" "U2",SYS."OBJ$" "O2" WHERE "O2"."OWNER#"="U2"."USER#" AND&lt;br /&gt;       "O2"."TYPE#"=88 AND "O2"."DATAOBJ#"=:B2 AND "U2"."TYPE#"=2 AND&lt;br /&gt;       "U2"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edition_id'))))))&lt;br /&gt;  13 - access("U"."NAME"='PSFT')&lt;br /&gt;  14 - filter(DECODE("O"."STATUS",0,'N/A',1,'VALID','INVALID')='VALID' AND&lt;br /&gt;       BITAND("O"."FLAGS",128)=0)&lt;br /&gt;  15 - access("O"."SPARE3"="U"."USER#" AND "O"."LINKNAME" IS NULL)&lt;br /&gt;       filter("O"."NAME"&lt;&gt;'_NEXT_OBJECT' AND "O"."NAME"&lt;&gt;'_default_auditing_options_' AND&lt;br /&gt;       "O"."LINKNAME" IS NULL AND DECODE("O"."TYPE#",0,'NEXT&lt;br /&gt;       OBJECT',1,'INDEX',2,'TABLE',3,'CLUSTER',4,'VIEW',5,'SYNONYM',6,'SEQUENCE',7,'PROCEDURE',8,'F&lt;br /&gt;       UNCTION',9,'PACKAGE',11,'PACKAGE BODY',12,'TRIGGER',13,'TYPE',14,'TYPE BODY',19,'TABLE&lt;br /&gt;       PARTITION',20,'INDEX PARTITION',21,'LOB',22,'LIBRARY',23,'DIRECTORY',24,'QUEUE',28,'JAVA&lt;br /&gt;       SOURCE',29,'JAVA CLASS',30,'JAVA RESOURCE',32,'INDEXTYPE',33,'OPERATOR',34,'TABLE&lt;br /&gt;       SUBPARTITION',35,'INDEX SUBPARTITION',40,'LOB PARTITION',41,'LOB SUBPARTITION',42,NVL(&lt;br /&gt;       (SELECT 'REWRITE EQUIVALENCE' FROM SYS."SUM$" "S" WHERE "S"."OBJ#"=:B1 AND&lt;br /&gt;       BITAND("S"."XPFLAGS",8388608)=8388608),'MATERIALIZED&lt;br /&gt;       VIEW'),43,'DIMENSION',44,'CONTEXT',46,'RULE SET',47,'RESOURCE PLAN',48,'CONSUMER&lt;br /&gt;       GROUP',51,'SUBSCRIPTION',52,'LOCATION',55,'XML SCHEMA',56,'JAVA&lt;br /&gt;       DATA',57,'EDITION',59,'RULE',60,'CAPTURE',61,'APPLY',62,'EVALUATION&lt;br /&gt;       CONTEXT',66,'JOB',67,'PROGRAM',68,'JOB CLASS',69,'WINDOW',72,'SCHEDULER&lt;br /&gt;       GROUP',74,'SCHEDULE',79,'CHAIN',81,'FILE GROUP',82,'MINING&lt;br /&gt;       MODEL',87,'ASSEMBLY',90,'CREDENTIAL',92,'CUBE DIMENSION',93,'CUBE',94,'MEASURE&lt;br /&gt;       FOLDER',95,'CUBE BUILD PROCESS',100,'FILE WATCHER',101,'DESTINATION','UNDEFINED')='VIEW')&lt;br /&gt;  16 - access("O"."OWNER#"="U"."USER#")&lt;br /&gt;  17 - filter("I"."TYPE#"=1 OR "I"."TYPE#"=2 OR "I"."TYPE#"=3 OR "I"."TYPE#"=4 OR&lt;br /&gt;       "I"."TYPE#"=6 OR "I"."TYPE#"=7 OR "I"."TYPE#"=9)&lt;br /&gt;  18 - access("I"."OBJ#"=:B1)&lt;br /&gt;  20 - access("U2"."TYPE#"=2 AND "U2"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edit&lt;br /&gt;       ion_id')))&lt;br /&gt;       filter("U2"."TYPE#"=2 AND "U2"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edit&lt;br /&gt;       ion_id')))&lt;br /&gt;  21 - access("O2"."DATAOBJ#"=:B1 AND "O2"."TYPE#"=88 AND "O2"."OWNER#"="U2"."USER#")&lt;br /&gt;  22 - filter(NULL IS NOT NULL)&lt;br /&gt;  25 - access("U"."NAME"='PSFT')&lt;br /&gt;  26 - access("L"."OWNER#"="U"."USER#")&lt;br /&gt;  29 - access("U"."NAME"='PSFT')&lt;br /&gt;  30 - access("O"."SPARE3"="U"."USER#")&lt;br /&gt;       filter("DBMS_METADATA"."GET_DDL"('VIEW',"O"."NAME","U"."NAME") LIKE '%/*+%')&lt;br /&gt;  31 - access("O"."OWNER#"="U"."USER#")&lt;br /&gt;  32 - access("O"."OBJ#"="V"."OBJ#")&lt;br /&gt;  34 - access("U2"."TYPE#"=2 AND "U2"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edit&lt;br /&gt;       ion_id')))&lt;br /&gt;       filter("U2"."TYPE#"=2 AND "U2"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edit&lt;br /&gt;       ion_id')))&lt;br /&gt;  35 - access("O2"."DATAOBJ#"=:B1 AND "O2"."TYPE#"=88 AND "O2"."OWNER#"="U2"."USER#")&lt;br /&gt;&lt;br /&gt;Column Projection Information (identified by operation id):&lt;br /&gt;-----------------------------------------------------------&lt;br /&gt;&lt;br /&gt;   1 - "O"."NAME"[VARCHAR2,30], "U"."NAME"[VARCHAR2,30]&lt;br /&gt;   2 - (#keys=0) "O"."NAME"[VARCHAR2,30], "U"."NAME"[VARCHAR2,30], "O"."OBJ#"[NUMBER,22],&lt;br /&gt;       "O"."TYPE#"[NUMBER,22], "U"."TYPE#"[NUMBER,22], "U"."SPARE1"[NUMBER,22],&lt;br /&gt;       "U"."SPARE2"[NUMBER,22]&lt;br /&gt;   3 - (#keys=0) "O"."NAME"[VARCHAR2,30], "U"."NAME"[VARCHAR2,30], "O"."OBJ#"[NUMBER,22],&lt;br /&gt;       "O"."TYPE#"[NUMBER,22], "U"."TYPE#"[NUMBER,22], "U"."SPARE1"[NUMBER,22],&lt;br /&gt;       "U"."SPARE2"[NUMBER,22]&lt;br /&gt;   4 - (#keys=1) "O"."NAME"[VARCHAR2,30], "U"."NAME"[VARCHAR2,30], "O"."OBJ#"[NUMBER,22],&lt;br /&gt;       "O"."OWNER#"[NUMBER,22], "O"."TYPE#"[NUMBER,22]&lt;br /&gt;   5 - "O"."OBJECT_NAME"[VARCHAR2,128]&lt;br /&gt;   6 - STRDEF[30], STRDEF[128], STRDEF[19], STRDEF[7]&lt;br /&gt;   8 - "S".ROWID[ROWID,10]&lt;br /&gt;   9 - "U"."NAME"[VARCHAR2,30], "O"."OBJ#"[NUMBER,22], "O"."NAME"[VARCHAR2,30],&lt;br /&gt;       "O"."TYPE#"[NUMBER,22], "O"."STATUS"[NUMBER,22]&lt;br /&gt;  10 - (#keys=0) "U"."NAME"[VARCHAR2,30], "O"."OBJ#"[NUMBER,22], "O"."NAME"[VARCHAR2,30],&lt;br /&gt;       "O"."TYPE#"[NUMBER,22], "O"."STATUS"[NUMBER,22], "U"."TYPE#"[NUMBER,22],&lt;br /&gt;       "U"."SPARE1"[NUMBER,22], "U"."SPARE2"[NUMBER,22]&lt;br /&gt;  11 - (#keys=0) "U"."NAME"[VARCHAR2,30], "O"."OBJ#"[NUMBER,22], "O"."OWNER#"[NUMBER,22],&lt;br /&gt;       "O"."NAME"[VARCHAR2,30], "O"."TYPE#"[NUMBER,22], "O"."STATUS"[NUMBER,22]&lt;br /&gt;  12 - "U"."USER#"[NUMBER,22], "U"."NAME"[VARCHAR2,30]&lt;br /&gt;  13 - "U".ROWID[ROWID,10], "U"."NAME"[VARCHAR2,30]&lt;br /&gt;  14 - "O"."OBJ#"[NUMBER,22], "O"."OWNER#"[NUMBER,22], "O"."NAME"[VARCHAR2,30],&lt;br /&gt;       "O"."TYPE#"[NUMBER,22], "O"."STATUS"[NUMBER,22]&lt;br /&gt;  15 - "SYS_ALIAS_4".ROWID[ROWID,10], "O"."NAME"[VARCHAR2,30], "O"."TYPE#"[NUMBER,22],&lt;br /&gt;       "O"."OWNER#"[NUMBER,22], "O"."OBJ#"[NUMBER,22]&lt;br /&gt;  16 - "U"."TYPE#"[NUMBER,22], "U"."SPARE1"[NUMBER,22], "U"."SPARE2"[NUMBER,22]&lt;br /&gt;  18 - "I".ROWID[ROWID,10]&lt;br /&gt;  19 - (#keys=0)&lt;br /&gt;  20 - "U2"."USER#"[NUMBER,22]&lt;br /&gt;  22 - "U"."NAME"[VARCHAR2,30], "L"."NAME"[VARCHAR2,128]&lt;br /&gt;  23 - (#keys=0) "U"."NAME"[VARCHAR2,30], "L"."NAME"[VARCHAR2,128]&lt;br /&gt;  24 - "U"."USER#"[NUMBER,22], "U"."NAME"[VARCHAR2,30]&lt;br /&gt;  25 - "U".ROWID[ROWID,10], "U"."NAME"[VARCHAR2,30]&lt;br /&gt;  26 - "L"."NAME"[VARCHAR2,128]&lt;br /&gt;  27 - (#keys=0) "U"."NAME"[VARCHAR2,30], "O"."OBJ#"[NUMBER,22], "O"."OWNER#"[NUMBER,22],&lt;br /&gt;       "O"."NAME"[VARCHAR2,30], "O"."TYPE#"[NUMBER,22]&lt;br /&gt;  28 - "U"."USER#"[NUMBER,22], "U"."NAME"[VARCHAR2,30]&lt;br /&gt;  29 - "U".ROWID[ROWID,10], "U"."NAME"[VARCHAR2,30]&lt;br /&gt;  30 - "O"."OBJ#"[NUMBER,22], "O"."OWNER#"[NUMBER,22], "O"."NAME"[VARCHAR2,30],&lt;br /&gt;       "O"."TYPE#"[NUMBER,22]&lt;br /&gt;  31 - "U"."TYPE#"[NUMBER,22], "U"."SPARE1"[NUMBER,22], "U"."SPARE2"[NUMBER,22]&lt;br /&gt;  33 - (#keys=0)&lt;br /&gt;  34 - "U2"."USER#"[NUMBER,22]&lt;br /&gt;&lt;br /&gt;195 rows selected.&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;I did not came down what's really wrong in the 2nd case. But it is some of these effects where I'd blame the database more than the SQL for invalidity.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-7734808511343615126?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/7734808511343615126/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=7734808511343615126' title='3 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/7734808511343615126'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/7734808511343615126'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2010/12/invalid-sql-if-hint-is-missing.html' title='Invalid SQL if hint is missing?'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-5056673105669541137</id><published>2010-12-23T12:44:00.007+01:00</published><updated>2010-12-30T16:11:12.608+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='GUI'/><title type='text'>GUI criticism</title><content type='html'>As a DBA, I'm not a big fan of Graphical User Interfaces.&lt;br /&gt;From my point of view they too often hiding more information than they visualize.&lt;br /&gt;As I am no GUI developer, please excuse me if I name some things not correct.&lt;br /&gt;&lt;br /&gt;I'll show an example. Please take this screenshot. I do not own the tool myself but got this via email from a developer.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_E63cStXJqzo/TRM2PjLuUBI/AAAAAAAAAJY/kfSqtWQD8GQ/s1600/GUI_criticism.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 317px; height: 400px;" src="http://2.bp.blogspot.com/_E63cStXJqzo/TRM2PjLuUBI/AAAAAAAAAJY/kfSqtWQD8GQ/s400/GUI_criticism.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5553842406248304658" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;What can I see?&lt;br /&gt;In the top left corner I see 3 tabs, the active one is &lt;i&gt;Sessions&lt;/i&gt;. This shows me a table with one line highlighted (sid &lt;u&gt;160&lt;/u&gt;). Below that table, there is something I would assume as a sub-tab. Especially the borders of that tab makes me think so, as it's 'above' the '&lt;i&gt;Sessions&lt;/i&gt;' tab.&lt;br /&gt;The sub-tab &lt;i&gt;Waits&lt;/i&gt; is the active on. In it I see 2 Tables, &lt;i&gt;Current Waits&lt;/i&gt; and &lt;i&gt;Total Waits&lt;/i&gt;.&lt;br /&gt;At the bottom I can find a line &lt;i&gt;Last refresh&lt;/i&gt;. I'm glad I have any timestamp anywhere.&lt;br /&gt;&lt;br /&gt;This is all really fine. But I'm still missing something:&lt;br /&gt;&lt;div&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;In general, I'd like to know the statement which generates the data I can see here. In the topmost table, I assume it will query v$session, v$process and some others to get the informations. But what's the query exactly? Even small changes can mean something different. Do you see the column &lt;i&gt;CPU&lt;/i&gt; in the first table? I can not even imagine it's origin.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Many tools provide the ability to spool all SQLs they generate into a file. But as they do not associate the SQL to the visual representation, it's still guesswork.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;I can not see which columns I do &lt;b&gt;not&lt;/b&gt; see! Is the &lt;i&gt;AUDSID&lt;/i&gt; important? Most of the time I'd say no. Until I have to deal with auditing &lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;I can not adapt the query according to my needs. In the &lt;i&gt;Current Waits&lt;/i&gt; table - I assume based on &lt;i&gt;v$session_wait&lt;/i&gt; I am often interested in the P1, P2 and P3 values (sometimes even raw - it depends). Sometimes also the &lt;u&gt;change&lt;/u&gt; of &lt;i&gt;SEQ#&lt;/i&gt; is of some interest. This rapidly forces me to go to the command line, or SQL-window if you want.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;But there are also clever examples of some GUIs. The one I like most (as it helps both blind people and others) is &lt;a href=http://oracledoug.com/serendipity/index.php?/archives/1469-Grid-Control-Accessibility.html&gt;Providing Textual Descriptions of Charts&lt;/a&gt;. It's still not the SQL, but at least the content of a graph in re-useable form.&lt;br /&gt;&lt;br /&gt;I have only considered of any kind of query, yet. no DML or DDL operations at the moment. Maybe it's worth another post in the future ;-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-5056673105669541137?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/5056673105669541137/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=5056673105669541137' title='2 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/5056673105669541137'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/5056673105669541137'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2010/12/gui-criticism.html' title='GUI criticism'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_E63cStXJqzo/TRM2PjLuUBI/AAAAAAAAAJY/kfSqtWQD8GQ/s72-c/GUI_criticism.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-1218307114766814131</id><published>2010-12-20T20:19:00.005+01:00</published><updated>2011-02-21T11:52:05.842+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='11.2.0.2'/><category scheme='http://www.blogger.com/atom/ns#' term='BUG'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='al32utf8'/><title type='text'>create database might fail with 11.2.0.2</title><content type='html'>I hit a nice bug at a test migration from 10.2.0.5 to 11.2.0.2.&lt;br /&gt;As it's easier to convince Oracle Support of a problem if the testcase is just simple, a colleague reduced the testcase to&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&lt;br /&gt;cretate a small pfile:&lt;/i&gt;&lt;br /&gt;&lt;pre class="brush: sql"&gt;&lt;br /&gt;db_name=test&lt;br /&gt;db_block_size=2048&lt;br /&gt;db_create_file_dest=/tmp&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;i&gt; and run &lt;/i&gt;&lt;br /&gt;&lt;pre class="brush: sql"&gt;create database character set al32utf8;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;the result is:&lt;br /&gt;&lt;pre class="brush: sql"&gt;&lt;br /&gt;create database character set al32utf8&lt;br /&gt;*&lt;br /&gt;ERROR at line 1:&lt;br /&gt;ORA-01092: ORACLE instance terminated. Disconnection forced&lt;br /&gt;ORA-01501: CREATE DATABASE failed&lt;br /&gt;ORA-01519: error while processing file '?/rdbms/admin/doptim.bsq' near line 416&lt;br /&gt;ORA-00604: error occurred at recursive SQL level 1&lt;br /&gt;ORA-01429: Index-Organized Table: no data segment to store overflow row-pieces&lt;br /&gt;Process ID: 16723&lt;br /&gt;Session ID: 47 Serial number: 1&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;For Orale Support this really was enough to file &lt;a href="https://supporthtml.oracle.com/ep/faces/secure/ml3/sr/ViewDefectDetail.jspx?id=10410249"&gt;Bug:10410249&lt;/a&gt; towards development.&lt;br /&gt;&lt;br /&gt;If you have a Database with blocksize of &lt;b&gt;2k&lt;/b&gt; and a &lt;b&gt;multibyte characterset&lt;/b&gt;, beware!&lt;br /&gt;&lt;br /&gt;So far enough for Oracle Support. Just to provide some more insights:&lt;br /&gt;the upgrade failed at&lt;br /&gt;&lt;i&gt;@catupgrd.sql&lt;/i&gt;&lt;br /&gt;with&lt;br /&gt;&lt;pre class="brush: sql"&gt;&lt;br /&gt;SQL&gt; begin&lt;br /&gt; 2    dbms_stats.delete_table_stats('SYS', 'OBJ$MIG');&lt;br /&gt; 3    dbms_stats.delete_table_stats('SYS', 'USER$MIG');&lt;br /&gt; 4    dbms_Stats.gather_table_stats('SYS', 'OBJ$MIG',  estimate_percent =&gt; 100,&lt;br /&gt; 5                                   method_opt=&gt;'FOR ALL COLUMNS SIZE SKEWONLY');&lt;br /&gt; 6    dbms_Stats.gather_table_stats('SYS', 'USER$MIG', estimate_percent =&gt; 100,&lt;br /&gt; 7                                   method_opt=&gt;'FOR ALL COLUMNS SIZE SKEWONLY');&lt;br /&gt; 8  end;&lt;br /&gt; 9  /&lt;br /&gt;begin&lt;br /&gt;*&lt;br /&gt;ERROR at line 1:&lt;br /&gt;ORA-04063: package body "SYS.DBMS_STATS" has errors&lt;br /&gt;ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_STATS"&lt;br /&gt;ORA-06512: at line 2&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;I did not know why &lt;i&gt;dbms_stats&lt;/i&gt; seems to be broken. So I tried to run &lt;i&gt;catupgrd.sql&lt;/i&gt; again - same problem.&lt;br /&gt;&lt;br /&gt;Next step: recompile dbms_stats manually.&lt;br /&gt;at running&lt;br /&gt;&lt;pre class="brush: sql"&gt;&lt;br /&gt;@prvtstas.plb&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;it showed me there was an error at line 2175.&lt;br /&gt;If you are curious what's going on there:&lt;br /&gt;&lt;pre class="brush: sql"&gt;&lt;br /&gt;2175 CURSOR GET_COL_GROUP_USAGE(OWNER VARCHAR2, TABNAME VARCHAR2) IS&lt;br /&gt;2176 SELECT CU.OBJ# OBJN, CU.COLS,&lt;br /&gt;2177    (CASE WHEN BITAND(CU.FLAGS, 1) = 1 THEN 'FILTER ' ELSE '' END) ||&lt;br /&gt;2178    (CASE WHEN BITAND(CU.FLAGS, 2) = 2 THEN 'JOIN ' ELSE '' END) ||&lt;br /&gt;2179    (CASE WHEN BITAND(CU.FLAGS, 4) = 4 THEN 'GROUP_BY ' ELSE '' END) USAGE,&lt;br /&gt;2180    CU.FLAGS USAGEFLG&lt;br /&gt;2181 FROM SYS.COL_GROUP_USAGE$ CU&lt;br /&gt;2182 WHERE CU.OBJ# = (SELECT O.OBJ# FROM SYS.OBJ$ O, SYS.USER$ U&lt;br /&gt;2183                     WHERE O.OWNER# = U.USER#&lt;br /&gt;2184                       AND U.NAME = OWNER&lt;br /&gt;2185                       AND O.NAMESPACE = 1&lt;br /&gt;2186                       AND O.REMOTEOWNER IS NULL&lt;br /&gt;2187                       AND O.LINKNAME IS NULL&lt;br /&gt;2188                       AND O.SUBNAME IS NULL&lt;br /&gt;2189                       AND O.TYPE# = 2&lt;br /&gt;2190                       AND O.NAME = TABNAME)&lt;br /&gt;2191   ORDER BY ...&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;I checked &lt;i&gt;COL_GROUP_USAGE$&lt;/i&gt; - but it did not exist!&lt;br /&gt;&lt;br /&gt;Some grep in &lt;i&gt;$ORACLE_HOME/rdbms/admin&lt;/i&gt; brought me to &lt;i&gt;c1102000.sql&lt;/i&gt;&lt;br /&gt;There I can read:&lt;br /&gt;&lt;pre class="brush: sql"&gt;&lt;br /&gt;-- #(9577300) Column group usage&lt;br /&gt;create table col_group_usage$&lt;br /&gt;(&lt;br /&gt; obj#              number,                                 /* object number */&lt;br /&gt; /*&lt;br /&gt;  * We store intcol# separated by comma in the following column.&lt;br /&gt;  * We allow upto 32 (CKYMAX) columns in the group. intcol# can be&lt;br /&gt;  * upto 1000 (or can be 64K in future or with some xml virtual columns?).&lt;br /&gt;  * Assume 5 digits for intcol# and one byte for comma.&lt;br /&gt;  * So max length would be 32 * (5+1) = 192&lt;br /&gt;  */&lt;br /&gt; cols              varchar2(192 char),              /* columns in the group */&lt;br /&gt; timestamp         date,     /* timestamp of last time this row was changed */&lt;br /&gt; flags             number,                                 /* various flags */&lt;br /&gt; constraint        pk_col_group_usage$&lt;br /&gt; primary key       (obj#, cols))&lt;br /&gt; organization index&lt;br /&gt; storage (initial 200K next 100k maxextents unlimited pctincrease 0)&lt;br /&gt;/&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;As I tried to create that table manually, I recieved my ORA-01429.&lt;br /&gt;&lt;br /&gt;We discussed some workarounds internally.&lt;br /&gt;I created the IOT (&lt;u&gt;without&lt;/u&gt; approval from Oracle Support) with &lt;i&gt;cols varchar2(192 &lt;b&gt;byte&lt;/b&gt;)&lt;/i&gt;. Guess what, it worked! Also &lt;i&gt;@catupgrd.sql&lt;/i&gt; was fine afterwards.&lt;br /&gt;As I'm sure in this particular DB there are only column names with plain ASCII, this will not be an issue in this particular DB. But some other suggestions like creating a heap table or IOT without the cols as part of the index definition. This might result in performance problems of dbms_stats, but does not affect any logic (as my WA does).&lt;br /&gt;&lt;br /&gt;&lt;b&gt;UPDATE:&lt;/b&gt;&lt;br /&gt;Patch:10410249 is provided for this issue now. It's labeled &lt;i&gt;generic&lt;/i&gt;, as it contains only some sql files for $ORACLE_HOME/rdbms/admin and the proper patch (and rollback) scripts.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-1218307114766814131?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/1218307114766814131/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=1218307114766814131' title='2 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/1218307114766814131'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/1218307114766814131'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2010/12/create-database-might-fail-with-11202.html' title='create database might fail with 11.2.0.2'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-9095129569746947617</id><published>2010-11-12T09:08:00.013+01:00</published><updated>2010-12-19T18:38:25.236+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='multicast'/><category scheme='http://www.blogger.com/atom/ns#' term='mDNS'/><category scheme='http://www.blogger.com/atom/ns#' term='11.2.0.2'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>11.2.0.2 multicast fails totally</title><content type='html'>Recently Oracle released a new Patch Set: 11g Release 2 (11.2.0.2) Patch Set 1&lt;br /&gt;&lt;br /&gt;In its &lt;a href="https://updates.oracle.com/Orion/PatchDetails/view_readme?plat_lang=226P&amp;amp;patch_file=&amp;amp;file_id=&amp;amp;password_required=&amp;amp;password_required_readme=&amp;amp;merged_trans=&amp;amp;aru=12918649&amp;amp;patch_num=10098816&amp;amp;patch_num_id=1294815&amp;amp;default_release=80112020&amp;amp;default_plat_lang=226P&amp;amp;default_compatible_with=&amp;amp;patch_password=&amp;amp;orderby=&amp;amp;direction=&amp;amp;no_header=0&amp;amp;sortcolpressed=&amp;amp;tab_number="&gt;README&lt;/a&gt; there is no word about &lt;i&gt;multicast&lt;/i&gt; or the IP &lt;i&gt;230.0.1.0&lt;/i&gt;. It just contains a link to the &lt;a href="https://support.oracle.com/CSP/main/article?cmd=show&amp;amp;type=NOT&amp;amp;doctype=README&amp;amp;id=1179474.1"&gt;Known Issues specific to the 11.2.0.2 Patch Set&lt;/a&gt;. Still no word there about &lt;i&gt;multicast&lt;/i&gt; or the IP &lt;i&gt;230.0.1.0&lt;/i&gt;.&lt;br /&gt;But why is it so important for me, more than it seems to be for Oracle?&lt;br /&gt;&lt;br /&gt;Oracle &lt;b&gt;has&lt;/b&gt; introduced a new feature in 11.2.0.2 Grid Infrastructure: It uses multicast communication on the cluster interlink for some purposes.&lt;br /&gt;To be more precise, it uses the IP &lt;i&gt;230.0.1.0&lt;/i&gt; by default for this purpose.&lt;br /&gt;&lt;br /&gt;Multicast per se is not a bad thing at all, but it should be done &lt;b&gt;right&lt;/b&gt;, not the Oracle way:&lt;br /&gt;&lt;br /&gt;The IANA has defined a &lt;a href=http://www.iana.org/assignments/multicast-addresses/multicast-addresses.xml&gt;set of IP adresses&lt;/a&gt; to be used for multicast communication. All together this is the range from 224.0.0.0 to 239.255.255.255. &lt;br /&gt;As &lt;i&gt;230.0.1.0&lt;/i&gt; is within this range - everything fine? &lt;b&gt;NO!&lt;/b&gt;&lt;br /&gt;The block &lt;a href=http://www.iana.org/assignments/multicast-addresses/multicast-addresses.xml#multicast-addresses-9&gt;225.0.0.0-231.255.255.255&lt;/a&gt; is marked as &lt;a href=http://tools.ietf.org/html/rfc5771#page-8&gt;RESERVED&lt;/a&gt;. And the IETF has a clear wording about these addresses: &lt;p&gt;&lt;i&gt;Applications &lt;b&gt;MUST NOT&lt;/b&gt; use addressing in the IANA reserved blocks.&lt;/i&gt;&lt;p&gt;&lt;br /&gt;It seems I'm not the first person who found out this issue. If you read &lt;br /&gt;&lt;a href="https://support.oracle.com/CSP/main/article?cmd=show&amp;id=1212703.1&amp;type=NOT"&gt;11.2.0.2 Grid Infrastructure Install or Upgrade may fail due to Multicasting Requirement [ID 1212703.1]&lt;/a&gt; you see the &lt;br /&gt;&lt;H2 class=km&gt;&lt;A NAME="CAUSE"&gt;&lt;/A&gt;Cause&lt;/H2&gt; &lt;br /&gt;The cause of this issue is CSSD being unable to establish network communication on the private interconnect network.&amp;nbsp; Assuming that Cluster Verify (cluvfy) has succeeded on all network checks or you are upgrading to 11.2.0.2 whereas the previous release was not experiencing communication issues, multicast not being enabled on the private network is a potential cause.&lt;br&gt;&lt;br&gt;Oracle Grid Infrastructure 11.2.0.2 introduces new feature called Redundant Interconnect allowing for Oracle Supplied redundancy for the cluster interconnect.&amp;nbsp; With this new feature, multicast network communication on the private interconnect network is utilized on bootstrap to establish communication with peer nodes in the cluster, once communication is established network communication is then switched to unicast.&amp;nbsp; This mulitcast communication utilizes the 230.0.1.0 address (port 42424) on the private interconnect network.&amp;nbsp;  Therefore multicast on the private interconnect network must be enabled and properly functioning on all cluster nodes for the mulitcast address 230.0.1.0 (port 42424).&amp;nbsp;  Should multicast communication fail, the end result will be the inability for the node to join the cluster (as shown above in the symptoms).&amp;nbsp;&lt;p&gt;&lt;br /&gt;and a suggested&lt;br /&gt;&lt;H2 class=km&gt;&lt;A NAME="FIX"&gt;&lt;/A&gt;Solution&lt;/H2&gt; &lt;br /&gt;It has been found that the functionality of multicast on the 230.0.1.0 (port 42424) network address has been problematic with some network environments resulting in the issue stated above.&amp;nbsp; To address this issue Oracle has released &lt;a href='https://updates.oracle.com/ARULink/PatchDetails/process_form?patch_num=9974223' target='_blank' &gt;Patch: 9974223&lt;/a&gt; on top of 11.2.0.2 .&amp;nbsp; This patch makes use of the 224.0.0.251&amp;nbsp;(port 42424) multicast network address in addition to the 230.0.1.0 (port 42424) multicast address.&amp;nbsp; Multicast must be enabled on one of these two addresses to allow for Oracle Grid Infrastructure to successfully start on all cluster nodes.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Patch 9974223 has a size of 153M for Linux x86-64. but that's not a problem per se.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;The real problem is the spirit of the patch: Instead of making the multicast IP configureable (by that it would be possible to use a dedicated IP address which was assigned for exactly that purpose) Oracle decided to use another IP: &lt;i&gt;224.0.0.251&lt;/i&gt;. So let's look for that IP in more detail: In the IANAs Document for multicast IPs &lt;i&gt;224.0.0.251&lt;/i&gt; is defined for the use with &lt;i&gt;mDNS&lt;/i&gt; - &lt;a href=http://en.wikipedia.org/wiki/Multicast_DNS#Apple.27s_protocol:_Multicast_DNS.2FDNS-SD&gt; Multicast DNS&lt;/a&gt;.&lt;br /&gt;Ok. Now we have at least an IP which is defined to be used with a protocol to announce available resources within a local network. But still, Oracle failed:&lt;br /&gt;Now &lt;i&gt;224.0.0.251 (port &lt;u&gt;42424&lt;/u&gt;)&lt;/i&gt; is used. But this conflicts with the &lt;a href=http://www.ietf.org/&gt;IETF&lt;/a&gt;s Document for &lt;a href=http://tools.ietf.org/html/draft-cheshire-dnsext-multicastdns-12&gt;Multicast DNS&lt;/a&gt;: There you can read: &lt;br /&gt;&lt;p&gt;&lt;br /&gt;When this document uses the term "Multicast DNS", it should be taken&lt;br /&gt;   to mean: "Clients performing DNS-like queries for DNS-like resource&lt;br /&gt;   records by sending DNS-like UDP query and response packets over IP&lt;br /&gt;   Multicast to UDP port 5353." &lt;br /&gt;&lt;p&gt;&lt;br /&gt;5353 != 42424 &lt;br /&gt;&lt;p&gt;&lt;br /&gt;At the end my plea to Oracle is: Make the Multicast IP of a Cluster configurable by the customer! Follow existing standards! Many companies has different requirements regarding the usage of IPs - so any hard coded value will have disadvantages.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Update:&lt;/b&gt; I've just created &lt;a href=https://support.oracle.com/CSP/main/sr/detail?sr_number=3-2347539801&amp;tzOffset=-60&amp;entrySortOrder=descending&amp;hideSystemMessages=N&amp;bodyOnly=true&gt;SR:3-2347539801&lt;/a&gt; for this - just out of curiosity.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-9095129569746947617?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/9095129569746947617/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=9095129569746947617' title='2 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/9095129569746947617'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/9095129569746947617'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2010/11/11202-multicast-fails-totally.html' title='11.2.0.2 multicast fails totally'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-3294134467353942234</id><published>2010-10-29T12:34:00.004+02:00</published><updated>2010-10-29T12:50:56.303+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='11.2.0.1.0'/><title type='text'>Oracle joke</title><content type='html'>Sometimes it's really funny to read logfiles (and yes, some sarcasm helps a lot!)&lt;div&gt;my todays joke is this one:&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: sql"&gt;&lt;br /&gt;ALTER DATABASE ENABLE BLOCK CHANGE TRACKING&lt;br /&gt;Fri Oct 29 11:28:04 2010&lt;br /&gt;Block change tracking file is current.&lt;br /&gt;Fri Oct 29 11:28:30 2010&lt;br /&gt;Starting background process CTWR&lt;br /&gt;Fri Oct 29 11:28:30 2010&lt;br /&gt;CTWR started with pid=58, OS id=9457&lt;br /&gt;Fri Oct 29 11:28:55 2010&lt;br /&gt;ORA-1013 signalled during: ALTER DATABASE ENABLE BLOCK CHANGE TRACKING...&lt;br /&gt;Stopping background process CTWR&lt;br /&gt;Fri Oct 29 11:29:26 2010&lt;br /&gt;Background process CTWR not dead after 30 seconds&lt;br /&gt;Killing background process CTWR&lt;br /&gt;Fri Oct 29 11:29:26 2010&lt;br /&gt;PMON (ospid: 4322): terminating the instance due to error 487&lt;br /&gt;Fri Oct 29 11:29:26 2010&lt;br /&gt;ORA-1092 : opitsk aborting process&lt;br /&gt;Fri Oct 29 11:29:26 2010&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;What was going here?&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Someone tried to enable &lt;a href=http://download.oracle.com/docs/cd/E11882_01/backup.112/e10642/rcmbckba.htm#BRADV89533&gt;Block Change Tracking&lt;/a&gt;.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;The process CTWR started. &lt;/li&gt;&lt;br /&gt;&lt;li&gt;(for some reason) the DBA hit ^C before the operation finished.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;The instance tried to stop the CTWR.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;CTWR did not stop within 30 seconds - therefore the instance tried to kill it.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;PMON found CTWR dead (ORA-487 "CTWR process terminated with error"), considered this a critical issue and terminated the instance. (ORA-1092 "ORACLE instance terminated. Disconnection forced") &lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;For me this is one if these &lt;i&gt;bugs&lt;/i&gt; which are not worth investigating.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-3294134467353942234?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/3294134467353942234/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=3294134467353942234' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/3294134467353942234'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/3294134467353942234'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2010/10/oracle-joke.html' title='Oracle joke'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-7531111463041748929</id><published>2010-08-05T10:18:00.004+02:00</published><updated>2010-08-05T10:44:39.240+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='IT'/><title type='text'>back to the future</title><content type='html'>Last month I walked through some boxes full of my old books at my parents house. There I also found my first school book about information technology. It was printed in 1990. So for me it covers almost the beginning of my life with IT.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_E63cStXJqzo/TFp1MNkxnFI/AAAAAAAAAIw/naCmD8zQfoY/s1600/communication.jpg"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 400px; height: 153px;" src="http://2.bp.blogspot.com/_E63cStXJqzo/TFp1MNkxnFI/AAAAAAAAAIw/naCmD8zQfoY/s400/communication.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5501838747449269330" /&gt;&lt;/a&gt;&lt;br /&gt;To my surprise, the first page is not about bits, bytes or ICs. It's about communication:&lt;br /&gt;&lt;br /&gt;With my todays background I scanned through the book and searched if there is anything about SQL or at least databases:&lt;br /&gt;3 types of databases where mentioned there:&lt;div&gt;&lt;ul&gt;&lt;li&gt;hierarchical databases&lt;/li&gt;&lt;li&gt;network databases&lt;/li&gt;&lt;li&gt;relational databases&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;Especially relational databases where described as slow, but flexible ;-)&lt;/div&gt;&lt;/div&gt;&lt;div&gt;SQL was not mentioned within this book, but available database systems where listed:&lt;/div&gt;&lt;div&gt;&lt;a href="http://en.wikipedia.org/wiki/DBase_III_Plus"&gt;&lt;i&gt;dBASE III PLUS&lt;/i&gt;&lt;/a&gt;&lt;i&gt;, Everyman, &lt;/i&gt;&lt;a href="http://en.wikipedia.org/wiki/R:Base"&gt;&lt;i&gt;MS-R:Base&lt;/i&gt;&lt;/a&gt;&lt;i&gt;, &lt;/i&gt;&lt;a href="http://en.wikipedia.org/wiki/Informix"&gt;&lt;i&gt;Informix&lt;/i&gt;&lt;/a&gt;&lt;i&gt;, &lt;/i&gt;&lt;a href="http://en.wikipedia.org/wiki/Dataflex"&gt;&lt;i&gt;Dataflex&lt;/i&gt;&lt;/a&gt; (no Oracle or DB2, sorry).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;As the first pichture in the book is still valueable, so is also the last:&lt;/div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_E63cStXJqzo/TFp5DBf2vpI/AAAAAAAAAI4/elbXS369wMs/s1600/flowchart.jpg"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 321px; height: 400px;" src="http://3.bp.blogspot.com/_E63cStXJqzo/TFp5DBf2vpI/AAAAAAAAAI4/elbXS369wMs/s400/flowchart.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5501842987635097234" /&gt;&lt;/a&gt;&lt;br /&gt;Sometimes it's worth to look into his own history, and books I've read seem to be a valuable method. Many things have changed, some expectations did not come true. But it's worth to know about the own foundation.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-7531111463041748929?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/7531111463041748929/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=7531111463041748929' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/7531111463041748929'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/7531111463041748929'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2010/08/back-to-future.html' title='back to the future'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_E63cStXJqzo/TFp1MNkxnFI/AAAAAAAAAIw/naCmD8zQfoY/s72-c/communication.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-4819216846250006684</id><published>2010-05-13T13:44:00.003+02:00</published><updated>2010-05-13T13:47:49.849+02: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'>debugging MOS</title><content type='html'>If you ever wanted to know a little bit more about the Flash Client of &lt;a href=http://support.oracle.com&gt;My Oracle Support&lt;/a&gt;, you can enable it's debug mode:&lt;br /&gt;&lt;pre&gt;Hold down the CTRL key and click to Oracle logo.&lt;/pre&gt;&lt;br /&gt;I have limited use of these informations, but maybe someone with some more knowledge of Flash can use them?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-4819216846250006684?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/4819216846250006684/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=4819216846250006684' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/4819216846250006684'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/4819216846250006684'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2010/05/debugging-mos.html' title='debugging MOS'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-2888259437516087534</id><published>2010-04-16T08:21:00.002+02:00</published><updated>2010-04-16T08:29:47.650+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CRS'/><category scheme='http://www.blogger.com/atom/ns#' term='awk'/><category scheme='http://www.blogger.com/atom/ns#' term='crs_stat'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='11gR1'/><title type='text'>are my resources in favored place?</title><content type='html'>On a 11gR1 Oracle Cluster I had an issue with some resources not in their favored place. &lt;br /&gt;While investigating, I had to get the affected resources fast (at least faster than reading a huge list of resources manually and &lt;i&gt;think&lt;/i&gt; if they match the rules).&lt;br /&gt;&lt;br /&gt;This brought me to a small script:&lt;br /&gt;&lt;pre class="brush: shell"&gt;&lt;br /&gt;crs_stat -f | awk ' BEGIN { FS="=" &lt;br /&gt;                            c=0}&lt;br /&gt;/^NAME=/{n=$2}&lt;br /&gt;/TYPE=/{t=$2}&lt;br /&gt;/HOSTING_MEMBERS=/{hm=$2}&lt;br /&gt;/PLACEMENT=/{p=$2}&lt;br /&gt;/TARGET=/{g=$2}&lt;br /&gt;/STATE=/{s=$2; &lt;br /&gt;  ch=s&lt;br /&gt;  gsub("ONLINE on ", "",ch)&lt;br /&gt;  if( (p=="favored") &amp;&amp; !( index(hm,ch)&gt;0 ) ) {&lt;br /&gt;    printf("%-30s%-20s%-17s%-15s%-30s\n", n, " should be located on ", hm, " but has STATE: ", s) ;&lt;br /&gt;    c+=1 ;&lt;br /&gt;    }&lt;br /&gt;} &lt;br /&gt;END { exit c }'&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;It prints out a line for every resource which has a &lt;b&gt;favored&lt;/b&gt; placement, but currently is not on any &lt;b&gt;HOSTING_MEMBERS&lt;/b&gt;. &lt;br /&gt;&lt;br /&gt;I'm sure it's not the best awk-code, but it's fine for me. &lt;br /&gt;&lt;br /&gt;To use it in other scripts (e.g. monitoring) I can use &lt;i&gt;| wc -l &lt;/i&gt; to get the number of suboptimal located resources or just get the return value &lt;i&gt;$?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-2888259437516087534?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/2888259437516087534/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=2888259437516087534' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/2888259437516087534'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/2888259437516087534'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2010/04/are-my-resources-in-favored-place.html' title='are my resources in favored place?'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-2439096573537981476</id><published>2010-03-22T21:58:00.003+01:00</published><updated>2010-03-22T22:41:14.562+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='BUG'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>developers joke</title><content type='html'>Yesterday evening I had to deal with the product of a really funny Oracle developer: &lt;br /&gt;I had requested a CRS patch for &lt;a href="https://supporthtml.oracle.com/ep/faces/secure/km/BugDisplay.jspx?id=8328904&amp;amp;bugProductSource=Oracle"&gt;Bug:8328904&lt;/a&gt; under really high preassure (Management involved). With a target date of 3rd week of March 2010, I got the patch on 19-Mar-2010 about 2pm local time. &lt;b&gt;Just&lt;/b&gt; in time!&lt;br /&gt;So I had the fun to patch a test system on Sunday evening. As allways, it's not that easy as it sounds:&lt;br /&gt;after a slow, but successful preparation of one node and a really easy patch, at restart of the CRS I got &lt;pre&gt;/etc/init.d/init.crs: [[: not found&lt;/pre&gt;&lt;br /&gt;Ok. I knew this Patch was knitted with really hot needles, so after some checking we applied this diff: &lt;pre&gt; 72c72&lt;br /&gt;&lt; if [[ "$CMD" = "init.crs" &amp;&amp; "$PARENT_CMD" != "startpar" ]]; then&lt;br /&gt;---&lt;br /&gt;&gt; if [ "$CMD" = "init.crs" ] &amp;&amp; [ "$PARENT_CMD" != "startpar" ]; then&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;All the patching ended at Monday, 2am.&lt;br /&gt;&lt;br /&gt;Of course, I updated my SR on Monday morning with this slightly detail.&lt;br /&gt;The answer was overwhelming:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;/etc/init.d/init.crs: [[: not found encountered while startup is a known issue and bug is already filed.( &lt;a href="https://support.oracle.com/CSP/main/article?cmd=show&amp;type=NOT&amp;id=1053868.1"&gt;bug# 9131555&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;The problem is with the 11.1.0.7. bundle 2 . Since the patch was created on top of 11.1.0.7 bundle 2 hence the same error got passed on. The workaround is correct and is same as mentioned in the above mentioned bug. So no problem it is a supported workaround.&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;What a funny developer! &lt;br /&gt;delivering a patch for a escalated but just in time, delivering another &lt;b&gt;known&lt;/b&gt; within it.&lt;br /&gt;&lt;br /&gt;Who can tell me why i was not laughing?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-2439096573537981476?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/2439096573537981476/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=2439096573537981476' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/2439096573537981476'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/2439096573537981476'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2010/03/developers-joke.html' title='developers joke'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-9176587816861322871</id><published>2010-03-17T01:01:00.001+01:00</published><updated>2010-03-17T01:01:00.187+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Philosophy'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>Job, hobby or passion?</title><content type='html'>In my &lt;a href="http://berxblog.blogspot.com/2010/03/fastest-sql.html"&gt;last post&lt;/a&gt; I summarized the answers I got on a mailing list for the short question:&lt;br /&gt;&lt;pre&gt;what ist the fastest SQL you can create?&lt;/pre&gt; maybe the most remarkable answer was &lt;pre&gt;I think y'all need a hobby- and one that doesn't include oracle!&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Well, maybe I have to answer. Which is not that easy.&lt;br /&gt;Let's try to confine a little bit: Let's start with &lt;i&gt;Job&lt;/i&gt;. I see a job as a work which I get paid for. So i &lt;u&gt;need&lt;/u&gt; a job to make a living.&lt;br /&gt;At first view a &lt;i&gt;hobby&lt;/i&gt; is a totally contradiction to a Job: I do it at my own will and possible even spend money to do it. A hobby is something I do to have &lt;u&gt;fun&lt;/u&gt;. &lt;br /&gt;But sometimes it's not that easy. &lt;br /&gt;Even if job and hobby are a contradiction in money and choice, they are not imperatively a contradiction in &lt;u&gt;fun&lt;/u&gt;.&lt;br /&gt;Assume, you have a job which at the same time is fun. Why not enjoy this: instead of paying for fun, you get paid for! Maybe it's ok if I call it an &lt;i&gt;avocation&lt;/i&gt;? &lt;br /&gt;Of course, it's not that easy all the time, but nothing is that easy, not even a hobby ;-)&lt;br /&gt;I see one more bonus in this situation: I assume I'm quite good in the tasks I get paid for. And at least at the moment I get a fair salary. I hope, both will at least stay at this level for a long time.&lt;br /&gt;&lt;br /&gt;This all leads me to an answer:&lt;br /&gt;&lt;pre&gt;I have a job in IT, especially Oracle. Why do I need a hobby?&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-9176587816861322871?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/9176587816861322871/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=9176587816861322871' title='1 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/9176587816861322871'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/9176587816861322871'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2010/03/job-hobby-or-passion.html' title='Job, hobby or passion?'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-8825151539751160281</id><published>2010-03-16T09:33:00.003+01:00</published><updated>2010-03-16T11:39:57.457+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>fastest SQL?</title><content type='html'>Recently I &lt;a href="http://www.freelists.org/post/oracle-l/fastest-SQL"&gt;asked&lt;/a&gt; &lt;i&gt;what ist the fastest SQL you can create?&lt;/i&gt; on &lt;a href="http://www.freelists.org/webpage/oracle-l"&gt;oracle-l mailing list&lt;/a&gt;.&lt;br /&gt;It was a kind of challenge. But not a real clever one.&lt;br /&gt;I was more interrested in the way people think and react to this question than in a particular SQL or result.&lt;br /&gt;&lt;br /&gt;Here are some summaries for those who are interrested:&lt;br /&gt;There where 33 replies (until now), these can be grouped by some categories (some mails belong to more than one):&lt;br /&gt;&lt;br /&gt;&lt;i&gt;select 1 from dual;&lt;/i&gt; was suggested by  Niall Litchfield and Kevin Lidh. &lt;br /&gt;Don Granaman showed an imprived version with a &lt;i&gt;view on sys.v_dual&lt;/i&gt;, but Niall and Norman Dunbar argued, that's what &lt;i&gt;fast_dual&lt;/i&gt; was introduced for.&lt;br /&gt;&lt;br /&gt;Niall and Wolfgang Breitling asked for better specifications for the quest, which I left open by intention.&lt;br /&gt;&lt;br /&gt;Another approach started with &lt;i&gt;exit;&lt;/i&gt; by Daniel Fink. Robert Freeman called this &lt;i&gt;not a SQL&lt;/i&gt;, but Grant Allen (&lt;i&gt;--&lt;/i&gt;) and Jaromir D.B. Nemec (&lt;i&gt;"empty statement"&lt;/i&gt;) tried the same direction. &lt;br /&gt;Job Miller suggested the qhole quest as a kind of &lt;i&gt;trick question&lt;/i&gt; With the answer &lt;i&gt;You look at the statement/business logic and decide that you don't need to run that statement at all.&lt;/i&gt; and Daniel gave a real world example for this effect.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Toon Koppelaars and Andre van Winssen both suggested &lt;i&gt;query result cache&lt;/i&gt;. I &lt;a href="http://www.freelists.org/post/oracle-l/fastest-SQL,25"&gt;tried to test this&lt;/a&gt; but could not find a suficient measurement. Brandon Allen raised the method by checking &lt;i&gt; elapsed_time down to microseconds from v$sql/v$sqlstats&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;Wolfgang did one step further with his &lt;i&gt;client side cache&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;A discussion about other products like &lt;i&gt;purple&lt;/i&gt; and &lt;i&gt;Mauve&lt;/i&gt; by Jack C. Applewhite, Christopher Boyle, John Piwowar and Jason Heinrich.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;I think y'all need a hobby- and one that doesn't include oracle!&lt;/i&gt; by Kellyn Pedersen and Kathy Duret seems to be worth a seperate blog!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-8825151539751160281?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/8825151539751160281/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=8825151539751160281' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/8825151539751160281'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/8825151539751160281'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2010/03/fastest-sql.html' title='fastest SQL?'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-8686809987825024838</id><published>2010-03-12T10:23:00.003+01:00</published><updated>2010-03-12T10:32:49.569+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='ASM'/><title type='text'>NOTE:Unident of disk</title><content type='html'>I just wondered where the lines&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;*** 2010-03-12 10:25:13.862&lt;br /&gt;NOTE:Unident of disk:/appl/oracle/asm_disks/c3t60014380024D39280000A000039B0000d0s0_eva&lt;br /&gt;NOTE:Unident of disk:/appl/oracle/asm_disks/c3t60014380024D39280000A00003A10000d0s0_eva&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;came from in my &lt;i&gt;+ASMS744_rbal_3119.trc&lt;/i&gt; trace file every minute.&lt;br /&gt;&lt;br /&gt;As i did not find any matches for &lt;i&gt;NOTE:Unident of disk&lt;/i&gt; in MOS, I tried to open a SR there. Just in the preperation, I checked the status of this particular Disk:&lt;br /&gt;&lt;pre class="brush: sql"&gt;&lt;br /&gt;select header_status, path &lt;br /&gt;from v$asm_disk &lt;br /&gt;where path like '%c3t60014380024D39280000A000039B0000d0s0%';&lt;br /&gt;&lt;br /&gt;HEADER_STATUS PATH&lt;br /&gt;------------- ------------------------------------------------------------------&lt;br /&gt;CANDIDATE     /appl/oracle/asm_disks/c3t60014380024D39280000A000039B0000d0s0_eva&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;So I added these disks to a DiskGroup and the trace file did not grow any further.&lt;br /&gt;&lt;br /&gt;I didn't found anything about &lt;b&gt;Unident of disk&lt;/b&gt; in the docu, MOS or google. sadly.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-8686809987825024838?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/8686809987825024838/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=8686809987825024838' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/8686809987825024838'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/8686809987825024838'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2010/03/noteunident-of-disk.html' title='NOTE:Unident of disk'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-7266122550331641511</id><published>2009-12-31T01:01:00.001+01:00</published><updated>2009-12-31T01:01:01.065+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='excel'/><category scheme='http://www.blogger.com/atom/ns#' term='USL'/><title type='text'>USL in excel - without the need to read</title><content type='html'>&lt;div&gt;Neil Gunther created a nice small excel &lt;a href="http://www.perfdynamics.com/Classes/Materials/sscalc-class.xls"&gt;spreadsheet&lt;/a&gt; to calculate the key values sigma and kappa for his Universal Scalability Law - primarily for the use in his &lt;a href="http://www.perfdynamics.com/Classes/Outlines/guerilla.html"&gt;GCaP class&lt;/a&gt;. Beside some other problems with excels numerical precision and &lt;a href="http://perfdynamics.blogspot.com/2009/05/negative-usl-coefficients-in-excel.html"&gt;Negative Scalability Coefficients in Excel&lt;/a&gt; I dislike the ugly '&lt;i&gt;create a graphic, let it show a trendline and it's coefficients, add these into some cells and continue&lt;/i&gt;' step. Fortunately, Scott Roberts has created some &lt;a href="https://spreadsheets.google.com/ccc?key=0AslFTeSsTP15dHVwS2FHV3dwNXk2R1c0dXkyREozeXc&amp;amp;hl=en"&gt;google spreadsheets&lt;/a&gt; where he implemented a real formula (as google spreadsheets does not support trendlines and their coefficients). These are mentioned in Neils blog entry &lt;a href="http://perfdynamics.blogspot.com/2009/07/scalability-in-spreadsheet-google-style.html"&gt;Scalability in a Spreadsheet - google style&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;As this method is also available in excel, I decided to extend Neils excel by some functions to avoud the &lt;i&gt;read and insert&lt;/i&gt; part. &lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_E63cStXJqzo/Szs9_tKyYWI/AAAAAAAAAHI/xF3O6Ru6GBU/s1600-h/sscalc-class_berx1.jpg"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 140px; height: 162px;" src="http://2.bp.blogspot.com/_E63cStXJqzo/Szs9_tKyYWI/AAAAAAAAAHI/xF3O6Ru6GBU/s400/sscalc-class_berx1.jpg" border="0" alt="sscalc-class_berx1" id="BLOGGER_PHOTO_ID_5420994741136417122" /&gt;&lt;/a&gt; It is not just easier to apply, it's also more accurate as the coefficients shown in the graph are shown with small rounding.&lt;p&gt;&lt;/p&gt;&lt;div&gt;With the formula shown here:&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_E63cStXJqzo/Szs-7oleNtI/AAAAAAAAAHQ/YeSbgGrmQ5g/s1600-h/sscalc-class_berx2.jpg"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 400px; height: 148px;" src="http://2.bp.blogspot.com/_E63cStXJqzo/Szs-7oleNtI/AAAAAAAAAHQ/YeSbgGrmQ5g/s400/sscalc-class_berx2.jpg" border="0" alt="sscalc-class_berx2" id="BLOGGER_PHOTO_ID_5420995770698315474" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;Don't be confused by the semicolons in the formula, depending on your language settings, excel sometimes use colon or semicolon to separate fields of the formula.&lt;/div&gt;&lt;div&gt;Here the detailed fields I've added:&lt;/div&gt;&lt;br /&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Field&amp;nbsp;H11:&lt;/td&gt;&lt;td&gt;R²&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Field&amp;nbsp;I8:&lt;/td&gt;&lt;td&gt;=INDEX(LINEST($G8:$G14;$F8:$F14^{1,2}; FALSE); 1)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Field&amp;nbsp;I9:&lt;/td&gt; &lt;td&gt;=INDEX(INDEX(LINEST($G8:$G14;$F8:$F14^{1,2}; FALSE;TRUE); 1);2)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Field&amp;nbsp;I10:&lt;/td&gt; &lt;td&gt;=INDEX(INDEX(LINEST($G8:$G14;$F8:$F14^{1,2}; FALSE;TRUE); 1);3)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Field&amp;nbsp;I11:&lt;/td&gt; &lt;td&gt;=INDEX(INDEX(LINEST($G8:$G14;$F8:$F14^{1,2}; FALSE;TRUE); 3);1)&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;I hope i used the &lt;a href="http://office.microsoft.com/en-us/excel/HP052091551033.aspx"&gt;LINEST&lt;/a&gt; function correct, and this might help others to reduce one step while playing with USL.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-7266122550331641511?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/7266122550331641511/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=7266122550331641511' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/7266122550331641511'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/7266122550331641511'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2009/12/usl-in-excel-without-need-to-read.html' title='USL in excel - without the need to read'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_E63cStXJqzo/Szs9_tKyYWI/AAAAAAAAAHI/xF3O6Ru6GBU/s72-c/sscalc-class_berx1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-4968823271008891371</id><published>2009-12-30T14:07:00.004+01:00</published><updated>2009-12-30T14:12:21.902+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MOS'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>MOS can't count</title><content type='html'>MOS (the flash version) can not even count up to 3:&lt;br /&gt;&lt;p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_E63cStXJqzo/SztQvDPoxsI/AAAAAAAAAHY/6vzRV3Us7Ic/s1600-h/MOS_count_123.jpg"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 400px; height: 247px;" src="http://2.bp.blogspot.com/_E63cStXJqzo/SztQvDPoxsI/AAAAAAAAAHY/6vzRV3Us7Ic/s400/MOS_count_123.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5421015345725490882" /&gt;&lt;/a&gt;Can someone show me the hidden element?&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-4968823271008891371?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/4968823271008891371/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=4968823271008891371' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/4968823271008891371'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/4968823271008891371'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2009/12/mos-cant-count.html' title='MOS can&apos;t count'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_E63cStXJqzo/SztQvDPoxsI/AAAAAAAAAHY/6vzRV3Us7Ic/s72-c/MOS_count_123.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-8196155639865357477</id><published>2009-12-30T11:30:00.001+01:00</published><updated>2009-12-30T11:30:37.688+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='GCaP'/><category scheme='http://www.blogger.com/atom/ns#' term='Amdahl'/><category scheme='http://www.blogger.com/atom/ns#' term='USL'/><title type='text'>Guerrilla Capacity Planning arrived - let's prepare the underground resistance!</title><content type='html'>Some weeks ago one of my &lt;i&gt;X-mas gifts to myself&lt;/i&gt; arrived. (One of those I'm always allowed to buy as none of my relatives would ever imagine to buy me such books for Christmas): &lt;a href="http://www.perfdynamics.com/iBook/gcap.html"&gt;Guerrilla Capacity Planning&lt;/a&gt; by &lt;a href="http://www.perfdynamics.com/Bio/njg.html"&gt;Neil J. Gunther&lt;/a&gt;. In fact, I was only interested in his &lt;a href="http://en.wikipedia.org/wiki/Neil_J._Gunther#Universal_Law_of_Computational_Scalability"&gt;Universal Scalability Law&lt;/a&gt;, which did me a good service in a performance review some weeks ago.&lt;div&gt;I really like this book and I'm sure it will go with me for some more time; at least every day I go to work by public transport, but also in many other situations. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The idea which gave the book it's name is the &lt;b&gt;&lt;a href="http://www.perfdynamics.com/Classes/Outlines/guerilla.html"&gt;Guerrilla Capacity Planning&lt;/a&gt;&lt;/b&gt;. This is described in the first 2 chapters. &lt;/div&gt;&lt;div&gt;I read it as another iteration of &lt;a href="http://en.wikipedia.org/wiki/KISS_principle"&gt;KISS&lt;/a&gt;, applied to  Capacity Planning. The main goal is to achieve fast and just good enough predictions by the usage of minimal resources and time. It just leads one step further and advises to be well prepared in lean tools and flexible methods to reach the goal when needed. In my current situation, I also see it as a hint to do Capacity Planning in every project, even if it's not calculated within the project plan. But keep it small enough to hide it within the jitter every project contains. The following chapters try to provide some simple weapons to be prepared for all tactical situations which can occur. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Chapter 3 is about significant digits, rounding rules and errors. &lt;/div&gt;&lt;div&gt;These 13 pages where worth reading for &lt;u&gt;me&lt;/u&gt;, because I never had a full qualified mathematical or statistical education. It might be just enough to estimate the errors I carry through all my work and provide them (and their meanings to the results) in any discussion, presentation and so on.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Chapters 4 to 6 are the real reason why I ordered this book:  the &lt;b&gt;Universal Scalability Model&lt;/b&gt; (or Law?). Neil leads in a very consistent way, why scalability is not only limited by &lt;i&gt;contention&lt;/i&gt;, as &lt;a href="http://en.wikipedia.org/wiki/Amdahl's_law"&gt;Amdahls law&lt;/a&gt; implies, but also by &lt;i&gt;coherency&lt;/i&gt;, which leads to a retrograde in scalability beyond p*.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Not only the Model itself is described, but - important for all Guerrilleros - an easy method to gain the parameters for σ and κ out of some measured data with excel is provided. Not mentioned in the book directly but easily to find is the &lt;a href="http://www.perfdynamics.com/Classes/Materials/sscalc-class.xls"&gt;spreadsheet&lt;/a&gt; which contains exactly the method Neil provides.&lt;/div&gt;&lt;div&gt;I would like to have also other methods provided within the book to circumvent the problem with excels numerical precision, but Neil provided (and discussed it's difficulties) a glimpse of a implementation in &lt;a href="http://cran.r-project.org/index.html"&gt;R&lt;/a&gt; &lt;a href="http://perfdynamics.blogspot.com/2009/05/negative-usl-coefficients-in-excel.html"&gt;somewhere else&lt;/a&gt;. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In chapter 7 the main focus is on virtualization across all scales, from in-CPU (Hyperthreading) up to Grids and P2P on the other end of the scale. Here it's more about queues, schedules and polling cycles. I had the feeling I should have read &lt;a href="http://www.perfdynamics.com/iBook/ppa_new.html"&gt;Analyzing Computer System Performance with Perl::PDQ&lt;/a&gt; before. But I have not. (I will, after the 2nd ed. is published). Also there is not too much ammunition for my underground resistance. More a rough description of that area and some major snares. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Currently I cannot say much about chapters 8 to 11 as I'm in the middle of 8 at the moment. they will also be worth to write about them - in the future.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There is also some criticism &lt;a href="http://www.cmg.org/measureit/issues/mit44/m_44_18.html"&gt;outside there&lt;/a&gt; which laments, USL does only provide limited practical use for the forecast, until a set of data is measured and σ and κ are derived from these. In comparison, Amdahls &lt;i&gt;s&lt;/i&gt; can be measured so much easier as the single threaded phase of a program. This criticism provides its own error inside: &lt;u&gt;If&lt;/u&gt; &lt;i&gt;s&lt;/i&gt; can be measured, this mean the setup is well instrumented and known and the target hardware is chosen (otherwise, the measurement must be somehow translated to the target hardware) at least for a single process. But, with a well instrumented and know setup, also all code parts which will account to coherency can be spotted and therefore not only Amdahls &lt;i&gt;s&lt;/i&gt; leads to σ, but the coherency part leads to κ. &lt;/div&gt;&lt;div&gt;Unfortunately, even in a well instrumented Software like Oracle, nobody sorted all the wait events where they account to.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-8196155639865357477?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/8196155639865357477/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=8196155639865357477' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/8196155639865357477'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/8196155639865357477'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2009/12/guerrilla-capacity-planning-arrived.html' title='Guerrilla Capacity Planning arrived - let&apos;s prepare the underground resistance!'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-5947661144173371305</id><published>2009-11-22T21:12:00.001+01:00</published><updated>2009-11-22T21:32:13.097+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='10.2.0.4'/><category scheme='http://www.blogger.com/atom/ns#' term='11.1.0.7'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>PRKO-2007 is not always correct</title><content type='html'>&lt;div&gt;This week I had to stop and start an instance in a CRS-cluster. Nothing special so far, I just hit a PRKO-2007 error. For those which does not know it by heart, here the short description:&lt;br /&gt;&lt;pre&gt;&lt;span style=";font-family:Courier New,Courier,mono;font-size:120%;"  &gt;PRKO-2007: "Invalid instance name: "&lt;br /&gt;Cause: An invalid instance name was entered.&lt;br /&gt;Action: Use the correct instance name for the database. Run 'srvctl config database&lt;br /&gt;-d &lt;db_name&gt;' command to find out all instances of a database in the&lt;br /&gt;Cluster Database Configuration.&lt;br /&gt;&lt;/db_name&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;and here the copy of my commands (solution included):&lt;br /&gt;&lt;pre&gt;&lt;span style=";font-family:Courier New,Courier,mono;font-size:120%;"  &gt;oracle@aves742p:~/ [EDWP031] srvctl stop instance -d &lt;span style="color: rgb(255, 0, 0);"&gt;EDWP03&lt;/span&gt; -i &lt;span style="color: rgb(51, 51, 255);"&gt;EDWP031&lt;/span&gt;&lt;br /&gt;PRKO-2007 : Invalid instance name: EDWP031&lt;br /&gt;oracle@aves742p:~/ [EDWP031] srvctl stop instance -d &lt;span style="color: rgb(255, 0, 0);"&gt;EDWP03&lt;span style="font-weight: bold;"&gt;_SITE1&lt;/span&gt;&lt;/span&gt; -i &lt;span style="color: rgb(51, 51, 255);"&gt;EDWP031&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;I'm sure, you see the &lt;span style="color: rgb(255, 0, 0);"&gt;difference&lt;/span&gt;, and it's not the &lt;span style="color: rgb(51, 51, 255);"&gt;instance&lt;/span&gt;!&lt;br /&gt;Just once again: don't trust the error message 100%, sometimes it's still worth to use the brain ;-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-5947661144173371305?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/5947661144173371305/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=5947661144173371305' title='3 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/5947661144173371305'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/5947661144173371305'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2009/11/prko-2007-is-not-always-correct.html' title='PRKO-2007 is not always correct'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-6739187115844547269</id><published>2009-11-11T22:07:00.004+01:00</published><updated>2009-11-14T21:09:02.628+01:00</updated><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='Oracle'/><title type='text'>hardware lasts longer than software</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_E63cStXJqzo/SvsqKPqoTGI/AAAAAAAAAG8/XXCwYbsx3aA/s1600-h/IMG_6804.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 267px; height: 400px;" src="http://2.bp.blogspot.com/_E63cStXJqzo/SvsqKPqoTGI/AAAAAAAAAG8/XXCwYbsx3aA/s400/IMG_6804.jpg" alt="2.0" id="BLOGGER_PHOTO_ID_5402958533453433954" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;A week ago, Oracle has replaced its good old support platform MetaLink with MyOracleSupport (&lt;a href="https://support.oracle.com/"&gt;MOS&lt;/a&gt;).&lt;br /&gt;The thing I like most about MOS is the non Flash-based &lt;a href="https://supporthtml.oracle.com/"&gt;HTML-Version&lt;/a&gt;.&lt;br /&gt;Many discussions about the need, target and failures during the last week of transition are ongoing in blogs, mailing lists, forums; I also had to suffer and had to communicate it. But that's not what's this blog is about.&lt;br /&gt;&lt;br /&gt;I got into touch with MetaLink in 2000, as Oracle tried to move the customers from calling the Support to a self-service platform. They promoted MetaLink on many events, with everything you can imagine. The transition was not forced, but within a short period of time most customers liked the possibility to get many answers faster than on the phone. A real win-win situation.&lt;br /&gt;Also I learned how to use MetaLink effective and therefore like it.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_E63cStXJqzo/SvsqKKjcB9I/AAAAAAAAAG0/tmTKwOzi8HA/s1600-h/IMG_6803.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 267px; height: 400px;" src="http://2.bp.blogspot.com/_E63cStXJqzo/SvsqKKjcB9I/AAAAAAAAAG0/tmTKwOzi8HA/s400/IMG_6803.jpg" alt="Metalink iTar" id="BLOGGER_PHOTO_ID_5402958532081092562" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;On one of these events, I got the promo-mug. I like it, because I like MetaLink.&lt;br /&gt;Nowadays, everytime I feel without any Support from Oracle, I cling to the mug, hopefully filled with good, strong, hot coffee. This makes me feel a little bit better.&lt;br /&gt;And sometimes, hardware really lasts longer than software, especially if you have the hardware in your hands and take care of.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-6739187115844547269?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/6739187115844547269/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=6739187115844547269' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/6739187115844547269'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/6739187115844547269'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2009/11/hardware-lasts-longer-than-software.html' title='hardware lasts longer than software'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_E63cStXJqzo/SvsqKPqoTGI/AAAAAAAAAG8/XXCwYbsx3aA/s72-c/IMG_6804.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-6963916990366444526</id><published>2009-11-10T01:01:00.003+01:00</published><updated>2009-11-10T01:01:00.119+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PL/SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='rollback'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>rollback in PL/SQL</title><content type='html'>I recently came across a slightly, but possible dangerous mismatch between transactions and the PL/SQL code based on it.&lt;br /&gt;Here a cut down example (not very realistic, but easy to follow):&lt;br /&gt;&lt;pre class="brush: sql"&gt;&lt;br /&gt;create table mytab (myval number);&lt;br /&gt;&lt;br /&gt;create or replace procedure tuwas (&lt;br /&gt;    varA in number,&lt;br /&gt;    varB in number,&lt;br /&gt;    varC OUT number)&lt;br /&gt;is&lt;br /&gt;begin&lt;br /&gt; varC := varA;&lt;br /&gt; insert into mytab values (varA);&lt;br /&gt; if varB = 0 then&lt;br /&gt;   commit;&lt;br /&gt; else&lt;br /&gt;   rollback;&lt;br /&gt; end if;&lt;br /&gt;end;&lt;br /&gt;/&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The Idea behind the code is, to get varA and varB as input parameters, do some calculations (missing here), insert the result into a table and return the calculated value for next steps.&lt;br /&gt;There might be reasons to rollback the DML within the procedure, which is not seen as an error.&lt;br /&gt;&lt;br /&gt;And here the result of the procedure:&lt;br /&gt;&lt;pre class="brush: sql"&gt;&lt;br /&gt;set serverout on&lt;br /&gt;&lt;br /&gt;declare&lt;br /&gt; vA number;&lt;br /&gt; vB number;&lt;br /&gt; vC number;&lt;br /&gt;begin&lt;br /&gt; vA := 1;&lt;br /&gt; vB := 0; -- commit;&lt;br /&gt; tuwas(vA, vB, vC);&lt;br /&gt; dbms_output.put_line('vC: ' ||vC);&lt;br /&gt; vA := 2;&lt;br /&gt; vB := 1; -- rollback;&lt;br /&gt; tuwas(vA, vB, vC);&lt;br /&gt; dbms_output.put_line('vC: ' ||vC);&lt;br /&gt;END; &lt;br /&gt;/&lt;br /&gt;&lt;br /&gt;vC: 1&lt;br /&gt;vC: 2&lt;br /&gt;&lt;br /&gt;select * from mytab;&lt;br /&gt;&lt;br /&gt;    MYVAL&lt;br /&gt;----------&lt;br /&gt;        1&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;What's dangerous here? Even with&lt;br /&gt;&lt;pre&gt;&lt;br /&gt; vA := 2;&lt;br /&gt; vB := 1;&lt;br /&gt;&lt;/pre&gt;the return value&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;vC: 2&lt;br /&gt;&lt;/pre&gt; is given. But t's not visible in the table, as the procedure did a rollback.&lt;br /&gt;I learned from this example never to populate return-values until you are sure it's really stored (if this is a requirement, of course).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-6963916990366444526?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/6963916990366444526/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=6963916990366444526' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/6963916990366444526'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/6963916990366444526'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2009/11/rollback-in-plsql.html' title='rollback in PL/SQL'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-1992553456332649413</id><published>2009-11-09T09:04:00.003+01:00</published><updated>2009-11-09T09:15:37.200+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Security'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>Oracle Security Options</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_E63cStXJqzo/SvfO8BJ3RwI/AAAAAAAAAGs/e_KxQvVNv7c/s1600-h/Oracle_Security_Options.jpg"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 400px; height: 274px;" src="http://1.bp.blogspot.com/_E63cStXJqzo/SvfO8BJ3RwI/AAAAAAAAAGs/e_KxQvVNv7c/s400/Oracle_Security_Options.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5402013808551479042" /&gt;&lt;/a&gt;&lt;br /&gt;Last week I attended a 1 day Seminar about Oracle Security by Dominique Jeunot.&lt;br /&gt;Dominique did a great job to squeeze everything she knows into one day, and it was allways obvious there is a lot more she could tell us in the script and even more in her brain. Nevertheless she created a very good overview with the right level on all topics. It was obvious she could only make a kind of teaser, but it was a very tasty one!&lt;br /&gt;Maybe the most important picture she draw was the first overview about all available features, options and products. I did the effort to draw it for my own joy and will share it here, as it might be helpful for others as well. All options are colored &lt;span class="Apple-style-span"  style="color:#FF0000;"&gt;red&lt;/span&gt;, so you can see where you have to take extra money. &lt;div&gt;&lt;br /&gt;&lt;div&gt;In general you can say: for nearly every issue there are possibilities to do it without extra money (but extra effort) or you can buy a solution.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If someone wants the visio behind this jpeg&lt;a href="http://berx.at/Oracle_Security_Options.vsd"&gt;,&lt;/a&gt; just contact me :)&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&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/5309604992043123290-1992553456332649413?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/1992553456332649413/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=1992553456332649413' title='3 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/1992553456332649413'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/1992553456332649413'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2009/11/oracle-security-options.html' title='Oracle Security Options'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_E63cStXJqzo/SvfO8BJ3RwI/AAAAAAAAAGs/e_KxQvVNv7c/s72-c/Oracle_Security_Options.jpg' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-3772845683349887837</id><published>2009-10-27T11:31:00.003+01:00</published><updated>2009-10-27T11:36:57.822+01:00</updated><title type='text'>ML-fun</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_E63cStXJqzo/SubMXJLMPwI/AAAAAAAAAGg/zRa0vzWsn4s/s1600-h/ML_ERR_7620.jpg"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 320px; height: 174px;" src="http://1.bp.blogspot.com/_E63cStXJqzo/SubMXJLMPwI/AAAAAAAAAGg/zRa0vzWsn4s/s320/ML_ERR_7620.jpg" border="0" alt="ERR-7620 Could not determine workspace for application ()" id="BLOGGER_PHOTO_ID_5397225901422034690" /&gt;&lt;/a&gt;&lt;br /&gt;sometimes it's really funny to see error messages.&lt;br /&gt;This ony I got today:&lt;br /&gt;&lt;div&gt;I think, I'm missing my workspace (or is it the application, who knows ...)&lt;/div&gt;&lt;div&gt;Maybe this is only because of the ongoing transition phase and within the next days everything will be better...&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-3772845683349887837?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/3772845683349887837/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=3772845683349887837' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/3772845683349887837'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/3772845683349887837'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2009/10/ml-fun.html' title='ML-fun'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_E63cStXJqzo/SubMXJLMPwI/AAAAAAAAAGg/zRa0vzWsn4s/s72-c/ML_ERR_7620.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-4983918886293859059</id><published>2009-10-02T10:21:00.005+02:00</published><updated>2009-10-02T11:26:23.492+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='xplan'/><title type='text'>xplan 2.1.3 is out</title><content type='html'>&lt;a href="http://www.adellera.it/about/index.html"&gt;Alberto Dell'Era&lt;/a&gt; released a ne version of his &lt;a href="http://www.adellera.it/scripts_etcetera/xplan/index.html"&gt;xplan&lt;/a&gt; utility. Version 2.1.3 is out now. &lt;br /&gt;Why is it's worth to mention?&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;1st&lt;/span&gt; he fixed a problem I faced within extraordinary speed (&amp;lt; 4 hrs!):&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: sql"&gt;&lt;br /&gt;declare /* xplan_exec_marker */  *** error before main block (&lt;br /&gt;processing XPLAN_OPTIONS ) *** -- main block&lt;br /&gt;                                *&lt;br /&gt;ERROR at line 1:&lt;br /&gt;ORA-06550: line 1, column 34:&lt;br /&gt;PLS-00103: Encountered the symbol "*" when expecting one of the following:&lt;br /&gt;begin function pragma procedure subtype type &amp;lt;an identifier&gt;&lt;br /&gt;&amp;lt;a double-quoted delimited-identifier&gt; current cursor delete&lt;br /&gt;exists prior&lt;br /&gt;&lt;br /&gt;--in setup.lst it's this error:&lt;br /&gt;&lt;br /&gt;declare /* xplan_exec_marker */ -- process options&lt;br /&gt;*&lt;br /&gt;ERROR at line 1:&lt;br /&gt;ORA-06502: PL/SQL: numeric or value error: character string buffer too small&lt;br /&gt;ORA-06512: at line 28&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;and&lt;span style="font-weight:bold;"&gt; 2nd&lt;/span&gt;: he didn't even announce it himself, so someone must do it :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-4983918886293859059?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/4983918886293859059/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=4983918886293859059' title='1 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/4983918886293859059'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/4983918886293859059'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2009/10/xplan-213-is-out.html' title='xplan 2.1.3 is out'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-7476083488897589114</id><published>2009-09-14T08:10:00.005+02:00</published><updated>2009-09-21T21:28:58.084+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='11gR2'/><category scheme='http://www.blogger.com/atom/ns#' term='result cache'/><category scheme='http://www.blogger.com/atom/ns#' term='11gR1'/><title type='text'>result cache not enabled for owner SYS and SYSTEM</title><content type='html'>&lt;span style="font-weight: bold;"&gt;EDIT&lt;/span&gt;: the original title of this blog was "&lt;span style="font-weight: bold;"&gt;result cache not enabled in SYSTEM and SYSAUX Tablespace&lt;/span&gt;".&lt;br /&gt;After a &lt;a href="http://www.blogger.com/profile/11570869033287689498"&gt;totally correct post&lt;/a&gt; from &lt;a href="http://coskan.wordpress.com/"&gt;Coskan&lt;/a&gt; I had to rework it totally. I mixed up the problem and conclusio so much it was totally messed up.&lt;br /&gt;&lt;br /&gt;I hope this one is the better one:&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;br /&gt;During some Tests with result cache in 11gR2 I discovered a small docu bug.&lt;div&gt;You can still see the bug in the &lt;a href="http://download.oracle.com/docs/cd/B28359_01/server.111/b28274/memory.htm#sthref436"&gt;11gR1 docu&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;&lt;p&gt;You cannot cache results when you use the following database objects or functions in your SQL query:&lt;/p&gt; &lt;ul&gt;&lt;li&gt; &lt;p&gt;Dictionary and temporary tables&lt;/p&gt; &lt;/li&gt;&lt;li&gt; &lt;p&gt;Sequence &lt;code&gt;CURRVAL&lt;/code&gt; and &lt;code&gt;NEXTVAL&lt;/code&gt; pseudo columns&lt;/p&gt; &lt;/li&gt;&lt;li&gt; &lt;p&gt;SQL functions &lt;code&gt;current_date&lt;/code&gt;, &lt;code&gt;current_timestamp&lt;/code&gt;, &lt;code&gt;local_timestamp&lt;/code&gt;, &lt;code&gt;userenv/sys_context&lt;/code&gt; (with non-constant variables), &lt;code&gt;sys_guid&lt;/code&gt;, &lt;code&gt;sysdate&lt;/code&gt;, and &lt;code&gt;sys_timestamp&lt;/code&gt;&lt;/p&gt; &lt;/li&gt;&lt;li&gt; &lt;p&gt;Non-deterministic PL/SQL functions&lt;/p&gt; &lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;In 11gR2 it sounds slightly different:  &lt;a href="http://download.oracle.com/docs/cd/E11882_01//server.112/e10821/memory.htm#sthref546"&gt;7.6.4.2 Additional Requirements for the Result Cache&lt;/a&gt;:&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style=";font-family:Tahoma,sans-serif;font-size:small;"  &gt;&lt;p&gt;You cannot cache results when the following objects or functions are in a query:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;Temporary tables and tables in the &lt;code style="font-family: monospace; font-size: 12px;"&gt;SYS&lt;/code&gt; or &lt;code style="font-family: monospace; font-size: 12px;"&gt;SYSTEM&lt;/code&gt; schemas&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Sequence &lt;code style="font-family: monospace; font-size: 12px;"&gt;CURRVAL&lt;/code&gt; and &lt;code style="font-family: monospace; font-size: 12px;"&gt;NEXTVAL&lt;/code&gt; pseudo columns&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;SQL functions &lt;code style="font-family: monospace; font-size: 12px;"&gt;CURRENT_DATE&lt;/code&gt;, &lt;code style="font-family: monospace; font-size: 12px;"&gt;CURRENT_TIMESTAMP&lt;/code&gt;, &lt;code style="font-family: monospace; font-size: 12px;"&gt;LOCAL_TIMESTAMP&lt;/code&gt;, &lt;code style="font-family: monospace; font-size: 12px;"&gt;USERENV/SYS_CONTEXT&lt;/code&gt; (with non-constant variables), &lt;code style="font-family: monospace; font-size: 12px;"&gt;SYS_GUID&lt;/code&gt;, &lt;code style="font-family: monospace; font-size: 12px;"&gt;SYSDATE&lt;/code&gt;, and&lt;code style="font-family: monospace; font-size: 12px;"&gt;SYS_TIMESTAMP&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;for those of you who want to run the testcase:&lt;/div&gt;&lt;pre name="code" class="sql"&gt;&lt;br /&gt;create tablespace berx1 datafile '+DG' SIZE 50M;&lt;br /&gt;create user berx1 identified by berx1;&lt;br /&gt;grant connect to berx1;&lt;br /&gt;grant unlimited tablespace to berx1;&lt;br /&gt;&lt;br /&gt;create table sys.berx1_1 tablespace system as select * from dual;&lt;br /&gt;create table sys.berx1_2 tablespace sysaux as select * from dual;&lt;br /&gt;create table sys.berx1_3 tablespace berx1 as select * from dual;&lt;br /&gt;create table system.berx1_4 tablespace system as select * from dual;&lt;br /&gt;create table system.berx1_5 tablespace sysaux as select * from dual;&lt;br /&gt;create table system.berx1_6 tablespace berx1 as select * from dual;&lt;br /&gt;create table berx1.berx1_7 tablespace system as select * from dual;&lt;br /&gt;create table berx1.berx1_8 tablespace sysaux as select * from dual;&lt;br /&gt;create table berx1.berx1_9 tablespace berx1 as select * from dual;&lt;br /&gt;grant select on sys.berx1_1 to berx1;&lt;br /&gt;grant select on sys.berx1_2 to berx1;&lt;br /&gt;grant select on sys.berx1_3 to berx1;&lt;br /&gt;grant select on system.berx1_4 to berx1;&lt;br /&gt;grant select on system.berx1_5 to berx1;&lt;br /&gt;grant select on system.berx1_6 to berx1;&lt;br /&gt;&lt;br /&gt;set autotrace on&lt;br /&gt;&lt;br /&gt;-- run as user sys, system and berx1:&lt;br /&gt;&lt;br /&gt;select /*+ result_cache */ * from sys.berx1_1;&lt;br /&gt;select /*+ result_cache */ * from sys.berx1_2;&lt;br /&gt;select /*+ result_cache */ * from sys.berx1_3;&lt;br /&gt;select /*+ result_cache */ * from system.berx1_4;&lt;br /&gt;select /*+ result_cache */ * from system.berx1_5;&lt;br /&gt;select /*+ result_cache */ * from system.berx1_6;&lt;br /&gt;select /*+ result_cache */ * from berx1.berx1_7;&lt;br /&gt;select /*+ result_cache */ * from berx1.berx1_8;&lt;br /&gt;select /*+ result_cache */ * from berx1.berx1_9;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;my results are reflected in this matrix:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;table&gt;&lt;thead&gt;  &lt;tr&gt;&lt;td&gt;&lt;br /&gt;&lt;/td&gt;&lt;td&gt;berx1_1&lt;/td&gt; &lt;td&gt;berx1_2&lt;/td&gt; &lt;td&gt;berx1_3&lt;/td&gt;     &lt;td&gt;berx1_4&lt;/td&gt; &lt;td&gt;berx1_5&lt;/td&gt; &lt;td&gt;berx1_6&lt;/td&gt;     &lt;td&gt;berx1_7&lt;/td&gt; &lt;td&gt;berx1_8&lt;/td&gt; &lt;td&gt;berx1_9&lt;/td&gt;    &lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;  &lt;tr&gt;    &lt;td&gt;sys&lt;/td&gt; &lt;td&gt;N&lt;/td&gt; &lt;td&gt;N&lt;/td&gt; &lt;td&gt;N&lt;/td&gt; &lt;td&gt;N&lt;/td&gt;                  &lt;td&gt;N&lt;/td&gt; &lt;td&gt;N&lt;/td&gt; &lt;td&gt;Y&lt;/td&gt; &lt;td&gt;Y&lt;/td&gt; &lt;td&gt;Y&lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;    &lt;td&gt;system &lt;/td&gt; &lt;td&gt;N&lt;/td&gt; &lt;td&gt;N&lt;/td&gt; &lt;td&gt;N&lt;/td&gt; &lt;td&gt;N&lt;/td&gt;                     &lt;td&gt;N&lt;/td&gt; &lt;td&gt;N&lt;/td&gt; &lt;td&gt;Y&lt;/td&gt; &lt;td&gt;Y&lt;/td&gt; &lt;td&gt;Y&lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;    &lt;td&gt;berx1&lt;/td&gt; &lt;td&gt;N&lt;/td&gt; &lt;td&gt;N&lt;/td&gt; &lt;td&gt;N&lt;/td&gt; &lt;td&gt;N&lt;/td&gt;                    &lt;td&gt;N&lt;/td&gt; &lt;td&gt;N&lt;/td&gt; &lt;td&gt;Y&lt;/td&gt; &lt;td&gt;Y&lt;/td&gt; &lt;td&gt;Y&lt;/td&gt;  &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;So in my testcase it's not dependend of the schema (or the &lt;span style="font-style: italic;"&gt;data dichtionary&lt;/span&gt;), but the tablespace.&lt;br /&gt;This issue is addressed in &lt;a href="https://metalink2.oracle.com/metalink/plsql/f?p=130:4:585951328391650050::::p4_database_id,p4_docid,p4_show_header,p4_show_help,p4_black_frame,p4_font:BUG,8558309,1,1,1,helvetica"&gt;BUG:8558309&lt;/a&gt; and fixed in the latest docu :)&lt;br /&gt;&lt;br /&gt;I know, I should never create any objects in SYS or SYSTEM schema. Especially if you want this object to be cached in result cache.&lt;br /&gt;&lt;br /&gt;Once again thank you Coskan for showing my ridiculous error.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-7476083488897589114?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/7476083488897589114/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=7476083488897589114' title='3 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/7476083488897589114'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/7476083488897589114'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2009/09/result-cache-not-enabled-in-system-and.html' title='result cache not enabled for owner SYS and SYSTEM'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-7312356180937371237</id><published>2009-08-26T21:44:00.003+02:00</published><updated>2009-08-26T22:25:31.553+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='direct_access'/><category scheme='http://www.blogger.com/atom/ns#' term='prelim'/><category scheme='http://www.blogger.com/atom/ns#' term='SGA'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>-prelim and direct_access</title><content type='html'>I recently asked a question about the '&lt;i&gt;difference&lt;/i&gt;' &lt;a href="http://www.freelists.org/post/oracle-l/difference-between-prelim-and-direct-access"&gt;between /prelim and direct_access&lt;/a&gt; on &lt;a href="http://www.freelists.org/webpage/oracle-l"&gt;oracle-l&lt;/a&gt;.&lt;br /&gt;&lt;a href="http://blog.tanelpoder.com/"&gt;Tanel Poder&lt;/a&gt; gave a great answer. Now it's nearly clear, at least for me:&lt;br /&gt;&lt;br /&gt;&lt;i&gt;-prelim allows sysdba to start a preliminary connection to db, which&lt;br /&gt;means that a server process is started for you and it attaches to sga&lt;br /&gt;segments, but it does not allocate anything inside sga (no process&lt;br /&gt;state nor session state object and session structures are allocated&lt;br /&gt;for example). This means tha no latch gets are needed in prelim mode&lt;br /&gt;and if you have an instance hang due these latches your session wont&lt;br /&gt;get stuck. You can do very limited things with prelim mode, mostly&lt;br /&gt;just various dumps with oradebug.&lt;br /&gt;&lt;br /&gt;Oradebug direct-access allows you to also query few x dollar tables&lt;br /&gt;with sql-like syntax. thats fake sql though its oradebugs hack, not&lt;br /&gt;real sql. The same is doable with oradebug dumptype as well.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Or, to summarise it (just for me):&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;-prelim&lt;/span&gt; allows me to start a sqlplus binary and connect it to the (correct ≈ right &lt;i&gt;$ORACLE_HOME&lt;/i&gt; and &lt;i&gt;$ORACLE_SID&lt;/i&gt;) SGA without creating anything within this SGA. So for me it's the cheapest way to get access to the shared memory of the specific instance.&lt;/li&gt;&lt;li&gt;this prelim state is of no really use in ordinary life. Just for some really rare occasions, it might be of any use. Most of these are &lt;span style="font-style: italic;"&gt;oradebug&lt;/span&gt; variants. I have not tested any &lt;i&gt;ALTER SYSTEM&lt;/i&gt; or &lt;i&gt;ALTER SESSION&lt;/i&gt; statement yet. Some of them might be worth testing, but most will fail. Ordinary SQL will fail all the time (I'm sure).&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;oradebug direct-access&lt;/span&gt; is a nice gadget to query some x$ tables without really going through all the sql-parse-pin-heap-whatever engine ;-)&lt;/li&gt;&lt;li&gt;at last, -prelim is a kind of last resort to access an instance and at least get some informations, until some really hard &lt;a href="http://oraperf.sourceforge.net/presentations/SGA_access.ppt"&gt;direct SGA access methods&lt;/a&gt; must be considered&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/5309604992043123290-7312356180937371237?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/7312356180937371237/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=7312356180937371237' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/7312356180937371237'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/7312356180937371237'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2009/08/prelim-and-directaccess.html' title='-prelim and direct_access'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-3543302482565293136</id><published>2009-08-18T20:19:00.002+02:00</published><updated>2009-08-18T21:07:22.294+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='NULL'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>The truth about NULL</title><content type='html'>"Do you want something to eat?" - "&lt;span style="font-style: italic;"&gt;NO&lt;/span&gt;"&lt;br /&gt;"Do you want nothintg to eat?" - "&lt;span style="font-style: italic;"&gt;NO&lt;/span&gt;"&lt;br /&gt;"What do you want?" - "&lt;span style="font-style: italic;"&gt;I don't know&lt;/span&gt;" (&lt;span style="font-style: italic;"&gt;off she run crying&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;That was a conversation between me and my 3 years old daughter.&lt;br /&gt;As she run away, totally overstrained by the situation, her dad and her world over all, I had pity on her.&lt;br /&gt;And one thought further, I recognised the true answer she gave me:&lt;br /&gt;it's not "&lt;span style="font-style: italic;"&gt;YES&lt;/span&gt;", it's not "&lt;span style="font-style: italic;"&gt;NO&lt;/span&gt;" (regarding the 1st question), it's "&lt;span style="font-style: italic; font-weight: bold;"&gt;NULL&lt;/span&gt;". Or translated into what I think are the thoughts of a 3 years old girl: "&lt;span style="font-style: italic;"&gt;I don't know what to do now, so I'm against anything and run away!&lt;/span&gt;"&lt;br /&gt;From now on, if any application designer argues with me, why any column can &lt;u&gt;not&lt;/u&gt; be set &lt;i&gt;NOT NULL&lt;/i&gt;, I will remember this picture of a overstrained, 3 years old girl and just feel pity.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-3543302482565293136?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/3543302482565293136/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=3543302482565293136' title='1 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/3543302482565293136'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/3543302482565293136'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2009/08/truth-about-null.html' title='The truth about NULL'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-1111578567948259927</id><published>2009-08-04T20:55:00.002+02:00</published><updated>2009-08-04T21:00:30.438+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='function'/><category scheme='http://www.blogger.com/atom/ns#' term='cbo'/><title type='text'>cbo costing for pl/sql functions</title><content type='html'>I rarely create a blog entry just to refer to another article, but this time it's worth to do so:&lt;br /&gt;&lt;a href="http://www.oracle-developer.net/display.php?id=426#"&gt;pl/sql functions and cbo costing&lt;/a&gt; from &lt;a href="http://apex.oracle.com/pls/otn/f?p=19297:4:5553434559725641::NO:4:P4_ID:274"&gt;Adrian Billington&lt;/a&gt; is worth reading and at the end a must know for anyone, who writes pl/sql functions and considers performance.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-1111578567948259927?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/1111578567948259927/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=1111578567948259927' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/1111578567948259927'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/1111578567948259927'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2009/08/cbo-costing-for-plsql-functions.html' title='cbo costing for pl/sql functions'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-8906768528585570169</id><published>2009-07-15T11:27:00.004+02:00</published><updated>2009-10-02T11:47:03.524+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sqlplus'/><category scheme='http://www.blogger.com/atom/ns#' term='linesize'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>linesize.sql</title><content type='html'>For a new set of db-servers I'm currently reworking our sql-script-toolbox.&lt;br /&gt;Many of these scripts are copied and modified from other sources, but this particular is created by myself.&lt;br /&gt;It's target is to set the linesize of sqlplus according the actual size of the unix terminal (yes, it's only for unix systems). So if you change the size of your terminal window, and you have this script in your SQL_PATH, just type &lt;i&gt;@linesize&lt;/i&gt; and you use your terminal the best way you can.&lt;br /&gt;&lt;br /&gt;It uses a defined &lt;i&gt;mycpid&lt;/i&gt; to distinguish different processes at the same time, and I populated this define with a &lt;i&gt;logon.sql&lt;/i&gt; which is derived from Tanel Poders init.sql out of his package &lt;a href="http://www.tanelpoder.com/files/TPT_public.zip"&gt;TPT_public.zip&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: sql"&gt;&lt;br /&gt;-- linesize.sql&lt;br /&gt;--&lt;br /&gt;-- mycpid must be defined before - e.g. in logon.sql&lt;br /&gt;--&lt;br /&gt;-- set linesize according to stty&lt;br /&gt;-- handle with care, as stty is not consistent over platform boundaries&lt;br /&gt;--&lt;br /&gt;&lt;br /&gt;set termout off&lt;br /&gt;&lt;br /&gt;define _linesize_cmd1 = 'echo -n "set linesize " &gt; /tmp/linesize_&amp;amp;mycpid..sql '&lt;br /&gt;-- for solaris:&lt;br /&gt;define _linesize_cmd2 = 'stty -a  | awk -F''[ ;]'' ''/columns/ { print $7 }'' &gt;&gt;/tmp/linesize_&amp;amp;mycpid..sql'&lt;br /&gt;-- for linux:&lt;br /&gt;-- define _linesize_cmd2 = 'stty -a  | awk -F''[ ;]'' ''/columns/ { print $9 }'' &gt;&gt;/tmp/linesize_&amp;amp;mycpid..sql'&lt;br /&gt;&lt;br /&gt;HOST &amp;amp;_linesize_cmd1&lt;br /&gt;HOST &amp;amp;_linesize_cmd2&lt;br /&gt;&lt;br /&gt;@ '/tmp/linesize_&amp;amp;mycpid..sql'&lt;br /&gt;&lt;br /&gt;undef _linesize_cmd1 _linesize_cmd2&lt;br /&gt;&lt;br /&gt;set termout on&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Unfortunately the output of &lt;i&gt;stty -a&lt;/i&gt; is not defined, so every OS provides a slightly different format and I have to change the parsing for every OS and sometomes even major release. &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Might it be useful for someone else, too ;)&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-8906768528585570169?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/8906768528585570169/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=8906768528585570169' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/8906768528585570169'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/8906768528585570169'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2009/07/linesizesql.html' title='linesize.sql'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-7544048547764139636</id><published>2009-05-18T22:00:00.000+02:00</published><updated>2009-05-18T22:00:00.657+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='fgac'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='trigger'/><title type='text'>before select trigger</title><content type='html'>The whole idea to create a '&lt;span style="font-style: italic;"&gt;before select trigge&lt;/span&gt;r' is based on a comment Martin Jensen dropped during his Seminar about Advanced Materialized Views in Vienna this week. So this all is not my idea, I just wanted to test the suggestion to get used to it.&lt;br /&gt;The whole functionality utilizes FGAC.&lt;br /&gt;As &lt;a href="http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:1726246308406"&gt;some&lt;/a&gt; &lt;a href="http://oracle-randolf.blogspot.com/2009/02/how-to-force-hard-parse.html"&gt;others&lt;/a&gt; &lt;a href="http://www.jlcomp.demon.co.uk/16_rls_02.doc"&gt;have&lt;/a&gt; also &lt;a href="http://dioncho.wordpress.com/2009/02/06/making-sql-always-hard-parsed-using-row-level-security/"&gt;noticed&lt;/a&gt;, the function is called twice per every execution, so I have to reduce the effective execution of my action.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;So let's start with - a log_table:&lt;br /&gt;&lt;pre name="code" class="sql"&gt;create table log_table&lt;br /&gt;(datum date,&lt;br /&gt;c varchar2(80)) ;&lt;/pre&gt;&lt;br /&gt;Now something which can write into this table.&lt;p&gt;The package is necessary to hold my package variable &lt;span style="font-style: italic;"&gt;tot_calls&lt;/span&gt; and eliminate every 2nd execution of the function (otherwise it would fire twice, not recommended in most cases, I guess).&lt;/p&gt;&lt;p&gt;The autonomous_transaction might be necessary in most cases, but if someone find business-cases where it's recommended not to be autonomous, just drop this line and have the trigger under full transaction control.&lt;br /&gt;&lt;/p&gt;&lt;pre name="code" class="sql"&gt;CREATE OR REPLACE PACKAGE my_select_package AS&lt;br /&gt;FUNCTION my_select_trigger (p_schema in varchar2,&lt;br /&gt;                      p_object in varchar2 ) return varchar2;&lt;br /&gt;END my_select_package;&lt;br /&gt;/&lt;br /&gt;&lt;br /&gt;CREATE OR REPLACE PACKAGE BODY my_select_package AS&lt;br /&gt;tot_calls NUMBER := 0;&lt;br /&gt;function my_select_trigger( p_schema in varchar2,&lt;br /&gt;                                p_object in varchar2 ) return varchar2&lt;br /&gt;as&lt;br /&gt;PRAGMA AUTONOMOUS_TRANSACTION;&lt;br /&gt;begin&lt;br /&gt;tot_calls := tot_calls + 1;&lt;br /&gt;if mod(tot_calls, 2) &gt; 0&lt;br /&gt;then&lt;br /&gt;insert into log_table values (sysdate, 'function was here: ' ||p_schema ||'.' || p_object || ' tot_calls: ' ||tot_calls);&lt;br /&gt;commit;&lt;br /&gt;end if;&lt;br /&gt;return NULL;&lt;br /&gt;end;&lt;br /&gt;END my_select_package;&lt;br /&gt;/&lt;br /&gt;&lt;/pre&gt;What are we still missing? A table to connect the trigger to, with some data:&lt;br /&gt;&lt;pre name="code" class="sql"&gt;create table my_table&lt;br /&gt;(  data        varchar2(30)&lt;br /&gt;);&lt;br /&gt;&lt;br /&gt;insert into my_table ( data ) values ( 'Some Data' );&lt;br /&gt;&lt;br /&gt;insert into my_table ( data ) values ( 'Some other Data' );&lt;br /&gt;&lt;br /&gt;commit;&lt;br /&gt;&lt;/pre&gt;Now let's tight these pieces together:&lt;br /&gt;&lt;pre name="code" class="sql"&gt;begin&lt;br /&gt;dbms_rls.add_policy&lt;br /&gt;( object_schema   =&gt; 'SR3',&lt;br /&gt;object_name     =&gt; 'MY_TABLE',&lt;br /&gt;policy_name     =&gt; 'MY_SELECT_TRIGGER',&lt;br /&gt;function_schema =&gt; 'SR3',&lt;br /&gt;policy_function =&gt; 'MY_SELECT_PACKAGE.MY_SELECT_TRIGGER',&lt;br /&gt;statement_types =&gt; 'select' ,&lt;br /&gt;update_check    =&gt; FALSE );&lt;br /&gt;end;&lt;br /&gt;/&lt;br /&gt;&lt;/pre&gt;and some trivial tests:&lt;br /&gt;&lt;pre name="code" class="sql"&gt;select * from my_table;&lt;br /&gt;&lt;br /&gt;DATA                           OWNER&lt;br /&gt;------------------------------ ------------------------------&lt;br /&gt;Some Data                      SR3&lt;br /&gt;Some Data Owned by SCOTT       SCOTT&lt;br /&gt;&lt;br /&gt;select * from log_table;&lt;br /&gt;&lt;br /&gt;DATUM               C&lt;br /&gt;------------------- --------------------------------------------------&lt;br /&gt;2009-05-18 13:19:09 function was here: SR3.MY_TABLE tot_calls: 1&lt;br /&gt;&lt;br /&gt;select * from my_table;&lt;br /&gt;-- ...&lt;br /&gt;&lt;br /&gt;select * from log_table;&lt;br /&gt;&lt;br /&gt;DATUM               C&lt;br /&gt;------------------- --------------------------------------------------&lt;br /&gt;2009-05-18 13:19:09 function was here: SR3.MY_TABLE tot_calls: 1&lt;br /&gt;2009-05-18 13:19:15 function was here: SR3.MY_TABLE tot_calls: 3&lt;br /&gt;&lt;/pre&gt;works like a charm.&lt;br /&gt;&lt;br /&gt;Anything more to say?&lt;br /&gt;Of course, as allways, this is only a proove of concept.&lt;br /&gt;As allways, most parts are borrowed from several sites.&lt;br /&gt;Don't use this blindly anywhere. I totally left everything out, which could confuse me. Like exception handling, hard testing, theoretical and practical security checks, performance baselines, etc.&lt;br /&gt;...&lt;br /&gt;and at the end, the most global citation from Martin Jensen: '&lt;span style="font-style: italic;"&gt;If it's not tested, it does not work&lt;/span&gt;'&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-7544048547764139636?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/7544048547764139636/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=7544048547764139636' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/7544048547764139636'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/7544048547764139636'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2009/05/before-select-trigger.html' title='before select trigger'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-1405506350443447254</id><published>2009-05-09T01:01:00.003+02:00</published><updated>2009-05-09T01:01:00.575+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='9.2.0.8'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>odyssey of a session - Part 2</title><content type='html'>An hour after I finished my work on explaining and supporting one &lt;a href="http://berxblog.blogspot.com/2009/05/odyssey-of-session-part-1.html"&gt;poor session&lt;/a&gt;, I got a call from my honoured colleague again.&lt;div&gt;'&lt;i&gt;The session stopped doing any sorts in v$session_longops and also no more segments on the indices are written. What's going on?&lt;/i&gt;'&lt;/div&gt;&lt;div&gt;My first guess was '&lt;i&gt;Did it just finish?&lt;/i&gt;', but that was not the case. The table still seemed to be empty (so no commit yet). The session was still active, but SQL_HASH_VALUE was NULL. Also sampling v$session_wait showed diferent events, so the process was doing anything. We just did not know, &lt;u&gt;what&lt;/u&gt;.&lt;/div&gt;&lt;div&gt;Even I didn't know, what's going on, I knew something is going on. I couldn't pin it down with the knowledge I have using plain oracle methods, so I decided to switch to another method. First &lt;a href="http://blog.tanelpoder.com/2008/10/31/advanced-oracle-troubleshooting-guide-part-9-process-stack-profiling-from-sqlplus-using-ostackprof/"&gt;OStackProf&lt;/a&gt; came to my mind, but unfortunately I was sitting on an Apple Computer at this moment, and I didn't want to care about VBS on Apple. Not a big deal at all, because after a short crawling through Tanles box of marvelous miracles, I grabbed &lt;a href="http://blog.tanelpoder.com/2008/06/15/advanced-oracle-troubleshooting-guide-part-6-understanding-oracle-execution-plans-with-os_explain/"&gt;os_explain&lt;/a&gt;. &lt;/div&gt;&lt;div&gt;Let's have a look what the process is doing.&lt;/div&gt;&lt;div&gt;After running  &lt;pre&gt;pstack 11460 | ./os_explain&lt;/pre&gt; some times (5 or 6 where enough) it was clear there is no ordinary execution plan running. We got 2 stacks ( with little changes in the end, but this didn't count). Putting these side by side for easier camparison:&lt;/div&gt;&lt;pre&gt;ksupop                  ksupop      &lt;br /&gt;ksudlc                  ksudlc&lt;br /&gt;ktcrsp                  ktcrsp&lt;br /&gt;ktursp                  ktursp&lt;br /&gt;ktubko                  ktubko&lt;br /&gt;&lt;b&gt;kcbgcur&lt;/b&gt;                 &lt;b&gt;ktundo&lt;/b&gt;&lt;br /&gt;kcbzib                  kqrpre&lt;br /&gt;kcfrbd                  kqrpre1&lt;br /&gt; ksfdread                kslfre&lt;br /&gt;  ksfd_odmio&lt;br /&gt;   odm_io&lt;br /&gt;    ioctl&lt;/pre&gt;&lt;div&gt;I highlighted the first diference:&lt;/div&gt;&lt;div&gt;&lt;b&gt;kcbgcur&lt;/b&gt; vs. &lt;b&gt;ktundo&lt;/b&gt;.&lt;/div&gt;&lt;div&gt;To decipher these names (ok, in this particular case it wasn't too difficult, even for me) we had a look in &lt;a href="https://metalink2.oracle.com/metalink/plsql/f?p=130:3:4481607028924089650::::p3_database_id,p3_docid,p3_show_header,p3_show_help,p3_black_frame,p3_font:NOT,175982.1,1,1,1,helvetica"&gt;Note:175982.1 - ORA-600 Lookup Error Categories&lt;/a&gt;. &lt;i&gt;kcbgcur &lt;/i&gt;will be more or less Kernel Cache Buffer Current (don't know about the &lt;i&gt;g&lt;/i&gt;) and &lt;i&gt;ktundo &lt;/i&gt;is about undo and rollback management. &lt;/div&gt;&lt;div&gt;This still didn't answer all my questions, but what can a session be doing if it doesn't execute a SQL, (there is no sign for PL/SQL, java or similar currently executed by the session) and there is a lot of work performed in Cache and Undo? The next idea was: Rollback!&lt;/div&gt;&lt;div&gt;v$transaction came into my mind. And a little bit googling led me to this query:&lt;/div&gt;&lt;br /&gt;&lt;pre name="code" class="sql"&gt;&lt;br /&gt;SELECT a.sid, a.username, b.xidusn, b.used_urec, b.used_ublk&lt;br /&gt;FROM v$session a, v$transaction b&lt;br /&gt;WHERE a.saddr = b.ses_addr;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Yes, &lt;b&gt;USED_UREC&lt;/b&gt; was decreasing! So the poor session, which worked for mor than 12 hours now, did a rollback.&lt;div&gt;Some phone calls later, the operations-guy who started the whole script told us '&lt;i&gt;Yes, about noon there where some hanging situations on my PC, but Toad looks ok again, I'm just waiting for the script to finish&lt;/i&gt;'.&lt;/div&gt;&lt;div&gt;Poor guy, and lucky me for enabling &lt;a href="http://download.oracle.com/docs/cd/B10501_01/network.920/a96581/sqlnet.htm#437587"&gt;Dead connection Detection&lt;/a&gt; in sqlnet.ora. Otherwise the whole statement would have run until the end and started the rollback THEN.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This was the last chapter in the odyssey of my little poor session. After the rollback finished, it just closed (as the client connection died before).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Some words at the end?&lt;/span&gt;&lt;/div&gt;&lt;div&gt;I assume, the script which caused the problem was never tested properly. &lt;/div&gt;&lt;div&gt;Even with limited knowledge, a more or less systematic aproach is possible. &lt;/div&gt;&lt;div&gt;There is a lot of free information and tools out there. Just try to know about them before you need them.&lt;/div&gt;&lt;div&gt;I should try to learn more about sessions in rollback.&lt;/div&gt;&lt;div&gt;No fancy Oracle-features where needed. No statspack, no AWR (as the DB is 9i - did I mention that?). Not even dtrace.&lt;/div&gt;&lt;div&gt;It was a great day for me, working &lt;u&gt;with&lt;/u&gt; a DB again and not only talking &lt;u&gt;about&lt;/u&gt; DBs in endless meetings.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-1405506350443447254?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/1405506350443447254/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=1405506350443447254' title='1 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/1405506350443447254'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/1405506350443447254'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2009/05/odyssey-of-session-part-2.html' title='odyssey of a session - Part 2'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-5326238399386381242</id><published>2009-05-07T20:48:00.008+02:00</published><updated>2009-05-08T12:13:49.682+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>odyssey of a session - Part 1</title><content type='html'>Today a single session made my day!&lt;br /&gt;In the later morning I got a call form a colleague. I would call him a kind of ApplicationDBA, even there is no such definition in our company. He asked my, why a particular session is doing a lot of sorts in gv$session_longops. He also tole me, what the session was doing:&lt;br /&gt;this script was started in the early morning by an operations-guy:&lt;br /&gt;&lt;pre name="code" class="sql"&gt;&lt;br /&gt;drop materialized view MV;&lt;br /&gt;&lt;br /&gt;CREATE MATERIALIZED VIEW MV&lt;br /&gt;TABLESPACE MVIEW_DATA&lt;br /&gt;NOCACHE&lt;br /&gt;NOLOGGING&lt;br /&gt;NOPARALLEL&lt;br /&gt;REFRESH FAST WITH ROWID&lt;br /&gt;AS&lt;br /&gt;select * from USER.TABLE@LINK;&lt;br /&gt;&lt;br /&gt;CREATE INDEX I1 ON MV&lt;br /&gt;(...)&lt;br /&gt;LOGGING;&lt;br /&gt;&lt;br /&gt;CREATE INDEX I2 ON MV&lt;br /&gt;(...);&lt;br /&gt;&lt;br /&gt;CREATE INDEX I3 ON MV&lt;br /&gt;(...)&lt;br /&gt;;&lt;br /&gt;&lt;br /&gt;CREATE INDEX I4 ON MV&lt;br /&gt;(...)&lt;br /&gt;;&lt;br /&gt;&lt;br /&gt;CREATE INDEX I4 ON MV&lt;br /&gt;(...)&lt;br /&gt;;&lt;br /&gt;&lt;br /&gt;CREATE INDEX I5 ON MV&lt;br /&gt;(...)&lt;br /&gt;;&lt;br /&gt;&lt;br /&gt;CREATE INDEX I6 ON MV&lt;br /&gt;(...)&lt;br /&gt;;&lt;br /&gt;&lt;br /&gt;CREATE INDEX I7 ON MV&lt;br /&gt;(...)&lt;br /&gt;;&lt;br /&gt;&lt;br /&gt;CREATE INDEX I8 ON MV&lt;br /&gt;(...)&lt;br /&gt;;&lt;br /&gt;&lt;br /&gt;CREATE INDEX I9 ON MV&lt;br /&gt;(...)&lt;br /&gt;;&lt;br /&gt;&lt;br /&gt;CREATE INDEX I10 ON MV&lt;br /&gt;(...)&lt;br /&gt;;&lt;br /&gt;&lt;br /&gt;CREATE INDEX I11 ON MV&lt;br /&gt;(...)&lt;br /&gt;;&lt;br /&gt;&lt;br /&gt;CREATE INDEX I12 ON MV&lt;br /&gt;(...)&lt;br /&gt;;&lt;br /&gt;&lt;br /&gt;CREATE INDEX I13 ON MV&lt;br /&gt;(...)&lt;br /&gt;;&lt;br /&gt;&lt;br /&gt;GRANT SELECT ON  MV TO USER1;&lt;br /&gt;&lt;br /&gt;--currently running as snapadmin:&lt;br /&gt;&lt;br /&gt;exec dbms_snapshot.refresh('USER.MV ','c');&lt;br /&gt;&lt;/pre&gt;In fact, I did not know what's going on. But that's enough teason to start digging.&lt;br /&gt;And as the session did run for some time now, I was pretty sure it would continue to do so and therefore give me enough time to &lt;span style="font-weight: bold;"&gt;search&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;think&lt;/span&gt;. (Yes, some Services where unavailable, but he agreed not to kill any session or reboot an instance without knowing what's going on).&lt;br /&gt;&lt;br /&gt;My first search was the actual SQL (v$session sql_hash_value =&gt; v$sql_text).&lt;br /&gt;It was something like&lt;br /&gt;&lt;pre name="code" class="sql"&gt;INSERT /*+ APPEND */ INTO MV AS&lt;br /&gt;SELECT .... FROM&lt;br /&gt;USER.TABLE@LINK;&lt;/pre&gt;I told my colleague about this, but he replied '&lt;span style="font-style: italic;"&gt;Yes, but I checked the MV, it's empty&lt;/span&gt;'.&lt;br /&gt;Ok, this even I could explain by a simpe '&lt;a href="http://en.wikipedia.org/wiki/ACID"&gt;ASIC&lt;/a&gt;' - or in this phone call '&lt;span style="font-style: italic;"&gt;you will see the rows after the commit, and this can last&lt;/span&gt;'.&lt;br /&gt;This answer was acceptable, but nevertheless, the legitimate question was '&lt;span style="font-style: italic;"&gt;how long will it run; and wehre is it standing right now?&lt;/span&gt;'&lt;br /&gt;How to answer this? &lt;pre&gt;v$session_longops&lt;/pre&gt; Does only give informations about the 'current' longop, not about the total transaction.&lt;br /&gt;&lt;br /&gt;But as we assumed, there might be indices written right now (vsession_longops showed &lt;span style="font-style: italic;"&gt;sort&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;sort merges&lt;/span&gt;), the next step was to check anything we can get about the indices.&lt;br /&gt;Even we could not access them directly, we could check for some footprints:&lt;br /&gt;&lt;pre name="code" class="sql"&gt;select seg.owner, seg.segment_name, seg.segment_type, (sum(blocks)*8192)/(1024*1024) MB&lt;br /&gt;from dba_segments seg, dba_indexes ind&lt;br /&gt;where ind.table_owner ='OWNER and ind.table_NAME='MV'&lt;br /&gt;and ind.owner = seg.owner&lt;br /&gt;and ind.index_name = seg.segment_name&lt;br /&gt;group by  seg.owner, seg.segment_name, seg.segment_type&lt;br /&gt;order by MB desc&lt;br /&gt;/&lt;br /&gt;&lt;/pre&gt;By sampling this query we saw some full populated indices, and one just growing. So even for us it was clear what's going on: the indices are calculated and populated.&lt;br /&gt;&lt;br /&gt;The next question I had to face was '&lt;span style="font-style: italic;"&gt;why is the index-creation so slow?&lt;/span&gt;'&lt;br /&gt;Hmmm. Who can answer this?&lt;br /&gt;manual sampling vsession_wait gave some hints:&lt;br /&gt;some gc... events and latches on the buffer where top.&lt;br /&gt;(Did I mention, this is on a 2-node RAC? ;-) )&lt;br /&gt;&lt;br /&gt;It was time to switch to the other node and check for running sessions which has also cache fusion waits, and could interfer with our session of the day.&lt;br /&gt;&lt;br /&gt;After some sampling and searching (vsession, vsession_wait, later on vsql_text) and additional clicking in Grid control (yes, it can be useful!) I found a possible culprit:&lt;br /&gt;USER1 run a lot of queries on a view which contains USER.MV.&lt;br /&gt;I didn't proove, but I guess, Instance2 held the master for MV as there where 100 sessions hanging on the View. But I didn't care of - &lt;span style="font-style: italic;"&gt;GV$GCSPFMASTER_INFO&lt;/span&gt; - I just wanted to get rid of all the cache-fusion waits until the MV is created.&lt;br /&gt;Some might have seen the solution for this yet, it's not hidden.&lt;br /&gt;Our &lt;span style="font-size:130%;"&gt;Silver Bullet of The Day&lt;/span&gt; was a simple:&lt;pre name="code" class="sql"&gt;REVOKE SELECT ON MV FROM USER1;&lt;/pre&gt;(had to be run for several times, as there where DDL-timeouts...))&lt;br /&gt;&lt;br /&gt;Afterwards, the index-creation run quite fast - fast enough for us.&lt;br /&gt;&lt;br /&gt;It's not the end of the story, but enough for now,&lt;br /&gt;just to leave enough space for &lt;a href="http://berxblog.blogspot.com/2009/05/odyssey-of-session-part-2.html"&gt;Part 2&lt;/a&gt; ;-)&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Some infos at the end: &lt;/div&gt;&lt;div&gt;Many parts I can not explain in more detail, simply as I didn't log everything I did and therefore have no exact queries, output or whatever. (Maybe this is the most important area to improve myselve!)&lt;/div&gt;&lt;div&gt;I also used Tanel Poders &lt;a href="http://www.tanelpoder.com/files/scripts/latchprofx.sql"&gt;latchprofx &lt;/a&gt;and &lt;a href="http://www.tanelpoder.com/files/scripts/snapper.sql"&gt;snapper&lt;/a&gt; to collect well sampled data about the session.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-5326238399386381242?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/5326238399386381242/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=5326238399386381242' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/5326238399386381242'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/5326238399386381242'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2009/05/odyssey-of-session-part-1.html' title='odyssey of a session - Part 1'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-4635244700856091223</id><published>2009-05-07T20:39:00.002+02:00</published><updated>2009-05-07T20:47:14.802+02:00</updated><title type='text'>New Blogger in Bloggosphere</title><content type='html'>There is a &lt;a href="http://blog.trivadis.com/blogs/mathiaszarick/default.aspx"&gt;new Blogger&lt;/a&gt;: &lt;a href="http://blog.trivadis.com/members/Mathias-Zarick.aspx"&gt;Mathias Zarick&lt;/a&gt; wrote hist &lt;a href="http://blog.trivadis.com/blogs/mathiaszarick/archive/2009/05/04/asm-disk-groups-redundancy-at-diskgroup-level-vs-redundancy-at-template-level-are-there-differences.aspx"&gt;first blog entry&lt;/a&gt;.&lt;br /&gt;He is a clever guy, with a lot of  knowledge and passion and a very systematic aproach.&lt;br /&gt;I'm very glad he shares his findings with us now.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-4635244700856091223?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/4635244700856091223/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=4635244700856091223' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/4635244700856091223'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/4635244700856091223'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2009/05/new-blogger-in-bloggosphere.html' title='New Blogger in Bloggosphere'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-3517518755572485401</id><published>2009-03-02T21:12:00.005+01:00</published><updated>2009-03-02T21:24:25.690+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='Registry'/><title type='text'>'symbolic link' for Windows ODBC drivers</title><content type='html'>Maybe you know this situation: (nearly) everyone in your Company has local Admin grants on 'his' (and her) local PC. So they install everything they want, also ODBC-Drivers with any name on any local location.&lt;div&gt;No problem so far, but if they want to share something with an ODBC connection string, they are doomed. Everyone has another version in another ODBC-location.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;What else than to 'fake' any ODBC name to any directory you want?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Here is my solution (I don't know, if it's supported. It just works for me!)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;pre&gt;Windows Registry Editor Version 5.00&lt;br /&gt;&lt;br /&gt;[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\&lt;b&gt;&amp;lt;INSERT_ODBC_NAME_HERE&amp;gt;&lt;/b&gt;]&lt;br /&gt;"APILevel"="1"&lt;br /&gt;"CPTimeout"="60"&lt;br /&gt;"ConnectFunctions"="YYY"&lt;br /&gt;"Driver"=&lt;b&gt;"C:\\PATH\\TO\\YOUR\\DRIVER\\SQORA32.DLL"&lt;/b&gt;&lt;br /&gt;"DriverODBCVer"="03.51"&lt;br /&gt;"FileUsage"="0"&lt;br /&gt;"Setup"=&lt;b&gt;"C:\\PATH\\TO\\YOUR\\DRIVER\\SQORAS32.DLL"&lt;/b&gt;&lt;br /&gt;"SQLLevel"="1"&lt;/pre&gt;&lt;div&gt;Just use the &lt;span class="Apple-style-span" style="font-style: italic;"&gt;Driver&lt;/span&gt; and &lt;span class="Apple-style-span" style="font-style: italic;"&gt;Setup&lt;/span&gt; files from an existing ODBC-Source.&lt;/div&gt;Might it work for you also ;-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-3517518755572485401?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/3517518755572485401/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=3517518755572485401' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/3517518755572485401'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/3517518755572485401'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2009/03/symbolic-link-for-windows-odbc-drivers.html' title='&apos;symbolic link&apos; for Windows ODBC drivers'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-3513687205026336141</id><published>2009-02-28T19:29:00.002+01:00</published><updated>2009-02-28T19:52:50.120+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>please increase my TEMP Tablespace</title><content type='html'>Today I recieved a call. I was asked to increase a TEMP Tablespace as it was 100% used. I checked the TS and it was correct - 100% full. So I added additional 10% to the tempfile.&lt;br /&gt;So what?&lt;br /&gt;It's only fighting symptoms.&lt;br /&gt;After some minutes I got the same call again.&lt;br /&gt;I suggested the Apps responsible to check the statements or response time. After some minutes he agreed. Because of some new analyses some plans flipped. This caused some more scans and in memory sorts than necessary, which landed in Temp TS.&lt;br /&gt;The solution was obvious: change the objects stats back to 'good' values.&lt;br /&gt;The learnings: once again: don't fight symptoms. It will bring you to no end. Find the initial cause and fix it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-3513687205026336141?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/3513687205026336141/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=3513687205026336141' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/3513687205026336141'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/3513687205026336141'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2009/02/please-increase-my-temp-tablespace.html' title='please increase my TEMP Tablespace'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-4635083239941532096</id><published>2009-01-20T14:26:00.000+01:00</published><updated>2009-01-20T14:40:20.789+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>pipelined function vs. dbms_output</title><content type='html'>I don't like dbms_output.&lt;br /&gt;So I came to pipelined functions.&lt;br /&gt;here a small example:&lt;br /&gt;&lt;pre class="sql" name="code"&gt;create or replace&lt;br /&gt;function dummy&lt;br /&gt;return DBMS_DEBUG_VC2COLL&lt;br /&gt;PIPELINED -- NOTE the pipelined keyword&lt;br /&gt;is&lt;br /&gt;begin&lt;br /&gt;pipe row (to_char(sysdate, 'DD-MON-YYYY HH24:MI:SS' ));&lt;br /&gt;dbms_lock.sleep(15);&lt;br /&gt;pipe row (to_char(sysdate, 'DD-MON-YYYY HH24:MI:SS' ));&lt;br /&gt;return;&lt;br /&gt;end;&lt;br /&gt;/&lt;br /&gt;&lt;/pre&gt;Make sure you set the arraysize of SQL*PLUS (or whatever) small enough, otherwise you will get a bunch of results at once, not when they occure.&lt;br /&gt;&lt;pre&gt;set arraysize 1&lt;/pre&gt;&lt;pre&gt;select * from table(dummy());&lt;br /&gt;&lt;/pre&gt;gives&lt;br /&gt;&lt;pre&gt;COLUMN_VALUE&lt;br /&gt;--------------------&lt;br /&gt;20-JAN-2009 14:24:17&lt;br /&gt;&lt;/pre&gt;and after 15 sec.&lt;br /&gt;&lt;pre&gt;20-JAN-2009 14:24:32&lt;br /&gt;&lt;/pre&gt;It might not be a big advantage for anyone, just a thing I like.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-4635083239941532096?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/4635083239941532096/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=4635083239941532096' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/4635083239941532096'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/4635083239941532096'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2009/01/pipelined-function-vs-dbmsoutput.html' title='pipelined function vs. dbms_output'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-7488424789652102875</id><published>2009-01-13T22:45:00.001+01:00</published><updated>2009-01-13T22:45:01.166+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='ASM'/><category scheme='http://www.blogger.com/atom/ns#' term='11gR1'/><title type='text'>multiple ASM instances on one node (11gR1)</title><content type='html'>I just searched a way to circumvent the limit of &lt;a href="http://download.oracle.com/docs/cd/B28359_01/server.111/b31107/asmdiskgrps.htm#CHDCGGED"&gt;63 ASM DiskGroups&lt;/a&gt; in a storage system.&lt;br /&gt;My first thought was to create a 2nd (or multiple) ASM instances on the same node which manage seperated DGs. This is quite easily possible: Just create a spfile for the 2nd ASM, just make sure to add *.&lt;a href="http://download.oracle.com/docs/cd/B28359_01/server.111/b28320/initparams065.htm#REFRN10242"&gt;DB_UNIQUE_NAME&lt;/a&gt;&lt;other_than_+asm&gt; to avoid &lt;a href="http://download.oracle.com/docs/cd/B28359_01/server.111/b28278/e12700.htm#sthref4972"&gt;ORA-15150&lt;/a&gt;. I also recommend to use different &lt;a href="http://download.oracle.com/docs/cd/B28359_01/server.111/b28320/initparams011.htm#REFRN10248"&gt;ASM_DISKSTRING&lt;/a&gt;s, to avoid multiple mount-attempts of the same DG on all ASM instances. &lt;/other_than_+asm&gt;&lt;br /&gt;So I could create different DGs in different ASM-instances.&lt;br /&gt;But now the troubles starts: In my test-RDBMS I could only see the DGs of the first ASM.&lt;br /&gt;So I created a SR(&lt;a href="https://metalink2.oracle.com/metalink/plsql/tar_main.this_tar?tar_num=7275580.994"&gt;7275580.994&lt;/a&gt;) at MetaLink to ask how to do it and wether or not it's supported in single instance or RAC.&lt;br /&gt;To summarize the answers:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;It is possible to run multiple ASMs on a node&lt;/li&gt;&lt;li&gt;One RDBMS can onlybe served by one ASM &lt;br /&gt;&lt;/li&gt;&lt;li&gt;all the GUIs are not aware of multiple ASMs&lt;/li&gt;&lt;li&gt;it's not supported in RAC&lt;/li&gt;&lt;/ul&gt;Even these answers are worth some forther testcases.&lt;br /&gt;I have 2 ASMs: +ASM (default) and +ASM2 (2nd, with changed DB_UNIQUE_NAME and ASM_DISKSTRING) and one RDBMS. DG ASM1_DG created in +ASM, DG ASM2_DG created in +ASM2.&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-size: large;"&gt;Test 1&lt;/span&gt;&lt;br /&gt;+ASM up&lt;br /&gt;+ASM2 up&lt;br /&gt;=&amp;gt; only ASM1_DG1 visible in RDBMS.&lt;/li&gt;&lt;li&gt;&lt;span style="font-size: large;"&gt;Test 2&lt;/span&gt;&lt;br /&gt;+ASM down&lt;br /&gt;+ASM2 up&lt;br /&gt;=&amp;gt; ASM2_DG1 visible&lt;br /&gt;! create tablespace in ASM2_DG1&lt;/li&gt;&lt;li&gt;&lt;span style="font-size: large;"&gt;Test 3&lt;/span&gt;&lt;br /&gt;+ASM up&lt;br /&gt;+ASM2 up&lt;br /&gt;- restart RDBMS&lt;br /&gt;=&amp;gt; only ASM2_DG1 visible in RDBMS&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size: large;"&gt;Test 4&lt;/span&gt;&lt;br /&gt;+ASM up&lt;br /&gt;+ASM2 up&lt;br /&gt;=&amp;gt; DBCA only shows ASM1_DG1:&amp;nbsp;&lt;a href="http://4.bp.blogspot.com/_E63cStXJqzo/SW0Bl8dd1aI/AAAAAAAAAFw/Br7Af1EyGsc/s1600-h/DBCA_ASM1-only.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_E63cStXJqzo/SW0Bl8dd1aI/AAAAAAAAAFw/Br7Af1EyGsc/s320/DBCA_ASM1-only.png" /&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&amp;nbsp;&lt;span style="font-size: large;"&gt;Test 5&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;shutdown +ASM&lt;/li&gt;&lt;li&gt;switch ASM1_DG to +ASM2 (some fiddling with ASM_DISKSTRING and symlinks)&lt;/li&gt;&lt;li&gt;mount ASM1_DG in +ASM2&lt;/li&gt;&lt;li&gt;create TS in ASM1_DG&lt;/li&gt;&lt;li&gt;shutdown RDBMS and +ASM2&lt;/li&gt;&lt;li&gt;switch ASM1_DG back to +ASM&lt;/li&gt;&lt;li&gt;startup +ASM, +ASM2 and rdbms&lt;/li&gt;&lt;li&gt;this constelation (ASM1_DG mounted on +ASM, ASM2_DG mounted on +ASM2) led to this error-message:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;ORA-01157: cannot identify/lock data file 8 - see DBWR trace file&lt;br /&gt;ORA-01110: data file 8: '+ASM1_DG/berx2/datafile/asm1_dg.256.676065339'&lt;br /&gt;ORA-17503: ksfdopn:2 Failed to open file +ASM1_DG/berx2/datafile/asm1_dg.256.67&lt;br /&gt;6065339&lt;br /&gt;ORA-15001: diskgroup "ASM1_DG" does not exist or is not mounted&lt;br /&gt;ORA-15001: diskgroup "ASM1_DG" does not exist or is not mounted&lt;br /&gt;&lt;/pre&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ol&gt;Test5 led me to one guess: &lt;i&gt;At startup a RDBMS can potentially access all ASMs, but the first attempt to access a DG pins the RDBMS to the ASM.&lt;/i&gt; Unfortunately I do not know how to prove this.&lt;br /&gt;Within the SR &lt;a href="https://metalink2.oracle.com/metalink/plsql/ml2_documents.showFrameDocument?p_database_id=BUG&amp;amp;p_id=6991236"&gt;Bug:6991236&lt;/a&gt; was mentioned.&lt;br /&gt;This Bug is not visible right now, but interpreting the header I can guess it's an enhancement request to allow or support multiple ASM-instances with differen OS-users in a cluster-environment. It's shown to be fixed (implemented) in 11gR2 and has status 98 (Suggestion Implemented). We will see when 11gR2 is out.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-7488424789652102875?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/7488424789652102875/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=7488424789652102875' title='1 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/7488424789652102875'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/7488424789652102875'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2009/01/multiple-asm-instances-on-one-node.html' title='multiple ASM instances on one node (11gR1)'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_E63cStXJqzo/SW0Bl8dd1aI/AAAAAAAAAFw/Br7Af1EyGsc/s72-c/DBCA_ASM1-only.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-6634693401501811717</id><published>2009-01-09T21:57:00.002+01:00</published><updated>2009-01-09T22:10:37.149+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='11.1.0.7'/><category scheme='http://www.blogger.com/atom/ns#' term='ORA-1555'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='SCN'/><title type='text'>avoid ORA-1555 in long running queries</title><content type='html'>11.1.0.7 brought an interresting new Feature: &lt;a href="https://metalink2.oracle.com/metalink/plsql/f?p=130:3:1622648823400467080::::p3_database_id,p3_docid,p3_show_header,p3_show_help,p3_black_frame,p3_font:NOT,6688108.8,1,0,1,helvetica"&gt;Allow ORA-1555 to be ignored during table scan&lt;/a&gt;.&lt;br /&gt;From the description for Bug 6688108:&lt;br /&gt;&lt;br /&gt;&lt;i&gt;ORA-1555 can occur during long running queries involving a ROWID Range or full table scan if the undo has recycled.&lt;br /&gt;This error is normal and expected.&lt;br /&gt;&lt;br /&gt;This fix is a special enhancement to allow an &lt;span style="font-weight: bold;"&gt;SCN_ASCENDING &lt;/span&gt;hint to be supplied in the SQL statement. With this hint the select will take a new snapshot SCN and continue the scan rather than reporting an ORA-1555 to the caller. This can lead to inconsistent results as the SELECT is allowed to see data which is not all consistent to one point in time.&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;It is somewhat amazing Oracle allows inconsistent results, or it's the 'other end' of READ UNCOMMITTED isolation Level.&lt;br /&gt;&lt;br /&gt;I'm not sure where this feature makes any sense, but there will be environments where it's better to get false data than no data.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-6634693401501811717?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/6634693401501811717/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=6634693401501811717' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/6634693401501811717'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/6634693401501811717'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2009/01/avoid-ora-1555-in-long-running-queries.html' title='avoid ORA-1555 in long running queries'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-5340118384642608887</id><published>2009-01-08T14:52:00.003+01:00</published><updated>2009-01-08T15:31:45.331+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='11.1.0.7'/><category scheme='http://www.blogger.com/atom/ns#' term='buffer cache'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>buffer cache poisioning</title><content type='html'>Out of some tests and discussions I wanted to create a way to pollute the buffercache with blocks not existing there. As a result the &lt;a href="http://oratips-ddf.blogspot.com/2007/07/bchr-follies-my-two-cents.html"&gt;BCHR&lt;/a&gt; also goes down, so I might produce a contradiction to &lt;a href="http://www.oracledba.co.uk/"&gt;Connor McDonalds&lt;/a&gt; &lt;a href="http://www.oracledba.co.uk/tips/choose.htm"&gt;choose_a_hit_ratio&lt;/a&gt;. There might be easier ways doing so, feel free to promote, if you want.&lt;br /&gt;&lt;br /&gt;How i test the BCHR:&lt;br /&gt;&lt;pre name="code" class="sql"&gt;&lt;br /&gt;column name format A32;&lt;br /&gt;SELECT id, name, block_size,&lt;br /&gt; (1-(PHYSICAL_READS/(DB_BLOCK_GETS+CONSISTENT_GETS))) HIT&lt;br /&gt;FROM V$BUFFER_POOL_STATISTICS&lt;br /&gt;ORDER BY NAME, BLOCK_SIZE;&lt;/pre&gt;On my test system the script is really slow and I'm not sure about side effects it will have on other systems than the buffer cache.&lt;br /&gt;&lt;br /&gt;and my results (before the first run):&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;ID NAME       BLOCK_SIZE        HIT&lt;br /&gt;-- ---------- ---------- ----------&lt;br /&gt;3 DEFAULT          8192 .920069518&lt;br /&gt;1 KEEP             8192 .158558559&lt;/pre&gt;The scripts functionality explained:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;a Cursor c_tab provides all Tables of some quality (e.g. not owned by SYS)&lt;/li&gt;&lt;li&gt;for every entry in this cursor, all rowids are collected into a TABLE OF ROWID&lt;/li&gt;&lt;li&gt;every rowid is checked if it's block exists in x$bh, if not, it's directly selected and therefore bushed into bufer cache.&lt;/li&gt;&lt;/ol&gt;and here the script itselve (a big part just copied with permission from &lt;a href="http://www.database-mechanics.com/wp/?p=669"&gt;Reinhard Krämer&lt;/a&gt;)&lt;br /&gt;&lt;pre name="code" class="sql"&gt;&lt;br /&gt;DECLARE&lt;br /&gt;counter  number;&lt;br /&gt;obj_id   number;&lt;br /&gt;rel_fno  number;&lt;br /&gt;block_id number;&lt;br /&gt;bh_count number;&lt;br /&gt;bh_stmt  varchar2(200);&lt;br /&gt;rid_stmt varchar2(200);&lt;br /&gt;v_stt    varchar2(50);&lt;br /&gt;v_rid    ROWID;&lt;br /&gt;CURSOR c_tab&lt;br /&gt;IS&lt;br /&gt;  SELECT owner,&lt;br /&gt;         table_name,&lt;br /&gt;            owner&lt;br /&gt;         || '.'&lt;br /&gt;         || table_name owntab&lt;br /&gt;  FROM DBA_tables&lt;br /&gt;  WHERE owner NOT IN ('SYS')&lt;br /&gt;         -- comment next line, if you want to have all tables&lt;br /&gt;         --AND table_name = 'T_KEEP'&lt;br /&gt;         AND BUFFER_POOL NOT IN ('KEEP')&lt;br /&gt;  --       AND owner = UPPER ('TEST')&lt;br /&gt;  ;&lt;br /&gt;&lt;br /&gt;g_string VARCHAR2 (4000) := NULL;&lt;br /&gt;-- memory-array&lt;br /&gt;TYPE t_rowid IS TABLE OF ROWID&lt;br /&gt;  INDEX BY PLS_INTEGER;&lt;br /&gt;&lt;br /&gt;r_rowid t_rowid;&lt;br /&gt;&lt;br /&gt;-- print-procedure (mini-version of MSG)&lt;br /&gt;PROCEDURE PRINT (&lt;br /&gt;  p_text IN VARCHAR2 := NULL&lt;br /&gt;)&lt;br /&gt;IS&lt;br /&gt;BEGIN&lt;br /&gt;-- remove comment for debug&lt;br /&gt;--      DBMS_OUTPUT.put_line (p_text);&lt;br /&gt; NULL;&lt;br /&gt;END;&lt;br /&gt;BEGIN&lt;br /&gt;-- main&lt;br /&gt;EXECUTE IMMEDIATE 'select b.ksppstvl InstValue&lt;br /&gt;                 from x$ksppi a, x$ksppcv b&lt;br /&gt;                 where a.indx = b.indx&lt;br /&gt;                   and a.ksppinm=''_small_table_threshold''' into v_stt;&lt;br /&gt;EXECUTE IMMEDIATE 'alter session set "_small_table_threshold" = 10';&lt;br /&gt;counter := 0;&lt;br /&gt;bh_stmt := 'select count(*)&lt;br /&gt;          from x$bh&lt;br /&gt;          where obj=:obj_id and dbablk=:block_id and dbarfil=:rel_fno';&lt;br /&gt;&lt;br /&gt;FOR crec IN c_tab&lt;br /&gt;LOOP&lt;br /&gt; PRINT(' tab: ' ||crec.owntab);&lt;br /&gt;  g_string :=    'select rowid the_rowid from '&lt;br /&gt;              || crec.owntab;&lt;br /&gt;&lt;br /&gt;  BEGIN&lt;br /&gt;     PRINT (   'using command: '&lt;br /&gt;            || g_string);&lt;br /&gt;&lt;br /&gt;     EXECUTE IMMEDIATE (g_string)&lt;br /&gt;     BULK COLLECT INTO r_rowid;&lt;br /&gt;  EXCEPTION&lt;br /&gt;     WHEN OTHERS&lt;br /&gt;     THEN&lt;br /&gt;        PRINT (   SQLERRM&lt;br /&gt;               || ' on '&lt;br /&gt;               || g_string);&lt;br /&gt;  END;&lt;br /&gt;&lt;br /&gt;  IF r_rowid.COUNT &amp;gt; 0&lt;br /&gt;  THEN&lt;br /&gt;     PRINT (   'showing rowids for: '&lt;br /&gt;            || crec.owntab);&lt;br /&gt;&lt;br /&gt;     FOR i IN r_rowid.FIRST .. r_rowid.LAST&lt;br /&gt;     LOOP&lt;br /&gt;        PRINT (r_rowid (i));&lt;br /&gt;        -- load block if not in X$bh&lt;br /&gt;   &lt;br /&gt;        obj_id   := dbms_rowid.rowid_object(r_rowid(i));&lt;br /&gt;        rel_fno  := dbms_rowid.rowid_relative_fno(r_rowid(i));&lt;br /&gt;        block_id := dbms_rowid.rowid_block_number(r_rowid(i));&lt;br /&gt;        rid_stmt := 'SELECT rowid the_rowid FROM '&lt;br /&gt;              || crec.owntab || ' WHERE rowid = :rid';&lt;br /&gt;        execute immediate bh_stmt into bh_count using obj_id, block_id, rel_fno;&lt;br /&gt;   &lt;br /&gt;        IF bh_count = 0 THEN -- block curently not in buffer&lt;br /&gt;          BEGIN&lt;br /&gt;            execute immediate rid_stmt into v_rid using r_rowid(i);&lt;br /&gt;            counter := counter + 1;&lt;br /&gt;          END;&lt;br /&gt;        END IF;&lt;br /&gt;     END LOOP;&lt;br /&gt;  END IF;&lt;br /&gt;END LOOP;&lt;br /&gt;EXECUTE IMMEDIATE 'alter session set "_small_table_threshold" = :stt' using v_stt;&lt;br /&gt;DBMS_OUTPUT.put_line ('counter: ' || counter);&lt;br /&gt;END;&lt;br /&gt;/&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;After a 2nd check the BCHR is really lower than before.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;ID NAME       BLOCK_SIZE        HIT&lt;br /&gt;-- ---------- ---------- ----------&lt;br /&gt;3 DEFAULT          8192 .856567413&lt;br /&gt;1 KEEP             8192 .158558559&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;One question might be why I didn't run just a lot of full table scans? I can not be sure how many blocks of this tables exist in buffer cache, and every existing buffer would increse the &lt;span style="font-style: italic;"&gt;BCHR&lt;/span&gt;. Also in Oracle 11g this might result in &lt;span style="font-style: italic;"&gt;direct path read&lt;/span&gt;s which will not affect the buffer cache directly (in fact, it will increase the BCHR, as all internal selects in &lt;span style="font-style: italic;"&gt;SEG$&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;TS$&lt;/span&gt; and all the other data dictionary tables needed to access blocks).&lt;br /&gt;One last purpose: If ever anyone argues about the need of ratios to judge the health of a database, just ask if you get additional ressources if the BCHR is above/below any limit - and then grab these resources :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-5340118384642608887?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/5340118384642608887/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=5340118384642608887' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/5340118384642608887'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/5340118384642608887'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2009/01/buffer-cache-poisioning.html' title='buffer cache poisioning'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-811788108543073079</id><published>2009-01-07T21:20:00.002+01:00</published><updated>2009-01-08T06:40:29.970+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CMT'/><category scheme='http://www.blogger.com/atom/ns#' term='11.1.0.7'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='Solaris'/><title type='text'>Instance parameters derived from cpu_count</title><content type='html'>Today I have a lot of pictures!&lt;br /&gt;We got a brand new SUN &lt;a href="http://www.sun.com/servers/coolthreads/t5240/"&gt;T5140&lt;/a&gt;, and I managed to get my hands on it to run some tests.&lt;br /&gt;&lt;br /&gt;Glenn Fawcett wrote some interresting entries in his &lt;a href="http://blogs.sun.com/glennf/"&gt;blog&lt;/a&gt; about these so called chip multithreading  CPUs. 2 should be mentioned here, as they had influence to this test-case:&lt;br /&gt;&lt;a href="http://blogs.sun.com/glennf/entry/oracle_s_vision_of_multi"&gt;Oracle's vision of multi-core processors on Solaris&lt;/a&gt; and &lt;a href="http://blogs.sun.com/glennf/entry/virtual_cpus_effect_on_oracle"&gt;Virtual CPUs effect on Oracle SGA allocations&lt;/a&gt;.&lt;br /&gt;I wanted to know which parameters are derived from cpu_count.&lt;br /&gt;A fresh installed and patched RDBMS 11.1.0.7.0 was my victim.&lt;br /&gt;I used this script to get my data:&lt;br /&gt;&lt;pre class="c" name="code"&gt;#!/usr/bin/ksh  -x&lt;br /&gt;&lt;br /&gt;integer i=1&lt;br /&gt;while ((i &lt;= 128));&lt;br /&gt;do&lt;br /&gt;  print " $i ";&lt;br /&gt;&lt;br /&gt;  echo "*.compatible='11.1.0.0.0'&lt;br /&gt;*.control_files='/appl/oracle/oradata/BERX2/control01.ctl','/appl/oracle/oradata/BERX2/control02.ctl','/appl/oracle/oradata/BERX2/control03&lt;br /&gt;.ctl'&lt;br /&gt;*.db_block_size=8192&lt;br /&gt;*.db_name='BERX2'&lt;br /&gt;*.MEMORY_MAX_TARGET=16G&lt;br /&gt;*.SGA_TARGET=13G&lt;br /&gt;*.cpu_count=$i"&gt; initBERX2.ora&lt;br /&gt;&lt;br /&gt;  echo "startup pfile='/appl/oracle/product/11.1.0.7/dbs/initBERX2.ora' ;&lt;br /&gt;&lt;br /&gt;insert into init_parameters&lt;br /&gt;select $i         ,&lt;br /&gt;       a.ksppinm  ,&lt;br /&gt;       b.ksppstvl ,&lt;br /&gt;       c.ksppstvl&lt;br /&gt;from x\$ksppi a, x\$ksppcv b, x\$ksppsv c&lt;br /&gt;where a.indx = b.indx and a.indx = c.indx;&lt;br /&gt;&lt;br /&gt;commit;&lt;br /&gt;&lt;br /&gt;select distinct(\"CPUs\") from init_parameters;&lt;br /&gt;&lt;br /&gt;shutdown;&lt;br /&gt;&lt;br /&gt;exit;"&gt; cpus/doit$i.sql&lt;br /&gt;&lt;br /&gt;sqlplus "/ as sysdba" @cpus/doit$i.sql &gt;cpus/log$i.log&lt;br /&gt;&lt;br /&gt;sleep 5&lt;br /&gt;&lt;br /&gt;  (( i = i + 1));&lt;br /&gt;done&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Afterwards I just had to get the interresting data out:&lt;br /&gt;&lt;pre class="sql" name="code"&gt;select /*+ PARALLEL */ i."CPUs" || ',' || i."Parameter" || ',' || i."InstanceValue"  &lt;br /&gt;from init_parameters i  &lt;br /&gt;where "Parameter" in (select distinct(i1."Parameter")&lt;br /&gt;    from init_parameters i1,&lt;br /&gt;       init_parameters i2&lt;br /&gt;    where i1."Parameter" = i2."Parameter"&lt;br /&gt;       and i1."CPUs" &amp;lt;&amp;gt; i2."CPUs"&lt;br /&gt;      and i1."InstanceValue" &amp;lt;&amp;gt; i2."InstanceValue" )  &lt;br /&gt;order by i."CPUs", i."Parameter";&lt;/pre&gt;&lt;br /&gt;and waste my time in excel creating the graphs:&lt;br /&gt;(&lt;span style="font-size:x-small;"&gt;the whole spool output can be found &lt;a href="http://berx.at/files/ext_init_params.lst"&gt;here&lt;/a&gt;.&lt;/span&gt;)&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_E63cStXJqzo/SWT4hZpGOuI/AAAAAAAAADI/evynE5psw3c/s1600-h/__db_cache_size.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img src="http://2.bp.blogspot.com/_E63cStXJqzo/SWT4hZpGOuI/AAAAAAAAADI/evynE5psw3c/s320/__db_cache_size.jpg" border="0" /&gt;&lt;/a&gt;&lt;a href="http://4.bp.blogspot.com/_E63cStXJqzo/SWT4jfOM8qI/AAAAAAAAADQ/lnE5mttjR5o/s1600-h/__shared_pool_size.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img src="http://4.bp.blogspot.com/_E63cStXJqzo/SWT4jfOM8qI/AAAAAAAAADQ/lnE5mttjR5o/s320/__shared_pool_size.jpg" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_E63cStXJqzo/SWT4knOuySI/AAAAAAAAADY/ulPzAs6oE_E/s1600-h/_cursor_db_buffers_pinned.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img src="http://3.bp.blogspot.com/_E63cStXJqzo/SWT4knOuySI/AAAAAAAAADY/ulPzAs6oE_E/s320/_cursor_db_buffers_pinned.jpg" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_E63cStXJqzo/SWT46YFxdYI/AAAAAAAAADg/8CRuqJB8FM4/s1600-h/_db_block_buffers.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img src="http://1.bp.blogspot.com/_E63cStXJqzo/SWT46YFxdYI/AAAAAAAAADg/8CRuqJB8FM4/s320/_db_block_buffers.jpg" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_E63cStXJqzo/SWT477CjDXI/AAAAAAAAADo/aglX8I82Sgw/s1600-h/_db_block_lru_latches.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img src="http://1.bp.blogspot.com/_E63cStXJqzo/SWT477CjDXI/AAAAAAAAADo/aglX8I82Sgw/s320/_db_block_lru_latches.jpg" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_E63cStXJqzo/SWT49VxTqQI/AAAAAAAAADw/Rp0XRI6XcPE/s1600-h/_enqueue_hash_chain_latches.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img src="http://3.bp.blogspot.com/_E63cStXJqzo/SWT49VxTqQI/AAAAAAAAADw/Rp0XRI6XcPE/s320/_enqueue_hash_chain_latches.jpg" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_E63cStXJqzo/SWT4-o-5mWI/AAAAAAAAAD4/wowvbTQMUMw/s1600-h/_enqueue_locks.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img src="http://2.bp.blogspot.com/_E63cStXJqzo/SWT4-o-5mWI/AAAAAAAAAD4/wowvbTQMUMw/s320/_enqueue_locks.jpg" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_E63cStXJqzo/SWT5BFXusKI/AAAAAAAAAEA/Mj1YJEac1lw/s1600-h/_flashback_generation_buffer_size.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img src="http://1.bp.blogspot.com/_E63cStXJqzo/SWT5BFXusKI/AAAAAAAAAEA/Mj1YJEac1lw/s320/_flashback_generation_buffer_size.jpg" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_E63cStXJqzo/SWT5C_FMonI/AAAAAAAAAEI/IZYeISF2URU/s1600-h/_kghdsidx_count.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img src="http://2.bp.blogspot.com/_E63cStXJqzo/SWT5C_FMonI/AAAAAAAAAEI/IZYeISF2URU/s320/_kghdsidx_count.jpg" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_E63cStXJqzo/SWT5EyHf3uI/AAAAAAAAAEQ/HptWFFRALC0/s1600-h/_log_parallelism_max.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img src="http://1.bp.blogspot.com/_E63cStXJqzo/SWT5EyHf3uI/AAAAAAAAAEQ/HptWFFRALC0/s320/_log_parallelism_max.jpg" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_E63cStXJqzo/SWT5GEnE1-I/AAAAAAAAAEY/zLUoBxUZB5A/s1600-h/_log_simultaneous_copies.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img src="http://3.bp.blogspot.com/_E63cStXJqzo/SWT5GEnE1-I/AAAAAAAAAEY/zLUoBxUZB5A/s320/_log_simultaneous_copies.jpg" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_E63cStXJqzo/SWT5KTVLEVI/AAAAAAAAAEg/VENpD-VF3n8/s1600-h/_num_longop_child_latches.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img src="http://3.bp.blogspot.com/_E63cStXJqzo/SWT5KTVLEVI/AAAAAAAAAEg/VENpD-VF3n8/s320/_num_longop_child_latches.jpg" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_E63cStXJqzo/SWT5LOvFkCI/AAAAAAAAAEo/ylOc56IFYsM/s1600-h/_parallel_min_message_pool.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img src="http://4.bp.blogspot.com/_E63cStXJqzo/SWT5LOvFkCI/AAAAAAAAAEo/ylOc56IFYsM/s320/_parallel_min_message_pool.jpg" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_E63cStXJqzo/SWT5L-tt9NI/AAAAAAAAAEw/ackJLi1dG6Y/s1600-h/_shared_server_num_queues.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img src="http://3.bp.blogspot.com/_E63cStXJqzo/SWT5L-tt9NI/AAAAAAAAAEw/ackJLi1dG6Y/s320/_shared_server_num_queues.jpg" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_E63cStXJqzo/SWT5NMtHwaI/AAAAAAAAAE4/1TR2qgDzFkk/s1600-h/_small_table_threshold.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img src="http://2.bp.blogspot.com/_E63cStXJqzo/SWT5NMtHwaI/AAAAAAAAAE4/1TR2qgDzFkk/s320/_small_table_threshold.jpg" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_E63cStXJqzo/SWT5OpgOVmI/AAAAAAAAAFA/tLGX8NZ_4Z0/s1600-h/_spin_count.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img src="http://3.bp.blogspot.com/_E63cStXJqzo/SWT5OpgOVmI/AAAAAAAAAFA/tLGX8NZ_4Z0/s320/_spin_count.jpg" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_E63cStXJqzo/SWT5P1_XqzI/AAAAAAAAAFI/GWIijtnmJsc/s1600-h/_sqlmon_max_plan.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img src="http://1.bp.blogspot.com/_E63cStXJqzo/SWT5P1_XqzI/AAAAAAAAAFI/GWIijtnmJsc/s320/_sqlmon_max_plan.jpg" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_E63cStXJqzo/SWT5RgZ9ahI/AAAAAAAAAFQ/0YQT-Mf109E/s1600-h/db_writer_processes.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img src="http://2.bp.blogspot.com/_E63cStXJqzo/SWT5RgZ9ahI/AAAAAAAAAFQ/0YQT-Mf109E/s320/db_writer_processes.jpg" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_E63cStXJqzo/SWT5S4DOIII/AAAAAAAAAFY/RuHUASgPH-0/s1600-h/log_buffer.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img src="http://4.bp.blogspot.com/_E63cStXJqzo/SWT5S4DOIII/AAAAAAAAAFY/RuHUASgPH-0/s320/log_buffer.jpg" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_E63cStXJqzo/SWUHDY8mmBI/AAAAAAAAAFo/wwjRTtH-vYo/s1600-h/parallel_max_servers.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img src="http://3.bp.blogspot.com/_E63cStXJqzo/SWUHDY8mmBI/AAAAAAAAAFo/wwjRTtH-vYo/s320/parallel_max_servers.jpg" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;I hope everyone enjoys these graphs. I'm sure there can be done much more tests, so if you have an interresting testcase whic hcan be automated such as mine, feel free to contact me.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-811788108543073079?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/811788108543073079/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=811788108543073079' title='1 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/811788108543073079'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/811788108543073079'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2009/01/instance-parameters-derived-from.html' title='Instance parameters derived from cpu_count'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_E63cStXJqzo/SWT4hZpGOuI/AAAAAAAAADI/evynE5psw3c/s72-c/__db_cache_size.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-6245075019599652738</id><published>2009-01-05T12:52:00.003+01:00</published><updated>2009-01-05T14:00:05.936+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='11.1.0.7'/><category scheme='http://www.blogger.com/atom/ns#' term='buffer cache'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>KEEP and DEFAULT buffer really seperated (at least for LRU lists)</title><content type='html'>I had to answer a really simple question:&lt;br /&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;If I manage to put a table totally into KEEP buffer (&lt;span style="font-size: x-small;"&gt;and it's the only table which will ever go there&lt;/span&gt;), will it be affected by other operations which are going into DEFAULT buffer cache?&lt;/div&gt;At least if you disable &lt;b&gt;Automated Memory Management&lt;/b&gt; the answer is &lt;b&gt;&lt;span style="font-size: large;"&gt;yes &lt;/span&gt;&lt;/b&gt;(even if &lt;a href="http://www.freelists.org/post/oracle-l/different-physical-access-method-because-of-disabling-Automated-Memory-Management"&gt;some points&lt;/a&gt; has to be considered, but that's not part of the primary question).&lt;br /&gt;Here my little testcase:&lt;br /&gt;I have a table t_keep which should go and stay in keep buffer cache (and fits into it).&lt;br /&gt;I have 2 other tables, t and t2, where t is mich bigger than the default pool, t2 also fits into default-pool but together they kick each other out (at least partially).&lt;br /&gt;And now for the tests:&lt;br /&gt;(I had to make &lt;i&gt;_small_table_threshold&lt;/i&gt; big enough to load all tables in buffer cache and avoiding direct path reads) &lt;br /&gt;&lt;br /&gt;about the tables:&lt;br /&gt;&lt;pre class="sql" name="code"&gt;select table_name, buffer_pool, blocks from dba_tables where owner ='TEST';TABLE_NAME&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BUFFER_&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BLOCKS&lt;br /&gt;------------------------------ ------- ----------&lt;br /&gt;T2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DEFAULT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 401&lt;br /&gt;T_KEEP&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; KEEP&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 496&lt;br /&gt;T&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DEFAULT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 26289&lt;br /&gt;&lt;br /&gt;select OBJECT_NAME, DATA_OBJECT_ID &lt;br /&gt;from dba_objects&lt;br /&gt; where owner ='TEST';&lt;br /&gt;OBJ_NAME DATA_OBJECT_ID&lt;br /&gt;-------- --------------&lt;br /&gt;T2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 64351&lt;br /&gt;T_KEEP&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 64143&lt;br /&gt;T&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 64142&lt;br /&gt;&lt;/pre&gt;the test itselve:&lt;br /&gt;&lt;pre class="sql" name="code"&gt;SELECT ROWID FROM TEST.T_KEEP;&lt;br /&gt;&lt;br /&gt;... ROWIDs ...&lt;br /&gt;&lt;br /&gt;select obj, count(*) from x$bh where obj in (64142, 64143,64351) group by obj;&lt;br /&gt;&lt;br /&gt;OBJ&amp;nbsp;&amp;nbsp; COUNT(*)&lt;br /&gt;---------- ----------&lt;br /&gt;64143&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 452&lt;br /&gt;&lt;br /&gt;SELECT ROWID FROM TEST.T;&lt;br /&gt;&lt;br /&gt;... ROWIDs ...&lt;br /&gt;&lt;br /&gt;select obj, count(*) from x$bh where obj in (64142, 64143,64351) group by obj;&lt;br /&gt;&lt;br /&gt;OBJ&amp;nbsp;&amp;nbsp; COUNT(*)&lt;br /&gt;---------- ----------&lt;br /&gt;64143&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 452&lt;br /&gt;64142&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1080&lt;br /&gt;&lt;br /&gt;select obj, count(*) from x$bh where obj in (64142, 64143,64351) group by obj; &lt;br /&gt;&lt;br /&gt;OBJ&amp;nbsp;&amp;nbsp; COUNT(*)&lt;br /&gt;---------- ----------&lt;br /&gt;64351&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 386&lt;br /&gt;64143&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 452&lt;br /&gt;64142&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 &lt;br /&gt;&lt;/pre&gt;So ObjectID:64143 == T_KEEP is still in KEEP buffer cache.&lt;br /&gt;&lt;br /&gt;Now the same test with &lt;b&gt;Automated Memory Management&lt;/b&gt;:&lt;br /&gt;(only the results)&lt;br /&gt;&lt;pre class="sql" name="code"&gt;select obj, count(*) from x$bh where obj in (64142, 64143,64351) group by obj;&lt;br /&gt;       OBJ   COUNT(*)&lt;br /&gt;---------- ----------&lt;br /&gt;     64143        452&lt;br /&gt;&lt;br /&gt;select obj, count(*) from x$bh where obj in (64142, 64143,64351) group by obj;&lt;br /&gt;       OBJ   COUNT(*)&lt;br /&gt;---------- ----------&lt;br /&gt;     64143        452&lt;br /&gt;     64142      20111&lt;br /&gt;&lt;br /&gt;select obj, count(*) from x$bh where obj in (64142, 64143,64351) group by obj;&lt;br /&gt;       OBJ   COUNT(*)&lt;br /&gt;---------- ----------&lt;br /&gt;     64351        386&lt;br /&gt;     64143        452&lt;br /&gt;     64142      19725&lt;/pre&gt;So also in this case 64143 survived, whereas the other 2 were fighting for the same blocks in DEFAULT buffer cache.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-6245075019599652738?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/6245075019599652738/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=6245075019599652738' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/6245075019599652738'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/6245075019599652738'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2009/01/keep-and-default-buffer-really.html' title='KEEP and DEFAULT buffer really seperated (at least for LRU lists)'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-689475125833378046</id><published>2008-12-31T09:00:00.002+01:00</published><updated>2008-12-31T09:00:01.308+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ntp'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><title type='text'>Windows NTP client - allow large time offsets</title><content type='html'>During the christmas holidays, I 'm doing my own christmas ralley to meet a rather huge family. At these visits I'm often asked to solve some smal or great PC-Problems. Even I'm no PC-pro, I'm something like the one-eyed among blindes. Ad of course it makes more sense to solve problems onsite than remote using just the telephone.&lt;br /&gt;One of the problems was an old laptop with an decrepit BIOS-battery. This led to an totally insane system date at every startup. Even with a proper system time and NTP-Server setup it never set the time correctly as the time offset was to large.&lt;br /&gt;After some searching within the registry I changed under &lt;code&gt;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config&lt;/code&gt; the parameters &lt;a href="http://technet.microsoft.com/en-us/library/cc776191.aspx"&gt;&lt;code&gt;MaxNegPhaseCorrection&lt;/code&gt;&lt;/a&gt; and &lt;a href="http://technet.microsoft.com/en-us/library/cc775503.aspx"&gt;&lt;code&gt;MaxPosPhaseCorrection&lt;/code&gt;&lt;/a&gt; toFFFFFFFF, which is the maximum value (approx 136 years). Now at every connection, or at least at every manual time adjustment, the time is really set (and no boring error message is shown).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-689475125833378046?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/689475125833378046/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=689475125833378046' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/689475125833378046'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/689475125833378046'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2008/12/windows-ntp-client-allow-large-time.html' title='Windows NTP client - allow large time offsets'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-4276330731960433542</id><published>2008-12-28T19:05:00.000+01:00</published><updated>2008-12-28T20:02:34.661+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='event 10046'/><category scheme='http://www.blogger.com/atom/ns#' term='11.1.0.7'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>no row information in data dictionary</title><content type='html'>It all began with a simple question &lt;i&gt;&lt;a href="http://www.freelists.org/post/oracle-l/how-to-get-all-ROWIDs-from-a-table-without-selecting-it"&gt;how to get all ROWIDs from a table (without selecting it)?&lt;/a&gt;&lt;/i&gt; I posted on &lt;a href="http://www.freelists.org/list/oracle-l"&gt;oracle-l&lt;/a&gt;. After some private forks of conversations I got an email by &lt;a href="http://jaredstill.com/"&gt;Jared Still&lt;/a&gt; where he mentioned:&lt;br /&gt;"&lt;i&gt;&lt;span style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;If you constructed a rowid, and did a select on the row, it probably doesn't&lt;/span&gt;&lt;br style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;" /&gt;&lt;span style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;matter if the row exists or not.&lt;/span&gt;&lt;br style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;" /&gt;&lt;br style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;" /&gt;&lt;span style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;Oracle has to read the block from disk to read the row directory.&lt;/span&gt;&lt;br style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;" /&gt;&lt;span style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;The block would get cached whether or not the row exists.&lt;/span&gt;&lt;br style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;" /&gt;&lt;br style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;" /&gt;&lt;span style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;I haven't tested this, but I imagine you will.&amp;nbsp; :)&lt;/span&gt;&lt;/i&gt;"&lt;br /&gt;Of course, he was right:&lt;br /&gt;My testcase was very simple:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;preparation&lt;br /&gt;&lt;pre class="sql" name="code"&gt; create table jared as select * from dual;&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;testcase&lt;br /&gt;&lt;pre class="sql" name="code"&gt;ALTER SESSION SET events '10046 trace name context forever, level 12';&lt;br /&gt;&lt;br /&gt;Session altered.&lt;br /&gt;&lt;br /&gt;select * from jared where rowid='AAAPa5AABAAATHhAAB';&lt;br /&gt;&lt;br /&gt;no rows selected&lt;br /&gt;&lt;br /&gt;/&lt;br /&gt;&lt;br /&gt;no rows selected&lt;br /&gt;&lt;br /&gt;select * from jared where rowid='AAAPa5AABAAATHhAAA';&lt;br /&gt;&lt;br /&gt;D&lt;br /&gt;-&lt;br /&gt;X&lt;br /&gt;&lt;/pre&gt;which created a &lt;a href="http://berx.at/tools/BERX2_ora_3963.trc"&gt;tracefile&lt;/a&gt;.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;summary&lt;br /&gt;the first statement hase one related wait: &lt;b&gt;'db file sequential read'&lt;/b&gt; the second and the third have no such waits!&lt;br /&gt;I crosschecked the situation by asking the buffer: &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="sql" name="code"&gt;select tch from x$bh where obj=63161 and dbablk=78305 and dbarfil=1;&lt;/pre&gt;and - as expected - it just counted up from &lt;b&gt;no rows selected&lt;/b&gt; (before the first run) counting &lt;b&gt;1&lt;/b&gt;, &lt;b&gt;2&lt;/b&gt;, &lt;b&gt;3&lt;/b&gt;.&lt;/li&gt;&lt;li&gt;conclusio&lt;br /&gt;&lt;span style="font-size: xx-small;"&gt;&lt;b&gt;Disclaimer&lt;/b&gt;: Even I hope it's well coated, I never can be 100% sure. A modern RDBMS has so many ways to do it's job I would have to ask the developers to prove. (which I can't).&lt;/span&gt;&lt;br /&gt;  &lt;br /&gt;&lt;ul&gt;&lt;li&gt;the buffer_cache caches blocks, not rows. (obvious?)&lt;/li&gt;&lt;li&gt;even if a row does not exist, it's including block is cached, if it's available.&lt;/li&gt;&lt;li&gt;as the smallest granularity the RDBMS takes care at IO is a block, and it even stores blocks if the row asked for does not exist.&lt;/li&gt;&lt;/ul&gt;this brings me to my own answer to my initial question:&lt;br /&gt;&lt;b&gt;There is no ROWID information for a given table stored in data dictionary.&lt;/b&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-4276330731960433542?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/4276330731960433542/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=4276330731960433542' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/4276330731960433542'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/4276330731960433542'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2008/12/no-row-information-in-data-dictionary.html' title='no row information in data dictionary'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-1162710325473902311</id><published>2008-12-24T18:00:00.001+01:00</published><updated>2008-12-24T18:00:01.310+01:00</updated><title type='text'>Frohe Weihnachten!</title><content type='html'>Ich wünsche allen frohe Weihnachten!&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_E63cStXJqzo/SU_4GN9fw7I/AAAAAAAAADA/GXL6c4Kf9Fo/s1600-h/Weihnachten_2008.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_E63cStXJqzo/SU_4GN9fw7I/AAAAAAAAADA/GXL6c4Kf9Fo/s320/Weihnachten_2008.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;Möge eurer Leben so friedvoll und zufrieden verlaufen, dass ihr jeden Tag das Gefühl habt, es sei Weihnachten.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;(translation available if &lt;a href="mailto:martin.a.berger@gmail.com"&gt;required&lt;/a&gt;&amp;nbsp;)&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-1162710325473902311?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/1162710325473902311/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=1162710325473902311' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/1162710325473902311'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/1162710325473902311'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2008/12/frohe-weihnachten.html' title='Frohe Weihnachten!'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_E63cStXJqzo/SU_4GN9fw7I/AAAAAAAAADA/GXL6c4Kf9Fo/s72-c/Weihnachten_2008.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-2298718525348826132</id><published>2008-12-18T09:01:00.003+01:00</published><updated>2008-12-18T09:01:00.191+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='10.2.0.4'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>Doing it better ... (Part 2)</title><content type='html'>Based on my &lt;a href="http://berxblog.blogspot.com/2008/12/doing-it-better-part-1.html"&gt;Doing it better ... (Part 1)&lt;/a&gt;, several days after the first approach and a lot of testcases (for other parts of the application) the performance of our so well tuned statement decreased dramatically.&lt;br /&gt;What happened? The index on &lt;span style="font-style: italic;"&gt;RESOURCE_POOL.FREED_TIME&lt;/span&gt; became soomething &lt;a href="http://oracle-online-help.blogspot.com/2007/01/when-should-i-rebuild-my-indexes.html"&gt;unbalanced&lt;/a&gt;. Not the kind you might argue 'B* trees can not be unbalanced per definition', but more of the kind 'based on the code there often remain some blocks &lt;span style="font-weight: bold;"&gt;nearly&lt;/span&gt; unused, which makes the selectivity of the index apear less and less usable. In fact, the statment is not really nice to the CBO, as an &lt;span style="font-style: italic;"&gt;AND ROWNUM=1&lt;/span&gt; is hard to estimate.&lt;br /&gt;&lt;br /&gt;This brings me to one of the highlights in this project: Based on good arguments and a test-case we could argue to make a slightly change in the code and the logic. To understand the change some words must be said to the logic: the part  &lt;span&gt;&lt;span&gt;v_time&gt;FREED_TIME  was used to introduce a kind of 'cold down period' where a resource was not used but neverthleless NOT reused again. This period was ever planned to be several minutes (about 5 was the asumption for the project, but it could also be 2 or 15, but it was agreed NEVER to be less than 1 or more than 20 minutes).&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This led us to these changes:&lt;br /&gt;we could change the table to make FREED_TIME of type NUMBER and changed the statement to:&lt;br /&gt;&lt;pre name="code" class="sql"&gt;&lt;br /&gt;UPDATE RESOURCE_POOL SET&lt;br /&gt;&lt;span&gt;           &lt;/span&gt;STATUS='INUSE',&lt;br /&gt;        FREED_TIME=NULL,&lt;br /&gt;        SESSION_START_TIME=:B7&lt;br /&gt;WHERE&lt;br /&gt;     FREED_TIME NOT IN&lt;br /&gt;       (select (to_char(sysdate, 'MI')-(rownum - 1)) - 60 * FLOOR((to_char(sysdate, 'MI')-(rownum - 1))/60) safe_minutes&lt;br /&gt;        from dual&lt;br /&gt;        connect by level &lt;= :MINUTES_GRACE)&lt;br /&gt; AND STATUS='FREE'&lt;br /&gt; AND ADDRESS_POOL=:B1&lt;br /&gt; AND ROWNUM=1 &lt;br /&gt;RETURNING IP_ADDR INTO :O0 &lt;/pre&gt;&lt;br /&gt;and the statement which 'frees' the resource:&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="sql"&gt;&lt;br /&gt;UPDATE RESOURCE_POOL SET&lt;br /&gt;...&lt;br /&gt;STATUS='FREE' FREED_TIME=to_char(sysdate, 'MI')&lt;br /&gt;...&lt;br /&gt;&lt;/pre&gt;This leads to a logic, where every time the status is freed the current minute is stored in FREED_TIME. There are only 60 different values which come again and again and again. (so The selectivity is quite stable.&lt;br /&gt;The &lt;span style="font-style: italic;"&gt;select ... from dual ... connect by ... &lt;/span&gt;is a simple way to have a eaily changable list of 'the last x minutes' which is aware the break every hour; the more or less strange formula is a kind of MOD().&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-2298718525348826132?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/2298718525348826132/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=2298718525348826132' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/2298718525348826132'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/2298718525348826132'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2008/12/doing-it-better-part-2.html' title='Doing it better ... (Part 2)'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-3567624408664639469</id><published>2008-12-17T21:48:00.000+01:00</published><updated>2008-12-17T22:53:06.436+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='10.2.0.4'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>Doing it better ... (Part 1)</title><content type='html'>I never thought something like this could be worth a blog entry, but as &lt;a href="http://www.blogger.com/profile/00933377956793659534"&gt;Tom Kyte&lt;/a&gt; can &lt;a href="http://tkyte.blogspot.com/2008/12/doing-it-wrong.html"&gt;do this&lt;/a&gt;, I can also! ;-)&lt;br /&gt;&lt;br /&gt;I had the pleasure to assist in a little project as a DBA.&lt;br /&gt;The pleasure was mine, as the target (in response-time) was outstanding (in my current working circumstances) and the setup was done to achieve this in a more or less professional manner (which much more outstanding ...), so we had testcases, a kind of change-management, really load-tests, totally cooperative designers/developers. Great!&lt;br /&gt;&lt;br /&gt;The goal of the whole thing was to 'lock' and 'free' available resources out of a pool (according to some additional 'quality'). The example I'm writing is about the process 'provide the next free ressource out of the given pool'. It should come back in about 10ms.&lt;br /&gt;&lt;br /&gt;Here the Iterations we came through:&lt;br /&gt;&lt;br /&gt;1) primary code:&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="sql"&gt;&lt;br /&gt;SELECT resource into v_resource&lt;br /&gt;FROM RESOURCE_POOL&lt;br /&gt;WHERE v_time&gt;FREED_TIME&lt;br /&gt;AND STATUS='FREE'&lt;br /&gt;AND POOL=v_pool&lt;br /&gt;AND ROWNUM=1&lt;br /&gt;FOR UPDATE;&lt;br /&gt;UPDATE RESOURCE_POOL set&lt;br /&gt;     STATUS='INUSE',&lt;br /&gt;     FREED_TIME=null,&lt;br /&gt;     START_TIME=current_timestamp,&lt;br /&gt;WHERE RESOURCE=v_resource;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;with this comment beside these statements:&lt;br /&gt;&lt;pre name="code" class="sql"&gt;-- FOR UPDATE statement ensures that the selected row is locked until the transition is completed --&lt;br /&gt;--    open 2 different sqlplus commands, issue the command and watch the last command. it waits until update is completed (or commit) on the first session&lt;br /&gt;-- FOR UPDATE NOWAIT would report an error if the row cant be locked immediately --&lt;br /&gt;-- FOR UPDATE SKIP LOCKED pauses other db queries - this could be the perf bottleneck ...&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;BRRR! Even with an index in RESOURCE_POOL.RESOURCE it's not really optimal. And, the hard fact is, it's to slow.&lt;br /&gt;&lt;br /&gt;2) after some iterations we came to:&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="sql"&gt;UPDATE RESOURCE_POOL set&lt;br /&gt;            STATUS='INUSE',&lt;br /&gt;            FREED_TIME=null,&lt;br /&gt;            SESSION_START_TIME=current_&lt;wbr&gt;timestamp,&lt;br /&gt;WHERE v_time&gt;FREED_&lt;wbr&gt;TIME&lt;br /&gt;           AND STATUS='FREE'&lt;br /&gt;           AND RESOURCE_POOL=v_pool&lt;br /&gt;           AND ROWNUM=1&lt;br /&gt;           AND v_time&gt;FREED_TIME&lt;br /&gt;RETURNING RESOURCE  INTO v_resource;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;As we are counting miliseconds, this WAS an advantage. And for me personally, it's more beautiful, even this is not really a tuning-goal.&lt;br /&gt;&lt;br /&gt;Beside some tests on the physical layout (we came to the conclusion to use partitions by resource pools and local indexes on them) this saved us enough time so we could stop tuning.&lt;br /&gt;Maybe I also have to tell all the data is small enough to fit into the buffer_pool.&lt;br /&gt;And for the Records, it's 10.2.0.4 EE on HP-UX (Itanium), Failover ServiceGuard.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-3567624408664639469?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/3567624408664639469/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=3567624408664639469' title='4 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/3567624408664639469'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/3567624408664639469'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2008/12/doing-it-better-part-1.html' title='Doing it better ... (Part 1)'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-6383156594253017554</id><published>2008-12-16T22:19:00.003+01:00</published><updated>2008-12-16T22:38:38.981+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='11g'/><category scheme='http://www.blogger.com/atom/ns#' term='10.2.0.4'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='optimizer'/><title type='text'>Detuning soft parses</title><content type='html'>During our seminar &lt;a href="http://berxblog.blogspot.com/2008/12/oracle-10g-performance-analysis-with.html"&gt;Oracle 10g Performance analysis with Doug Burns&lt;/a&gt; the question arises how to force the optimizer to do a hard-parse all the teme, even when prepared statements and bind variables are used. The question was about a 10.2.0.4 DWH env.&lt;br /&gt;&lt;br /&gt;For 11g and some backports I found &lt;a href="http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28419/d_shared_pool.htm#sthref7227"&gt;DBMS_SHARED_POOL.PURGE &lt;/a&gt;which just purges the cursor (of course, you have to know it first; but that's no problem for one who complain about bind peeking in 10g).&lt;br /&gt;And just for the records there are some Notes&lt;br /&gt;&lt;a href="https://metalink2.oracle.com/metalink/plsql/f?p=130:3:10065371815071148393::::p3_database_id,p3_docid,p3_show_header,p3_show_help,p3_black_frame,p3_font:NOT,457309.1,1,1,1,helvetica"&gt;Note:457309.1&lt;/a&gt; - &lt;span style="font-weight: bold;"&gt;How To Flush an Object out the Library Cache [SGA]&lt;/span&gt;&lt;br /&gt;&lt;a href="https://metalink2.oracle.com/metalink/plsql/f?p=130:3:10065371815071148393::::p3_database_id,p3_docid,p3_show_header,p3_show_help,p3_black_frame,p3_font:NOT,751876.1,1,1,1,helvetica"&gt;Note:751876.1&lt;/a&gt; - &lt;span style="font-weight: bold;"&gt;DBMS_SHARED_POOL.PURGE Is Not Working On 10.2.0.4&lt;/span&gt;&lt;br /&gt; and other blogs also: &lt;a href="http://el-caro.blogspot.com/2007/10/flushing-single-cursor.html"&gt;Flushing a single cursor&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;But my initial idea was tha classic art or &lt;u&gt;de-tuning&lt;/u&gt;:&lt;br /&gt;Sometimes we complain about situatiions, where the statement is literally the same, but the optimizer creates several childs by hard-parsing. So let's use this bahaviour this time: Just change one of the many related optimizer environments.&lt;br /&gt;&lt;a href="http://oracledoug.com/serendipity/index.php?/archives/907-10g-Optimiser-Environment-Views.html"&gt;1og Optimizer Environment Views&lt;/a&gt; will be a good start, but I assume (not tested&lt;span style="font-weight: bold;"&gt;!&lt;/span&gt;) even a NLS_SORT might help for the start.&lt;br /&gt;Just grab one environment parameter which provides a wide range of values with little to no affect. So first &lt;a href="http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/initparams020.htm#REFRN10010"&gt;bitmap_merge_area_size&lt;/a&gt; came into my mind, but I'm not sure if it will have no side effects, at least in a DWH env.&lt;br /&gt;&lt;br /&gt;At the end, the common disclaimer: I have not tested any of the methods described here, so be warned ;-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-6383156594253017554?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/6383156594253017554/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=6383156594253017554' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/6383156594253017554'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/6383156594253017554'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2008/12/detuning-soft-parses.html' title='Detuning soft parses'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-7353607043990347056</id><published>2008-12-16T20:45:00.001+01:00</published><updated>2008-12-16T21:23:52.618+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>Oracle 10g Performance Analysis with Doug Burns in Vienna</title><content type='html'>&lt;a href="http://oracledoug.com/serendipity/"&gt;Doug Burns&lt;/a&gt; hold a 2 day class in Vienna. The topic was "&lt;i&gt;Oracle 10g Performance Analysis with Doug Burns&lt;/i&gt;".&lt;br /&gt;I had the pleasure to attend this class and saw (and of course listen to) Doug.&lt;br /&gt;The course had 3 major parts (from my point of view):&lt;br /&gt;&lt;ol&gt;&lt;li&gt;General introduction to Tuning like:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;It's all about time (not costs, not ratios, not beauty, ...)&lt;/li&gt;&lt;li&gt; the customer is the only who can tell what's good (and &lt;b&gt;must&lt;/b&gt; do this, before tuning begins)&lt;/li&gt;&lt;li&gt; beware Compulsive tuning disorder&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;the history of the tools:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;bstat/estat&lt;/li&gt;&lt;li&gt;wait interface&lt;/li&gt;&lt;li&gt;statspack&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;current tools (10g/11g) and new features (11g) - (or why it's all the same, just better)&lt;br /&gt;&lt;ul&gt;&lt;li&gt;ASH&lt;/li&gt;&lt;li&gt;AWR&lt;/li&gt;&lt;li&gt;ADDM&lt;/li&gt;&lt;li&gt;improvements in 11g&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;That's all I remember (high level) - so if I miss anything substantial, sorry Doug, I must have drifted off (which I have to account my little daughters growing teeth much more than Dough) .&lt;br /&gt;&lt;br /&gt;It was the first time to see Dough and it was great. It was full of good examples (many of them known if you follow his blog or others, but that's good!), but he never lost the red line through all his slides.&lt;br /&gt;As he started with some history, he picked me up in a well known and familiar area and guided me to the brave new world, their strenghts and pitfalls.&lt;br /&gt;&lt;br /&gt;During all the coffee breaks (and there where enough, even for the smokers) quite refreshing debates arose. Very convenient.&lt;br /&gt;&lt;br /&gt;At the end, Doug just finished before time, but I had no feeling he missed something during the past 2 days. So I was happy to use the time for some more&amp;nbsp; general, not so technical chat.&lt;br /&gt;&lt;br /&gt;At all, these 2 days where the perfect recreation from ordinary labour work as a DBA for a geek like me!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-7353607043990347056?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/7353607043990347056/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=7353607043990347056' title='1 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/7353607043990347056'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/7353607043990347056'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2008/12/oracle-10g-performance-analysis-with.html' title='Oracle 10g Performance Analysis with Doug Burns in Vienna'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>1</thr:total><georss:featurename>Donaustadt, Wien, Österreich</georss:featurename><georss:point>48.23530728169834 16.42155647277832</georss:point><georss:box>48.17813778169834 16.30482697277832 48.29247678169834 16.538285972778322</georss:box></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-5256465609678415743</id><published>2008-11-26T10:07:00.003+01:00</published><updated>2008-12-16T20:44:44.058+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>dynamic SQL with DMLs</title><content type='html'>Once again, &lt;a href="http://antognini.ch/about/"&gt;Christian Antognini&lt;/a&gt; is the reason for this entry (beside my curiosity of course).&lt;br /&gt;In &lt;u&gt;Chapter 8 - Parsing&lt;/u&gt; of his book &lt;a href="http://top.antognini.ch/"&gt;Troubleshooting Oracle Performance&lt;/a&gt; he showed the advantage of explicit cursor handling. The package &lt;a href="http://books.google.com/books?id=w8qzDTUVHSQC&amp;amp;printsec=frontcover#PPA332,M2"&gt;dbms_sql&lt;/a&gt; shows the most flexibility. Unfortunately he only showed SELECT statements, no DML (which I'm interrested for some reasons). So I had to do the tests myselve:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;CREATE TABLE dyn_sql (id number, val varchar2(32));&lt;/pre&gt;&lt;br /&gt;&lt;pre class="sql" name="code"&gt;DECLARE   v_cur_hdl         INTEGER;&lt;br /&gt;  v_stmt_str        VARCHAR2(200);&lt;br /&gt;  v_rows_processed  BINARY_INTEGER;&lt;br /&gt;  gid               INTEGER;&lt;br /&gt;  gval              VARCHAR2(32);&lt;br /&gt;BEGIN   v_stmt_str := 'INSERT INTO dyn_sql VALUES (:gid, :gval)';&lt;br /&gt;  v_cur_hdl := DBMS_SQL.OPEN_CURSOR(2); -- to avoid ORA-29471 in 11g  &lt;br /&gt;  DBMS_SQL.PARSE(v_cur_hdl, v_stmt_str, DBMS_SQL.NATIVE);&lt;br /&gt;  DBMS_SQL.BIND_VARIABLE (v_cur_hdl, ':gid',  1);&lt;br /&gt;  DBMS_SQL.BIND_VARIABLE (v_cur_hdl, ':gval', 'V01C01');&lt;br /&gt;  &lt;br /&gt;  v_rows_processed := DBMS_SQL.EXECUTE(v_cur_hdl);&lt;br /&gt;  &lt;br /&gt;  DBMS_SQL.BIND_VARIABLE (v_cur_hdl, ':gid',  2);&lt;br /&gt;  DBMS_SQL.BIND_VARIABLE (v_cur_hdl, ':gval', 'V02C01');&lt;br /&gt;  v_rows_processed := DBMS_SQL.EXECUTE(v_cur_hdl);&lt;br /&gt;  COMMIT;&lt;br /&gt;&lt;br /&gt;  DBMS_SQL.BIND_VARIABLE (v_cur_hdl, ':gid',  3);&lt;br /&gt;  DBMS_SQL.BIND_VARIABLE (v_cur_hdl, ':gval', 'V03C02');&lt;br /&gt;&lt;br /&gt;  v_rows_processed := DBMS_SQL.EXECUTE(v_cur_hdl);&lt;br /&gt;  DBMS_SQL.BIND_VARIABLE (v_cur_hdl, ':gid',  4);&lt;br /&gt;  DBMS_SQL.BIND_VARIABLE (v_cur_hdl, ':gval', 'V04C02');&lt;br /&gt;  &lt;br /&gt;  v_rows_processed := DBMS_SQL.EXECUTE(v_cur_hdl);&lt;br /&gt;  ROLLBACK;&lt;br /&gt;  &lt;br /&gt;  DBMS_SQL.BIND_VARIABLE (v_cur_hdl, ':gid',  5);&lt;br /&gt;  DBMS_SQL.BIND_VARIABLE (v_cur_hdl, ':gval', 'V05C03');&lt;br /&gt;  &lt;br /&gt;  v_rows_processed := DBMS_SQL.EXECUTE(v_cur_hdl);&lt;br /&gt;  &lt;br /&gt;  DBMS_SQL.CLOSE_CURSOR(v_cur_hdl);&lt;br /&gt;END;&lt;br /&gt; /&lt;/pre&gt;&lt;br /&gt;&lt;pre class="sql" name="code"&gt;SQL&gt; select * from dyn_sql;&lt;br /&gt;        ID VAL&lt;br /&gt;---------- ------&lt;br /&gt;         1 V01C01&lt;br /&gt;         2 V02C01&lt;br /&gt;         5 V05C03&lt;/pre&gt;blubb&lt;br /&gt;what are my findings?&lt;br /&gt;&lt;ol&gt;&lt;li&gt;DBMS_SQL works fine also for DMLs.&lt;/li&gt;&lt;li&gt;commit/rollback within an open cursor works fine.&lt;/li&gt;&lt;li&gt;&lt;del&gt;closing a cursor implicite commits (direct sql-trace sequence: EXEC(insert) - CLOSE(insert) - EXEC(pl/sql) - CLOSE (pl/sql)&lt;/del&gt;&lt;b&gt;Deleted after Chris commentar&lt;/b&gt;&lt;/li&gt;&lt;/ol&gt;There is an explicite warning in the documentation: &lt;a href="http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14251/adfns_dynamic_sql.htm#sthref1097"&gt;&lt;b&gt;Native Dynamic SQL is faster than DBMS_SQL&lt;/b&gt;&lt;/a&gt;. I did not test this. But be warned. (and &lt;u&gt;test&lt;/u&gt; it yourselve, If you fear performance!)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-5256465609678415743?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/5256465609678415743/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=5256465609678415743' title='2 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/5256465609678415743'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/5256465609678415743'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2008/11/dynamic-sql-with-dmls.html' title='dynamic SQL with DMLs'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-781339251839156806</id><published>2008-11-25T20:05:00.004+01:00</published><updated>2008-11-25T21:21:19.527+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='11.1.0.7'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>minimal init.ora</title><content type='html'>my minimal init.ora has only 4 lines:&lt;br /&gt;&lt;pre&gt;*.compatible='11.1.0.0.0'&lt;br /&gt;*.control_files='/appl/oracle/oradata/BERX2/control01.ctl','/appl/oracle/oradata/BERX2/control02.ctl','/appl/oracle/oradata/BERX2/control03.ctl'&lt;br /&gt;*.db_block_size=8192&lt;br /&gt;*.db_name='BERX2'&lt;br /&gt;&lt;/pre&gt;where I have to check if I can omit the compatible. So it would be down to 3 lines. nice!&lt;br /&gt;Without setting &lt;span style="font-style: italic;"&gt;compatible&lt;/span&gt;, I get&lt;br /&gt;&lt;pre&gt;ORA-00201: control file version 11.1.0.0.0 incompatible with ORACLE version&lt;br /&gt;11.0.0.0.0&lt;br /&gt;ORA-00202: control file: '/appl/oracle/oradata/BERX2/control01.ctl'&lt;br /&gt;&lt;/pre&gt;and a &lt;span style="font-style: italic;"&gt;show parameter compatible&lt;/span&gt; gives&lt;br /&gt;&lt;pre&gt;compatible                           string      11.0.0&lt;/pre&gt;strange, as the instance identifies itselve as&lt;br /&gt;&lt;pre&gt;SQL&gt; select version from v$instance;&lt;br /&gt;&lt;br /&gt;VERSION&lt;br /&gt;-----------------&lt;br /&gt;11.1.0.7.0&lt;br /&gt;&lt;/pre&gt;So it seems the automatic value for &lt;span style="font-style: italic;"&gt;compatible&lt;/span&gt; is derived only from the first Version number of &lt;span style="font-style: italic;"&gt;v$instance&lt;/span&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-781339251839156806?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/781339251839156806/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=781339251839156806' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/781339251839156806'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/781339251839156806'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2008/11/minimal-initora.html' title='minimal init.ora'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-5629191798969792159</id><published>2008-11-25T08:45:00.002+01:00</published><updated>2010-01-09T20:56:25.720+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>sysstat_sample.sql</title><content type='html'>Based on &lt;a href="http://blog.tanelpoder.com/"&gt;Tanel Poders&lt;/a&gt; &lt;a href="http://www.tanelpoder.com/files/scripts/sample.sql"&gt;sample.sql&lt;/a&gt; and &lt;a href="http://www.tanelpoder.com/files/scripts/ses.sql"&gt;ses.sql&lt;/a&gt; I was interrested to get some informations about the System at all.&lt;br /&gt;There are various discussions wether or not it is useful to have a look on the system when hunting a problem within a session. Nevertheless I decided I need such a tool. On the one hand to generate a 'good' baseline, on the other to have a quick, zentralised view. It's also of some use to compare the system-statistics to the values of one dedicated sessions to see if this session is the major reason for any changes or submit only a small amount, but might suffer from others in the system.&lt;br /&gt;&lt;br /&gt;So here is the code:&lt;br /&gt;&lt;pre class="brush: sql"&gt;&lt;br /&gt;select name,&lt;br /&gt;  min(value)               "MIN",&lt;br /&gt;  max(value)               "MAX",&lt;br /&gt;  max(value) - min(value)  "overall_delta",&lt;br /&gt;  max(delta)               "max_single_delta",&lt;br /&gt;  sum(decode(delta,0,0,1)) "#changes"   -- count distinct &lt;br /&gt;from&lt;br /&gt;  (with c as&lt;br /&gt;     (select &amp;amp;1 counter from dual)&lt;br /&gt;  select     rn,&lt;br /&gt; name,&lt;br /&gt; value,&lt;br /&gt;     decode(rn,1,0,value-prev) delta  &lt;br /&gt;from    ( select /*+ ordered use_nl(t) */&lt;br /&gt;         r.rn,&lt;br /&gt; NAME,&lt;br /&gt; Value,&lt;br /&gt;         LAG(VALUE) OVER (Partition BY NAME order by r.rn) prev&lt;br /&gt;      from&lt;br /&gt;        (select /*+ no_unnest */&lt;br /&gt; rownum rn,&lt;br /&gt; 1 sample_dummy&lt;br /&gt;          from dual&lt;br /&gt;            connect by level &amp;lt;= (select counter from c)        ) r,        v$sysstat t      order by name, r.rn     )  ) syss&lt;br /&gt;where   value     &amp;gt; 0&lt;br /&gt;  and delta &amp;gt; 0&lt;br /&gt;group by name&lt;br /&gt;order by name&lt;br /&gt;/&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This piece of code samples through &lt;a href="http://download.oracle.com/docs/cd/B28359_01/server.111/b28320/dynviews_3086.htm#REFRN30272"&gt;v$sysstat&lt;/a&gt; and generates for every entry (where the value &amp;gt; 0, to reduce the lines) a line with the minimal value, the maximal value, the delta between them (this could also be done by &lt;a href="http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28419/d_lock.htm#i997212"&gt;DBMS_LOCK.SLEEP&lt;/a&gt;) but also the greatest single step between 2 sequent samples.&lt;br /&gt;There might also be other statistical functions of some interrest, but I have too little knowledge on statistics and how to use them (comments/suggestions welcome!).&lt;br /&gt;&lt;br /&gt;The script can also be found &lt;a href="http://berx.otepad.com/script:sysstat_sample.sql"&gt;here&lt;/a&gt;, where I will keep the most recent version all the time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-5629191798969792159?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/5629191798969792159/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=5629191798969792159' title='2 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/5629191798969792159'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/5629191798969792159'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2008/11/sysstatsamplesql.html' title='sysstat_sample.sql'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-6562344316869872760</id><published>2008-11-07T12:08:00.002+01:00</published><updated>2008-11-07T13:13:31.690+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='11.1.0.6'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>Composite Bitmap Indexes</title><content type='html'>In hist Book &lt;a href="http://top.antognini.ch/"&gt;Troubleshoot Oracle Performance&lt;/a&gt; &lt;a href="http://antognini.ch/about/"&gt;Christian Antognini&lt;/a&gt; wrote also about&amp;nbsp;&lt;b&gt;Composite Bitmap Indexes&lt;/b&gt;. (&lt;a href="http://books.google.com/books?id=w8qzDTUVHSQC&amp;amp;printsec=frontcover#PPA400,M2"&gt;p400&lt;/a&gt;)&lt;br /&gt;Unfortunately he only proclaims&lt;br /&gt;&lt;blockquote&gt;Composite bitmap indexes are rarely created. This is because several indexes can be combined efficiently in order to apply a restriction. To see how powerful bitmap indexes are, let’s look at several queries.&lt;span style="font-size: xx-small;"&gt; (&lt;a href="http://books.google.com/books?id=w8qzDTUVHSQC&amp;amp;printsec=frontcover#PPA400,M2"&gt;p400&lt;/a&gt;)&lt;/span&gt;&lt;/blockquote&gt;without givin gany evidence. So I grabbed his &lt;a href="http://antognini.ch/downloads/Scripts20080821.zip"&gt;scripts &lt;/a&gt;(thank you for providing them) and run some testcases (on 11.1.0.6):&lt;br /&gt;I just created this additional bitmap index:&lt;br /&gt;&lt;pre class="sql" name="code"&gt;CREATE BITMAP INDEX bx_i_n456 on t (n4, n5, n6);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;bitmap AND&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;index_combine&lt;/b&gt;:&lt;br /&gt;&lt;br /&gt;&lt;pre class="sql" name="code"&gt;SELECT /*+ index_combine(t i_n4 i_n5 i_n6) */ *&lt;br /&gt;FROM t&lt;br /&gt;WHERE n4 = 6 AND n5 = 42 AND n6 = 11&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------------------------&lt;br /&gt;| Id  | Operation                    | Name | Starts | E-Rows | A-Rows |   A-Time   | Buffers |&lt;br /&gt;-----------------------------------------------------------------------------------------------&lt;br /&gt;|   1 |  TABLE ACCESS BY INDEX ROWID | T    |      1 |      1 |      1 |00:00:00.01 |       7 |&lt;br /&gt;|   2 |   BITMAP CONVERSION TO ROWIDS|      |      1 |        |      1 |00:00:00.01 |       6 |&lt;br /&gt;|   3 |    BITMAP AND                |      |      1 |        |      1 |00:00:00.01 |       6 |&lt;br /&gt;|*  4 |     BITMAP INDEX SINGLE VALUE| I_N5 |      1 |        |      1 |00:00:00.01 |       2 |&lt;br /&gt;|*  5 |     BITMAP INDEX SINGLE VALUE| I_N6 |      1 |        |      1 |00:00:00.01 |       2 |&lt;br /&gt;|*  6 |     BITMAP INDEX SINGLE VALUE| I_N4 |      1 |        |      1 |00:00:00.01 |       2 |&lt;br /&gt;-----------------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;   4 - access("N5"=42)&lt;br /&gt;   5 - access("N6"=11)&lt;br /&gt;   6 - access("N4"=6)&lt;br /&gt;&lt;/pre&gt;&lt;div style="text-align: right;"&gt;Cost: 3&lt;/div&gt;&lt;br /&gt;&lt;b&gt;composite bitmap index&lt;/b&gt;(CIB):&lt;br /&gt;&lt;br /&gt;&lt;pre class="sql" name="code"&gt;SELECT *&lt;br /&gt;FROM t&lt;br /&gt;WHERE n4 = 6 AND n5 = 42 AND n6 = 11&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------------------------------&lt;br /&gt;| Id  | Operation                    | Name      | Starts | E-Rows | A-Rows |   A-Time   | Buffers |&lt;br /&gt;----------------------------------------------------------------------------------------------------&lt;br /&gt;|   1 |  TABLE ACCESS BY INDEX ROWID | T         |      1 |      1 |      1 |00:00:00.01 |       4 |&lt;br /&gt;|   2 |   BITMAP CONVERSION TO ROWIDS|           |      1 |        |      1 |00:00:00.01 |       3 |&lt;br /&gt;|*  3 |    BITMAP INDEX SINGLE VALUE | BX_I_N456 |      1 |        |      1 |00:00:00.01 |       3 |&lt;br /&gt;----------------------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;   3 - access("N4"=6 AND "N5"=42 AND "N6"=11)&lt;br /&gt;&lt;/pre&gt;&lt;div style="text-align: right;"&gt;Cost:1&lt;/div&gt;&lt;br /&gt;In this case the CBI wins.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;bitmap OR&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;index_combine&lt;/b&gt;:&lt;br /&gt;&lt;br /&gt;&lt;pre class="sql" name="code"&gt;SELECT /*+ index_combine(t i_n4 i_n5 i_n6) */ *&lt;br /&gt;FROM t&lt;br /&gt;WHERE n4 = 6 OR n5 = 42 OR n6 = 11&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------------------------&lt;br /&gt;| Id  | Operation                    | Name | Starts | E-Rows | A-Rows |   A-Time   | Buffers |&lt;br /&gt;-----------------------------------------------------------------------------------------------&lt;br /&gt;|   1 |  TABLE ACCESS BY INDEX ROWID | T    |      1 |    797 |    767 |00:00:00.01 |     419 |&lt;br /&gt;|   2 |   BITMAP CONVERSION TO ROWIDS|      |      1 |        |    767 |00:00:00.01 |       7 |&lt;br /&gt;|   3 |    BITMAP OR                 |      |      1 |        |      1 |00:00:00.01 |       7 |&lt;br /&gt;|*  4 |     BITMAP INDEX SINGLE VALUE| I_N4 |      1 |        |      1 |00:00:00.01 |       3 |&lt;br /&gt;|*  5 |     BITMAP INDEX SINGLE VALUE| I_N6 |      1 |        |      1 |00:00:00.01 |       2 |&lt;br /&gt;|*  6 |     BITMAP INDEX SINGLE VALUE| I_N5 |      1 |        |      1 |00:00:00.01 |       2 |&lt;br /&gt;-----------------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;   4 - access("N4"=6)&lt;br /&gt;   5 - access("N6"=11)&lt;br /&gt;   6 - access("N5"=42)&lt;br /&gt;&lt;/pre&gt;&lt;div style="text-align: right;"&gt;&amp;nbsp;Cost: 135&lt;/div&gt;&lt;br /&gt;&lt;b&gt;no hints&lt;/b&gt;:&lt;br /&gt;&lt;br /&gt;&lt;pre class="sql" name="code"&gt;SELECT *&lt;br /&gt;FROM t&lt;br /&gt;WHERE n4 = 6 OR n5 = 42 OR n6 = 11&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------------------------&lt;br /&gt;| Id  | Operation                    | Name | Starts | E-Rows | A-Rows |   A-Time   | Buffers |&lt;br /&gt;-----------------------------------------------------------------------------------------------&lt;br /&gt;|   1 |  TABLE ACCESS BY INDEX ROWID | T    |      1 |    797 |    767 |00:00:00.01 |     419 |&lt;br /&gt;|   2 |   BITMAP CONVERSION TO ROWIDS|      |      1 |        |    767 |00:00:00.01 |       7 |&lt;br /&gt;|   3 |    BITMAP OR                 |      |      1 |        |      1 |00:00:00.01 |       7 |&lt;br /&gt;|*  4 |     BITMAP INDEX SINGLE VALUE| I_N4 |      1 |        |      1 |00:00:00.01 |       3 |&lt;br /&gt;|*  5 |     BITMAP INDEX SINGLE VALUE| I_N6 |      1 |        |      1 |00:00:00.01 |       2 |&lt;br /&gt;|*  6 |     BITMAP INDEX SINGLE VALUE| I_N5 |      1 |        |      1 |00:00:00.01 |       2 |&lt;br /&gt;-----------------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;   4 - access("N4"=6)&lt;br /&gt;   5 - access("N6"=11)&lt;br /&gt;   6 - access("N5"=42)&lt;br /&gt;&lt;/pre&gt;&lt;div style="text-align: right;"&gt;Cost:135&lt;/div&gt;&lt;br /&gt;&lt;b&gt;index_combine with BX_I_N456&lt;/b&gt;:&amp;nbsp; &lt;br /&gt;&lt;br /&gt;&lt;pre class="sql" name="code"&gt;SELECT /*+ index_combine(t BX_I_N456 i_n5 i_n6) */ *&lt;br /&gt;FROM t&lt;br /&gt;WHERE n4 = 6 OR n5 = 42 OR n6 = 11   &lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------------------------------&lt;br /&gt;| Id  | Operation                    | Name      | Starts | E-Rows | A-Rows |   A-Time   | Buffers |&lt;br /&gt;----------------------------------------------------------------------------------------------------&lt;br /&gt;|   1 |  TABLE ACCESS BY INDEX ROWID | T         |      1 |    797 |    767 |00:00:00.04 |     420 |&lt;br /&gt;|   2 |   BITMAP CONVERSION TO ROWIDS|           |      1 |        |    767 |00:00:00.03 |       8 |&lt;br /&gt;|   3 |    BITMAP OR                 |           |      1 |        |      1 |00:00:00.03 |       8 |&lt;br /&gt;|   4 |     BITMAP MERGE             |           |      1 |        |      1 |00:00:00.03 |       4 |&lt;br /&gt;|*  5 |      BITMAP INDEX RANGE SCAN | BX_I_N456 |      1 |        |    527 |00:00:00.01 |       4 |&lt;br /&gt;|*  6 |     BITMAP INDEX SINGLE VALUE| I_N6      |      1 |        |      1 |00:00:00.01 |       2 |&lt;br /&gt;|*  7 |     BITMAP INDEX SINGLE VALUE| I_N5      |      1 |        |      1 |00:00:00.01 |       2 |&lt;br /&gt;----------------------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;   5 - access("N4"=6)&lt;br /&gt;       filter("N4"=6)&lt;br /&gt;   6 - access("N6"=11)&lt;br /&gt;   7 - access("N5"=42)&lt;br /&gt;&lt;/pre&gt;&lt;div style="text-align: right;"&gt;Cost: 138&lt;/div&gt;&lt;br /&gt;&lt;b&gt;index_combine with BX_I_N456 on 2nd place&lt;/b&gt;:&amp;nbsp; &lt;br /&gt;&lt;br /&gt;&lt;pre class="sql" name="code"&gt;SELECT /*+ index_combine(t i_n4 BX_I_N456 i_n6) */ *&lt;br /&gt;FROM t&lt;br /&gt;WHERE n4 = 6 OR n5 = 42 OR n6 = 11   &lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------------------------------&lt;br /&gt;| Id  | Operation                    | Name      | Starts | E-Rows | A-Rows |   A-Time   | Buffers |&lt;br /&gt;----------------------------------------------------------------------------------------------------&lt;br /&gt;|   1 |  TABLE ACCESS BY INDEX ROWID | T         |      1 |    797 |    767 |00:00:00.01 |     420 |&lt;br /&gt;|   2 |   BITMAP CONVERSION TO ROWIDS|           |      1 |        |    767 |00:00:00.01 |       8 |&lt;br /&gt;|   3 |    BITMAP OR                 |           |      1 |        |      1 |00:00:00.01 |       8 |&lt;br /&gt;|   4 |     BITMAP MERGE             |           |      1 |        |      1 |00:00:00.01 |       4 |&lt;br /&gt;|*  5 |      BITMAP INDEX RANGE SCAN | BX_I_N456 |      1 |        |    527 |00:00:00.01 |       4 |&lt;br /&gt;|*  6 |     BITMAP INDEX SINGLE VALUE| I_N6      |      1 |        |      1 |00:00:00.01 |       2 |&lt;br /&gt;|*  7 |     BITMAP INDEX SINGLE VALUE| I_N5      |      1 |        |      1 |00:00:00.01 |       2 |&lt;br /&gt;----------------------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Predicate Information (identified by operation id):&lt;br /&gt;---------------------------------------------------&lt;br /&gt;&lt;br /&gt;   5 - access("N4"=6)&lt;br /&gt;       filter("N4"=6)&lt;br /&gt;   6 - access("N6"=11)&lt;br /&gt;   7 - access("N5"=42)&lt;br /&gt;&lt;/pre&gt;&lt;div style="text-align: right;"&gt;Costs: 138&lt;/div&gt;&lt;br /&gt;in this case, the 3 seperated bitmap indices wins.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOT EQUAL AND&lt;/b&gt;:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;index_combine&lt;/b&gt;: &lt;br /&gt;&lt;br /&gt;&lt;pre class="sql" name="code"&gt;SELECT /*+ index_combine(t i_n4 i_n5 i_n6) */ *&lt;br /&gt;FROM t&lt;br /&gt;WHERE n4 != 6 AND n5 = 42 AND n6 = 11   &lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------------------------&lt;br /&gt;| Id  | Operation                    | Name | Starts | E-Rows | A-Rows |   A-Time   | Buffers |&lt;br /&gt;-----------------------------------------------------------------------------------------------&lt;br /&gt;|*  1 |  TABLE ACCESS BY INDEX ROWID | T    |      1 |      1 |      1 |00:00:00.01 |       6 |&lt;br /&gt;|   2 |   BITMAP CONVERSION TO ROWIDS|      |      1 |        |      2 |00:00:00.01 |       4 |&lt;br /&gt;|   3 |    BITMAP AND                |      |      1 |        |      1 |00:00:00.01 |       4 |&lt;br /&gt;|*  4 |     BITMAP INDEX SINGLE VALUE| I_N5 |      1 |        |      1 |00:00:00.01 |       2 |&lt;br /&gt;|*  5 |     BITMAP INDEX SINGLE VALUE| I_N6 |      1 |        |      1 |00:00:00.01 |       2 |&lt;br /&gt;-----------------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;   1 - filter("N4"&amp;lt;&amp;gt;6)&lt;br /&gt;   4 - access("N5"=42)&lt;br /&gt;   5 - access("N6"=11)&lt;br /&gt;&lt;/pre&gt;&lt;div style="text-align: right;"&gt;Costs: 2&lt;/div&gt;&lt;br /&gt;a different execution plan from Chris' Book, there a &lt;b&gt;BITMAP MINUS&lt;/b&gt; was shown in the execution plan.&lt;br /&gt;Maybe a question for a seperated session, where the &lt;b&gt;BITMAP MINUS&lt;/b&gt; disappeared.&lt;br /&gt;&lt;br /&gt;for some reason, this hint generated the &lt;b&gt;BITMAP MINUS&lt;/b&gt;&lt;br /&gt;&lt;pre class="sql" name="code"&gt;SELECT /*+ index(t  BX_I_N456) */ *&lt;br /&gt;FROM t&lt;br /&gt;WHERE n4 != 6 AND n5 = 42 AND n6 = 11   &lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------------------------------------------&lt;br /&gt;| Id  | Operation                      | Name      | Starts | E-Rows | A-Rows |   A-Time   | Buffers |&lt;br /&gt;------------------------------------------------------------------------------------------------------&lt;br /&gt;|   1 |  TABLE ACCESS BY INDEX ROWID   | T         |      1 |      1 |      1 |00:00:00.01 |      13 |&lt;br /&gt;|   2 |   BITMAP CONVERSION TO ROWIDS  |           |      1 |        |      1 |00:00:00.01 |      12 |&lt;br /&gt;|   3 |    BITMAP MINUS                |           |      1 |        |      1 |00:00:00.01 |      12 |&lt;br /&gt;|   4 |     BITMAP MINUS               |           |      1 |        |      1 |00:00:00.01 |       8 |&lt;br /&gt;|   5 |      BITMAP AND                |           |      1 |        |      1 |00:00:00.01 |       4 |&lt;br /&gt;|*  6 |       BITMAP INDEX SINGLE VALUE| I_N5      |      1 |        |      1 |00:00:00.01 |       2 |&lt;br /&gt;|*  7 |       BITMAP INDEX SINGLE VALUE| I_N6      |      1 |        |      1 |00:00:00.01 |       2 |&lt;br /&gt;|   8 |      BITMAP MERGE              |           |      1 |        |      1 |00:00:00.01 |       4 |&lt;br /&gt;|*  9 |       BITMAP INDEX RANGE SCAN  | BX_I_N456 |      1 |        |    526 |00:00:00.01 |       4 |&lt;br /&gt;|  10 |     BITMAP MERGE               |           |      1 |        |      1 |00:00:00.01 |       4 |&lt;br /&gt;|* 11 |      BITMAP INDEX RANGE SCAN   | BX_I_N456 |      1 |        |    526 |00:00:00.01 |       4 |&lt;br /&gt;------------------------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;   6 - access("N5"=42)&lt;br /&gt;   7 - access("N6"=11)&lt;br /&gt;   9 - access("N4"=6)&lt;br /&gt;  11 - access("N4" IS NULL)&lt;br /&gt;&lt;/pre&gt;&lt;div style="text-align: right;"&gt;Cost: 4&lt;/div&gt;&lt;br /&gt;So I decided to do a slightly different testcase:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;index_combine&lt;/b&gt;:&lt;br /&gt;&lt;br /&gt;&lt;pre class="sql" name="code"&gt;SELECT /*+ index_combine(t i_n4 i_n5 i_n6) */ * &lt;br /&gt;FROM t &lt;br /&gt;WHERE n4 = 6 and n5 != 42 and n6 = 11&lt;br /&gt;&lt;br /&gt;-------------------------------------------------------------------------------------------------&lt;br /&gt;| Id  | Operation                      | Name | Starts | E-Rows | A-Rows |   A-Time   | Buffers |&lt;br /&gt;-------------------------------------------------------------------------------------------------&lt;br /&gt;|   1 |  TABLE ACCESS BY INDEX ROWID   | T    |      1 |      8 |      7 |00:00:00.01 |      15 |&lt;br /&gt;|   2 |   BITMAP CONVERSION TO ROWIDS  |      |      1 |        |      7 |00:00:00.01 |       8 |&lt;br /&gt;|   3 |    BITMAP MINUS                |      |      1 |        |      1 |00:00:00.01 |       8 |&lt;br /&gt;|   4 |     BITMAP MINUS               |      |      1 |        |      1 |00:00:00.01 |       6 |&lt;br /&gt;|   5 |      BITMAP AND                |      |      1 |        |      1 |00:00:00.01 |       4 |&lt;br /&gt;|*  6 |       BITMAP INDEX SINGLE VALUE| I_N6 |      1 |        |      1 |00:00:00.01 |       2 |&lt;br /&gt;|*  7 |       BITMAP INDEX SINGLE VALUE| I_N4 |      1 |        |      1 |00:00:00.01 |       2 |&lt;br /&gt;|*  8 |      BITMAP INDEX SINGLE VALUE | I_N5 |      1 |        |      1 |00:00:00.01 |       2 |&lt;br /&gt;|*  9 |     BITMAP INDEX SINGLE VALUE  | I_N5 |      1 |        |      1 |00:00:00.01 |       2 |&lt;br /&gt;-------------------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;   6 - access("N6"=11)&lt;br /&gt;   7 - access("N4"=6)&lt;br /&gt;   8 - access("N5"=42)&lt;br /&gt;   9 - access("N5" IS NULL)&lt;br /&gt;&lt;/pre&gt;&lt;div style="text-align: right;"&gt;Costs: 6&lt;/div&gt;&lt;br /&gt;&lt;b&gt;CIB&lt;/b&gt;:&lt;br /&gt;&lt;br /&gt;&lt;pre class="sql" name="code"&gt;SELECT /*+ index(t BX_I_N456) */ * &lt;br /&gt;FROM t &lt;br /&gt;WHERE n4 =6 and n5 != 42 and n6 = 11&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------------------------------&lt;br /&gt;| Id  | Operation                    | Name      | Starts | E-Rows | A-Rows |   A-Time   | Buffers |&lt;br /&gt;----------------------------------------------------------------------------------------------------&lt;br /&gt;|   1 |  TABLE ACCESS BY INDEX ROWID | T         |      1 |      8 |      7 |00:00:00.01 |      12 |&lt;br /&gt;|   2 |   BITMAP CONVERSION TO ROWIDS|           |      1 |        |      7 |00:00:00.01 |       5 |&lt;br /&gt;|*  3 |    BITMAP INDEX RANGE SCAN   | BX_I_N456 |      1 |        |      7 |00:00:00.01 |       5 |&lt;br /&gt;----------------------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;   3 - access("N4"=6)&lt;br /&gt;       filter(("N6"=11 AND "N5"&amp;lt;&amp;gt;42 AND "N4"=6))&lt;br /&gt;&lt;/pre&gt;&lt;div style="text-align: right;"&gt;Costs: 107&lt;/div&gt;&lt;br /&gt;&lt;b&gt;no hints&lt;/b&gt;:&lt;br /&gt;&lt;br /&gt;&lt;pre class="sql" name="code"&gt;SELECT  * &lt;br /&gt;FROM t &lt;br /&gt;WHERE n4 =6 and n5 != 42 and n6 = 11    &lt;br /&gt;    &lt;br /&gt;-----------------------------------------------------------------------------------------------&lt;br /&gt;| Id  | Operation                    | Name | Starts | E-Rows | A-Rows |   A-Time   | Buffers |&lt;br /&gt;-----------------------------------------------------------------------------------------------&lt;br /&gt;|*  1 |  TABLE ACCESS BY INDEX ROWID | T    |      1 |      8 |      7 |00:00:00.01 |      12 |&lt;br /&gt;|   2 |   BITMAP CONVERSION TO ROWIDS|      |      1 |        |      8 |00:00:00.01 |       4 |&lt;br /&gt;|   3 |    BITMAP AND                |      |      1 |        |      1 |00:00:00.01 |       4 |&lt;br /&gt;|*  4 |     BITMAP INDEX SINGLE VALUE| I_N6 |      1 |        |      1 |00:00:00.01 |       2 |&lt;br /&gt;|*  5 |     BITMAP INDEX SINGLE VALUE| I_N4 |      1 |        |      1 |00:00:00.01 |       2 |&lt;br /&gt;-----------------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;   1 - filter("N5"&amp;lt;&amp;gt;42)&lt;br /&gt;   4 - access("N6"=11)&lt;br /&gt;   5 - access("N4"=6)&amp;nbsp;&lt;/pre&gt;&lt;div style="text-align: right;"&gt;Costs: 4 &lt;/div&gt;&lt;br /&gt;My a little bit more explicit view of composite bitmap indexes is:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;They can be useful in &lt;b&gt;AND &lt;/b&gt;statements:&lt;/li&gt;&lt;li&gt;even not optimal for &lt;b&gt;OR&lt;/b&gt; statements, they can replace the bitmap index which is created only on the first column without high cost increasement&lt;/li&gt;&lt;li&gt;in &lt;b&gt;NOT EQUAL AND&lt;/b&gt; statements they really kill the performance if enfoced.&lt;br /&gt;&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/5309604992043123290-6562344316869872760?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/6562344316869872760/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=6562344316869872760' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/6562344316869872760'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/6562344316869872760'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2008/11/composite-bitmap-indexes.html' title='Composite Bitmap Indexes'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-4743688917765599075</id><published>2008-10-10T08:07:00.016+02:00</published><updated>2008-10-13T08:23:49.097+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='syntaxhighlighter'/><title type='text'>syntax highlighter</title><content type='html'>I'm bored of playing around with html-tags just to get the code formatted a little bot better. So I'm switching to &lt;a href="http://code.google.com/p/syntaxhighlighter/"&gt;syntaxhighlighter&lt;/a&gt; from &lt;a href="http://code.google.com/u/alex.gorbatchev/"&gt;alex.gorbatchev&lt;/a&gt; As I'm a lazy boy, I used &lt;a href="http://fahdshariff.blogspot.com/2008/07/syntax-highlighting-code-in-webpages.html"&gt;this documentation&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;from now on, code should look lihe this:&lt;br /&gt;&lt;br /&gt;&lt;pre class="sql" name="code"&gt;select sysdate from dual;select sysdate+1 from dual;select sysdate+2 from dual;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Maybe I will rewrite some of my older posts to use this for better readability. - Maybe ;-)&lt;br /&gt;&lt;span style="font-size:large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:large;"&gt;UPDATE1:&lt;/span&gt; there is something going wrong, I don't know where the &amp;lt;br&amp;gt; come from. But I will check.&lt;br /&gt;&lt;span style="font-size:large;"&gt;UPDATE2: &lt;/span&gt;solution: I must NOT put a newline at the beginning and end of the statements.&lt;br /&gt;&lt;span style="font-size:large;"&gt;UPDATE3:&lt;/span&gt; I have to switch to &lt;a href="http://draft.blogger.com/home"&gt;draft blogger&lt;/a&gt; for editiong to make it work. strange thing. but the code formatting is worth the change.&lt;br /&gt;UPDATE4: A solution is posted in syntaxhighlighters &lt;a href="http://code.google.com/p/syntaxhighlighter/wiki/BloggerMode"&gt;wiki&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-4743688917765599075?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/4743688917765599075/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=4743688917765599075' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/4743688917765599075'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/4743688917765599075'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2008/10/syntax-highlighter.html' title='syntax highlighter'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-17542460955341878</id><published>2008-10-08T10:31:00.015+02:00</published><updated>2008-11-10T09:27:06.067+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='11.1.0.6'/><category scheme='http://www.blogger.com/atom/ns#' term='11.1.0.7'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>result_cache invalidated within the same transaction</title><content type='html'>I just stumbled across one sentence about &lt;span style="font-weight: bold;"&gt;Server Result Cache&lt;/span&gt; in &lt;a href="http://antognini.ch/about/"&gt;Christian Antognini&lt;/a&gt;s &lt;a href="http://antognini.ch/top/"&gt;Troubleshooting Oracle Performance&lt;/a&gt;: &lt;span style="font-style: italic;"&gt;" ... To guarantee the consistency of the results ... every time that something changes on the objects reference by a query, the cache entries dependent on it are invalidated ...&lt;/span&gt;" (&lt;a href="http://books.google.com/books?id=w8qzDTUVHSQC&amp;amp;printsec=frontcover#PPA484,M2"&gt;p484&lt;/a&gt;).&lt;br /&gt;&lt;div&gt;This made me a little bit curious, as other caches can deal with different versions of cached objects.&lt;/div&gt;&lt;div&gt;so here are some tests:&lt;/div&gt;&lt;div&gt;(2 connections to the same instance, no RAC, 11.1.0.6):&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-large;"&gt;Default isolation level:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: large;"&gt;Session 1:&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;preparations:&lt;/div&gt;&lt;br /&gt;&lt;pre class="sql" name="code"&gt;alter session set timed_statistics = true;&lt;br /&gt;   alter session set statistics_level=all;&lt;br /&gt;   alter session set "_rowsource_execution_statistics" = true;&lt;br /&gt;   set serveroutput on&lt;br /&gt;   BEGIN&lt;br /&gt;     IF dbms_result_cache.flush &lt;br /&gt;  THEN &lt;br /&gt;    dbms_output.put_line('Flush Successful');&lt;br /&gt;  ELSE &lt;br /&gt;    dbms_output.put_line('Flush Failure');&lt;br /&gt;  END IF;&lt;br /&gt;  END;&lt;br /&gt;  /&lt;br /&gt;  set serveroutput off&lt;br /&gt;  drop table dob;&lt;br /&gt;  create table dob as select * from dba_objects;  &lt;/pre&gt;&lt;br /&gt;test:&lt;br /&gt;&lt;pre class="sql" name="code"&gt;select /*+ result_cache */ max(OBJECT_ID) from dob;    &lt;br /&gt; MAX(OBJECT_ID)&lt;br /&gt; --------------&lt;br /&gt; 74959&lt;br /&gt; &lt;br /&gt; SQL_ID  36tj9136q6pxx, child number 1&lt;br /&gt; -------------------------------------&lt;br /&gt; select /*+ result_cache */ max(OBJECT_ID) from dob&lt;br /&gt; Plan hash value: 648181113&lt;br /&gt; ---------------------------------------------------------------------------------------------------------------------&lt;br /&gt; | Id  | Operation           | Name                       | Starts | E-Rows | A-Rows |   A-Time   | Buffers | Reads  |&lt;br /&gt; ---------------------------------------------------------------------------------------------------------------------&lt;br /&gt; |   1 |  RESULT CACHE       | bskcp8b45qj3q5ju5uwg5fuscg |      1 |        |      1 |00:00:00.12 |     976 |    209 |&lt;br /&gt; |   2 |   SORT AGGREGATE    |                            |      1 |      1 |      1 |00:00:00.12 |     976 |    209 |&lt;br /&gt; |   3 |    TABLE ACCESS FULL| DOB                        |      1 |  69871 |  65761 |00:00:00.07 |     976 |    209 |&lt;br /&gt; ---------------------------------------------------------------------------------------------------------------------&lt;br /&gt; &lt;br /&gt; select /*+ result_cache */ max(OBJECT_ID) from dob;&lt;br /&gt; MAX(OBJECT_ID)&lt;br /&gt; --------------&lt;br /&gt; 74959&lt;br /&gt; &lt;br /&gt; SQL_ID 36tj9136q6pxx, child number 1&lt;br /&gt; -------------------------------------&lt;br /&gt; select /*+ result_cache */ max(OBJECT_ID) from dob&lt;br /&gt; Plan hash value: 648181113&lt;br /&gt; --------------------------------------------------------------------------------------------------&lt;br /&gt; | Id  | Operation           | Name                       | Starts | E-Rows | A-Rows |   A-Time   |&lt;br /&gt; --------------------------------------------------------------------------------------------------&lt;br /&gt; |   1 |  RESULT CACHE       | bskcp8b45qj3q5ju5uwg5fuscg |      1 |        |      1 |00:00:00.01 |&lt;br /&gt; |   2 |   SORT AGGREGATE    |                            |      0 |      1 |      0 |00:00:00.01 |&lt;br /&gt; |   3 |    TABLE ACCESS FULL| DOB                        |      0 |  69871 |      0 |00:00:00.01 |&lt;br /&gt; --------------------------------------------------------------------------------------------------&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;Session 2:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="sql" name="code"&gt;update dob set object_id=74999 where object_id=74959;&lt;br /&gt;1 row updated.&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;Session 1:&lt;/span&gt;&lt;br /&gt;&lt;pre class="sql" name="code"&gt;select /*+ result_cache */ max(OBJECT_ID) from dob;&lt;br /&gt;MAX(OBJECT_ID)&lt;br /&gt;--------------&lt;br /&gt;74959&lt;br /&gt;&lt;br /&gt;SQL_ID  36tj9136q6pxx, child number 1&lt;br /&gt;-------------------------------------&lt;br /&gt;select /*+ result_cache */ max(OBJECT_ID) from dob&lt;br /&gt;Plan hash value: 648181113&lt;br /&gt;--------------------------------------------------------------------------------------------------&lt;br /&gt;| Id  | Operation           | Name                       | Starts | E-Rows | A-Rows |   A-Time   |&lt;br /&gt;--------------------------------------------------------------------------------------------------&lt;br /&gt;|   1 |  RESULT CACHE       | bskcp8b45qj3q5ju5uwg5fuscg |      1 |        |      1 |00:00:00.01 |&lt;br /&gt;|   2 |   SORT AGGREGATE    |                            |      0 |      1 |      0 |00:00:00.01 |&lt;br /&gt;|   3 |    TABLE ACCESS FULL| DOB                        |      0 |  69871 |      0 |00:00:00.01 |&lt;br /&gt;-------------------------------------------------------------------------------------------------- &lt;/pre&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;Session 2:&lt;/span&gt;&lt;br /&gt;&lt;pre class="sql" name="code"&gt;commit;&lt;br /&gt;Commit complete.&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;Session 1:&lt;/span&gt;&lt;br /&gt;&lt;pre class="sql" name="code"&gt;select * from table(dbms_xplan.display_cursor(null,null,'ALLSTATS LAST'));&lt;br /&gt;&lt;br /&gt;MAX(OBJECT_ID)&lt;br /&gt;--------------&lt;br /&gt;74999&lt;br /&gt;&lt;br /&gt;SQL_ID  36tj9136q6pxx, child number 1&lt;br /&gt;-------------------------------------&lt;br /&gt;select /*+ result_cache */ max(OBJECT_ID) from dob&lt;br /&gt;&lt;br /&gt;Plan hash value: 648181113&lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------------------------------------------------&lt;br /&gt;| Id  | Operation           | Name                       | Starts | E-Rows | A-Rows |   A-Time   | Buffers |&lt;br /&gt;------------------------------------------------------------------------------------------------------------&lt;br /&gt;|   1 |  RESULT CACHE       | bskcp8b45qj3q5ju5uwg5fuscg |      1 |        |      1 |00:00:00.06 |     976 |&lt;br /&gt;|   2 |   SORT AGGREGATE    |                            |      1 |      1 |      1 |00:00:00.06 |     976 |&lt;br /&gt;|   3 |    TABLE ACCESS FULL| DOB                        |      1 |  69871 |  65761 |00:00:00.01 |     976 |&lt;br /&gt;------------------------------------------------------------------------------------------------------------&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;as expected - so far.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: x-large;"&gt;SET TRANSACTION ISOLATION LEVEL serializable;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;flush result cache&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: large;"&gt;Session 1:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="sql" name="code"&gt;select /*+ result_cache */ max(OBJECT_ID) from dob;&lt;br /&gt;&lt;br /&gt;MAX(OBJECT_ID)&lt;br /&gt;--------------&lt;br /&gt;75003&lt;br /&gt;&lt;br /&gt;SQL_ID  36tj9136q6pxx, child number 1&lt;br /&gt;-------------------------------------&lt;br /&gt;select /*+ result_cache */ max(OBJECT_ID) from dob&lt;br /&gt;&lt;br /&gt;Plan hash value: 648181113&lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------------------------------------------------&lt;br /&gt;| Id  | Operation           | Name                       | Starts | E-Rows | A-Rows |   A-Time   | Buffers |&lt;br /&gt;------------------------------------------------------------------------------------------------------------&lt;br /&gt;|   1 |  RESULT CACHE       | bskcp8b45qj3q5ju5uwg5fuscg |      1 |        |      1 |00:00:00.06 |     976 |&lt;br /&gt;|   2 |   SORT AGGREGATE    |                            |      1 |      1 |      1 |00:00:00.06 |     976 |&lt;br /&gt;|   3 |    TABLE ACCESS FULL| DOB                        |      1 |  69871 |  65761 |00:00:00.01 |     976 |&lt;br /&gt;------------------------------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;select /*+ result_cache */ max(OBJECT_ID) from dob;&lt;br /&gt;&lt;br /&gt;MAX(OBJECT_ID)&lt;br /&gt;--------------&lt;br /&gt;75003&lt;br /&gt;&lt;br /&gt;SQL_ID  36tj9136q6pxx, child number 1&lt;br /&gt;-------------------------------------&lt;br /&gt;select /*+ result_cache */ max(OBJECT_ID) from dob&lt;br /&gt;&lt;br /&gt;Plan hash value: 648181113&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------------------------------&lt;br /&gt;| Id  | Operation           | Name                       | Starts | E-Rows | A-Rows |   A-Time   |&lt;br /&gt;--------------------------------------------------------------------------------------------------&lt;br /&gt;|   1 |  RESULT CACHE       | bskcp8b45qj3q5ju5uwg5fuscg |      1 |        |      1 |00:00:00.01 |&lt;br /&gt;|   2 |   SORT AGGREGATE    |                            |      0 |      1 |      0 |00:00:00.01 |&lt;br /&gt;|   3 |    TABLE ACCESS FULL| DOB                        |      0 |  69871 |      0 |00:00:00.01 |&lt;br /&gt;--------------------------------------------------------------------------------------------------&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;Session 2:&lt;/span&gt;&lt;br /&gt;&lt;pre class="sql" name="code"&gt;update dob set object_id=75004 where object_id=75003;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;Session 1:&lt;/span&gt;&lt;br /&gt;&lt;pre class="sql" name="code"&gt;select /*+ result_cache */ max(OBJECT_ID) from dob;&lt;br /&gt;&lt;br /&gt;MAX(OBJECT_ID)&lt;br /&gt;--------------&lt;br /&gt;75003&lt;br /&gt;&lt;br /&gt;SQL_ID  36tj9136q6pxx, child number 1&lt;br /&gt;-------------------------------------&lt;br /&gt;select /*+ result_cache */ max(OBJECT_ID) from dob&lt;br /&gt;&lt;br /&gt;Plan hash value: 648181113&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------------------------------&lt;br /&gt;| Id  | Operation           | Name                       | Starts | E-Rows | A-Rows |   A-Time   |&lt;br /&gt;--------------------------------------------------------------------------------------------------&lt;br /&gt;|   1 |  RESULT CACHE       | bskcp8b45qj3q5ju5uwg5fuscg |      1 |        |      1 |00:00:00.01 |&lt;br /&gt;|   2 |   SORT AGGREGATE    |                            |      0 |      1 |      0 |00:00:00.01 |&lt;br /&gt;|   3 |    TABLE ACCESS FULL| DOB                        |      0 |  69871 |      0 |00:00:00.01 |&lt;br /&gt;--------------------------------------------------------------------------------------------------&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;Session 2:&lt;/span&gt;&lt;br /&gt;&lt;pre class="sql" name="code"&gt;commit;Commit complete.&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;Session 1:&lt;/span&gt;&lt;br /&gt;&lt;pre class="sql" name="code"&gt;select /*+ result_cache */ max(OBJECT_ID) from dob;&lt;br /&gt;&lt;br /&gt;MAX(OBJECT_ID)&lt;br /&gt;--------------&lt;br /&gt;75003&lt;br /&gt;SQL_ID  36tj9136q6pxx, child number 1&lt;br /&gt;-------------------------------------&lt;br /&gt;select /*+ result_cache */ max(OBJECT_ID) from dob&lt;br /&gt;&lt;br /&gt;Plan hash value: 648181113&lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------------------------------------------------&lt;br /&gt;| Id  | Operation           | Name                       | Starts | E-Rows | A-Rows |   A-Time   | Buffers |&lt;br /&gt;------------------------------------------------------------------------------------------------------------&lt;br /&gt;|   1 |  RESULT CACHE       | bskcp8b45qj3q5ju5uwg5fuscg |      1 |        |      1 |00:00:00.06 |     976 |&lt;br /&gt;|   2 |   SORT AGGREGATE    |                            |      1 |      1 |      1 |00:00:00.06 |     976 |&lt;br /&gt;|   3 |    TABLE ACCESS FULL| DOB                        |      1 |  69871 |  65761 |00:00:00.01 |     976 |&lt;br /&gt;------------------------------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;select cache_id, CACHE_KEY, NAME, status, creation_timestamp, scn, build_time, row_count, scan_count from v$result_cache_objects;&lt;br /&gt;&lt;br /&gt;CACHE_ID                       CACHE_KEY                      NAME                                               STATUS     CREATION_TIMEST        SCN BUILD_TIME  ROW_COUNT SCAN_COUNT&lt;br /&gt;&lt;br /&gt;bskcp8b45qj3q5ju5uwg5fuscg     d8g29yuwtjtn9d2bcvaykm08fc     select /*+ result_cache */ max(OBJECT_ID) from dob Invalid    08-OCT-08          6102319          6          1          2&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Ouch. Even the ISOLATION LEVEL serializable works fine for the Result itselve (&lt;i&gt;75003&lt;/i&gt; all the time), and the SCN of the result is stored somewhere, the result is global invalidated. I guess this is an area for improvement for Oracle.&lt;/div&gt;&lt;br /&gt;&lt;b&gt;Update:&lt;/b&gt; I got the same results with 11.1.0.7&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-17542460955341878?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/17542460955341878/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=17542460955341878' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/17542460955341878'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/17542460955341878'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2008/10/resultcache-invalidated-within-same.html' title='result_cache invalidated within the same transaction'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-31380646741193074</id><published>2008-09-22T14:29:00.006+02:00</published><updated>2008-09-22T14:56:51.181+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='11.1.0.6'/><category scheme='http://www.blogger.com/atom/ns#' term='11.1.0.7'/><category scheme='http://www.blogger.com/atom/ns#' term='Wait'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>latches and events - from 11.1.0.6 to 11.1.0.7</title><content type='html'>I was just curious what parts of latches and waits oracle changed in it's first patchset of 11.1.0.7. here my results (i run a &lt;code&gt;create table latch_11106 as select * from v$latch;&lt;/code&gt; before and after the patch, with 11107 obviously):&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;Counts:&lt;/span&gt;&lt;br /&gt;&lt;code&gt;select count(*) from latch_11106;&lt;/code&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;COUNT(*)&lt;br /&gt;----------&lt;br /&gt;   496&lt;/pre&gt;&lt;br /&gt;&lt;code&gt;select count(*) from latch_11107;&lt;/code&gt;&lt;br /&gt;&lt;pre&gt;  COUNT(*)&lt;br /&gt;----------&lt;br /&gt;    502&lt;/pre&gt;&lt;br /&gt;&lt;code&gt;select count(*) from EVENT_NAME_11106;&lt;/code&gt;&lt;br /&gt;&lt;pre&gt;  COUNT(*)&lt;br /&gt;----------&lt;br /&gt;    961&lt;/pre&gt;&lt;br /&gt;&lt;code&gt;select count(*) from EVENT_NAME_11107;&lt;/code&gt;&lt;br /&gt;&lt;pre&gt;  COUNT(*)&lt;br /&gt;----------&lt;br /&gt;    997&lt;/pre&gt;&lt;br /&gt;&lt;span class="Apple-style-span"  style="font-size:x-large;"&gt;More Details:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;Events which does not exist in 11.1.0.7 anymore:&lt;/span&gt;&lt;br /&gt;&lt;code&gt;select name from event_name_11106 minus select name from event_name_11107;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;pre&gt;NAME&lt;br /&gt;---------------------------------------------&lt;br /&gt;Intelligent Storage OSS I/O completion&lt;br /&gt;Streams capture: resolve low memory condition&lt;br /&gt;storage device registration&lt;br /&gt;virtual circuit status&lt;/pre&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;new Events&lt;/span&gt;:&lt;br /&gt;&lt;code&gt;select name from event_name_11107 minus select name from event_name_11106;&lt;/code&gt;&lt;br /&gt;&lt;pre&gt;NAME&lt;br /&gt;----------------------------------------------&lt;br /&gt;Archiver slave I/O&lt;br /&gt;DBWR range invalidation sync&lt;br /&gt;DBWR slave I/O&lt;br /&gt;LGWR slave I/O&lt;br /&gt;Logical Standby Debug&lt;br /&gt;PMON to cleanup detached branches at shutdown&lt;br /&gt;RMAN Disk slave I/O&lt;br /&gt;RMAN Tape slave I/O&lt;br /&gt;Streams apply: waiting for dependency&lt;br /&gt;Streams apply: waiting to commit&lt;br /&gt;Streams: flow control&lt;br /&gt;Streams: resolve low memory condition&lt;br /&gt;Streams: waiting for messages&lt;br /&gt;WCR: replay paused&lt;br /&gt;cell multiblock physical read&lt;br /&gt;cell single block physical read&lt;br /&gt;cell smart file creation&lt;br /&gt;cell smart incremental backup&lt;br /&gt;cell smart index scan&lt;br /&gt;cell smart restore from backup&lt;br /&gt;cell smart table scan&lt;br /&gt;cell statistics gather&lt;br /&gt;direct path sync&lt;br /&gt;enq: AM - ASM File Destroy&lt;br /&gt;enq: XC - XDB Configuration&lt;br /&gt;enq: ZA - add std audit table partition&lt;br /&gt;enq: ZF - add fga audit table partition&lt;br /&gt;external table misc IO&lt;br /&gt;external table read&lt;br /&gt;external table write&lt;br /&gt;gc cancel retry&lt;br /&gt;gc recovery&lt;br /&gt;ges DFS hang analysis phase 2 acks&lt;br /&gt;ges/gcs diag dump&lt;br /&gt;listener registration dump&lt;br /&gt;master diskmon startup&lt;br /&gt;process diagnostic dump&lt;br /&gt;securefile chain update&lt;br /&gt;shared server idle wait&lt;br /&gt;virtual circuit wait&lt;br /&gt;&lt;br /&gt;40 rows selected.&lt;/pre&gt;&lt;br /&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;There are no changes between &lt;/span&gt;&lt;code&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;WAIT_CLASS&lt;/span&gt;&lt;/code&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;es.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span"  style="font-size:x-large;"&gt;latches:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;removed:&lt;/span&gt;&lt;br /&gt;&lt;code&gt;select name from latch_11106 minus select name from latch_11107;&lt;/code&gt;&lt;br /&gt;&lt;pre&gt;NAME&lt;br /&gt;---------------------&lt;br /&gt;FAL subheap alocation&lt;br /&gt;TXN SGA&lt;br /&gt;cv apply list lock&lt;br /&gt;cv free list lock&lt;/pre&gt;&lt;br /&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;New:&lt;/span&gt;&lt;br /&gt;&lt;code&gt;select name from latch_11107 minus select name from latch_11106;&lt;/code&gt;&lt;br /&gt;&lt;pre&gt;NAME&lt;br /&gt;---------------------------------------&lt;br /&gt;VPSO SGA&lt;br /&gt;WCR: MMON Create dir&lt;br /&gt;WCR: kecr File Count&lt;br /&gt;cvmap freelist lock&lt;br /&gt;ges DFS wait callback info&lt;br /&gt;heartbeat check&lt;br /&gt;kcfis stats shared latch&lt;br /&gt;parallel ibr array&lt;br /&gt;rsb inst ckpt scn&lt;br /&gt;storage server table manipulation latch&lt;br /&gt;&lt;br /&gt;10 rows selected.&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Unfortunately I do't know how to get a List of all existing mutexes. &lt;code&gt;v$mutex_sleep_history&lt;/code&gt; does not give all possible mutexes, only these, qou used in the past (and the system holds historical infos about.&lt;/div&gt; If someone knows, how to get all mutexes, please inform me!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-31380646741193074?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/31380646741193074/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=31380646741193074' title='1 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/31380646741193074'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/31380646741193074'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2008/09/latches-and-events-from-11106-to-11107.html' title='latches and events - from 11.1.0.6 to 11.1.0.7'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-2337636376170727555</id><published>2008-09-19T11:12:00.008+02:00</published><updated>2008-10-10T09:10:22.652+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='11.1.0.6'/><category scheme='http://www.blogger.com/atom/ns#' term='10.2.0.4'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='optimizer'/><title type='text'>ANY translated to filter(("col1"= OR "col2=))</title><content type='html'>I had to tweak a sequence of statements, in pseudo-code it was something like this:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;select col1 into v1&lt;br /&gt;from tab1&lt;br /&gt;where col2=&amp;lt;condition1&amp;gt;;&lt;br /&gt;delete from tab2&lt;br /&gt;where col3 = v1;&lt;br /&gt;delete from tab2&lt;br /&gt;where col4 = v1;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;My first step was to avoid the variable v1 and put the select into the deletes as a subselect.&lt;br /&gt;My 2nd step was to merge the 2 deletes into one, combining the 2 selerated conditions using OR.&lt;br /&gt;this gave an execution plan similar to this (I use the test-table from my &lt;a href="http://berxblog.blogspot.com/2008/09/simple-tuning-using-decode.html"&gt;previous post&lt;/a&gt; and a really simple statement):&lt;br /&gt;&lt;code&gt;delete&lt;br /&gt;from berx1&lt;br /&gt;where type=(select 1 from dual)&lt;br /&gt;or dim=(select 1 from dual);&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;pre name="code" class="sql"&gt;-------------------------------------&lt;br /&gt;| Id  | Operation           | Name  |&lt;br /&gt;-------------------------------------&lt;br /&gt;|   1 |  DELETE             | BERX1 |&lt;br /&gt;|*  2 |   TABLE ACCESS FULL | BERX1 |&lt;br /&gt;|   3 |    FAST DUAL        |       |&lt;br /&gt;|   4 |     FAST DUAL       |       |&lt;br /&gt;-------------------------------------&lt;br /&gt;&lt;br /&gt;Predicate Information (identified by operation id):&lt;br /&gt;---------------------------------------------------&lt;br /&gt;2 - filter(("TYPE"= OR "DIM"=))&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The next idea was to avoid running the same subselect twice:&lt;br /&gt;My first thought was to use the &lt;a href="http://68.142.116.70/docs/cd/B19306_01/server.102/b14200/statements_10002.htm#i2077142"&gt;subquery_factoring_clause&lt;/a&gt; (WITH), but it's only useable in SELECT statements. So I loitered through the documentation and stumbled across the ANY keyword. After some ests I came to this statement:&lt;br /&gt;&lt;code&gt;delete&lt;br /&gt;from berx1&lt;br /&gt;where (select 1 from dual) = any (type, dim);&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;------------------------------------&lt;br /&gt;| Id  | Operation          | Name  |&lt;br /&gt;------------------------------------&lt;br /&gt;|   1 |  DELETE            | BERX1 |&lt;br /&gt;|*  2 |   TABLE ACCESS FULL| BERX1 |&lt;br /&gt;|   3 |    FAST DUAL       |       |&lt;br /&gt;------------------------------------&lt;br /&gt;Predicate Information (identified by operation id):&lt;br /&gt;---------------------------------------------------&lt;br /&gt;2 - filter(("TYPE"= OR "DIM"=))&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Anything more to say? Only one subselect, even the filter is the same.&lt;br /&gt;I tested this behaviour with 11.1.0.6 and 10.2.0.4 - both are the same.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-2337636376170727555?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/2337636376170727555/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=2337636376170727555' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/2337636376170727555'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/2337636376170727555'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2008/09/any-translated-to-filtercol1-or-col2.html' title='ANY translated to filter((&quot;col1&quot;= OR &quot;col2=))'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-544452194732972194</id><published>2008-09-19T06:48:00.006+02:00</published><updated>2008-09-19T10:22:38.278+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='decode'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>simple tuning using decode</title><content type='html'>Currently I have to assist in tuning of a really time critic application (in comparison to other applications/projects I have to support). There I found 2 statements called within an PL/SQL procedure:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;span class="note_content"&gt;&lt;pre&gt;&lt;pre&gt;&lt;span class="k"&gt;select&lt;/span&gt; &lt;span class="k"&gt;count&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;berx1&lt;/span&gt;&lt;br /&gt;&lt;span class="k"&gt;where&lt;/span&gt; &lt;span class="n"&gt;val&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="k"&gt;and&lt;/span&gt; &lt;span class="k"&gt;type&lt;/span&gt; &lt;span class="k"&gt;is&lt;/span&gt; &lt;span class="k"&gt;null&lt;/span&gt;&lt;span class="p"&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="note_content"&gt;&lt;pre&gt;&lt;pre&gt;&lt;span class="k"&gt;select&lt;/span&gt; &lt;span class="k"&gt;count&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;berx1&lt;/span&gt;&lt;br /&gt;&lt;span class="k"&gt;where&lt;/span&gt; &lt;span class="n"&gt;val&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="k"&gt;and&lt;/span&gt; &lt;span class="k"&gt;type&lt;/span&gt; &lt;span class="k"&gt;is&lt;/span&gt; &lt;span class="k"&gt;null&lt;/span&gt; &lt;span class="k"&gt;and&lt;/span&gt; &lt;span class="n"&gt;dim&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;(The statements are reduced to test-cases, my test-table is&lt;br /&gt;&lt;code&gt;create table berx1 (id number, val number, type number, dim number);&lt;br /&gt;&lt;br /&gt;insert into berx1 values (1, 1, NULL, 1);&lt;br /&gt;insert into berx1 values (2, 1, 1, 2);&lt;br /&gt;insert into berx1 values (3, 1, NULL, 3);&lt;br /&gt;insert into berx1 values (4, 1, 1, 1);&lt;br /&gt;insert into berx1 values (5, 2, NULL, 2);&lt;br /&gt;insert into berx1 values (6, 2, 1, 3);&lt;br /&gt;insert into berx1 values (7, 2, NULL, 1);&lt;br /&gt;insert into berx1 values (8, 2, 1, 2);&lt;br /&gt;insert into berx1 values (9, 3, NULL, 3);&lt;br /&gt;insert into berx1 values (10, 3, 1, 1);&lt;br /&gt;insert into berx1 values (11, 3, NULL, 2);&lt;br /&gt;insert into berx1 values (12, 3, 1, 3);&lt;br /&gt;insert into berx1 values (13, 4, NULL, 1);&lt;br /&gt;insert into berx1 values (14, 4, 1, 2);&lt;br /&gt;insert into berx1 values (15, 4, NULL, 3);&lt;br /&gt;insert into berx1 values (16, 4, 1, 1);&lt;br /&gt;insert into berx1 values (17, 5, NULL, 2);&lt;br /&gt;insert into berx1 values (18, 5, 1, 3);&lt;/code&gt;)&lt;br /&gt;Even both of them are very fast (with an index on &lt;span style="font-style: italic;"&gt;val&lt;/span&gt;), As we have to save every slice of time we can, I merged the statements into one:&lt;br /&gt;&lt;span class="note_content"&gt;&lt;pre&gt;&lt;pre&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="k"&gt;count&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;count&lt;/span&gt;&lt;br /&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;NVL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="k"&gt;SUM&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="n"&gt;DECODE&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;dim&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;   &lt;span class="c1"&gt;-- if 'dim' is 2 &lt;/span&gt;&lt;br /&gt;                      &lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;   &lt;span class="c1"&gt;-- add 1 to sum&lt;/span&gt;&lt;br /&gt;                      &lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;-- otherwise add nothing&lt;/span&gt;&lt;br /&gt;          &lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;br /&gt;     &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;count_dim&lt;/span&gt;&lt;br /&gt;&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;berx1&lt;/span&gt; &lt;span class="k"&gt;where&lt;/span&gt; &lt;span class="n"&gt;val&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="k"&gt;and&lt;/span&gt; &lt;span class="k"&gt;type&lt;/span&gt; &lt;span class="k"&gt;is&lt;/span&gt; &lt;span class="k"&gt;null&lt;/span&gt;&lt;span class="p"&gt;&lt;span style="font-family:Georgia,serif;"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;/span&gt;What did I expect so far? (not tested into detail!)&lt;br /&gt;&lt;ul&gt;&lt;li&gt;less context-switches between PL/SQL and SQL&lt;/li&gt;&lt;li&gt;less soft parses / library cache lookups&lt;/li&gt;&lt;li&gt;less activity in the buffer cache&lt;/li&gt;&lt;/ul&gt;In fact, at the end of the optimization I hope I can modify the program logic,  maybe we can save a lot more time on other places and also get rid of this statement. But this is still matter of investigation with the application-designers.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-544452194732972194?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/544452194732972194/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=544452194732972194' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/544452194732972194'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/544452194732972194'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2008/09/simple-tuning-using-decode.html' title='simple tuning using decode'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-4770705248826586727</id><published>2008-08-29T18:01:00.000+02:00</published><updated>2008-10-08T10:03:01.015+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='optimizer'/><title type='text'>switching patches on and off</title><content type='html'>You want to play around with optimizer-patches in your DB?&lt;div&gt;you want to break your DB a curious way?&lt;/div&gt;&lt;div&gt;have a look at &lt;span class="Apple-style-span" style="font-style: italic;"&gt;v$system_fix_control&lt;/span&gt; and &lt;span class="Apple-style-span" style="font-style: italic;"&gt;v$session_fix_control&lt;/span&gt; and gamble by change the parameter &lt;span class="Apple-style-span" style="font-style: italic;"&gt;_fix_contro&lt;/span&gt;l. I also found  &lt;span class="Apple-style-span" style="font-style: italic;"&gt;_fix_control_key&lt;/span&gt; but no information about it.&lt;/div&gt;&lt;div&gt;For more than one patch to switch, use &lt;br /&gt;&lt;code&gt;alter session set "_fix_control"='4728348:OFF','4663698:OFF';&lt;/code&gt; i learned &lt;a href="http://el-caro.blogspot.com/2007_06_01_archive.html"&gt;here&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;What is it good for?&lt;/div&gt;&lt;div&gt;To test if the just-applied patch works as expected.&lt;/div&gt;&lt;div&gt;Recommended? &lt;/div&gt;&lt;div&gt;Patches are to fix bugs. Playing around with bugs is a job for exterminators.&lt;/div&gt;&lt;div&gt;Happy playing ;-)&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-4770705248826586727?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/4770705248826586727/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=4770705248826586727' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/4770705248826586727'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/4770705248826586727'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2008/08/switching-patches-on-and-off.html' title='switching patches on and off'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-1030305469149022671</id><published>2008-08-29T13:00:00.000+02:00</published><updated>2008-08-29T13:00:01.529+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='event 10046'/><category scheme='http://www.blogger.com/atom/ns#' term='Wait'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>gc current block 2-way - p1,p2,p3</title><content type='html'>In some tracing I stumbled about a lot of lines like this:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;nam='gc current block 2-way' ela= 1716 p1=7 p2=449034 p3=33554433 obj#=61165 tim=1190815206676979&lt;/code&gt;&lt;br /&gt;Even I know the Interconnect is too slow (only 100MBit), I just want to &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;a href="http://www.battleagainstanyguess.com/"&gt;know&lt;/a&gt;&lt;/span&gt; what I read here. (at least the best way I can do).&lt;div&gt;the meaning of &lt;span class="Apple-style-span" style="font-style: italic;"&gt;ela=&lt;/span&gt;, &lt;span class="Apple-style-span" style="font-style: italic;"&gt;obj#=&lt;/span&gt; and &lt;span class="Apple-style-span" style="font-style: italic;"&gt;tim=&lt;/span&gt; can be found on many places. But the &lt;span class="Apple-style-span" style="font-style: italic;"&gt;p1&lt;/span&gt;, &lt;span class="Apple-style-span" style="font-style: italic;"&gt;p2&lt;/span&gt; and &lt;span class="Apple-style-span" style="font-style: italic;"&gt;p3&lt;/span&gt; where of some interrest. So I started to search. but neither &lt;a href="http://metalink.oracle.com/"&gt;Metalink&lt;/a&gt; nor &lt;a href="http://www.freelists.org/list/oracle-l"&gt;Oracle-L&lt;/a&gt; could answer my search-results (maybe I just used the wrong words?) There where even no other direct source I could find.&lt;/div&gt;I also run&lt;br /&gt;&lt;code&gt;&lt;br /&gt;SELECT name, parameter1, parameter2, parameter3&lt;br /&gt;FROM V$EVENT_NAME&lt;br /&gt;WHERE name like 'gc current block %way';&lt;/code&gt;&lt;br /&gt;and got&lt;br /&gt;&lt;code&gt;&lt;br /&gt;NAME                                                       P1    P2    P3&lt;br /&gt;------------------------ ----- ----- -----&lt;br /&gt;gc current block 2-way&lt;br /&gt;gc current block 3-way&lt;/code&gt;&lt;br /&gt;back.&lt;br /&gt;there is also nothing in the &lt;a href="http://download.oracle.com/docs/cd/B28359_01/server.111/b28320/waitevents003.htm"&gt;11g documentation&lt;/a&gt; about &lt;span class="Apple-style-span" style="font-style: italic; "&gt;gc current block&lt;span class="Apple-style-span" style="font-style: normal; "&gt;.&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-style: italic; "&gt;&lt;span class="Apple-style-span" style="font-style: normal; "&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;Not so good informations so far. This led me to a searching marathon:&lt;/div&gt;&lt;div&gt;(only my findings)&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;The Book &lt;a href="http://www.elsevierdirect.com/product.jsp?isbn=1555583210"&gt;Oracle 10g RAC Grid, Services &amp;amp; Clustering&lt;/a&gt; gives a link between &lt;span class="Apple-style-span" style="font-style: italic;"&gt;gc current block 2-way&lt;/span&gt; (10g Wait name) and &lt;span class="Apple-style-span" style="font-style: italic;"&gt;global cache open x &lt;/span&gt;(9i Wait name).&lt;/li&gt;&lt;li&gt;The Book &lt;a href="http://www.mhprofessional.com/product.php?isbn=007222729X&amp;amp;cat=&amp;amp;promocode="&gt;Oracle Wait Interface&lt;/a&gt; tells me about &lt;span class="Apple-style-span" style="font-style: italic;"&gt;global cache open x&lt;/span&gt;: &lt;br /&gt;&lt;code&gt;&lt;br /&gt;global cache open x&lt;br /&gt;Wait Parameters&lt;br /&gt;Wait parameters for global cache open x are described here:&lt;br /&gt;&lt;br /&gt;P1 File number from which Oracle is reading the block&lt;br /&gt;P2 Block number from the file that Oracle wants to read into a buffer&lt;br /&gt;P3 The lock element number or class of the buffer&lt;br /&gt;&lt;/code&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;one more finding (from limited value): in the docu there is an event &lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;a href="http://download.oracle.com/docs/cd/B28359_01/server.111/b28320/waitevents003.htm#sthref3596"&gt;GCS lock open X&lt;/a&gt;&lt;/span&gt; which seems to have the same content for &lt;span class="Apple-style-span" style="font-style: italic;"&gt;P1&lt;/span&gt;, &lt;span class="Apple-style-span" style="font-style: italic;"&gt;P2&lt;/span&gt; and &lt;span class="Apple-style-span" style="font-style: italic;"&gt;P3&lt;/span&gt;. But of course a '&lt;span class="Apple-style-span" style="font-style: italic;"&gt;lock open&lt;/span&gt;' is not simply equal to a '&lt;span class="Apple-style-span" style="font-style: italic;"&gt;cache open&lt;/span&gt;' or a request for a '&lt;span class="Apple-style-span" style="font-style: italic;"&gt;current block&lt;/span&gt;'.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;/div&gt;So far for the (very limited) documentation I found.&lt;/div&gt;&lt;div&gt;Now let's do some tests (on an other DB):&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;instance 1: &lt;code&gt;create table test1 as select * from dba_objects;&lt;/code&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;instance 1: &lt;code&gt;select * from test1;&lt;/code&gt;27&lt;span class="Apple-style-span" style="font-style: italic;"&gt; cr multi block request&lt;/span&gt;, 2 &lt;span class="Apple-style-span" style="font-style: italic;"&gt;gc cr grant 2-way&lt;/span&gt;. I don't know where they come from(!) this will be matter for further investigations.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;instance 1: &lt;code&gt;select * From test1;&lt;/code&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;no&lt;/span&gt; &lt;span class="Apple-style-span" style="font-style: italic;"&gt;gc cr ...&lt;/span&gt; only &lt;span class="Apple-style-span" style="font-style: italic;"&gt;SQL*Net message&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;instance 2: &lt;code&gt;select * from test1; &lt;/code&gt;this is the most interresting part: a lot of differnt waits, most interresting is:&lt;br /&gt;&lt;code&gt;WAIT #1: nam='gc cr multi block request' ela= 144 file#=6 block#=48017 class#=1 obj#=62850 tim=685587786409&lt;br /&gt;WAIT #1: nam='gc current block 2-way' ela= 1121 p1=6 p2=48018 p3=1 obj#=62850 tim=685588475668&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;looking down for 6. ( i run it with &lt;span class="Apple-style-span" style="font-style: italic;"&gt;48017&lt;/span&gt; and &lt;span class="Apple-style-span" style="font-style: italic;"&gt;48018&lt;/span&gt;) I can at least compare &lt;span class="Apple-style-span" style="font-style: italic;"&gt;file#&lt;/span&gt; to &lt;span class="Apple-style-span" style="font-style: italic;"&gt;p1&lt;/span&gt; and &lt;span class="Apple-style-span" style="font-style: italic;"&gt;block#&lt;/span&gt; to &lt;span class="Apple-style-span" style="font-style: italic;"&gt;p2&lt;/span&gt; - &lt;span class="Apple-style-span" style="font-style: italic;"&gt;obj#&lt;/span&gt; also matches&lt;/li&gt;&lt;br /&gt;&lt;li&gt;instance 2: &lt;code&gt;select * From test1;&lt;/code&gt;only one &lt;span class="Apple-style-span" style="font-style: italic;"&gt;library cache lock&lt;/span&gt; and of course &lt;span class="Apple-style-span" style="font-style: italic; "&gt;SQL*Net message&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt; &lt;code&gt;SELECT segment_name&lt;br /&gt;FROM dba_segments&lt;br /&gt;WHERE header_file=6 and 48017 between HEADER_BLOCK and HEADER_BLOCK+blocks;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;SEGMENT_NAME&lt;br /&gt;------------&lt;br /&gt;TEST1&lt;/code&gt;&lt;br /&gt;and&lt;code&gt;&lt;br /&gt;SELECT OBJECT_NAME, OBJECT_ID&lt;br /&gt;FROM dba_objects&lt;br /&gt;WHERE OBJECT_ID=62850;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;OBJECT_NAME OBJECT_ID&lt;br /&gt;----------- ----------&lt;br /&gt;TEST1              62850&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Conclusio:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So my findings are:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;ol&gt;&lt;li&gt;more questions, e.g. why are there any &lt;span class="Apple-style-span" style="font-style: italic; "&gt;gc &lt;/span&gt;in the 1st select?&lt;/li&gt;&lt;li&gt;Even I still cannot proove, I assume p1, p2 and p3 of gc current block 2-way (and mayby also others) match to file#, block# (and maybe also class# - even I have &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;not&lt;/span&gt; thought about this!)&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&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/5309604992043123290-1030305469149022671?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/1030305469149022671/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=1030305469149022671' title='1 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/1030305469149022671'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/1030305469149022671'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2008/08/gc-current-block-2-way-p1p2p3.html' title='gc current block 2-way - p1,p2,p3'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-9220383885919006881</id><published>2008-08-29T10:00:00.000+02:00</published><updated>2008-08-29T11:13:09.265+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='parallel'/><title type='text'>the 'Magic of 2'</title><content type='html'>&lt;span class="a"&gt;There is a very popular pdf about &lt;a href="http://oracledoug.com/px_slaves.pdf"&gt;parallel queries&lt;/a&gt;.&lt;/span&gt;&lt;br /&gt;&lt;div&gt;Why I quote it here?&lt;/div&gt;&lt;div&gt;to create another link , give you something to read and as a starting-point for my own tests.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-9220383885919006881?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/9220383885919006881/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=9220383885919006881' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/9220383885919006881'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/9220383885919006881'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2008/07/magic-of-2.html' title='the &apos;Magic of 2&apos;'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-3231418065149373943</id><published>2008-08-27T09:22:00.003+02:00</published><updated>2008-08-27T10:27:18.291+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='oradebug'/><category scheme='http://www.blogger.com/atom/ns#' term='RAC'/><title type='text'>manual Remastering of Global Cache</title><content type='html'>this all is stolen from a &lt;a href="http://www.juliandyke.com/Presentations/InsideRAC.ppt"&gt;Presentation&lt;/a&gt; from &lt;a href="http://www.juliandyke.com/"&gt;Julian Dyke&lt;/a&gt;. Some infos are also from &lt;a href="http://el-caro.blogspot.com/2006/11/to-use-drm-or-not-to-use-drm.html"&gt;Fairlie Rego&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;for more background, please read there (or wherever you want). This is only a container for some code sniplets:&lt;br /&gt;&lt;br /&gt;find the object_id from the object you are interested in:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;SELECT data_object_id&lt;br /&gt;FROM dba_objects&lt;br /&gt;WHERE owner = 'US01' AND object_name = 'T1';&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;find current and previous master and a remaster-count (this might be 0 all the time due to &lt;a href="https://metalink.oracle.com/metalink/plsql/f?p=130:15:3083344278432844553::::p15_database_id,p15_docid,p15_show_header,p15_show_help,p15_black_frame,p15_font:BUG,5649377,1,1,1,helvetica"&gt;BUG:5649377&lt;/a&gt; - fixed in 11G - Backports available for Linux32-10.2.0.2&amp;amp;10.2.0.3&lt;br /&gt;&lt;code&gt;&lt;br /&gt;SELECT object_id,current_master, previous_master ,remaster_cnt&lt;br /&gt;FROM V$GCSPFMASTER_INFO&lt;br /&gt;WHERE object_id = 144615;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;to remaster the object to a dedicate instance go tho this instance and run&lt;br /&gt;&lt;code&gt;&lt;br /&gt;oradebug setmypid&lt;br /&gt;oradebug lkdebug -m pkey &amp;lt;obj_id&amp;gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;To dissolve remastering of this object on this instance&lt;br /&gt;&lt;code&gt;&lt;br /&gt;oradebug lkdebug -m dpkey &amp;lt;obj_id&amp;gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;There are some more infos availalbe from a bunch of internal tables.&lt;br /&gt;[&lt;span style="font-size: 20pt;"&gt;&lt;span style="color: rgb(51, 51, 204); font-family: Wingdings; font-size: 75%;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 20pt; font-family: Arial; color: rgb(51, 51, 204); font-weight: bold;"&gt;&lt;/span&gt;&lt;span style="font-size: 20pt; font-family: Arial; color: rgb(51, 51, 204); font-weight: bold;"&gt;&lt;/span&gt;X$KJDRMREQ-Dynamic Remastering Requests, X$KJDRMAFNSTATS-File Remastering Statistics, X$KJDRMHVSTATS-Hash Value Statistics,X$KJBL-Externalizes GCS Enqueues,&lt;br /&gt;X$KJBR-Externalizes GCS Resources]&lt;br /&gt;(I will not discuss it here)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-3231418065149373943?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/3231418065149373943/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=3231418065149373943' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/3231418065149373943'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/3231418065149373943'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2008/08/manual-remastering-of-global-cache.html' title='manual Remastering of Global Cache'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-683866740237384793</id><published>2008-08-24T06:37:00.004+02:00</published><updated>2008-08-24T06:44:33.868+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OSX'/><title type='text'>a fix for OS X syslogd going crazy</title><content type='html'>recently the fan of my PowerBook run permanently. I checked which process created the load (and therefore the heat) and found syslogd.&lt;br /&gt;After some tracing, I saw a lot of&lt;br /&gt;&lt;code&gt;&lt;br /&gt;lseek(0x6, 0xF0, 0x0)         = 240 0&lt;br /&gt;read_nocancel(0x6, "\004\0", 0x1000)         = 4096 0&lt;br /&gt;lseek(0x6, 0xFD, 0x0)         = 253 0&lt;br /&gt;write_nocancel(0x6, "\0", 0x4)&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;With some googeling, I found (only) this&lt;a href="http://www.bueche.ch/wp/2008/06/20/a-fix-for-os-x-syslogd-going-crazy/"&gt; blog-entry&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The solution from there (copy&amp;amp;paste)&lt;br /&gt;&lt;br /&gt;&lt;code&gt;sudo launchctl stop com.apple.syslogd&lt;br /&gt;sudo mv /var/log/system.log /var/log/system.log.old&lt;br /&gt;sudo launchctl start com.apple.syslogd&lt;br /&gt;sudo gzip /var/log/system.log.old&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;It works really fine for me. Thank you &lt;span class="entry-author author vcard"&gt;&lt;span class="fn n"&gt;&lt;a href="http://www.bueche.ch/wp/about/"&gt;sailor&lt;/a&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/5309604992043123290-683866740237384793?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/683866740237384793/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=683866740237384793' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/683866740237384793'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/683866740237384793'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2008/08/fix-for-os-x-syslogd-going-crazy.html' title='a fix for OS X syslogd going crazy'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-3702207617057906200</id><published>2008-07-30T22:11:00.001+02:00</published><updated>2008-08-28T08:34:07.825+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OSX'/><category scheme='http://www.blogger.com/atom/ns#' term='Logitech'/><category scheme='http://www.blogger.com/atom/ns#' term='Harmony Remote'/><title type='text'>Logitech Harmony Remote</title><content type='html'>Recently I was so bored by all the different remotes for all different devices laying around, I went off to my next store and bought a &lt;a href="http://www.logitech.com/index.cfm/remotes/universal_remotes/devices/376&amp;amp;cl=DE,de"&gt;Logitech Harmony Remote 555&lt;/a&gt;. It's a quite nice device and helped me to put away all other remotes by programming this one.&lt;br /&gt;Like all devices, there is also here a negative point: The Software on my PowerBook didn't start, it just complained:  &lt;span style="font-style: italic;"&gt;The application configuration was not loaded. Reinstall the software or contact customer service.&lt;/span&gt;&lt;br /&gt;The problem is based on the case sensitive filesystem and as I doesn#t want to change my entire Harddisk into a case insensitive one, I followed the &lt;a href="http://forums.logitech.com/logitech/board/message?board.id=remote_software&amp;amp;view=by_date_ascending&amp;amp;message.id=4748#M4748"&gt;hint&lt;/a&gt; from the forum:&lt;br /&gt;&lt;i&gt;&lt;ul&gt;&lt;li&gt; create a disk image with 'disk utility', make sure it's not case sensitive. About 100 megabyte is enough&lt;/li&gt;&lt;br /&gt;&lt;li&gt; move the '/Applications/remotecore.app' and '/Applications/Logitech Harmony Remote Software.app' applications to that disk image&lt;/li&gt;&lt;br /&gt;&lt;li&gt; create a symbolic link of remotecore.app to '/Applications/remotecore.app'&lt;br /&gt;So if you mounted your created volume 'Logitech' you can create a symbolic link with:&lt;br /&gt;$ ln -s /Volumes/Logitech/remotecore.app /Applications/remotecore.app&lt;/li&gt;&lt;br /&gt;&lt;li&gt; make sure the image is mounted and start the 'Logitech Harmony Remote Software' located in that created volume.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;/i&gt;&lt;span style="font-weight: bold;"&gt;Update:&lt;/span&gt;&lt;br /&gt;&lt;a href="http://images.harmonyremote.com/EasyZapper/Downloads/releases/logitech/7.5.0/LogitechHarmonyRemoteSoftware7.5.0-OSX.dmg"&gt;Version 7.5&lt;/a&gt; is out, and it works well so far. (just tested minimal)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-3702207617057906200?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/3702207617057906200/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=3702207617057906200' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/3702207617057906200'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/3702207617057906200'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2008/07/logitech-harmony-remote.html' title='Logitech Harmony Remote'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-7914667981012444587</id><published>2008-07-29T22:02:00.003+02:00</published><updated>2008-07-29T22:11:16.944+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='Apple'/><category scheme='http://www.blogger.com/atom/ns#' term='TimeMachine'/><title type='text'>TimeMachine for windows</title><content type='html'>I love my Mac, and I like TimeMachine as the best new feature (I use) from Leopard.&lt;br /&gt;I also searched for such a solution for Windows (e.g. for my parents or my sisters laptop).&lt;br /&gt;My search has an end, I found &lt;a style="font-weight: bold;" href="http://www.heise.de/ct/ftp/06/09/126/"&gt;rsyncbackup.vbs&lt;/a&gt; from &lt;a href="http://www.heise.de"&gt;heise.de&lt;/a&gt;.&lt;br /&gt;I know, it's not a solution, jus a script. but I'm sure, I can adapt it a little bit, so it would be useable for my family (e.g.: in startup-script, check if target-disk is available, etc.)&lt;br /&gt;We will see...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-7914667981012444587?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/7914667981012444587/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=7914667981012444587' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/7914667981012444587'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/7914667981012444587'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2008/07/timemachine-for-windows.html' title='TimeMachine for windows'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-107508531138721068</id><published>2008-07-27T09:06:00.003+02:00</published><updated>2008-07-27T09:11:21.319+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>Oracle Server Architecture - pdf</title><content type='html'>I've found a nice &lt;a href="http://www.digilife.be/quickreferences/QRC/ORACLE%20Server%20Architecture.pdf"&gt;PDF&lt;/a&gt; (created by &lt;a href="http://www.larsditzel.de"&gt;Lars Ditzel&lt;/a&gt;) which describes an Oracle Server from a file/process and memory point of view.&lt;br /&gt;even it's not that new, it's more or less correct.&lt;br /&gt;(maybe I will try to find the deltas to a current 11g instance with all its flavours)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-107508531138721068?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/107508531138721068/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=107508531138721068' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/107508531138721068'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/107508531138721068'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2008/07/oracle-server-architecture-pdf.html' title='Oracle Server Architecture - pdf'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-2799074424347001563</id><published>2008-07-25T13:05:00.001+02:00</published><updated>2008-07-25T13:05:01.366+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ipcs'/><category scheme='http://www.blogger.com/atom/ns#' term='sysresv'/><category scheme='http://www.blogger.com/atom/ns#' term='ipc'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='oradebug'/><title type='text'>DBAs little helper</title><content type='html'>You might know this situation: Your users call and complain, the DB is hanging. While trying to connect (and making plans what to check first, sessions, waits, locks, ...) you do not get any prompt. Ok, there would be a lot of things you get in mind to check, analyze and then fix. But in fact, the users want their connections back, don't care about current open sessions and just ask to reboot the instance.&lt;br /&gt;Even reboot is not that simple in this situation (have I mentioned the missing prompt in sql*plus?). So the next way is to try &lt;span style="font-style: italic;"&gt;kill &lt;/span&gt;on os-level (which doesn't do anything at the end, as the process seems to wait for something on OS). A much more entertaining way is &lt;span style="font-style: italic;"&gt;kill -9&lt;/span&gt;. I hope, if I kill a vital kernel process, the others will do the cleanup and close everything the best way they can (similar to a &lt;span style="font-style: italic;"&gt;shutdown abort&lt;/span&gt;). But even this doesn't happen. The others are hanging around and doing nothing. At the end I have to kill all processes using &lt;span style="font-style: italic;"&gt;-9&lt;/span&gt;.&lt;br /&gt;There is just one more thing to do: &lt;span style="font-style: italic;"&gt;startup&lt;/span&gt;. but, unfortunately, at the login there is one thing missing: '&lt;span style="font-style: italic;"&gt;Connecting to an idle instance&lt;/span&gt;' - and a '&lt;span style="font-style: italic;"&gt;startup&lt;/span&gt;' just hangs.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Why&lt;/span&gt;? Because no one did the &lt;u&gt;cleanup&lt;/u&gt;! Do you remember the &lt;span style="font-style: italic;"&gt;kill -9&lt;/span&gt; of all, also the last background process? Doing so, I did not gave any process the chance to release the &lt;span style="font-style: italic;"&gt;semaphore&lt;/span&gt; and the &lt;span style="font-style: italic;"&gt;shared memory segment&lt;/span&gt;s. They are just hanging around. Even no one uses them, sqlplus belives because they exists, there is a running system. So it connects to them, sends messages, but noone ever listens. this makes this sqlplus-instance also hanging.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;How&lt;/span&gt; can i do the cleanup manually?&lt;br /&gt;The old way, back in those days, when Versions did not contain characters like &lt;span style="font-style: italic;"&gt;i&lt;/span&gt; or &lt;span style="font-style: italic;"&gt;g&lt;/span&gt;, is to search all other instances for their ressources using &lt;span style="font-style: italic;"&gt;oradebug ipc&lt;/span&gt;, and afterwards removing them with &lt;span style="font-style: italic;"&gt;ipcs&lt;/span&gt;. If anything went wrong - another DB crashed very beautiful and interresting.&lt;br /&gt;The new way, introduced in this millenium, is &lt;u&gt;&lt;i&gt;sysresv&lt;/i&gt;&lt;/u&gt;, which you can find in &lt;span style="font-style: italic;"&gt;$ORACLE_HOME/bin&lt;/span&gt;. With this, you can show the &lt;span style="font-style: italic;"&gt;semaphor&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;shared memory segment&lt;/span&gt;s used by your current &lt;span style="font-style: italic;"&gt;os-user&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;$ORACLE_HOME&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;$ORACLE_SID&lt;/span&gt; (or for multiple SIDs). It can also &lt;u&gt;release&lt;/u&gt; the ressources for a given SID. This makes live much easier and more secure in situations like shown above.&lt;br /&gt;I doesn't know why Oracle doesn't mention this binary in its documentation.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-2799074424347001563?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/2799074424347001563/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=2799074424347001563' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/2799074424347001563'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/2799074424347001563'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2008/07/dbas-little-helper.html' title='DBAs little helper'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-4908326666911889059</id><published>2008-07-18T07:59:00.001+02:00</published><updated>2008-07-18T07:59:01.069+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='optimizer'/><title type='text'>Oracle Performance books</title><content type='html'>I got 2 new books:&lt;br /&gt;&lt;a style="font-weight: bold;" href="http://www.jlcomp.demon.co.uk/cbo_book/ind_book.html#Addenda"&gt;Cost-Based Oracle Fundamentals&lt;/a&gt; by &lt;a style="font-style: italic;" href="http://www.jlcomp.demon.co.uk/"&gt;Jonathan Lewis&lt;/a&gt; (ISBN:&lt;a href="http://www.apress.com/book/view/1590596366"&gt;1-59059-636-6&lt;/a&gt;)&lt;br /&gt;and&lt;br /&gt;&lt;a style="font-weight: bold;" href="http://antognini.ch/top/"&gt;Troubleshooting Oracle Performance&lt;/a&gt; by &lt;a style="font-style: italic;" href="http://antognini.ch/"&gt;Christian Antognini&lt;/a&gt; (ISBN:&lt;a href="http://www.apress.com/book/view/1590599179"&gt;1-59059-917-9&lt;/a&gt;)&lt;br /&gt;Both are worth reading.&lt;br /&gt;I will try to read and understand both of them.&lt;br /&gt;Maybe I will reproduce some of their tests and will try to do my own, and maybe maybe I will post the results here ;-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-4908326666911889059?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/4908326666911889059/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=4908326666911889059' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/4908326666911889059'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/4908326666911889059'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2008/07/oracle-performance-books.html' title='Oracle Performance books'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-8148486795492115618</id><published>2008-07-17T15:36:00.007+02:00</published><updated>2008-11-10T10:47:40.963+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='snoop'/><category scheme='http://www.blogger.com/atom/ns#' term='CDP'/><category scheme='http://www.blogger.com/atom/ns#' term='Cisco'/><title type='text'>interpreting CDP packages (the ugly way)</title><content type='html'>today I had to interpret &lt;a href="http://www.cisco.com/univercd/cc/td/doc/product/lan/trsrb/frames.htm#xtocid12"&gt;CDP packages&lt;/a&gt; on our network.&lt;br /&gt;I'm no shell-coder, but sometimes I'm curious and in such situations this script will come out.&lt;br /&gt;In this particular case its output just gives the Switchname, Switchport, VLAN and Duplex settings, but everyone who wants can do a lot more (and better).&lt;br /&gt;the script itselve:&lt;br /&gt;&lt;pre class="c" name="code"&gt;#!/usr/bin/bash&lt;br /&gt;&lt;br /&gt;snoopfile="/tmp/snoopy$$.bin"&lt;br /&gt;snoopline="/tmp/snoopy$$.line"&lt;br /&gt;snoop -d $1 -c 1 -vv  -o $snoopfile 'dst 01:00:0c:cc:cc:cc and length &gt; 50'&lt;br /&gt;snoop -i $snoopfile  -x 26 | nawk -F: ' { print $2 } ' | \&lt;br /&gt;cut -b1-41|  sed -e 's/ //g' | nawk 'BEGIN { ORS="" } { print $1 } ' | \&lt;br /&gt;tr [a-z] [A-Z] &gt; $snoopline&lt;br /&gt;instr=`cat $snoopline`&lt;br /&gt;while  [ $instr ]&lt;br /&gt;do&lt;br /&gt;typ=`echo $instr | cut -b1-4`&lt;br /&gt;lhex=`echo $instr | cut -b5-8`&lt;br /&gt;length=$(echo "ibase=16; $lhex*2" | bc)&lt;br /&gt;next=$(echo "ibase=16; $lhex*2+1" | bc)&lt;br /&gt;if [ $length -gt 8 ]&lt;br /&gt;then&lt;br /&gt;texthex=`echo $instr | cut -b9-$length`&lt;br /&gt;else&lt;br /&gt;texthex=""&lt;br /&gt;fi&lt;br /&gt;#  echo "$typ $lhex $texthex"&lt;br /&gt;if [ $typ == "0001" ]&lt;br /&gt;then&lt;br /&gt;printf "Switchname: "&lt;br /&gt;while  [ $texthex ]&lt;br /&gt;do&lt;br /&gt;charhex=`echo $texthex | cut -b1-2`&lt;br /&gt;chardec=$(echo "ibase=16; $charhex" | bc)&lt;br /&gt;printf "%b" `printf '\x%x' $chardec 2&gt;/dev/null`&lt;br /&gt;texthex=`echo $texthex | cut -b3-`&lt;br /&gt;done&lt;br /&gt;echo " "&lt;br /&gt;fi&lt;br /&gt;if [ $typ == "0003" ]&lt;br /&gt;then&lt;br /&gt;printf "Switchport: "&lt;br /&gt;while  [ $texthex ]&lt;br /&gt;do&lt;br /&gt;charhex=`echo $texthex | cut -b1-2`&lt;br /&gt;chardec=$(echo "ibase=16; $charhex" | bc)&lt;br /&gt;printf "%b" `printf '\x%x' $chardec 2&gt;/dev/null`&lt;br /&gt;texthex=`echo $texthex | cut -b3-`&lt;br /&gt;done&lt;br /&gt;echo " "&lt;br /&gt;fi&lt;br /&gt;if [ $typ == "000A" ]&lt;br /&gt;then&lt;br /&gt;echo "VLAN: 0x$texthex $(echo "ibase=16; $texthex" | bc)"&lt;br /&gt;fi&lt;br /&gt;if [ $typ == "000B" ]&lt;br /&gt;then&lt;br /&gt;echo "Duplex: $texthex"&lt;br /&gt;fi&lt;br /&gt;instr=`echo $instr | cut -b$next-`&lt;br /&gt;done&lt;br /&gt;rm $snoopfile $snoopline&lt;br /&gt;&lt;/pre&gt;Sorry for the line-breaks - you will have to reformat it a little bit (cut, paste &amp; think).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-8148486795492115618?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/8148486795492115618/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=8148486795492115618' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/8148486795492115618'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/8148486795492115618'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2008/07/interpreting-cdp-packages-ugly-way.html' title='interpreting CDP packages (the ugly way)'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-5969655992652144154</id><published>2008-07-17T07:59:00.003+02:00</published><updated>2008-08-28T08:35:09.826+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OCM'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='10.3'/><title type='text'>OCM with or without proxy settings</title><content type='html'>I tried to install and customize OCM version 10.3.&lt;br /&gt;&lt;br /&gt;Installation was quite easy on our development system.&lt;br /&gt;Just as I tried to create a response-file (using &lt;span style="font-style: italic;"&gt;emocmrsp&lt;/span&gt;) for our test and production-systems, I noticed I cannot add proxy-settings to this.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;I have to notice the ability to connect directly to &lt;span style="font-style: italic;"&gt;*.oracle.com&lt;/span&gt; from this development server.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;After some searching I created &lt;a href="https://metalink.oracle.com/metalink/plsql/tar_main.this_tar?tar_num=6969566.993&amp;amp;p_ctryCode=840"&gt;SR:6969566.993&lt;/a&gt; and got the answer:&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Starting with OCM 10.3 setupCCR , configCCR and emocmrsp commands does not include a parameter to specify a proxy server and port. However, If the systems t&lt;/span&gt;&lt;span style="font-style: italic;"&gt;hese commands run on does not have direct Internet access then you will be autom&lt;/span&gt;&lt;span style="font-style: italic;"&gt;atically  prompted to enter the proxy information. &lt;/span&gt;  &lt;span style="font-style: italic;"&gt;So in case you run emocmrsp on a system that does not have direct Internet access then you will be prompted&lt;/span&gt;&lt;span style="font-style: italic;"&gt; to enter the proxy information and that will be recorded in the responce file a&lt;/span&gt;&lt;span style="font-style: italic;"&gt;lso. If now there is no Internet access then you can enter the word NONE when pr&lt;/span&gt;&lt;span style="font-style: italic;"&gt;ompted for a proxy and that will instrall it in disconnected mode.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This is a little bit boring, as I will not run a configuration tool on a Prod-Env, but cannot create a working response-file on my development-node.&lt;br /&gt;&lt;br /&gt;I created an Enhancement Request &lt;a href="https://metalink.oracle.com/metalink/plsql/f?p=130:4:3224726975892982978::::p4_database_id,p4_docid,p4_show_header,p4_show_help,p4_black_frame,p4_font:BUG,7258715,1,1,1,helvetica"&gt;BUG:&lt;span style="font-family:helvetica;"&gt;7258715&lt;/span&gt;&lt;/a&gt; &lt;span class="nodatafound"&gt;&lt;i&gt;enable emocmrsp to add proxy-settings to response-file in any case&lt;/i&gt; &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-5969655992652144154?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/5969655992652144154/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=5969655992652144154' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/5969655992652144154'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/5969655992652144154'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2008/07/ocm-with-or-without-proxy-settings.html' title='OCM with or without proxy settings'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-1739128597435278806</id><published>2008-07-15T07:59:00.002+02:00</published><updated>2008-08-28T08:35:31.164+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='10.2.0.3'/><category scheme='http://www.blogger.com/atom/ns#' term='10.2.0.4'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='HP-UX'/><title type='text'>Shadow process leak on ASM instance when diskspace exhausted (ORA-20)</title><content type='html'>Once again one of 'my' bugs:&lt;br /&gt;&lt;b&gt;Facts:&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;10.2.0.3&lt;/li&gt;  &lt;li&gt;HP-UX&lt;/li&gt;  &lt;li&gt;archive_log_dest in ASM&lt;/li&gt;  &lt;li&gt;ASM-Diksgroup full&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;Symptoms:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;ORA-20&lt;/li&gt;  &lt;li&gt;archivelogs doesn't get archived, even the whole backup-subsystem works properly.&lt;/li&gt;&lt;/ul&gt;&lt;b&gt;Explanation:&lt;/b&gt;&lt;br /&gt;If the DG is full he database will try to connect to ASM for every retry of archiver to create archivelog. Even after the attempt to create archivelog fails, this process is not closed.&lt;br /&gt;This will eat up all 'processes' in ASM, so also the DB-process which tries to backup (and delete) the archivelogs can not connect to ASM.&lt;br /&gt;Even if you freed up space in the ASM-DG in the meantime, this problem still persists.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;WorkAround:&lt;/b&gt;&lt;br /&gt;find OS-process of archiver (&lt;span style="font-style: italic;"&gt;ps -ef | grep arc | grep $ORACLE_SID&lt;/span&gt;) and kill this process. this will also release all its childs (which holds processes in ASM) and solve the problem.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Reproduce:&lt;/b&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;fill up your diskGroup&lt;/li&gt;&lt;li&gt;force archiver to respawn a lot of processes (&lt;i&gt;alter system archive log current;&lt;/i&gt;) or wait at least for the factor of the &lt;i&gt;REOPEN&lt;/i&gt; parameter of your &lt;i&gt;log_archive_dest_x&lt;/i&gt; multiplied with &lt;i&gt;PROCESSES&lt;/i&gt; from your &lt;i&gt;ASM&lt;/i&gt;.&lt;/li&gt;&lt;li&gt;check if there are no more ASM-processes available (e.g. a  select name, free_mb from v$asm_diskgroup; will return no rows selected even there are diskgroups available and in use!)&lt;/li&gt;&lt;li&gt;free some space in the DiskGroup&lt;/li&gt;&lt;li&gt;check again if there are ASM-processes available&lt;/li&gt;&lt;li&gt;kill archiver&lt;/li&gt;&lt;li&gt;check again&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;The good newas after all: there is no corruption, just a ugly hang situation.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-1739128597435278806?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/1739128597435278806/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=1739128597435278806' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/1739128597435278806'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/1739128597435278806'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2008/07/shadow-process-leak-on-asm-instance.html' title='Shadow process leak on ASM instance when diskspace exhausted (ORA-20)'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-3402077064338875259</id><published>2008-07-14T09:06:00.005+02:00</published><updated>2008-07-16T09:52:35.927+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='11.1.0.6'/><category scheme='http://www.blogger.com/atom/ns#' term='10.2.0.3'/><category scheme='http://www.blogger.com/atom/ns#' term='compatible.rdbms'/><category scheme='http://www.blogger.com/atom/ns#' term='10.2.0.4'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='ORA-15204'/><category scheme='http://www.blogger.com/atom/ns#' term='ASM'/><title type='text'>10g RDBMS vs. 11g ASM</title><content type='html'>I tried to create a small test-env to compare oracle 10G and 11G.&lt;br /&gt;My setup:&lt;br /&gt;11G ASM (11.1.0.6)&lt;br /&gt;11G DB (11.1.0.6)&lt;br /&gt;10G DB (10.2.0.4)&lt;br /&gt;&lt;br /&gt;Both DBs a re using their own DiskGroup within ASM, called according to their SID.&lt;br /&gt;&lt;br /&gt;now at the 'CREATE DATABASE' i get:&lt;br /&gt;ORA-00200: control file could not be created&lt;br /&gt;ORA-00202: control file: '+TEST10G_DG'&lt;br /&gt;ORA-17502: ksfdcre:4 Failed to create file +TEST10G_DG&lt;br /&gt;ORA-15001: diskgroup "TEST10G_DG" does not exist or is not mounted&lt;br /&gt;&lt;u&gt;ORA-15204: database version &lt;span style="font-weight: bold;"&gt;10.2.0.3.0&lt;/span&gt; is incompatible with diskgroup TEST10G_DG&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;I also checked the &lt;span style="font-weight: bold;"&gt;Known Issues&lt;/span&gt; from &lt;a href="https://metalink.oracle.com/metalink/plsql/f?p=130:3:7837637019378830415::::p3_database_id,p3_docid,p3_show_header,p3_show_help,p3_black_frame,p3_font:NOT,555579.1,1,1,1,helvetica"&gt;&lt;span style="font-family:helvetica;"&gt;&lt;strong&gt;10.2.0.4 Patch Set - Availability and Known Issues&lt;/strong&gt;&lt;/span&gt;&lt;/a&gt;, but with no results.&lt;br /&gt;&lt;br /&gt;Once again, this leads to a new &lt;a href="https://metalink.oracle.com/metalink/plsql/tar_main.single_tar?p_tarNumber=6981490.993&amp;amp;p_show=Show"&gt;ServiceRequest&lt;/a&gt; (only visible for my CSI - sorry).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Reason/Solution:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;dbca &lt;/span&gt;sets '&lt;span style="font-style: italic;"&gt;compatible=10.2.0.3&lt;/span&gt;' in the init.ora it uses to create the DB. this was the source of the problem.&lt;br /&gt;By changing this Value to &lt;span style="font-style: italic;"&gt;10.2.0.4&lt;/span&gt;, everything is fine now.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-3402077064338875259?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/3402077064338875259/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=3402077064338875259' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/3402077064338875259'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/3402077064338875259'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2008/07/10g-rdbms-vs-11g-asm.html' title='10g RDBMS vs. 11g ASM'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-6884906968908182327</id><published>2008-07-11T11:00:00.005+02:00</published><updated>2008-08-28T08:36:14.251+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='11.1.0.6'/><category scheme='http://www.blogger.com/atom/ns#' term='10.2.0.4'/><category scheme='http://www.blogger.com/atom/ns#' term='character device'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='ASM'/><category scheme='http://www.blogger.com/atom/ns#' term='block device'/><title type='text'>ASM doesn't see block devices any longer since 10.2.0.4</title><content type='html'>according to &lt;a href="https://metalink.oracle.com/metalink/plsql/f?p=130:4:96491994003118763::::p4_database_id,p4_docid,p4_show_header,p4_show_help,p4_black_frame,p4_font:BUG,7120987,1,1,1,helvetica"&gt;BUG:&lt;/a&gt;&lt;span style="font-family:helvetica;"&gt;&lt;a href="https://metalink.oracle.com/metalink/plsql/f?p=130:4:96491994003118763::::p4_database_id,p4_docid,p4_show_header,p4_show_help,p4_black_frame,p4_font:BUG,7120987,1,1,1,helvetica"&gt;7120987&lt;/a&gt; - base.&lt;a href="https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_id=6454631&amp;amp;p_database_id=BUG"&gt;BUG:6&lt;/a&gt;&lt;/span&gt;&lt;span style="font-family:helvetica;"&gt;&lt;a href="https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_id=6454631&amp;amp;p_database_id=BUG" target="_parent"&gt;454631&lt;/a&gt; from Version 10.2.0.4 onwards ASM does no longer see any block devices. I also tested and reproduced this in 11.1.0.6. Use character devices instead.&lt;br /&gt;Only on Linux, you can still use block devices.&lt;br /&gt;this doesn't seem to be rated as bug, more a kind of feature. so don't expect this to change back again.&lt;br /&gt;This is also described in &lt;a href="https://metalink.oracle.com/metalink/plsql/f?p=130:3:96491994003118763::::p3_database_id,p3_docid,p3_show_header,p3_show_help,p3_black_frame,p3_font:NOT,601591.1,1,1,1,helvetica"&gt;Note:601591.1&lt;/a&gt; - &lt;span style="font-style: italic;"&gt;After Upgrading to 10.2.0.4 or 11.1.0.6 Unable to discover disks using block devices&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:helvetica;"&gt;&lt;strong&gt;&lt;span style="font-weight: normal;"&gt; and marked as &lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;expected behavior&lt;/span&gt;&lt;span style="font-family:helvetica;"&gt;&lt;strong&gt;&lt;span style="font-weight: normal; font-style: italic;"&gt;&lt;/span&gt;.&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-6884906968908182327?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/6884906968908182327/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=6884906968908182327' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/6884906968908182327'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/6884906968908182327'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2008/07/asm-doesnt-see-block-devices-any-longer.html' title='ASM doesn&apos;t see block devices any longer since 10.2.0.4'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5309604992043123290.post-5962740582638563680</id><published>2008-07-11T09:30:00.004+02:00</published><updated>2008-08-28T08:35:59.656+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='10.2.0.3'/><category scheme='http://www.blogger.com/atom/ns#' term='VIP'/><category scheme='http://www.blogger.com/atom/ns#' term='BUG'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='Solaris'/><category scheme='http://www.blogger.com/atom/ns#' term='RAC'/><title type='text'>Oracle SIB</title><content type='html'>I found an intresting SIB in Oracle clusterware.&lt;br /&gt;Why &lt;span style="font-weight: bold;"&gt;SIB&lt;/span&gt;? IT's not a BUG, it's not a Docu-BUG, nevertheless it's not working and I'm advised to use my WorkAround ( a simple patch to some files). So it must be &lt;span style="font-weight: bold;"&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;S&lt;/span&gt;omething&lt;span style="color: rgb(255, 0, 0);"&gt;I&lt;/span&gt;n&lt;span style="color: rgb(255, 0, 0);"&gt;B&lt;/span&gt;etween&lt;/span&gt;. I wasn't aware Oracle has such a status, but yes, it's there.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Summary:&lt;/span&gt;&lt;br /&gt;On an Oracle- RAC Cluster on Solaris, you can not bring up a VIP on an interface, if you can not reach the default-GW via this interface. (If there is enough traffic on that network, it might or might not work, depending on the traffic during the probe-phase).&lt;br /&gt;&lt;br /&gt;The problem is based on the way oracle checks if the interface is healthy: it first checks the packages in/out on that If, then tries to create some network-traffic using ping -I (Linux) or ping -i (solaris) and checks the packages again. If the numbers differ, it assumes the interface is good.&lt;br /&gt;&lt;br /&gt;Unfortunately the -I  (Linux) and -i (Solaris) differ a little bit:&lt;br /&gt;&lt;br /&gt;Linux:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;-I interface address&lt;/span&gt;&lt;br /&gt;       Set source address to specified interface address. Argument may be numeric IP address or name  of  device.  When  pinging  IPv6 link-local address this option is required.&lt;br /&gt;&lt;br /&gt;Solaris:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;-i interface_address    &lt;/span&gt;&lt;br /&gt;Specify   the   outgoing   interface  address to use for &lt;u&gt;multicast packets&lt;/u&gt; for IPv4 and both multicast and unicast  packets  for IPv6. The default interface  address   for   multicastpackets is determined from the (unicast)        routing         tables.&lt;br /&gt;                      interface_address  can  be a literal IP     address,     for     example, 10.123.100.99, or an interface name, for example, eri0, or  an  interface index, for example 2.&lt;br /&gt;&lt;br /&gt;Links:&lt;br /&gt;my &lt;a href="https://metalink.oracle.com/metalink/plsql/f?p=130:4:96491994003118763::::p4_database_id,p4_docid,p4_show_header,p4_show_help,p4_black_frame,p4_font:BUG,6839000,1,1,1,helvetica"&gt;BUG:&lt;/a&gt;&lt;a href="https://metalink.oracle.com/metalink/plsql/ml2_documents.showFrameDocument?p_database_id=BUG&amp;amp;p_id=6839000" target="new"&gt;6839000&lt;/a&gt; - Status:  Not a Bug. To Filer - Base &lt;a href="https://metalink.oracle.com/metalink/plsql/f?p=130:4:96491994003118763::::p4_database_id,p4_docid,p4_show_header,p4_show_help,p4_black_frame,p4_font:BUG,6332776,1,1,1,helvetica#bottom"&gt;BUG:&lt;/a&gt;&lt;span style="font-family:helvetica;"&gt;&lt;a href="https://metalink.oracle.com/metalink/plsql/f?p=130:4:96491994003118763::::p4_database_id,p4_docid,p4_show_header,p4_show_help,p4_black_frame,p4_font:BUG,6332776,1,1,1,helvetica#bottom"&gt;6332776&lt;/a&gt; - Status: C&lt;/span&gt;&lt;span style="font-family:helvetica;"&gt;losed, Not a Bug&lt;/span&gt;&lt;br /&gt;my &lt;a href="https://metalink.oracle.com/metalink/plsql/f?p=130:3:9490470436688649017::::p3_database_id,p3_docid,p3_show_header,p3_show_help,p3_black_frame,p3_font:NOT,214168.1,1,1,1,helvetica"&gt;enhancement-request&lt;/a&gt;:&lt;a href="https://metalink.oracle.com/metalink/plsql/ml2_documents.showFrameDocument?p_database_id=BUG&amp;amp;p_id=6969925"&gt;6969925&lt;/a&gt;- not published - &lt;a href="https://metalink.oracle.com/help/usaeng/Bugs/bug.html#statuses"&gt;Status-code 15&lt;/a&gt; (&lt;span style="font-style: italic;"&gt;To Internal (Oracle) Review&lt;/span&gt;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5309604992043123290-5962740582638563680?l=berxblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berxblog.blogspot.com/feeds/5962740582638563680/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5309604992043123290&amp;postID=5962740582638563680' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/5962740582638563680'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5309604992043123290/posts/default/5962740582638563680'/><link rel='alternate' type='text/html' href='http://berxblog.blogspot.com/2008/07/oracle-sib.html' title='Oracle SIB'/><author><name>Martin Berger</name><uri>https://profiles.google.com/112207675153334647559</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-ifoe7fpapjo/AAAAAAAAAAI/AAAAAAAAAKk/ZTZdoUic3SA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry></feed>
